about summary refs log tree commit diff
path: root/tests/ui/object-safety/avoid-ice-on-warning-2.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/object-safety/avoid-ice-on-warning-2.rs')
-rw-r--r--tests/ui/object-safety/avoid-ice-on-warning-2.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/ui/object-safety/avoid-ice-on-warning-2.rs b/tests/ui/object-safety/avoid-ice-on-warning-2.rs
index 9a6a4378fa3..eabfd31dda6 100644
--- a/tests/ui/object-safety/avoid-ice-on-warning-2.rs
+++ b/tests/ui/object-safety/avoid-ice-on-warning-2.rs
@@ -3,10 +3,12 @@
 //[new] edition:2021
 fn id<F>(f: Copy) -> usize {
 //~^ ERROR the trait `Copy` cannot be made into an object
+//~| ERROR: the size for values of type `(dyn Copy + 'static)`
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
 //[old]~| WARN trait objects without an explicit `dyn` are deprecated
 //[old]~| WARN this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021!
     f()
+    //~^ ERROR: expected function, found `(dyn Copy + 'static)`
 }
 fn main() {}