[INFO] cloning repository https://github.com/BruceChar/LearnRustByExample [INFO] running `Command { std: "git" "-c" "credential.helper=" "-c" "credential.helper=/workspace/cargo-home/bin/git-credential-null" "clone" "--bare" "https://github.com/BruceChar/LearnRustByExample" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBruceChar%2FLearnRustByExample", kill_on_drop: false }` [INFO] [stderr] Cloning into bare repository '/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBruceChar%2FLearnRustByExample'... [INFO] running `Command { std: "git" "rev-parse" "HEAD", kill_on_drop: false }` [INFO] [stdout] 2150219561f9dd455dbbc74483301654dc899e9f [INFO] testing BruceChar/LearnRustByExample against master#a77da2d454e6caa227a85b16410b95f93495e7e0 for pr-91031 [INFO] running `Command { std: "git" "clone" "/workspace/cache/git-repos/https%3A%2F%2Fgithub.com%2FBruceChar%2FLearnRustByExample" "/workspace/builds/worker-10/source", kill_on_drop: false }` [INFO] [stderr] Cloning into '/workspace/builds/worker-10/source'... [INFO] [stderr] done. [INFO] validating manifest of git repo https://github.com/BruceChar/LearnRustByExample on toolchain a77da2d454e6caa227a85b16410b95f93495e7e0 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a77da2d454e6caa227a85b16410b95f93495e7e0" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] started tweaking git repo https://github.com/BruceChar/LearnRustByExample [INFO] finished tweaking git repo https://github.com/BruceChar/LearnRustByExample [INFO] tweaked toml for git repo https://github.com/BruceChar/LearnRustByExample written to /workspace/builds/worker-10/source/Cargo.toml [INFO] crate git repo https://github.com/BruceChar/LearnRustByExample already has a lockfile, it will not be regenerated [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+a77da2d454e6caa227a85b16410b95f93495e7e0" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/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:5736fa189c1c60b01babf4b8b698fe57b6ecc41933a7ff2e0b8d7a221459412b" "/opt/rustwide/cargo-home/bin/cargo" "+a77da2d454e6caa227a85b16410b95f93495e7e0" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] a77d98168513252096b1ac9cc6d0d0f6bfab52c69ec0870085fc491c93acfa7b [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" "a77d98168513252096b1ac9cc6d0d0f6bfab52c69ec0870085fc491c93acfa7b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "a77d98168513252096b1ac9cc6d0d0f6bfab52c69ec0870085fc491c93acfa7b", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "a77d98168513252096b1ac9cc6d0d0f6bfab52c69ec0870085fc491c93acfa7b", kill_on_drop: false }` [INFO] [stdout] a77d98168513252096b1ac9cc6d0d0f6bfab52c69ec0870085fc491c93acfa7b [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/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" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5736fa189c1c60b01babf4b8b698fe57b6ecc41933a7ff2e0b8d7a221459412b" "/opt/rustwide/cargo-home/bin/cargo" "+a77da2d454e6caa227a85b16410b95f93495e7e0" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] c4c330a93c53aa363bb72a9d76e7170996023fdaeb9b6cb950807298315e4ad0 [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" "c4c330a93c53aa363bb72a9d76e7170996023fdaeb9b6cb950807298315e4ad0", kill_on_drop: false }` [INFO] [stderr] Compiling libc v0.2.80 [INFO] [stderr] Compiling getrandom v0.1.15 [INFO] [stderr] Compiling another v0.1.0 (/opt/rustwide/workdir/src/another) [INFO] [stderr] Compiling rand_core v0.5.1 [INFO] [stderr] Compiling rand_chacha v0.2.2 [INFO] [stderr] Compiling rand v0.7.3 [INFO] [stderr] Compiling anolib v0.1.0 (/opt/rustwide/workdir/anolib) [INFO] [stderr] Compiling mylib v0.1.0 (/opt/rustwide/workdir/mylib) [INFO] [stderr] Compiling RustByExamples v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused import: `super::*` [INFO] [stdout] --> src/main.rs:21:7 [INFO] [stdout] | [INFO] [stdout] 21 | use super::*; [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `print` [INFO] [stdout] --> src/main.rs:5:4 [INFO] [stdout] | [INFO] [stdout] 5 | fn print(a: i32) -> i32 { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: crate `RustByExamples` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] = help: convert the identifier to snake case: `rust_by_examples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 7.78s [INFO] running `Command { std: "docker" "inspect" "c4c330a93c53aa363bb72a9d76e7170996023fdaeb9b6cb950807298315e4ad0", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "c4c330a93c53aa363bb72a9d76e7170996023fdaeb9b6cb950807298315e4ad0", kill_on_drop: false }` [INFO] [stdout] c4c330a93c53aa363bb72a9d76e7170996023fdaeb9b6cb950807298315e4ad0 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-10/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" "ghcr.io/rust-lang/crates-build-env/linux@sha256:5736fa189c1c60b01babf4b8b698fe57b6ecc41933a7ff2e0b8d7a221459412b" "/opt/rustwide/cargo-home/bin/cargo" "+a77da2d454e6caa227a85b16410b95f93495e7e0" "test" "--frozen" "--no-run" "--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] bc943d7967ffdba4e316e3242ba1949aedcf8ecbe1174b1f6978ef6a8212ac46 [INFO] running `Command { std: "docker" "start" "-a" "bc943d7967ffdba4e316e3242ba1949aedcf8ecbe1174b1f6978ef6a8212ac46", kill_on_drop: false }` [INFO] [stderr] Compiling RustByExamples v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: unused label [INFO] [stdout] --> examples/loop.rs:7:9 [INFO] [stdout] | [INFO] [stdout] 7 | 'inner: loop { [INFO] [stdout] | ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_labels)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `std::rc::Rc` [INFO] [stdout] --> examples/thread.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use std::rc::Rc; [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: value assigned to `m1` is never read [INFO] [stdout] --> examples/demo.rs:3:13 [INFO] [stdout] | [INFO] [stdout] 3 | let mut m1 = m; [INFO] [stdout] | ^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_assignments)]` on by default [INFO] [stdout] = help: maybe it is overwritten before being read? [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `iter` [INFO] [stdout] --> examples/demo.rs:6:9 [INFO] [stdout] | [INFO] [stdout] 6 | let iter = [1,2,3].iter(); [INFO] [stdout] | ^^^^ help: if this is intentional, prefix it with an underscore: `_iter` [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] --> examples/demo.rs:2:9 [INFO] [stdout] | [INFO] [stdout] 2 | let mut m = 9; [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] warning: trait objects without an explicit `dyn` are deprecated [INFO] [stdout] --> examples/func.rs:9:27 [INFO] [stdout] | [INFO] [stdout] 9 | fn factory(x: i32) -> Box i32> { [INFO] [stdout] | ^^^^^^^^^^^^^^ help: use `dyn`: `dyn Fn(i32) -> i32` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(bare_trait_objects)]` on by default [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] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `BorrowMut`, `Borrow` [INFO] [stdout] --> examples/smart_point.rs:24:19 [INFO] [stdout] | [INFO] [stdout] 24 | use std::borrow::{BorrowMut, Borrow}; [INFO] [stdout] | ^^^^^^^^^ ^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused imports: `DerefMut`, `Deref` [INFO] [stdout] --> examples/smart_point.rs:25:16 [INFO] [stdout] | [INFO] [stdout] 25 | use std::ops::{Deref, DerefMut}; [INFO] [stdout] | ^^^^^ ^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `RefMut` [INFO] [stdout] --> examples/smart_point.rs:26:17 [INFO] [stdout] | [INFO] [stdout] 26 | use std::cell::{RefMut, RefCell}; [INFO] [stdout] | ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `f` [INFO] [stdout] --> examples/file.rs:27:7 [INFO] [stdout] | [INFO] [stdout] 27 | let f = File::open("hello.txt").unwrap_or_else(|err| { [INFO] [stdout] | ^ help: if this is intentional, prefix it with an underscore: `_f` [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_variables)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `function` [INFO] [stdout] --> examples/mod.rs:40:4 [INFO] [stdout] | [INFO] [stdout] 40 | fn function() { [INFO] [stdout] | ^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0282]: type annotations needed for `HashMap` [INFO] [stdout] --> examples/rc.rs:21:13 [INFO] [stdout] | [INFO] [stdout] 21 | let m = HashMap::new(); [INFO] [stdout] | - ^^^^^^^^^^^^ cannot infer type for type parameter `K` [INFO] [stdout] | | [INFO] [stdout] | consider giving `m` the explicit type `HashMap`, where the type parameter `K` is specified [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find value `next` in this scope [INFO] [stdout] --> examples/box.rs:48:13 [INFO] [stdout] | [INFO] [stdout] 48 | next [INFO] [stdout] | ^^^^ a field by this name exists in `Self` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0283]: type annotations needed [INFO] [stdout] --> examples/loop.rs:4:25 [INFO] [stdout] | [INFO] [stdout] 4 | v.iter().map(|x| x).collect(); [INFO] [stdout] | ^^^^^^^ cannot infer type for type parameter `B` declared on the associated function `collect` [INFO] [stdout] | [INFO] [stdout] = note: cannot satisfy `_: FromIterator<&i32>` [INFO] [stdout] help: consider specifying the type argument in the method call [INFO] [stdout] | [INFO] [stdout] 4 | v.iter().map(|x| x).collect::(); [INFO] [stdout] | +++++ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error; 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused variable: `e` [INFO] [stdout] --> examples/from_into.rs:34:17 [INFO] [stdout] | [INFO] [stdout] 34 | Err(e) => Person::default() [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] For more information about this error, try `rustc --explain E0283`. [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0282`. [INFO] [stdout] [INFO] [stderr] error: could not compile `RustByExamples` due to 2 previous errors; 1 warning emitted [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] warning: field is never read: `name` [INFO] [stdout] --> examples/from_into.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | name: String, [INFO] [stdout] | ^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `age` [INFO] [stdout] --> examples/from_into.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | age: u8, [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: function is never used: `main1` [INFO] [stdout] --> examples/thread.rs:6:4 [INFO] [stdout] | [INFO] [stdout] 6 | fn main1() { [INFO] [stdout] | ^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] warning: crate `RustByExamples` should have a snake case name [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(non_snake_case)]` on by default [INFO] [stdout] = help: convert the identifier to snake case: `rust_by_examples` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `name` [INFO] [stdout] --> examples/format.rs:61:5 [INFO] [stdout] | [INFO] [stdout] 61 | name: &'a str, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(dead_code)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: field is never read: `age` [INFO] [stdout] --> examples/format.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | age: u8 [INFO] [stdout] | ^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0277]: cannot add a float to an integer [INFO] [stdout] --> examples/recursive_type.rs:35:31 [INFO] [stdout] | [INFO] [stdout] 35 | println!("{:?} {:?}", e, c+d); [INFO] [stdout] | ^ no implementation for `{integer} + {float}` [INFO] [stdout] | [INFO] [stdout] = help: the trait `Add<{float}>` is not implemented for `{integer}` [INFO] [stdout] note: required because of the requirements on the impl of `Add>` for `Cup<{integer}>` [INFO] [stdout] --> examples/recursive_type.rs:19:12 [INFO] [stdout] | [INFO] [stdout] 19 | impl Add> for Cup [INFO] [stdout] | ^^^^^^^^^^^ ^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to previous error [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0277`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/inter_mutability.rs:18:45 [INFO] [stdout] | [INFO] [stdout] 18 | let b = Cons(RefCell::new(4), Rc::clone(&a)); [INFO] [stdout] | ^^ expected struct `Rc`, found enum `List` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Rc` [INFO] [stdout] found reference `&List` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:30:26 [INFO] [stdout] | [INFO] [stdout] 30 | let a = Rc::new(Cons(Rc::new(RefCell::new(1)), [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected type `i32` [INFO] [stdout] found struct `Rc>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/inter_mutability.rs:19:45 [INFO] [stdout] | [INFO] [stdout] 19 | let c = Cons(RefCell::new(3), Rc::clone(&a)); [INFO] [stdout] | ^^ expected struct `Rc`, found enum `List` [INFO] [stdout] | [INFO] [stdout] = note: expected reference `&Rc` [INFO] [stdout] found reference `&List` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0615]: attempted to take value of method `borrow_mut` on type `RefCell` [INFO] [stdout] --> examples/inter_mutability.rs:24:16 [INFO] [stdout] | [INFO] [stdout] 24 | *v.borrow_mut += 5; [INFO] [stdout] | ^^^^^^^^^^ method, not a field [INFO] [stdout] | [INFO] [stdout] = help: methods are immutable and cannot be assigned to [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 3 previous errors [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0308, E0615. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:31:26 [INFO] [stdout] | [INFO] [stdout] 31 | Rc::new(Nil))); [INFO] [stdout] | ^^^^^^^^^^^^ expected struct `RefCell`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `RefCell>` [INFO] [stdout] found struct `Rc<_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:32:22 [INFO] [stdout] | [INFO] [stdout] 32 | let mut b = Cons(Rc::new(RefCell::new(2)), Rc::clone(&a)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected type `i32` [INFO] [stdout] found struct `Rc>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:32:48 [INFO] [stdout] | [INFO] [stdout] 32 | let mut b = Cons(Rc::new(RefCell::new(2)), Rc::clone(&a)); [INFO] [stdout] | ^^^^^^^^^^^^^ expected struct `RefCell`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `RefCell>` [INFO] [stdout] found struct `Rc<_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:34:19 [INFO] [stdout] | [INFO] [stdout] 34 | let c = Cons(Rc::new(RefCell::new(3)), a.clone()); // 只增加引用计数 [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ expected `i32`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected type `i32` [INFO] [stdout] found struct `Rc>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0308]: mismatched types [INFO] [stdout] --> examples/smart_point.rs:34:45 [INFO] [stdout] | [INFO] [stdout] 34 | let c = Cons(Rc::new(RefCell::new(3)), a.clone()); // 只增加引用计数 [INFO] [stdout] | ^^^^^^^^^ expected struct `RefCell`, found struct `Rc` [INFO] [stdout] | [INFO] [stdout] = note: expected struct `RefCell>` [INFO] [stdout] found struct `Rc<_>` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: aborting due to 6 previous errors; 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] For more information about this error, try `rustc --explain E0308`. [INFO] [stdout] [INFO] [stdout] warning: 3 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 1 warning emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 2 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: build failed [INFO] running `Command { std: "docker" "inspect" "bc943d7967ffdba4e316e3242ba1949aedcf8ecbe1174b1f6978ef6a8212ac46", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "bc943d7967ffdba4e316e3242ba1949aedcf8ecbe1174b1f6978ef6a8212ac46", kill_on_drop: false }` [INFO] [stdout] bc943d7967ffdba4e316e3242ba1949aedcf8ecbe1174b1f6978ef6a8212ac46