summaryrefslogtreecommitdiffstats
path: root/src/test/ui/dyn-drop
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:19:13 +0000
commit218caa410aa38c29984be31a5229b9fa717560ee (patch)
treec54bd55eeb6e4c508940a30e94c0032fbd45d677 /src/test/ui/dyn-drop
parentReleasing progress-linux version 1.67.1+dfsg1-1~progress7.99u1. (diff)
downloadrustc-218caa410aa38c29984be31a5229b9fa717560ee.tar.xz
rustc-218caa410aa38c29984be31a5229b9fa717560ee.zip
Merging upstream version 1.68.2+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'src/test/ui/dyn-drop')
-rw-r--r--src/test/ui/dyn-drop/dyn-drop.rs16
-rw-r--r--src/test/ui/dyn-drop/dyn-drop.stderr38
2 files changed, 0 insertions, 54 deletions
diff --git a/src/test/ui/dyn-drop/dyn-drop.rs b/src/test/ui/dyn-drop/dyn-drop.rs
deleted file mode 100644
index e1668a3f1..000000000
--- a/src/test/ui/dyn-drop/dyn-drop.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![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() {}
diff --git a/src/test/ui/dyn-drop/dyn-drop.stderr b/src/test/ui/dyn-drop/dyn-drop.stderr
deleted file mode 100644
index 1b1dbc4d1..000000000
--- a/src/test/ui/dyn-drop/dyn-drop.stderr
+++ /dev/null
@@ -1,38 +0,0 @@
-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
-