mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-01 06:51:58 +00:00
20 lines
306 B
Rust
20 lines
306 B
Rust
#![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() {}
|