]> git.lizzy.rs Git - rust.git/commitdiff
Update test expectations for new placeholder error messages
authorRemy Rakic <remy.rakic@gmail.com>
Fri, 25 Jan 2019 18:17:38 +0000 (19:17 +0100)
committerRémy Rakic <remy.rakic@gmail.com>
Sun, 27 Jan 2019 09:52:43 +0000 (10:52 +0100)
12 files changed:
src/test/ui/associated-types/associated-types-eq-hr.stderr
src/test/ui/associated-types/higher-ranked-projection.bad.stderr
src/test/ui/associated-types/higher-ranked-projection.good.stderr
src/test/ui/generator/auto-trait-regions.stderr
src/test/ui/hrtb/hrtb-cache-issue-54302.stderr
src/test/ui/hrtb/hrtb-conflate-regions.stderr
src/test/ui/hrtb/hrtb-exists-forall-trait-invariant.stderr
src/test/ui/hrtb/hrtb-just-for-static.stderr
src/test/ui/hrtb/hrtb-perfect-forwarding.stderr
src/test/ui/issues/issue-54302-cases.stderr
src/test/ui/issues/issue-54302.stderr
src/test/ui/where-clauses/where-for-self-2.stderr

index d3eaa894b504345f4a5bd6aab4399a39ee00a721..0e471a78d9ed8490069cf3407c42b5af314350d9 100644 (file)
@@ -41,8 +41,8 @@ LL |     tuple_one::<Tuple>();
    |     ^^^^^^^^^^^^^^^^^^
    |
    = note: Due to a where-clause on `tuple_one`,
-   = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
-   = note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+   = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+   = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
 
 error: implementation of `TheTrait` is not general enough
   --> $DIR/associated-types-eq-hr.rs:96:5
@@ -51,8 +51,8 @@ LL |     tuple_two::<Tuple>();
    |     ^^^^^^^^^^^^^^^^^^
    |
    = note: Due to a where-clause on `tuple_two`,
-   = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
-   = note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+   = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+   = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
 
 error: implementation of `TheTrait` is not general enough
   --> $DIR/associated-types-eq-hr.rs:105:5
@@ -61,8 +61,8 @@ LL |     tuple_four::<Tuple>();
    |     ^^^^^^^^^^^^^^^^^^^
    |
    = note: Due to a where-clause on `tuple_four`,
-   = note: `Tuple` must implement `TheTrait<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
-   = note: but `Tuple` only implements `TheTrait<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+   = note: `TheTrait<(&'0 isize, &'1 isize)>` would have to be implemented for the type `Tuple`, for any two lifetimes `'0` and `'1`
+   = note: but `TheTrait<(&'2 isize, &'2 isize)>` is actually implemented for the type `Tuple`, for some lifetime `'2`
 
 error: aborting due to 5 previous errors
 
index e4704494e149248f7bd1a029ce53d22785fd2766..69fa1ce30aa8f6c03c2871bdbdb8debf25d837cb 100644 (file)
@@ -1,12 +1,12 @@
-error[E0308]: mismatched types
+error: implementation of `Mirror` is not general enough
   --> $DIR/higher-ranked-projection.rs:25:5
    |
 LL |     foo(());
-   |     ^^^ one type is more general than the other
+   |     ^^^
    |
-   = note: expected type `Mirror`
-              found type `Mirror`
+   = note: Due to a where-clause on `foo`,
+   = note: `Mirror` would have to be implemented for the type `&'0 ()`, for any lifetime `'0`
+   = note: but `Mirror` is actually implemented for the type `&'1 ()`, for the specific lifetime `'1`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
index db15ec51d87c6e2fdfdfa08c9ebf36ca82100640..c5c8451a5a9db7453c3092cabc05ce6b68b2c08c 100644 (file)
@@ -3,7 +3,7 @@ error: compilation successful
    |
 LL | / fn main() { //[good]~ ERROR compilation successful
 LL | |     foo(());
-LL | |     //[bad]~^ ERROR E0308
+LL | |     //[bad]~^ ERROR not general enough
 LL | | }
    | |_^
 
index 1b4dfe2df1c0c92948ee58447895766f3e9a44f4..680a7bbc50e5eb89e0d7e1d5aa8d59ca6ef17a3a 100644 (file)
@@ -4,8 +4,8 @@ error: implementation of `Foo` is not general enough
 LL |     assert_foo(gen);
    |     ^^^^^^^^^^
    |
-   = note: `&'0 OnlyFooIfStaticRef` must implement `Foo` for any lifetime `'0`
-   = note: but `&'1 OnlyFooIfStaticRef` only implements `Foo` for the lifetime `'1`
+   = note: `Foo` would have to be implemented for the type `&'0 OnlyFooIfStaticRef`, for any lifetime `'0`
+   = note: but `Foo` is actually implemented for the type `&'1 OnlyFooIfStaticRef`, for the specific lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/auto-trait-regions.rs:48:5
@@ -13,8 +13,8 @@ error: implementation of `Foo` is not general enough
 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 the lifetime `'2`
+   = note: `Foo` would have to be implemented for the type `A<'0, '1>`, for any two lifetimes `'0` and `'1`
+   = note: but `Foo` is actually implemented for the type `A<'_, '2>`, for the specific lifetime `'2`
 
 error: aborting due to 2 previous errors
 
index e82fa51524ef1c52af48ac9171bf3590ea3a19f0..1aa0a7ca32bd1f23e8013ecaadc3c0def109d976 100644 (file)
@@ -4,8 +4,8 @@ error: implementation of `Deserialize` is not general enough
 LL |     assert_deserialize_owned::<&'static str>(); //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'static str` must implement `Deserialize<'0>` for any lifetime `'0`
-   = note: but `&str` only implements `Deserialize<'1>` for some lifetime `'1`
+   = note: `Deserialize<'0>` would have to be implemented for the type `&'static str`, for any lifetime `'0`
+   = note: but `Deserialize<'1>` is actually implemented for the type `&str`, for some lifetime `'1`
 
 error: aborting due to previous error
 
index 2ee398e3dd3b220687552a49b0c466d8945dc857..4c4f797988049082424cb824010067427ba29789 100644 (file)
@@ -5,8 +5,8 @@ LL | fn b() { want_foo2::<SomeStruct>(); } //~ ERROR
    |          ^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: Due to a where-clause on `want_foo2`,
-   = note: `SomeStruct` must implement `Foo<(&'0 isize, &'1 isize)>` for any two lifetimes `'0` and `'1`
-   = note: but `SomeStruct` only implements `Foo<(&'2 isize, &'2 isize)>` for some lifetime `'2`
+   = note: `Foo<(&'0 isize, &'1 isize)>` would have to be implemented for the type `SomeStruct`, for any two lifetimes `'0` and `'1`
+   = note: but `Foo<(&'2 isize, &'2 isize)>` is actually implemented for the type `SomeStruct`, for some lifetime `'2`
 
 error: aborting due to previous error
 
index 6a61181e2407cb915276d937d745f75b346a2779..916a524939b6b51201b0ea9832f184fc5f973ef5 100644 (file)
@@ -5,8 +5,8 @@ LL |     foo::<()>(); //~ ERROR not general enough
    |     ^^^^^^^^^
    |
    = note: Due to a where-clause on `foo`,
-   = note: `()` must implement `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>`
-   = note: but `()` only implements `Trait<fn(std::cell::Cell<&'0 u32>)>` for some lifetime `'0`
+   = note: `Trait<for<'b> fn(std::cell::Cell<&'b u32>)>` would have to be implemented for the type `()`
+   = note: but `Trait<fn(std::cell::Cell<&'0 u32>)>` is actually implemented for the type `()`, for some lifetime `'0`
 
 error: aborting due to previous error
 
index 094c449802415ff757f5c99263d5beef76f4bcc2..bd6e3dbebd2f5c1cf09305080b0da12a909560a9 100644 (file)
@@ -5,8 +5,8 @@ LL |     want_hrtb::<StaticInt>() //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^^^
    |
    = 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`
+   = note: `Foo<&'0 isize>` would have to be implemented for the type `StaticInt`, for any lifetime `'0`
+   = note: but `Foo<&'1 isize>` is actually implemented for the type `StaticInt`, for some lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/hrtb-just-for-static.rs:30:5
@@ -15,8 +15,8 @@ LL |     want_hrtb::<&'a u32>() //~ ERROR
    |     ^^^^^^^^^^^^^^^^^^^^
    |
    = note: Due to a where-clause on `want_hrtb`,
-   = note: `&'a u32` must implement `Foo<&'0 isize>` for any lifetime `'0`
-   = note: but `&'1 u32` only implements `Foo<&'1 isize>` for the lifetime `'1`
+   = note: `Foo<&'0 isize>` would have to be implemented for the type `&'a u32`, for any lifetime `'0`
+   = note: but `Foo<&'1 isize>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
 
 error: aborting due to 2 previous errors
 
index ec3bf8a1a1be3b79bfaa7356b49278130ab852eb..8b71a8a800e50d67f8cdeec32318fdc1fb119011 100644 (file)
@@ -1,12 +1,12 @@
-error[E0308]: mismatched types
+error: implementation of `Foo` is not general enough
   --> $DIR/hrtb-perfect-forwarding.rs:46:5
    |
-LL |     foo_hrtb_bar_not(&mut t); //~ ERROR E0308
-   |     ^^^^^^^^^^^^^^^^ one type is more general than the other
+LL |     foo_hrtb_bar_not(&mut t); //~ ERROR not general enough
+   |     ^^^^^^^^^^^^^^^^
    |
-   = note: expected type `Foo<&'a isize>`
-              found type `Foo<&isize>`
+   = note: Due to a where-clause on `foo_hrtb_bar_not`,
+   = note: `Foo<&'0 isize>` would have to be implemented for the type `&mut T`, for any lifetime `'0`
+   = note: but `Foo<&'1 isize>` is actually implemented for the type `&mut T`, for some lifetime `'1`
 
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0308`.
index c1329d331a18130cc6dd419714c187b17d1ef095..377bac3b24524055cae5b3fd13d9242ac5957e5d 100644 (file)
@@ -4,8 +4,8 @@ error: implementation of `Foo` is not general enough
 LL |     <u32 as RefFoo<u32>>::ref_foo(a)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'0 u32` must implement `Foo<'static, u32>` for any lifetime `'0`
-   = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+   = note: `Foo<'static, u32>` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`
+   = note: but `Foo<'_, u32>` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/issue-54302-cases.rs:69:5
@@ -13,8 +13,8 @@ error: implementation of `Foo` is not general enough
 LL |     <i32 as RefFoo<i32>>::ref_foo(a)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'0 i32` must implement `Foo<'static, i32>` for any lifetime `'0`
-   = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+   = note: `Foo<'static, i32>` would have to be implemented for the type `&'0 i32`, for any lifetime `'0`
+   = note: but `Foo<'_, i32>` is actually implemented for the type `&'1 i32`, for the specific lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/issue-54302-cases.rs:75:5
@@ -22,8 +22,8 @@ error: implementation of `Foo` is not general enough
 LL |     <u64 as RefFoo<u64>>::ref_foo(a)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'0 u64` must implement `Foo<'static, u64>` for any lifetime `'0`
-   = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+   = note: `Foo<'static, u64>` would have to be implemented for the type `&'0 u64`, for any lifetime `'0`
+   = note: but `Foo<'_, u64>` is actually implemented for the type `&'1 u64`, for the specific lifetime `'1`
 
 error: implementation of `Foo` is not general enough
   --> $DIR/issue-54302-cases.rs:81:5
@@ -31,8 +31,8 @@ error: implementation of `Foo` is not general enough
 LL |     <i64 as RefFoo<i64>>::ref_foo(a)
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'0 i64` must implement `Foo<'static, i64>` for any lifetime `'0`
-   = note: but `&'1 _` only implements `Foo<'_, _>` for the lifetime `'1`
+   = note: `Foo<'static, i64>` would have to be implemented for the type `&'0 i64`, for any lifetime `'0`
+   = note: but `Foo<'_, i64>` is actually implemented for the type `&'1 i64`, for the specific lifetime `'1`
 
 error: aborting due to 4 previous errors
 
index 1b255204b6ef71517026be13d2b3b4f753626222..ddf0414faf63f727826b7b4f9a8af292bdd2b3eb 100644 (file)
@@ -4,8 +4,8 @@ error: implementation of `Deserialize` is not general enough
 LL |     assert_deserialize_owned::<&'static str>();
    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
-   = note: `&'static str` must implement `Deserialize<'0>` for any lifetime `'0`
-   = note: but `&str` only implements `Deserialize<'1>` for some lifetime `'1`
+   = note: `Deserialize<'0>` would have to be implemented for the type `&'static str`, for any lifetime `'0`
+   = note: but `Deserialize<'1>` is actually implemented for the type `&str`, for some lifetime `'1`
 
 error: aborting due to previous error
 
index afc80bf4d8ee653b040ed3adea2e65d1b99391cf..4d827e6ce4fd65fa5eb77c1f41a239037707392b 100644 (file)
@@ -5,8 +5,8 @@ LL |     foo(&X); //~ ERROR implementation of `Bar` is not general enough
    |     ^^^
    |
    = 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 the lifetime `'1`
+   = note: `Bar` would have to be implemented for the type `&'0 u32`, for any lifetime `'0`
+   = note: but `Bar` is actually implemented for the type `&'1 u32`, for the specific lifetime `'1`
 
 error: aborting due to previous error