rust/tests/ui/traits/bad-method-typaram-kind.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
208 B
Rust
Raw Normal View History

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() {}