rust/src/test/ui/no_send-rc.rs

10 lines
172 B
Rust
Raw Normal View History

use std::rc::Rc;
fn bar<T: Send>(_: T) {}
fn main() {
2015-01-31 10:23:42 -06:00
let x = Rc::new(5);
2014-02-05 16:33:10 -06:00
bar(x);
//~^ ERROR `std::rc::Rc<{integer}>` cannot be sent between threads safely
}