mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-03 02:40:40 +00:00
12 lines
247 B
Rust
12 lines
247 B
Rust
//! Test that `Rc<T>` does not implement `Send`.
|
|
|
|
use std::rc::Rc;
|
|
|
|
fn requires_send<T: Send>(_: T) {}
|
|
|
|
fn main() {
|
|
let rc_value = Rc::new(5);
|
|
requires_send(rc_value);
|
|
//~^ ERROR `Rc<{integer}>` cannot be sent between threads safely
|
|
}
|