diff options
Diffstat (limited to 'tests/ui/traits/rc-not-send.rs')
| -rw-r--r-- | tests/ui/traits/rc-not-send.rs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/ui/traits/rc-not-send.rs b/tests/ui/traits/rc-not-send.rs new file mode 100644 index 00000000000..f31db15ef2e --- /dev/null +++ b/tests/ui/traits/rc-not-send.rs @@ -0,0 +1,9 @@ +use std::rc::Rc; + +fn bar<T: Send>(_: T) {} + +fn main() { + let x = Rc::new(5); + bar(x); + //~^ ERROR `Rc<{integer}>` cannot be sent between threads safely +} |
