[INFO] cloning repository https://github.com/wafuwafu13/trust [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/wafuwafu13/trust" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwafuwafu13%2Ftrust", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwafuwafu13%2Ftrust'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 814781b005a6345bb5321ddee9d070a026af4fd7 [INFO] checking wafuwafu13/trust against master#17ffbc81a30c094193836a5d7f90dff273b5df93 for pr-138785 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fwafuwafu13%2Ftrust" "/workspace/builds/worker-3-tc2/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-3-tc2/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/wafuwafu13/trust on toolchain 17ffbc81a30c094193836a5d7f90dff273b5df93 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/wafuwafu13/trust [INFO] finished tweaking git repo https://github.com/wafuwafu13/trust [INFO] tweaked toml for git repo https://github.com/wafuwafu13/trust written to /workspace/builds/worker-3-tc2/source/Cargo.toml [INFO] crate git repo https://github.com/wafuwafu13/trust 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" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded scoped-tls v0.1.2 [INFO] [stderr] Downloaded tun-tap v0.1.2 [INFO] [stderr] Downloaded crossbeam-deque v0.7.4 [INFO] [stderr] Downloaded etherparse v0.8.3 [INFO] [stderr] Downloaded tokio-core v0.1.18 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] aebf7682bfef4855ee76f84258c50fbc3b66145592edba07c7a02950f154bf03 [INFO] running `Command { std: "docker" "start" "-a" "aebf7682bfef4855ee76f84258c50fbc3b66145592edba07c7a02950f154bf03", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "aebf7682bfef4855ee76f84258c50fbc3b66145592edba07c7a02950f154bf03", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "aebf7682bfef4855ee76f84258c50fbc3b66145592edba07c7a02950f154bf03", kill_on_drop: false }` [INFO] [stdout] aebf7682bfef4855ee76f84258c50fbc3b66145592edba07c7a02950f154bf03 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-3-tc2/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:b0b074c097205a61b89e8ad263052f976b2b332c4dc5f02aef1fe52501660d6e" "/opt/rustwide/cargo-home/bin/cargo" "+17ffbc81a30c094193836a5d7f90dff273b5df93" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 4788ee15c4c04026372b6f8a4486c13e9ac26ab19961ff053362ef1a8abd4608 [INFO] running `Command { std: "docker" "start" "-a" "4788ee15c4c04026372b6f8a4486c13e9ac26ab19961ff053362ef1a8abd4608", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.126 [INFO] [stderr] Compiling crossbeam-utils v0.7.2 [INFO] [stderr] Compiling log v0.4.17 [INFO] [stderr] Checking futures v0.1.31 [INFO] [stderr] Checking byteorder v1.4.3 [INFO] [stderr] Checking slab v0.4.6 [INFO] [stderr] Checking smallvec v0.6.14 [INFO] [stderr] Compiling memoffset v0.5.6 [INFO] [stderr] Checking lock_api v0.3.4 [INFO] [stderr] Compiling crossbeam-epoch v0.8.2 [INFO] [stderr] Compiling cc v1.0.73 [INFO] [stderr] Checking scoped-tls v0.1.2 [INFO] [stderr] Checking etherparse v0.8.3 [INFO] [stderr] Checking crossbeam-queue v0.2.3 [INFO] [stderr] Compiling tun-tap v0.1.2 [INFO] [stderr] Checking crossbeam-deque v0.7.4 [INFO] [stderr] Checking iovec v0.1.4 [INFO] [stderr] Checking net2 v0.2.37 [INFO] [stderr] Checking num_cpus v1.13.1 [INFO] [stderr] Checking parking_lot_core v0.6.2 [INFO] [stderr] Checking bytes v0.4.12 [INFO] [stderr] Checking tokio-executor v0.1.10 [INFO] [stderr] Checking tokio-sync v0.1.8 [INFO] [stderr] Checking parking_lot v0.9.0 [INFO] [stderr] Checking mio v0.6.23 [INFO] [stderr] Checking tokio-threadpool v0.1.18 [INFO] [stderr] Checking tokio-timer v0.2.13 [INFO] [stderr] Checking tokio-current-thread v0.1.7 [INFO] [stderr] Checking tokio-io v0.1.13 [INFO] [stderr] Checking mio-uds v0.6.8 [INFO] [stderr] Checking tokio-reactor v0.1.12 [INFO] [stderr] Checking tokio-codec v0.1.2 [INFO] [stderr] Checking tokio-fs v0.1.7 [INFO] [stderr] Checking tokio-uds v0.2.7 [INFO] [stderr] Checking tokio-tcp v0.1.4 [INFO] [stderr] Checking tokio-udp v0.1.6 [INFO] [stderr] Checking tokio v0.1.22 [INFO] [stderr] Checking tokio-core v0.1.18 [INFO] [stderr] Checking trust v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/tcp.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn accept<'a>( [INFO] [stdout] | ------ this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 136 | self.tcp.syn = true; [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 85 | &self, nic: &mut tun_tap::Iface, [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/tcp.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn accept<'a>( [INFO] [stdout] | ------ this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 137 | self.tcp.ack = true; [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 85 | &self, nic: &mut tun_tap::Iface, [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `unwitten` in this scope [INFO] [stdout] --> src/tcp.rs:164:24 [INFO] [stdout] | [INFO] [stdout] 164 | let unwitten = unwitten.len(); [INFO] [stdout] | ^^^^^^^^ help: a local variable with a similar name exists: `unwritten` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `bufi` in this scope [INFO] [stdout] --> src/tcp.rs:175:19 [INFO] [stdout] | [INFO] [stdout] 175 | nic.send(&bufi[..buf.len() - unwritten])?; [INFO] [stdout] | ^^^^ help: a local variable with a similar name exists: `buf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/tcp.rs:136:9 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn accept<'a>( [INFO] [stdout] | ------ this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 136 | self.tcp.syn = true; [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 85 | &self, nic: &mut tun_tap::Iface, [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0424]: expected value, found module `self` [INFO] [stdout] --> src/tcp.rs:137:9 [INFO] [stdout] | [INFO] [stdout] 84 | pub fn accept<'a>( [INFO] [stdout] | ------ this function doesn't have a `self` parameter [INFO] [stdout] ... [INFO] [stdout] 137 | self.tcp.ack = true; [INFO] [stdout] | ^^^^ `self` value is a keyword only available in methods with a `self` parameter [INFO] [stdout] | [INFO] [stdout] help: add a `self` receiver parameter to make the associated `fn` a method [INFO] [stdout] | [INFO] [stdout] 85 | &self, nic: &mut tun_tap::Iface, [INFO] [stdout] | ++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `unwitten` in this scope [INFO] [stdout] --> src/tcp.rs:164:24 [INFO] [stdout] | [INFO] [stdout] 164 | let unwitten = unwitten.len(); [INFO] [stdout] | ^^^^^^^^ help: a local variable with a similar name exists: `unwritten` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `bufi` in this scope [INFO] [stdout] --> src/tcp.rs:175:19 [INFO] [stdout] | [INFO] [stdout] 175 | nic.send(&bufi[..buf.len() - unwritten])?; [INFO] [stdout] | ^^^^ help: a local variable with a similar name exists: `buf` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `usize` to `u16` [INFO] [stdout] --> src/tcp.rs:149:35 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^ no implementation for `u16 + usize` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add` is not implemented for `u16` [INFO] [stdout] = help: the following other types implement trait `Add`: [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `u16` implements `Add<&u16>` [INFO] [stdout] `u16` implements `Add` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:69 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^ expected `u16`, found `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `usize` to `u16` [INFO] [stdout] --> src/tcp.rs:149:67 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^ no implementation for `u16 + usize` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add` is not implemented for `u16` [INFO] [stdout] = help: the following other types implement trait `Add`: [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `u16` implements `Add<&u16>` [INFO] [stdout] `u16` implements `Add` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 147 | let size = std::cmp::min( [INFO] [stdout] | ------------- arguments to this function are incorrect [INFO] [stdout] 148 | buf.len(), [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u16` [INFO] [stdout] | [INFO] [stdout] help: the return type of this call is `u16` due to the type of the argument passed [INFO] [stdout] --> src/tcp.rs:147:20 [INFO] [stdout] | [INFO] [stdout] 147 | let size = std::cmp::min( [INFO] [stdout] | ____________________^ [INFO] [stdout] 148 | | buf.len(), [INFO] [stdout] 149 | | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | | --------------------------------------------------------------------- this argument influences the return type of `min` [INFO] [stdout] 150 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] note: function defined here [INFO] [stdout] --> /rustc/17ffbc81a30c094193836a5d7f90dff273b5df93/library/core/src/cmp.rs:1547:8 [INFO] [stdout] help: you can convert a `u16` to a `usize` [INFO] [stdout] | [INFO] [stdout] 149 | (self.tcp.header_len() + self.ip.header_len() as usize + payload.len()).into(), [INFO] [stdout] | + ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot subtract `&mut [u8]` from `usize` [INFO] [stdout] --> src/tcp.rs:175:36 [INFO] [stdout] | [INFO] [stdout] 175 | nic.send(&bufi[..buf.len() - unwritten])?; [INFO] [stdout] | ^ no implementation for `usize - &mut [u8]` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sub<&mut [u8]>` is not implemented for `usize` [INFO] [stdout] = help: the following other types implement trait `Sub`: [INFO] [stdout] `&usize` implements `Sub` [INFO] [stdout] `&usize` implements `Sub` [INFO] [stdout] `usize` implements `Sub<&usize>` [INFO] [stdout] `usize` implements `Sub` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:142:70 [INFO] [stdout] | [INFO] [stdout] 142 | fn write(&mut self, nic: &mut tun_tap::Iface, payload: &[u8]) -> io::Result { [INFO] [stdout] | ----- ^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 176 | Ok(payload_bytes); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:179:61 [INFO] [stdout] | [INFO] [stdout] 179 | fn send_rst<'a>(&mut self, nic: &mut tun_tap::Iface) -> io::Result<()> { [INFO] [stdout] | -------- ^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 199 | Ok(()); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:208:10 [INFO] [stdout] | [INFO] [stdout] 202 | pub fn on_packet<'a>( [INFO] [stdout] | --------- implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 208 | ) -> io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `()` [INFO] [stdout] ... [INFO] [stdout] 314 | Ok(()); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:320:21 [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(x) { [INFO] [stdout] | --- ^ expected `&u32`, found `u32` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/17ffbc81a30c094193836a5d7f90dff273b5df93/library/core/src/cmp.rs:975:8 [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(&x) { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `match` arms have incompatible types [INFO] [stdout] --> src/tcp.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(x) { [INFO] [stdout] | ------------------ `match` arms have incompatible types [INFO] [stdout] 321 | Ordering::Equal => false, [INFO] [stdout] | ----- this is found to be of type `bool` [INFO] [stdout] ... [INFO] [stdout] 344 | / if end >= start && end <= x { [INFO] [stdout] 345 | | return false; [INFO] [stdout] 346 | | } [INFO] [stdout] | |_____________^ expected `bool`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:37 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `u16`, found `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 17 | / loop { [INFO] [stdout] 18 | | let nbytes = nic.recv(&mut buf[..])?; [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 73 | Ok(()) [INFO] [stdout] | ^^^^^^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `usize` to `u16` [INFO] [stdout] --> src/tcp.rs:149:35 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^ no implementation for `u16 + usize` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add` is not implemented for `u16` [INFO] [stdout] = help: the following other types implement trait `Add`: [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `u16` implements `Add<&u16>` [INFO] [stdout] `u16` implements `Add` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:69 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^ expected `u16`, found `usize` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add `usize` to `u16` [INFO] [stdout] --> src/tcp.rs:149:67 [INFO] [stdout] | [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^ no implementation for `u16 + usize` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add` is not implemented for `u16` [INFO] [stdout] = help: the following other types implement trait `Add`: [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `&u16` implements `Add` [INFO] [stdout] `u16` implements `Add<&u16>` [INFO] [stdout] `u16` implements `Add` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/tcp.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0004]: non-exhaustive patterns: `State::Closed` and `State::Listen` not covered [INFO] [stdout] --> src/tcp.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | match *self { [INFO] [stdout] | ^^^^^ patterns `State::Closed` and `State::Listen` not covered [INFO] [stdout] | [INFO] [stdout] note: `State` defined here [INFO] [stdout] --> src/tcp.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] 5 | Closed, [INFO] [stdout] | ------ not covered [INFO] [stdout] 6 | Listen, [INFO] [stdout] | ------ not covered [INFO] [stdout] = note: the matched value is of type `State` [INFO] [stdout] help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms [INFO] [stdout] | [INFO] [stdout] 18 ~ State::Estab | State::FinWait1 | State::FinWait2 | State::Closing => true, [INFO] [stdout] 19 ~ State::Closed | State::Listen => todo!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:51:43 [INFO] [stdout] | [INFO] [stdout] 51 | ... Entry::Vacant(mut e) => { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0004, E0277, E0308, E0424, E0425. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0004`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:149:13 [INFO] [stdout] | [INFO] [stdout] 147 | let size = std::cmp::min( [INFO] [stdout] | ------------- arguments to this function are incorrect [INFO] [stdout] 148 | buf.len(), [INFO] [stdout] 149 | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `usize`, found `u16` [INFO] [stdout] | [INFO] [stdout] help: the return type of this call is `u16` due to the type of the argument passed [INFO] [stdout] --> src/tcp.rs:147:20 [INFO] [stdout] | [INFO] [stdout] 147 | let size = std::cmp::min( [INFO] [stdout] | ____________________^ [INFO] [stdout] 148 | | buf.len(), [INFO] [stdout] 149 | | self.tcp.header_len() + self.ip.header_len() as usize + payload.len(), [INFO] [stdout] | | --------------------------------------------------------------------- this argument influences the return type of `min` [INFO] [stdout] 150 | | ); [INFO] [stdout] | |_________^ [INFO] [stdout] note: function defined here [INFO] [stdout] --> /rustc/17ffbc81a30c094193836a5d7f90dff273b5df93/library/core/src/cmp.rs:1547:8 [INFO] [stdout] help: you can convert a `u16` to a `usize` [INFO] [stdout] | [INFO] [stdout] 149 | (self.tcp.header_len() + self.ip.header_len() as usize + payload.len()).into(), [INFO] [stdout] | + ++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot subtract `&mut [u8]` from `usize` [INFO] [stdout] --> src/tcp.rs:175:36 [INFO] [stdout] | [INFO] [stdout] 175 | nic.send(&bufi[..buf.len() - unwritten])?; [INFO] [stdout] | ^ no implementation for `usize - &mut [u8]` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Sub<&mut [u8]>` is not implemented for `usize` [INFO] [stdout] = help: the following other types implement trait `Sub`: [INFO] [stdout] `&usize` implements `Sub` [INFO] [stdout] `&usize` implements `Sub` [INFO] [stdout] `usize` implements `Sub<&usize>` [INFO] [stdout] `usize` implements `Sub` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:142:70 [INFO] [stdout] | [INFO] [stdout] 142 | fn write(&mut self, nic: &mut tun_tap::Iface, payload: &[u8]) -> io::Result { [INFO] [stdout] | ----- ^^^^^^^^^^^^^^^^^ expected `Result`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 176 | Ok(payload_bytes); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:179:61 [INFO] [stdout] | [INFO] [stdout] 179 | fn send_rst<'a>(&mut self, nic: &mut tun_tap::Iface) -> io::Result<()> { [INFO] [stdout] | -------- ^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 199 | Ok(()); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:208:10 [INFO] [stdout] | [INFO] [stdout] 202 | pub fn on_packet<'a>( [INFO] [stdout] | --------- implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] ... [INFO] [stdout] 208 | ) -> io::Result<()> { [INFO] [stdout] | ^^^^^^^^^^^^^^ expected `Result<(), Error>`, found `()` [INFO] [stdout] ... [INFO] [stdout] 314 | Ok(()); [INFO] [stdout] | - help: remove this semicolon to return this value [INFO] [stdout] | [INFO] [stdout] = note: expected enum `Result<(), std::io::Error>` [INFO] [stdout] found unit type `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/tcp.rs:320:21 [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(x) { [INFO] [stdout] | --- ^ expected `&u32`, found `u32` [INFO] [stdout] | | [INFO] [stdout] | arguments to this method are incorrect [INFO] [stdout] | [INFO] [stdout] note: method defined here [INFO] [stdout] --> /rustc/17ffbc81a30c094193836a5d7f90dff273b5df93/library/core/src/cmp.rs:975:8 [INFO] [stdout] help: consider borrowing here [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(&x) { [INFO] [stdout] | + [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `match` arms have incompatible types [INFO] [stdout] --> src/tcp.rs:344:13 [INFO] [stdout] | [INFO] [stdout] 320 | match start.cmp(x) { [INFO] [stdout] | ------------------ `match` arms have incompatible types [INFO] [stdout] 321 | Ordering::Equal => false, [INFO] [stdout] | ----- this is found to be of type `bool` [INFO] [stdout] ... [INFO] [stdout] 344 | / if end >= start && end <= x { [INFO] [stdout] 345 | | return false; [INFO] [stdout] 346 | | } [INFO] [stdout] | |_____________^ expected `bool`, found `()` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `trust` (bin "trust") due to 16 previous errors; 4 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: unreachable expression [INFO] [stdout] --> src/main.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 17 | / loop { [INFO] [stdout] 18 | | let nbytes = nic.recv(&mut buf[..])?; [INFO] [stdout] ... | [INFO] [stdout] 72 | | } [INFO] [stdout] | |_____- any code following this expression is unreachable [INFO] [stdout] 73 | Ok(()) [INFO] [stdout] | ^^^^^^ unreachable expression [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unreachable_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::prelude` [INFO] [stdout] --> src/tcp.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use std::io::prelude::*; [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0004]: non-exhaustive patterns: `State::Closed` and `State::Listen` not covered [INFO] [stdout] --> src/tcp.rs:16:15 [INFO] [stdout] | [INFO] [stdout] 16 | match *self { [INFO] [stdout] | ^^^^^ patterns `State::Closed` and `State::Listen` not covered [INFO] [stdout] | [INFO] [stdout] note: `State` defined here [INFO] [stdout] --> src/tcp.rs:4:10 [INFO] [stdout] | [INFO] [stdout] 4 | pub enum State { [INFO] [stdout] | ^^^^^ [INFO] [stdout] 5 | Closed, [INFO] [stdout] | ------ not covered [INFO] [stdout] 6 | Listen, [INFO] [stdout] | ------ not covered [INFO] [stdout] = note: the matched value is of type `State` [INFO] [stdout] help: ensure that all possible cases are being handled by adding a match arm with a wildcard pattern, a match arm with multiple or-patterns as shown, or multiple match arms [INFO] [stdout] | [INFO] [stdout] 18 ~ State::Estab | State::FinWait1 | State::FinWait2 | State::Closing => true, [INFO] [stdout] 19 ~ State::Closed | State::Listen => todo!(), [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> src/main.rs:68:17 [INFO] [stdout] | [INFO] [stdout] 68 | Err(e) => { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_e` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: variable does not need to be mutable [INFO] [stdout] --> src/main.rs:51:43 [INFO] [stdout] | [INFO] [stdout] 51 | ... Entry::Vacant(mut e) => { [INFO] [stdout] | ----^ [INFO] [stdout] | | [INFO] [stdout] | help: remove this `mut` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_mut)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0004, E0277, E0308, E0424, E0425. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0004`. [INFO] [stdout] [INFO] [stderr] error: could not compile `trust` (bin "trust" test) due to 16 previous errors; 4 warnings emitted [INFO] running `Command { std: "docker" "inspect" "4788ee15c4c04026372b6f8a4486c13e9ac26ab19961ff053362ef1a8abd4608", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "4788ee15c4c04026372b6f8a4486c13e9ac26ab19961ff053362ef1a8abd4608", kill_on_drop: false }` [INFO] [stdout] 4788ee15c4c04026372b6f8a4486c13e9ac26ab19961ff053362ef1a8abd4608