about summary refs log tree commit diff
path: root/tests
diff options
context:
space:
mode:
authorOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-01-17 08:21:34 +0000
committerOli Scherer <git-spam-no-reply9815368754983@oli-obk.de>2023-01-17 08:21:34 +0000
commit64e5f9129f6ffb382b458a255eed36f2581271c4 (patch)
tree35c86294f532d64f1bf610a2d7e9459c75e8f6dc /tests
parent1a6ab6c16a4902aef1e6d49ca188e1e112c677b7 (diff)
downloadrust-64e5f9129f6ffb382b458a255eed36f2581271c4.tar.gz
rust-64e5f9129f6ffb382b458a255eed36f2581271c4.zip
Handle diagnostics customization on the fluent side
Diffstat (limited to 'tests')
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/bounds-are-checked.stderr3
-rw-r--r--tests/ui/type-alias-impl-trait/generic_nondefining_use.rs2
-rw-r--r--tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr2
4 files changed, 5 insertions, 4 deletions
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked.rs b/tests/ui/type-alias-impl-trait/bounds-are-checked.rs
index 83d22161e4e..eeb5dca07f0 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked.rs
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked.rs
@@ -8,7 +8,7 @@ type X<'a> = impl Into<&'static str> + From<&'a str>;
 fn f<'a: 'static>(t: &'a str) -> X<'a> {
     //~^ WARNING unnecessary lifetime parameter
     t
-    //~^ ERROR non-defining opaque type use
+    //~^ ERROR expected generic lifetime parameter, found `'static`
 }
 
 fn extend_lt<'a>(o: &'a str) -> &'static str {
diff --git a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
index 920eef11da4..94882597a62 100644
--- a/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
+++ b/tests/ui/type-alias-impl-trait/bounds-are-checked.stderr
@@ -6,7 +6,7 @@ LL | fn f<'a: 'static>(t: &'a str) -> X<'a> {
    |
    = help: you can use the `'static` lifetime directly, in place of `'a`
 
-error: non-defining opaque type use in defining scope
+error[E0792]: expected generic lifetime parameter, found `'static`
   --> $DIR/bounds-are-checked.rs:10:5
    |
 LL | type X<'a> = impl Into<&'static str> + From<&'a str>;
@@ -17,3 +17,4 @@ LL |     t
 
 error: aborting due to previous error; 1 warning emitted
 
+For more information about this error, try `rustc --explain E0792`.
diff --git a/tests/ui/type-alias-impl-trait/generic_nondefining_use.rs b/tests/ui/type-alias-impl-trait/generic_nondefining_use.rs
index f5045d382aa..e7b8567b9a2 100644
--- a/tests/ui/type-alias-impl-trait/generic_nondefining_use.rs
+++ b/tests/ui/type-alias-impl-trait/generic_nondefining_use.rs
@@ -19,7 +19,7 @@ fn concrete_ty() -> OneTy<u32> {
 
 fn concrete_lifetime() -> OneLifetime<'static> {
     6u32
-    //~^ ERROR non-defining opaque type use in defining scope
+    //~^ ERROR expected generic lifetime parameter, found `'static`
 }
 
 fn concrete_const() -> OneConst<{ 123 }> {
diff --git a/tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr b/tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr
index 564648630b1..966fe823f02 100644
--- a/tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr
+++ b/tests/ui/type-alias-impl-trait/generic_nondefining_use.stderr
@@ -7,7 +7,7 @@ LL | type OneTy<T> = impl Debug;
 LL |     5u32
    |     ^^^^
 
-error: non-defining opaque type use in defining scope
+error[E0792]: expected generic lifetime parameter, found `'static`
   --> $DIR/generic_nondefining_use.rs:21:5
    |
 LL | type OneLifetime<'a> = impl Debug;