rust/tests/ui/moves/use_of_moved_value_clone_suggestions.rs
2023-01-11 09:32:08 +00:00

7 lines
209 B
Rust

// `Rc` is not ever `Copy`, we should not suggest adding `T: Copy` constraint
fn duplicate_rc<T>(t: std::rc::Rc<T>) -> (std::rc::Rc<T>, std::rc::Rc<T>) {
(t, t) //~ use of moved value: `t`
}
fn main() {}