mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
15 lines
208 B
Rust
15 lines
208 B
Rust
fn foo<T:'static>() {
|
|
1.bar::<T>(); //~ ERROR `T` cannot be sent between threads safely
|
|
}
|
|
|
|
trait Bar {
|
|
fn bar<T:Send>(&self);
|
|
}
|
|
|
|
impl Bar for usize {
|
|
fn bar<T:Send>(&self) {
|
|
}
|
|
}
|
|
|
|
fn main() {}
|