about summary refs log tree commit diff
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/ui/generator/auto-trait-regions.rs3
-rw-r--r--src/test/ui/generator/auto-trait-regions.stderr26
-rw-r--r--src/test/ui/hrtb/hrtb-just-for-static.stderr12
-rw-r--r--src/test/ui/where-clauses/where-for-self-2.rs2
-rw-r--r--src/test/ui/where-clauses/where-for-self-2.stderr14
5 files changed, 19 insertions, 38 deletions
diff --git a/src/test/ui/generator/auto-trait-regions.rs b/src/test/ui/generator/auto-trait-regions.rs
index 5b52bf3cd04..46d72899438 100644
--- a/src/test/ui/generator/auto-trait-regions.rs
+++ b/src/test/ui/generator/auto-trait-regions.rs
@@ -28,8 +28,7 @@ fn main() {
         assert_foo(x);
     };
     assert_foo(gen);
-    //~^ ERROR mismatched types
-    //~| ERROR mismatched types
+    //~^ ERROR implementation of `Foo` is not general enough
 
     // Allow impls which matches any lifetime
     let x = &OnlyFooIfRef(No);
diff --git a/src/test/ui/generator/auto-trait-regions.stderr b/src/test/ui/generator/auto-trait-regions.stderr
index 6f748a74032..94162cb9e8f 100644
--- a/src/test/ui/generator/auto-trait-regions.stderr
+++ b/src/test/ui/generator/auto-trait-regions.stderr
@@ -1,27 +1,14 @@
-error[E0308]: mismatched types
-  --> $DIR/auto-trait-regions.rs:30:5
-   |
-LL |     assert_foo(gen);
-   |     ^^^^^^^^^^ lifetime mismatch
-   |
-   = note: expected type `Foo`
-              found type `Foo`
-   = note: lifetime RePlaceholder(Placeholder { universe: U31, name: BrAnon(1) })...
-   = note: ...does not necessarily outlive the static lifetime
-
-error[E0308]: mismatched types
+error: implementation of `Foo` is not general enough
   --> $DIR/auto-trait-regions.rs:30:5
    |
 LL |     assert_foo(gen);
-   |     ^^^^^^^^^^ lifetime mismatch
+   |     ^^^^^^^^^^
    |
-   = note: expected type `Foo`
-              found type `Foo`
-   = note: lifetime RePlaceholder(Placeholder { universe: U35, name: BrAnon(1) })...
-   = note: ...does not necessarily outlive the static lifetime
+   = note: `&'0 OnlyFooIfStaticRef` must implement `Foo` for any lifetime `'0`
+   = note: but `&'1 OnlyFooIfStaticRef` only implements `Foo` for some lifetime `'1`
 
 error: implementation of `Foo` is not general enough
-  --> $DIR/auto-trait-regions.rs:49:5
+  --> $DIR/auto-trait-regions.rs:48:5
    |
 LL |     assert_foo(gen);
    |     ^^^^^^^^^^
@@ -29,6 +16,5 @@ LL |     assert_foo(gen);
    = note: `A<'0, '1>` must implement `Foo` for any two lifetimes `'0` and `'1`
    = note: but `A<'_, '2>` only implements `Foo` for some lifetime `'2`
 
-error: aborting due to 3 previous errors
+error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/hrtb/hrtb-just-for-static.stderr b/src/test/ui/hrtb/hrtb-just-for-static.stderr
index 6ea415c1734..ee518b956ab 100644
--- a/src/test/ui/hrtb/hrtb-just-for-static.stderr
+++ b/src/test/ui/hrtb/hrtb-just-for-static.stderr
@@ -1,13 +1,12 @@
-error[E0308]: mismatched types
+error: implementation of `Foo` is not general enough
   --> $DIR/hrtb-just-for-static.rs:24:5
    |
 LL |     want_hrtb::<StaticInt>() //~ ERROR
-   |     ^^^^^^^^^^^^^^^^^^^^^^ lifetime mismatch
+   |     ^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: expected type `Foo<&'a isize>`
-              found type `Foo<&'static isize>`
-   = note: lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:11), 'a) })...
-   = note: ...does not necessarily outlive the static lifetime
+   = note: Due to a where-clause on `want_hrtb`,
+   = note: `StaticInt` must implement `Foo<&'0 isize>` for any lifetime `'0`
+   = note: but `StaticInt` only implements `Foo<&'1 isize>` for some lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/hrtb-just-for-static.rs:30:5
@@ -21,4 +20,3 @@ LL |     want_hrtb::<&'a u32>() //~ ERROR
 
 error: aborting due to 2 previous errors
 
-For more information about this error, try `rustc --explain E0308`.
diff --git a/src/test/ui/where-clauses/where-for-self-2.rs b/src/test/ui/where-clauses/where-for-self-2.rs
index c69055fe0cc..0ce38e69f6b 100644
--- a/src/test/ui/where-clauses/where-for-self-2.rs
+++ b/src/test/ui/where-clauses/where-for-self-2.rs
@@ -18,5 +18,5 @@ fn foo<T>(x: &T)
 {}
 
 fn main() {
-    foo(&X); //~ ERROR E0308
+    foo(&X); //~ ERROR implementation of `Bar` is not general enough
 }
diff --git a/src/test/ui/where-clauses/where-for-self-2.stderr b/src/test/ui/where-clauses/where-for-self-2.stderr
index 04d7bbabb2a..06f3659a5c1 100644
--- a/src/test/ui/where-clauses/where-for-self-2.stderr
+++ b/src/test/ui/where-clauses/where-for-self-2.stderr
@@ -1,14 +1,12 @@
-error[E0308]: mismatched types
+error: implementation of `Bar` is not general enough
   --> $DIR/where-for-self-2.rs:21:5
    |
-LL |     foo(&X); //~ ERROR E0308
-   |     ^^^ lifetime mismatch
+LL |     foo(&X); //~ ERROR implementation of `Bar` is not general enough
+   |     ^^^
    |
-   = note: expected type `Bar`
-              found type `Bar`
-   = note: lifetime RePlaceholder(Placeholder { universe: U1, name: BrNamed(crate0:DefIndex(1:10), 'a) })...
-   = note: ...does not necessarily outlive the static lifetime
+   = note: Due to a where-clause on `foo`,
+   = note: `&'0 _` must implement `Bar` for any lifetime `'0`
+   = note: but `&'1 u32` only implements `Bar` for some lifetime `'1`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.