summaryrefslogtreecommitdiffstats
path: root/src/test/ui/moves/use_of_moved_value_clone_suggestions.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/moves/use_of_moved_value_clone_suggestions.rs')
-rw-r--r--src/test/ui/moves/use_of_moved_value_clone_suggestions.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/test/ui/moves/use_of_moved_value_clone_suggestions.rs b/src/test/ui/moves/use_of_moved_value_clone_suggestions.rs
new file mode 100644
index 000000000..d5c8d4e6b
--- /dev/null
+++ b/src/test/ui/moves/use_of_moved_value_clone_suggestions.rs
@@ -0,0 +1,6 @@
+// `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() {}