rust/tests/ui/drop-bounds/drop-bounds.rs

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

20 lines
306 B
Rust
Raw Normal View History

2020-08-19 10:05:44 +00:00
#![deny(drop_bounds)]
fn foo<T: Drop>() {} //~ ERROR
fn bar<U>()
where
U: Drop, //~ ERROR
{
}
fn baz(_x: impl Drop) {} //~ ERROR
struct Foo<T: Drop> { //~ ERROR
_x: T
}
struct Bar<U> where U: Drop { //~ ERROR
_x: U
}
trait Baz: Drop { //~ ERROR
}
impl<T: Drop> Baz for T { //~ ERROR
}
fn main() {}