error: calling `Rc::new` in `vec![elem; len]` --> $DIR/rc.rs:8:13 | LL | let v = vec![Rc::new("x".to_string()); 2]; | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | = note: `-D clippy::rc-clone-in-vec-init` implied by `-D warnings` = note: each element will point to the same `Rc` instance = help: if this is intentional, consider extracting the `Rc` initialization to a variable = help: or if not, initialize each element individually error: calling `Rc::new` in `vec![elem; len]` --> $DIR/rc.rs:12:13 | LL | let v = vec![ | _____________^ LL | | std::rc::Rc::new(Mutex::new({ LL | | let x = 1; LL | | dbg!(x); ... | LL | | 2 LL | | ]; | |_____^ | = note: each element will point to the same `Rc` instance = help: if this is intentional, consider extracting the `Rc` initialization to a variable = help: or if not, initialize each element individually error: aborting due to 2 previous errors