[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 master#b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18 for pr-79470 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FNeuropathyCC%2Frust_study" "/workspace/builds/worker-6/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-6/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/NeuropathyCC/rust_study on toolchain b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18" "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-6/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] [stderr] Blocking waiting for file lock on package cache [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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" "+b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 832e54e7ab9d4011ddd1d49510bf6c723e37a96127eadd8849ff641bb285d389 [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" "832e54e7ab9d4011ddd1d49510bf6c723e37a96127eadd8849ff641bb285d389", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "832e54e7ab9d4011ddd1d49510bf6c723e37a96127eadd8849ff641bb285d389", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "832e54e7ab9d4011ddd1d49510bf6c723e37a96127eadd8849ff641bb285d389", kill_on_drop: false }` [INFO] [stdout] 832e54e7ab9d4011ddd1d49510bf6c723e37a96127eadd8849ff641bb285d389 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-6/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" "+b7ebc6b0c1ba3c27ebb17c0b496ece778ef11e18" "check" "--frozen" "--all" "--all-targets" "--message-format=json", kill_on_drop: false }` [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] [stdout] 0e873c8e36de277f36e864945b12d2be4dea3a50a26bc9df9c4cb9866ad39839 [INFO] running `Command { std: "docker" "start" "-a" "0e873c8e36de277f36e864945b12d2be4dea3a50a26bc9df9c4cb9866ad39839", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.81 [INFO] [stderr] Checking ppv-lite86 v0.2.10 [INFO] [stderr] Checking log v0.4.11 [INFO] [stderr] Checking getrandom v0.1.15 [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[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] [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" "0e873c8e36de277f36e864945b12d2be4dea3a50a26bc9df9c4cb9866ad39839", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "0e873c8e36de277f36e864945b12d2be4dea3a50a26bc9df9c4cb9866ad39839", kill_on_drop: false }` [INFO] [stdout] 0e873c8e36de277f36e864945b12d2be4dea3a50a26bc9df9c4cb9866ad39839