[INFO] cloning repository https://github.com/TheLamplighter/dh-basic [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/TheLamplighter/dh-basic" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTheLamplighter%2Fdh-basic", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTheLamplighter%2Fdh-basic'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 929a647287ab78ca0a7f31a8b63f46f8ad306b7a [INFO] testing TheLamplighter/dh-basic against master#cdb45c87e2cd43495379f7e867e3cc15dcee9f93 for pr-145838-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FTheLamplighter%2Fdh-basic" "/workspace/builds/worker-1-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-1-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/TheLamplighter/dh-basic [INFO] finished tweaking git repo https://github.com/TheLamplighter/dh-basic [INFO] tweaked toml for git repo https://github.com/TheLamplighter/dh-basic written to /workspace/builds/worker-1-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/TheLamplighter/dh-basic on toolchain cdb45c87e2cd43495379f7e867e3cc15dcee9f93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/TheLamplighter/dh-basic already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] dacdf6117f9435b1f26ae35149e08d809116d6373ef9d6ce9c5a533c71f459d1 [INFO] running `Command { std: "docker" "start" "-a" "dacdf6117f9435b1f26ae35149e08d809116d6373ef9d6ce9c5a533c71f459d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "dacdf6117f9435b1f26ae35149e08d809116d6373ef9d6ce9c5a533c71f459d1", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "dacdf6117f9435b1f26ae35149e08d809116d6373ef9d6ce9c5a533c71f459d1", kill_on_drop: false }` [INFO] [stdout] dacdf6117f9435b1f26ae35149e08d809116d6373ef9d6ce9c5a533c71f459d1 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc1/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:7ad1b28ee6f5f7f699f6cf7015098d6ccdd96d6f2d78dd06228f5b4c9faf309c" "/opt/rustwide/cargo-home/bin/cargo" "+cdb45c87e2cd43495379f7e867e3cc15dcee9f93" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] fe2227ecfbde31bb99545fa24f3412aeb782d8d1fee29d43d366629a650aa05a [INFO] running `Command { std: "docker" "start" "-a" "fe2227ecfbde31bb99545fa24f3412aeb782d8d1fee29d43d366629a650aa05a", kill_on_drop: false }` [INFO] [stderr] Compiling autocfg v1.4.0 [INFO] [stderr] Compiling libc v0.2.171 [INFO] [stderr] Compiling getrandom v0.3.2 [INFO] [stderr] Compiling zerocopy v0.8.24 [INFO] [stderr] Compiling num-traits v0.2.19 [INFO] [stderr] Compiling num-integer v0.1.46 [INFO] [stderr] Compiling num-complex v0.4.6 [INFO] [stderr] Compiling rand_core v0.9.3 [INFO] [stderr] Compiling num-bigint v0.4.6 [INFO] [stderr] Compiling num-iter v0.1.45 [INFO] [stderr] Compiling ppv-lite86 v0.2.21 [INFO] [stderr] Compiling rand_chacha v0.9.0 [INFO] [stderr] Compiling rand v0.9.0 [INFO] [stderr] Compiling num-rational v0.4.2 [INFO] [stderr] Compiling num v0.4.3 [INFO] [stderr] Compiling dh-basic v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0425]: cannot find value `modulo` in this scope [INFO] [stdout] --> src/main.rs:25:32 [INFO] [stdout] | [INFO] [stdout] 25 | let public = (base^secret)%modulo; [INFO] [stdout] | ^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unnecessary parentheses around `if` condition [INFO] [stdout] --> src/main.rs:17:7 [INFO] [stdout] | [INFO] [stdout] 17 | if(alice_final == bob_final){ [INFO] [stdout] | ^ ^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_parens)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] help: remove these parentheses [INFO] [stdout] | [INFO] [stdout] 17 - if(alice_final == bob_final){ [INFO] [stdout] 17 + if alice_final == bob_final { [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:5:26 [INFO] [stdout] | [INFO] [stdout] 5 | let prime: BigUint = 51521; [INFO] [stdout] | ------- ^^^^^ expected `BigUint`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:6:25 [INFO] [stdout] | [INFO] [stdout] 6 | let base: BigUint = 31; [INFO] [stdout] | ------- ^^ expected `BigUint`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected due to this [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:24:73 [INFO] [stdout] | [INFO] [stdout] 24 | fn gen_public_key(prime: &BigUint, base: &BigUint, secret: &BigUint) -> BigUint{ [INFO] [stdout] | -------------- ^^^^^^^ expected `BigUint`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] | [INFO] [stdout] help: consider returning the local binding `public` [INFO] [stdout] | [INFO] [stdout] 25 ~ let public = (base^secret)%modulo; [INFO] [stdout] 26 + public [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:31:14 [INFO] [stdout] | [INFO] [stdout] 29 | let result: BigUint; [INFO] [stdout] | ------- expected due to this type [INFO] [stdout] 30 | [INFO] [stdout] 31 | result = (random_range(11..(prime-1))).to_biguint(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `BigUint`, found `Option` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `BigUint` [INFO] [stdout] found enum `Option` [INFO] [stdout] help: consider using `Option::expect` to unwrap the `Option` value, panicking if the value is an `Option::None` [INFO] [stdout] | [INFO] [stdout] 31 | result = (random_range(11..(prime-1))).to_biguint().expect("REASON"); [INFO] [stdout] | +++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:33:23 [INFO] [stdout] | [INFO] [stdout] 33 | assert!((result > 1) && (result < prime)); [INFO] [stdout] | ------ ^ expected `BigUint`, found integer [INFO] [stdout] | | [INFO] [stdout] | expected because this is `BigUint` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/main.rs:33:39 [INFO] [stdout] | [INFO] [stdout] 33 | assert!((result > 1) && (result < prime)); [INFO] [stdout] | ------ ^^^^^ expected `BigUint`, found `&BigUint` [INFO] [stdout] | | [INFO] [stdout] | expected because this is `BigUint` [INFO] [stdout] | [INFO] [stdout] help: consider dereferencing the borrow [INFO] [stdout] | [INFO] [stdout] 33 | assert!((result > 1) && (result < *prime)); [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `g` [INFO] [stdout] --> src/main.rs:40:29 [INFO] [stdout] | [INFO] [stdout] 40 | fn is_primitive_root_modulo(g:&BigUint, n:&BigUint) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_g` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `n` [INFO] [stdout] --> src/main.rs:40:41 [INFO] [stdout] | [INFO] [stdout] 40 | fn is_primitive_root_modulo(g:&BigUint, n:&BigUint) -> bool { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_n` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0425. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: could not compile `dh-basic` (bin "dh-basic") due to 7 previous errors; 3 warnings emitted [INFO] running `Command { std: "docker" "inspect" "fe2227ecfbde31bb99545fa24f3412aeb782d8d1fee29d43d366629a650aa05a", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "fe2227ecfbde31bb99545fa24f3412aeb782d8d1fee29d43d366629a650aa05a", kill_on_drop: false }` [INFO] [stdout] fe2227ecfbde31bb99545fa24f3412aeb782d8d1fee29d43d366629a650aa05a