[INFO] cloning repository https://github.com/NeuropathyCC/rust_study [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/NeuropathyCC/rust_study" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeuropathyCC%2Frust_study", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeuropathyCC%2Frust_study'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 83ee878ad4a4a2dfdc569694d5c834189c6dc2fd [INFO] checking NeuropathyCC/rust_study against try#55b3f428b4fac6790b1e8492e0b91ff2d80aec7c for pr-77035 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeuropathyCC%2Frust_study" "/workspace/builds/worker-8/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-8/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/NeuropathyCC/rust_study on toolchain 55b3f428b4fac6790b1e8492e0b91ff2d80aec7c [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+55b3f428b4fac6790b1e8492e0b91ff2d80aec7c" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/NeuropathyCC/rust_study [INFO] finished tweaking git repo https://github.com/NeuropathyCC/rust_study [INFO] tweaked toml for git repo https://github.com/NeuropathyCC/rust_study written to /workspace/builds/worker-8/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+55b3f428b4fac6790b1e8492e0b91ff2d80aec7c" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+55b3f428b4fac6790b1e8492e0b91ff2d80aec7c" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] [stderr] Downloading crates ... [INFO] [stderr] Downloaded mio v0.7.6 [INFO] [stderr] Downloaded ntapi v0.3.6 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/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" "rustops/crates-build-env@sha256:c8ac004eab7d63a0ad09a2dde3d3353ba464f767bee4de425dc8f74c46a1905e" "/opt/rustwide/cargo-home/bin/cargo" "+55b3f428b4fac6790b1e8492e0b91ff2d80aec7c" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 8952be9c1573826d65ffe64dab3ead6889dff512d6ec3a4244c662fa7f5d2970 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "8952be9c1573826d65ffe64dab3ead6889dff512d6ec3a4244c662fa7f5d2970", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "8952be9c1573826d65ffe64dab3ead6889dff512d6ec3a4244c662fa7f5d2970", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "8952be9c1573826d65ffe64dab3ead6889dff512d6ec3a4244c662fa7f5d2970", kill_on_drop: false }` [INFO] [stdout] 8952be9c1573826d65ffe64dab3ead6889dff512d6ec3a4244c662fa7f5d2970 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-8/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" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "rustops/crates-build-env@sha256:c8ac004eab7d63a0ad09a2dde3d3353ba464f767bee4de425dc8f74c46a1905e" "/opt/rustwide/cargo-home/bin/cargo" "+55b3f428b4fac6790b1e8492e0b91ff2d80aec7c" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 0aeb26543a498b77e114b25110903714f18eba3e33e0e8c46e0f0b8c91281de9 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "0aeb26543a498b77e114b25110903714f18eba3e33e0e8c46e0f0b8c91281de9", kill_on_drop: false }` [INFO] [stderr] Compiling getrandom v0.1.15 [INFO] [stderr] Checking log v0.4.11 [INFO] [stderr] Checking mio v0.7.6 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking rustlearning v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] error: expected item after doc comment [INFO] [stdout] --> src/lifetime/lifetime.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 62 | / ///Base usage: 省略生命周期参数示例 [INFO] [stdout] 63 | | /// ```rust [INFO] [stdout] 64 | | /// fn print(s: &str); // 省略 [INFO] [stdout] 65 | | /// fn print<'a>(s: &'a str); // 展开 [INFO] [stdout] ... | [INFO] [stdout] 78 | | /// fn new(buf: &mut [u8]) -> BufWriter; // 省略 [INFO] [stdout] 79 | | /// fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> // 展开 [INFO] [stdout] | |___________________________________________________________________- other attributes here [INFO] [stdout] 80 | /// ``` [INFO] [stdout] | ^^^^^^^ this doc comment doesn't document anything [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: expected item after doc comment [INFO] [stdout] --> src/lifetime/lifetime.rs:80:1 [INFO] [stdout] | [INFO] [stdout] 62 | / ///Base usage: 省略生命周期参数示例 [INFO] [stdout] 63 | | /// ```rust [INFO] [stdout] 64 | | /// fn print(s: &str); // 省略 [INFO] [stdout] 65 | | /// fn print<'a>(s: &'a str); // 展开 [INFO] [stdout] ... | [INFO] [stdout] 78 | | /// fn new(buf: &mut [u8]) -> BufWriter; // 省略 [INFO] [stdout] 79 | | /// fn new<'a>(buf: &'a mut [u8]) -> BufWriter<'a> // 展开 [INFO] [stdout] | |___________________________________________________________________- other attributes here [INFO] [stdout] 80 | /// ``` [INFO] [stdout] | ^^^^^^^ this doc comment doesn't document anything [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/trait_demo/trait_demo.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if switch { [INFO] [stdout] 63 | | NewsArticle { [INFO] [stdout] | _|_________- [INFO] [stdout] 64 | | | headline: String::from("Penguins win the Stanley Cup Championship!"), [INFO] [stdout] 65 | | | location: String::from("Pittsburgh, PA, USA"), [INFO] [stdout] 66 | | | author: String::from("Iceburgh"), [INFO] [stdout] 67 | | | content: String::from("The Pittsburgh Penguins once again are the best [INFO] [stdout] 68 | | | hockey team in the NHL."), [INFO] [stdout] 69 | | | } [INFO] [stdout] | |_|_________- expected because of this [INFO] [stdout] 70 | | } else { [INFO] [stdout] 71 | / | Tweet { [INFO] [stdout] 72 | | | username: String::from("horse_ebooks"), [INFO] [stdout] 73 | | | content: String::from("of course, as you probably already know, people"), [INFO] [stdout] 74 | | | reply: false, [INFO] [stdout] 75 | | | retweet: false, [INFO] [stdout] 76 | | | } [INFO] [stdout] | |_|_________^ expected struct `NewsArticle`, found struct `trait_demo::trait_demo::Tweet` [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____- `if` and `else` have incompatible types [INFO] [stdout] | [INFO] [stdout] help: you could change the return type to be a boxed trait object [INFO] [stdout] | [INFO] [stdout] 61 | fn returns_summarized(switch: bool) -> Box { [INFO] [stdout] | ^^^^^^^ ^ [INFO] [stdout] help: if you change the return type to expect trait objects, box the returned expressions [INFO] [stdout] | [INFO] [stdout] 63 | Box::new(NewsArticle { [INFO] [stdout] 64 | headline: String::from("Penguins win the Stanley Cup Championship!"), [INFO] [stdout] 65 | location: String::from("Pittsburgh, PA, USA"), [INFO] [stdout] 66 | author: String::from("Iceburgh"), [INFO] [stdout] 67 | content: String::from("The Pittsburgh Penguins once again are the best [INFO] [stdout] 68 | hockey team in the NHL."), [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: `if` and `else` have incompatible types [INFO] [stdout] --> src/trait_demo/trait_demo.rs:71:9 [INFO] [stdout] | [INFO] [stdout] 62 | / if switch { [INFO] [stdout] 63 | | NewsArticle { [INFO] [stdout] | _|_________- [INFO] [stdout] 64 | | | headline: String::from("Penguins win the Stanley Cup Championship!"), [INFO] [stdout] 65 | | | location: String::from("Pittsburgh, PA, USA"), [INFO] [stdout] 66 | | | author: String::from("Iceburgh"), [INFO] [stdout] 67 | | | content: String::from("The Pittsburgh Penguins once again are the best [INFO] [stdout] 68 | | | hockey team in the NHL."), [INFO] [stdout] 69 | | | } [INFO] [stdout] | |_|_________- expected because of this [INFO] [stdout] 70 | | } else { [INFO] [stdout] 71 | / | Tweet { [INFO] [stdout] 72 | | | username: String::from("horse_ebooks"), [INFO] [stdout] 73 | | | content: String::from("of course, as you probably already know, people"), [INFO] [stdout] 74 | | | reply: false, [INFO] [stdout] 75 | | | retweet: false, [INFO] [stdout] 76 | | | } [INFO] [stdout] | |_|_________^ expected struct `NewsArticle`, found struct `trait_demo::trait_demo::Tweet` [INFO] [stdout] 77 | | } [INFO] [stdout] | |_____- `if` and `else` have incompatible types [INFO] [stdout] | [INFO] [stdout] help: you could change the return type to be a boxed trait object [INFO] [stdout] | [INFO] [stdout] 61 | fn returns_summarized(switch: bool) -> Box { [INFO] [stdout] | ^^^^^^^ ^ [INFO] [stdout] help: if you change the return type to expect trait objects, box the returned expressions [INFO] [stdout] | [INFO] [stdout] 63 | Box::new(NewsArticle { [INFO] [stdout] 64 | headline: String::from("Penguins win the Stanley Cup Championship!"), [INFO] [stdout] 65 | location: String::from("Pittsburgh, PA, USA"), [INFO] [stdout] 66 | author: String::from("Iceburgh"), [INFO] [stdout] 67 | content: String::from("The Pittsburgh Penguins once again are the best [INFO] [stdout] 68 | hockey team in the NHL."), [INFO] [stdout] ... [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/trait_demo/trait_two.rs:57:41 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function (t: T, u: U) -> i32 where T: Display + Clone, U: Clone + Debug { } [INFO] [stdout] | ------------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> src/trait_demo/trait_two.rs:57:41 [INFO] [stdout] | [INFO] [stdout] 57 | fn some_function (t: T, u: U) -> i32 where T: Display + Clone, U: Clone + Debug { } [INFO] [stdout] | ------------- ^^^ expected `i32`, found `()` [INFO] [stdout] | | [INFO] [stdout] | implicitly returns `()` as its body has no tail or `return` expression [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `rustlearning` [INFO] [stderr] [INFO] [stderr] To learn more, run the command again with --verbose. [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "0aeb26543a498b77e114b25110903714f18eba3e33e0e8c46e0f0b8c91281de9", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0aeb26543a498b77e114b25110903714f18eba3e33e0e8c46e0f0b8c91281de9", kill_on_drop: false }` [INFO] [stdout] 0aeb26543a498b77e114b25110903714f18eba3e33e0e8c46e0f0b8c91281de9