mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-18 03:25:55 +00:00
17 lines
310 B
Rust
17 lines
310 B
Rust
#![deny(dyn_drop)]
|
|
#![allow(bare_trait_objects)]
|
|
fn foo(_: Box<dyn Drop>) {} //~ ERROR
|
|
fn bar(_: &dyn Drop) {} //~ERROR
|
|
fn baz(_: *mut 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() {}
|