summaryrefslogtreecommitdiffstats
path: root/tests/ui/dyn-drop/dyn-drop.rs
blob: e1668a3f188d59dd8771267c748cf521a52f25c9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#![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() {}