rust/tests/ui/dyn-drop/dyn-drop.stderr

39 lines
1.4 KiB
Plaintext

error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> $DIR/dyn-drop.rs:3:19
|
LL | fn foo(_: Box<dyn Drop>) {}
| ^^^^
|
note: the lint level is defined here
--> $DIR/dyn-drop.rs:1:9
|
LL | #![deny(dyn_drop)]
| ^^^^^^^^
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> $DIR/dyn-drop.rs:4:16
|
LL | fn bar(_: &dyn Drop) {}
| ^^^^
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> $DIR/dyn-drop.rs:5:16
|
LL | fn baz(_: *mut Drop) {}
| ^^^^
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> $DIR/dyn-drop.rs:7:15
|
LL | _x: Box<dyn Drop>
| ^^^^
error: types that do not implement `Drop` can still have drop glue, consider instead using `std::mem::needs_drop` to detect whether a type is trivially dropped
--> $DIR/dyn-drop.rs:14:16
|
LL | type T = dyn Drop;
| ^^^^
error: aborting due to 5 previous errors