summary refs log tree commit diff
path: root/tests/ui/parser
diff options
context:
space:
mode:
authorLeón Orell Valerian Liehr <me@fmease.dev>2025-06-20 21:39:19 +0200
committerLeón Orell Valerian Liehr <me@fmease.dev>2025-07-18 12:13:19 +0200
commit84ed70b69daa6865d3713d36fabad90a2fb96afd (patch)
tree8fbd2c90160a9e1968cca81c9cbba56a87e17349 /tests/ui/parser
parent1df99f22d3a1776b36fc00fc35626fd841f7242f (diff)
downloadrust-84ed70b69daa6865d3713d36fabad90a2fb96afd.tar.gz
rust-84ed70b69daa6865d3713d36fabad90a2fb96afd.zip
Reword diagnostics about relaxed bounds in invalid contexts
Diffstat (limited to 'tests/ui/parser')
-rw-r--r--tests/ui/parser/trait-object-trait-parens.rs6
-rw-r--r--tests/ui/parser/trait-object-trait-parens.stderr18
2 files changed, 7 insertions, 17 deletions
diff --git a/tests/ui/parser/trait-object-trait-parens.rs b/tests/ui/parser/trait-object-trait-parens.rs
index 438034bc38a..51f0e2de611 100644
--- a/tests/ui/parser/trait-object-trait-parens.rs
+++ b/tests/ui/parser/trait-object-trait-parens.rs
@@ -6,17 +6,17 @@ fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
 
 fn main() {
     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
-    //~^ ERROR `?Trait` is not permitted in trait object types
+    //~^ ERROR relaxed bounds are not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
     //~| WARN this is accepted in the current edition
     let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
-    //~^ ERROR `?Trait` is not permitted in trait object types
+    //~^ ERROR relaxed bounds are not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
     //~| WARN this is accepted in the current edition
     let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
-    //~^ ERROR `?Trait` is not permitted in trait object types
+    //~^ ERROR relaxed bounds are not permitted in trait object types
     //~| ERROR only auto traits can be used as additional traits
     //~| WARN trait objects without an explicit `dyn` are deprecated
     //~| WARN this is accepted in the current edition
diff --git a/tests/ui/parser/trait-object-trait-parens.stderr b/tests/ui/parser/trait-object-trait-parens.stderr
index d75352b6811..26d388f8779 100644
--- a/tests/ui/parser/trait-object-trait-parens.stderr
+++ b/tests/ui/parser/trait-object-trait-parens.stderr
@@ -1,29 +1,20 @@
-error[E0658]: `?Trait` is not permitted in trait object types
+error: relaxed bounds are not permitted in trait object types
   --> $DIR/trait-object-trait-parens.rs:8:24
    |
 LL |     let _: Box<(Obj) + (?Sized) + (for<'a> Trait<'a>)>;
    |                        ^^^^^^^^
-   |
-   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: `?Trait` is not permitted in trait object types
+error: relaxed bounds are not permitted in trait object types
   --> $DIR/trait-object-trait-parens.rs:13:16
    |
 LL |     let _: Box<?Sized + (for<'a> Trait<'a>) + (Obj)>;
    |                ^^^^^^
-   |
-   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
-error[E0658]: `?Trait` is not permitted in trait object types
+error: relaxed bounds are not permitted in trait object types
   --> $DIR/trait-object-trait-parens.rs:18:44
    |
 LL |     let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
    |                                            ^^^^^^^^
-   |
-   = help: add `#![feature(more_maybe_bounds)]` to the crate attributes to enable
-   = note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
 
 warning: trait objects without an explicit `dyn` are deprecated
   --> $DIR/trait-object-trait-parens.rs:8:16
@@ -100,5 +91,4 @@ LL |     let _: Box<for<'a> Trait<'a> + (Obj) + (?Sized)>;
 
 error: aborting due to 6 previous errors; 3 warnings emitted
 
-Some errors have detailed explanations: E0225, E0658.
-For more information about an error, try `rustc --explain E0225`.
+For more information about this error, try `rustc --explain E0225`.