rust/tests/ui/dyn-drop/dyn-drop.rs
Lukas Wirth aba70e8f9d Add missing dyn keywords to tests that do not test for them
This ensures that these tests can be run on editions other than 2015
2025-06-02 11:02:50 +02:00

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() {}