rust/tests/ui/moves/use_of_moved_value_clone_suggestions.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

7 lines
209 B
Rust
Raw Normal View History

2022-03-01 05:11:42 -06:00
// `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() {}