[INFO] cloning repository https://github.com/mreboland/rustTraitsGenerics [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/mreboland/rustTraitsGenerics" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmreboland%2FrustTraitsGenerics", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmreboland%2FrustTraitsGenerics'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 484201f2259c78579a7943dcb8b1f1d9a3632acd [INFO] checking mreboland/rustTraitsGenerics against master#8c32e313cccf7df531e2d49ffb8227bb92304aee for pr-145608-1 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2Fmreboland%2FrustTraitsGenerics" "/workspace/builds/worker-4-tc1/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-4-tc1/source'... [INFO] [stderr] done. [INFO] started tweaking git repo https://github.com/mreboland/rustTraitsGenerics [INFO] finished tweaking git repo https://github.com/mreboland/rustTraitsGenerics [INFO] tweaked toml for git repo https://github.com/mreboland/rustTraitsGenerics written to /workspace/builds/worker-4-tc1/source/Cargo.toml [INFO] validating manifest of git repo https://github.com/mreboland/rustTraitsGenerics on toolchain 8c32e313cccf7df531e2d49ffb8227bb92304aee [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate git repo https://github.com/mreboland/rustTraitsGenerics 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" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "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] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] b10dae968f4dae2792bc8c16bedb5d345b8fddd811f6b6d014b1b7ea43b3b267 [INFO] running `Command { std: "docker" "start" "-a" "b10dae968f4dae2792bc8c16bedb5d345b8fddd811f6b6d014b1b7ea43b3b267", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "b10dae968f4dae2792bc8c16bedb5d345b8fddd811f6b6d014b1b7ea43b3b267", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b10dae968f4dae2792bc8c16bedb5d345b8fddd811f6b6d014b1b7ea43b3b267", kill_on_drop: false }` [INFO] [stdout] b10dae968f4dae2792bc8c16bedb5d345b8fddd811f6b6d014b1b7ea43b3b267 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-tc1/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-4-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" "+8c32e313cccf7df531e2d49ffb8227bb92304aee" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c0f9b36378bedaaf9bca45b88c778e5dadaf1e441c945e587af50a67b6254c9c [INFO] running `Command { std: "docker" "start" "-a" "c0f9b36378bedaaf9bca45b88c778e5dadaf1e441c945e587af50a67b6254c9c", kill_on_drop: false }` [INFO] [stderr] Checking traits_generics v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: unexpected token: `...` [INFO] [stdout] --> src/main.rs:21:61 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] help: use `..` for an exclusive range [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { .. } [INFO] [stdout] | [INFO] [stdout] help: or `..=` for an inclusive range [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { ..= } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0586]: inclusive range with no end [INFO] [stdout] --> src/main.rs:21:61 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) [INFO] [stdout] help: use `..` instead [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: non-item in item list [INFO] [stdout] --> src/main.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | - item list starts here [INFO] [stdout] ... [INFO] [stdout] 22 | ... [INFO] [stdout] | ^^^ non-item starts here [INFO] [stdout] 23 | } [INFO] [stdout] | - item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: range-to patterns with `...` are not allowed [INFO] [stdout] --> src/main.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | let mut... [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] help: use `..=` instead [INFO] [stdout] | [INFO] [stdout] 82 - let mut... [INFO] [stdout] 82 + let mut..= [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: `mut` must be followed by a named binding [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut... [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `mut` may be followed by `variable` and `variable @ pattern` [INFO] [stdout] help: remove the `mut` prefix [INFO] [stdout] | [INFO] [stdout] 82 - let mut... [INFO] [stdout] 82 + let ... [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected a pattern range bound, found an expression [INFO] [stdout] --> src/main.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | buf.write... [INFO] [stdout] | ^^^^^^^^^ not a pattern [INFO] [stdout] | [INFO] [stdout] = note: arbitrary expressions are not allowed in patterns: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `(`, `.`, `::`, `:`, `;`, `=`, `?`, `|`, or an operator, found `...` [INFO] [stdout] --> src/main.rs:83:14 [INFO] [stdout] | [INFO] [stdout] 83 | buf.write... [INFO] [stdout] | ^^^ expected one of 9 possible tokens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: unexpected token: `...` [INFO] [stdout] --> src/main.rs:21:61 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] help: use `..` for an exclusive range [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { .. } [INFO] [stdout] | [INFO] [stdout] help: or `..=` for an inclusive range [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { ..= } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0586]: inclusive range with no end [INFO] [stdout] --> src/main.rs:21:61 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) [INFO] [stdout] help: use `..` instead [INFO] [stdout] | [INFO] [stdout] 21 - fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] 21 + fn write_all(&mut self, buf: &[u8]) -> Result<()> { .. } [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: non-item in item list [INFO] [stdout] --> src/main.rs:22:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | - item list starts here [INFO] [stdout] ... [INFO] [stdout] 22 | ... [INFO] [stdout] | ^^^ non-item starts here [INFO] [stdout] 23 | } [INFO] [stdout] | - item list ends here [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: range-to patterns with `...` are not allowed [INFO] [stdout] --> src/main.rs:82:12 [INFO] [stdout] | [INFO] [stdout] 82 | let mut... [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] help: use `..=` instead [INFO] [stdout] | [INFO] [stdout] 82 - let mut... [INFO] [stdout] 82 + let mut..= [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: `mut` must be followed by a named binding [INFO] [stdout] --> src/main.rs:82:9 [INFO] [stdout] | [INFO] [stdout] 82 | let mut... [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = note: `mut` may be followed by `variable` and `variable @ pattern` [INFO] [stdout] help: remove the `mut` prefix [INFO] [stdout] | [INFO] [stdout] 82 - let mut... [INFO] [stdout] 82 + let ... [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected a pattern range bound, found an expression [INFO] [stdout] --> src/main.rs:83:5 [INFO] [stdout] | [INFO] [stdout] 83 | buf.write... [INFO] [stdout] | ^^^^^^^^^ not a pattern [INFO] [stdout] | [INFO] [stdout] = note: arbitrary expressions are not allowed in patterns: [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected one of `(`, `.`, `::`, `:`, `;`, `=`, `?`, `|`, or an operator, found `...` [INFO] [stdout] --> src/main.rs:83:14 [INFO] [stdout] | [INFO] [stdout] 83 | buf.write... [INFO] [stdout] | ^^^ expected one of 9 possible tokens [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0255]: the name `Write` is defined multiple times [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ----------- previous definition of the trait `Write` here [INFO] [stdout] ... [INFO] [stdout] 28 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ `Write` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Write` must be defined only once in the type namespace of this block [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 28 | use std::io::Write as OtherWrite; [INFO] [stdout] | +++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0255]: the name `Write` is defined multiple times [INFO] [stdout] --> src/main.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ----------- previous definition of the trait `Write` here [INFO] [stdout] ... [INFO] [stdout] 80 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ `Write` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Write` must be defined only once in the type namespace of this block [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 80 | use std::io::Write as OtherWrite; [INFO] [stdout] | +++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0255]: the name `Write` is defined multiple times [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ----------- previous definition of the trait `Write` here [INFO] [stdout] ... [INFO] [stdout] 28 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ `Write` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Write` must be defined only once in the type namespace of this block [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 28 | use std::io::Write as OtherWrite; [INFO] [stdout] | +++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/main.rs:30:28 [INFO] [stdout] | [INFO] [stdout] 30 | fn say_hello(out: &mut Write) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 30 | fn say_hello(out: &mut dyn Write) -> std::io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0255]: the name `Write` is defined multiple times [INFO] [stdout] --> src/main.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ----------- previous definition of the trait `Write` here [INFO] [stdout] ... [INFO] [stdout] 80 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ `Write` reimported here [INFO] [stdout] | [INFO] [stdout] = note: `Write` must be defined only once in the type namespace of this block [INFO] [stdout] help: you can use `as` to change the binding name of the import [INFO] [stdout] | [INFO] [stdout] 80 | use std::io::Write as OtherWrite; [INFO] [stdout] | +++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:28:9 [INFO] [stdout] | [INFO] [stdout] 28 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::io::Write` [INFO] [stdout] --> src/main.rs:80:9 [INFO] [stdout] | [INFO] [stdout] 80 | use std::io::Write; [INFO] [stdout] | ^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> src/main.rs:30:28 [INFO] [stdout] | [INFO] [stdout] 30 | fn say_hello(out: &mut Write) -> std::io::Result<()> { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = warning: this is accepted in the current edition (Rust 2018) but is a hard error in Rust 2021! [INFO] [stdout] = note: for more information, see [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` on by default [INFO] [stdout] help: if this is a dyn-compatible trait, use `dyn` [INFO] [stdout] | [INFO] [stdout] 30 | fn say_hello(out: &mut dyn Write) -> std::io::Result<()> { [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:18:44 [INFO] [stdout] | [INFO] [stdout] 18 | fn write(&mut self, buf: &[u8]) -> Result; [INFO] [stdout] | ^^^^^^ ----- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 18 | fn write(&mut self, buf: &[u8]) -> Result; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | fn flush(&mut self) -> Result<()>; [INFO] [stdout] | ^^^^^^ -- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 19 | fn flush(&mut self) -> Result<(), E>; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:18:44 [INFO] [stdout] | [INFO] [stdout] 18 | fn write(&mut self, buf: &[u8]) -> Result; [INFO] [stdout] | ^^^^^^ ----- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 18 | fn write(&mut self, buf: &[u8]) -> Result; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:19:32 [INFO] [stdout] | [INFO] [stdout] 19 | fn flush(&mut self) -> Result<()>; [INFO] [stdout] | ^^^^^^ -- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 19 | fn flush(&mut self) -> Result<(), E>; [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:21:48 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^^^^ -- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<(), E> { ... } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0107]: enum takes 2 generic arguments but 1 generic argument was supplied [INFO] [stdout] --> src/main.rs:21:48 [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<()> { ... } [INFO] [stdout] | ^^^^^^ -- supplied 1 generic argument [INFO] [stdout] | | [INFO] [stdout] | expected 2 generic arguments [INFO] [stdout] | [INFO] [stdout] help: add missing generic argument [INFO] [stdout] | [INFO] [stdout] 21 | fn write_all(&mut self, buf: &[u8]) -> Result<(), E> { ... } [INFO] [stdout] | +++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:38:51 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 38 | let mut local_file = File::create("hello.txt")?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:38:51 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 38 | let mut local_file = File::create("hello.txt")?; [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `File: main::Write` is not satisfied [INFO] [stdout] --> src/main.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | say_hello(&mut local_file)?; // works [INFO] [stdout] | ^^^^^^^^^^^^^^^ the trait `main::Write` is not implemented for `File` [INFO] [stdout] | [INFO] [stdout] help: this trait has no implementations, consider adding one [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: required for the cast from `&mut File` to `&mut dyn main::Write` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `File: main::Write` is not satisfied [INFO] [stdout] --> src/main.rs:39:15 [INFO] [stdout] | [INFO] [stdout] 39 | say_hello(&mut local_file)?; // works [INFO] [stdout] | ^^^^^^^^^^^^^^^ the trait `main::Write` is not implemented for `File` [INFO] [stdout] | [INFO] [stdout] help: this trait has no implementations, consider adding one [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: required for the cast from `&mut File` to `&mut dyn main::Write` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 39 | say_hello(&mut local_file)?; // works [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:39:31 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 39 | say_hello(&mut local_file)?; // works [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `Vec<_>: main::Write` is not satisfied [INFO] [stdout] --> src/main.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | say_hello(&mut bytes)?; // also works [INFO] [stdout] | ^^^^^^^^^^ the trait `main::Write` is not implemented for `Vec<_>` [INFO] [stdout] | [INFO] [stdout] help: this trait has no implementations, consider adding one [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: required for the cast from `&mut Vec<_>` to `&mut dyn main::Write` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 42 | say_hello(&mut bytes)?; // also works [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the trait bound `Vec<_>: main::Write` is not satisfied [INFO] [stdout] --> src/main.rs:42:15 [INFO] [stdout] | [INFO] [stdout] 42 | say_hello(&mut bytes)?; // also works [INFO] [stdout] | ^^^^^^^^^^ the trait `main::Write` is not implemented for `Vec<_>` [INFO] [stdout] | [INFO] [stdout] help: this trait has no implementations, consider adding one [INFO] [stdout] --> src/main.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | trait Write { [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] = note: required for the cast from `&mut Vec<_>` to `&mut dyn main::Write` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`) [INFO] [stdout] --> src/main.rs:42:26 [INFO] [stdout] | [INFO] [stdout] 3 | fn main() { [INFO] [stdout] | --------- this function should return `Result` or `Option` to accept `?` [INFO] [stdout] ... [INFO] [stdout] 42 | say_hello(&mut bytes)?; // also works [INFO] [stdout] | ^ cannot use the `?` operator in a function that returns `()` [INFO] [stdout] | [INFO] [stdout] help: consider adding return type [INFO] [stdout] | [INFO] [stdout] 3 | fn main() -> Result<(), Box> { [INFO] [stdout] | +++++++++++++++++++++++++++++++++++++++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `write_all` found for struct `Vec` in the current scope [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | buf.write_all(b"hello")?; // error, no method named `write_all` [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] --> /rustc/8c32e313cccf7df531e2d49ffb8227bb92304aee/library/std/src/io/mod.rs:1835:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `Vec` here [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: trait `Write` which provides `write_all` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::io::Write; [INFO] [stdout] | [INFO] [stdout] help: there is a method `write` with a similar name [INFO] [stdout] | [INFO] [stdout] 77 - buf.write_all(b"hello")?; // error, no method named `write_all` [INFO] [stdout] 77 + buf.write(b"hello")?; // error, no method named `write_all` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0599]: no method named `write_all` found for struct `Vec` in the current scope [INFO] [stdout] --> src/main.rs:77:9 [INFO] [stdout] | [INFO] [stdout] 77 | buf.write_all(b"hello")?; // error, no method named `write_all` [INFO] [stdout] | ^^^^^^^^^ [INFO] [stdout] --> /rustc/8c32e313cccf7df531e2d49ffb8227bb92304aee/library/std/src/io/mod.rs:1835:8 [INFO] [stdout] | [INFO] [stdout] = note: the method is available for `Vec` here [INFO] [stdout] | [INFO] [stdout] = help: items from traits can only be used if the trait is in scope [INFO] [stdout] help: trait `Write` which provides `write_all` is implemented but not in scope; perhaps you want to import it [INFO] [stdout] | [INFO] [stdout] 1 + use std::io::Write; [INFO] [stdout] | [INFO] [stdout] help: there is a method `write` with a similar name [INFO] [stdout] | [INFO] [stdout] 77 - buf.write_all(b"hello")?; // error, no method named `write_all` [INFO] [stdout] 77 + buf.write(b"hello")?; // error, no method named `write_all` [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0107, E0255, E0277, E0586, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0107`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0107, E0255, E0277, E0586, E0599. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0107`. [INFO] [stdout] [INFO] [stderr] error: could not compile `traits_generics` (bin "traits_generics" test) due to 18 previous errors; 3 warnings emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stderr] error: could not compile `traits_generics` (bin "traits_generics") due to 18 previous errors; 3 warnings emitted [INFO] running `Command { std: "docker" "inspect" "c0f9b36378bedaaf9bca45b88c778e5dadaf1e441c945e587af50a67b6254c9c", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c0f9b36378bedaaf9bca45b88c778e5dadaf1e441c945e587af50a67b6254c9c", kill_on_drop: false }` [INFO] [stdout] c0f9b36378bedaaf9bca45b88c778e5dadaf1e441c945e587af50a67b6254c9c