about summary refs log tree commit diff
path: root/tests/ui/unsized/box-instead-of-dyn-fn.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tests/ui/unsized/box-instead-of-dyn-fn.rs')
-rw-r--r--tests/ui/unsized/box-instead-of-dyn-fn.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/ui/unsized/box-instead-of-dyn-fn.rs b/tests/ui/unsized/box-instead-of-dyn-fn.rs
index 321c2ebf5a1..720176081d6 100644
--- a/tests/ui/unsized/box-instead-of-dyn-fn.rs
+++ b/tests/ui/unsized/box-instead-of-dyn-fn.rs
@@ -3,7 +3,7 @@ use std::fmt::Debug;
 // Test to suggest boxing the return type, and the closure branch of the `if`
 
 fn print_on_or_the_other<'a>(a: i32, b: &'a String) -> dyn Fn() + 'a {
-    //~^ ERROR return type cannot have an unboxed trait object
+    //~^ ERROR return type cannot be a trait object without pointer indirection
     if a % 2 == 0 {
         move || println!("{a}")
     } else {