mirror of
https://github.com/rust-lang/rust.git
synced 2025-10-01 17:04:13 +00:00
16 lines
284 B
Rust
16 lines
284 B
Rust
#![deny(dyn_drop)]
|
|
fn foo(_: Box<dyn Drop>) {} //~ ERROR
|
|
fn bar(_: &dyn Drop) {} //~ERROR
|
|
fn baz(_: *mut dyn Drop) {} //~ ERROR
|
|
struct Foo {
|
|
_x: Box<dyn Drop> //~ ERROR
|
|
}
|
|
trait Bar {
|
|
type T: ?Sized;
|
|
}
|
|
struct Baz {}
|
|
impl Bar for Baz {
|
|
type T = dyn Drop; //~ ERROR
|
|
}
|
|
fn main() {}
|