Skip to content

Commit 1c1372c

Browse files
committed
bless diagnostics change
1 parent 4767f23 commit 1c1372c

94 files changed

Lines changed: 336 additions & 549 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

tests/ui/associated-inherent-types/inherent-assoc-ty-mismatch-issue-153539.stderr

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,7 @@ LL | fn ret_ref_local<'e>() -> &'e i32 {
1111
| ------- expected `&'e i32` because of return type
1212
...
1313
LL | f(&1)
14-
| ^^^^^ expected `&i32`, found associated type
15-
|
16-
= help: consider constraining the associated type `S<'_>::P` to `&'e i32`
17-
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
14+
| ^^^^^ expected `&i32`, found `()`
1815

1916
error: aborting due to 2 previous errors
2017

tests/ui/associated-inherent-types/next-solver-opaque-inherent-fn-ptr-issue-155204.stderr

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,17 @@ LL | type AssocType = impl Send;
4646
error[E0308]: mismatched types
4747
--> $DIR/next-solver-opaque-inherent-fn-ptr-issue-155204.rs:14:9
4848
|
49+
LL | type AssocType = impl Send;
50+
| --------- the expected opaque type
51+
...
4952
LL | fn ret(&self) -> Self::AssocType {
5053
| --------------- expected `Windows<for<'a> fn(&'a ())>::AssocType` because of return type
5154
LL |
5255
LL | ()
5356
| ^^ types differ
5457
|
55-
= note: expected associated type `Windows<for<'a> fn(&'a ())>::AssocType`
56-
found unit type `()`
57-
= help: consider constraining the associated type `Windows<for<'a> fn(&'a ())>::AssocType` to `()` or calling a method that returns `Windows<for<'a> fn(&'a ())>::AssocType`
58-
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
58+
= note: expected opaque type `Windows<for<'a> fn(&'a ())>::AssocType`
59+
found unit type `()`
5960

6061
error: aborting due to 7 previous errors
6162

tests/ui/associated-inherent-types/next-solver-opaque-inherent-no-ice.stderr

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,15 +40,16 @@ LL | type ImplTrait = impl Clone;
4040
error[E0308]: mismatched types
4141
--> $DIR/next-solver-opaque-inherent-no-ice.rs:13:9
4242
|
43+
LL | type ImplTrait = impl Clone;
44+
| ---------- the expected opaque type
45+
...
4346
LL | fn f() -> Self::ImplTrait {
4447
| --------------- expected `Foo::ImplTrait` because of return type
4548
LL | ()
4649
| ^^ types differ
4750
|
48-
= note: expected associated type `Foo::ImplTrait`
49-
found unit type `()`
50-
= help: consider constraining the associated type `Foo::ImplTrait` to `()` or calling a method that returns `Foo::ImplTrait`
51-
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
51+
= note: expected opaque type `Foo::ImplTrait`
52+
found unit type `()`
5253

5354
error: aborting due to 6 previous errors
5455

tests/ui/associated-types/associated-types-coherence-failure.stderr

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
1-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
1+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `Cow<'_, _>`
22
--> $DIR/associated-types-coherence-failure.rs:21:1
33
|
44
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
55
| ----------------------------------------------------------------------------- first implementation here
66
...
77
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Cow<'_, _>`
99

10-
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `<_ as ToOwned>::Owned`
10+
error[E0119]: conflicting implementations of trait `IntoCow<'_, _>` for type `&_`
1111
--> $DIR/associated-types-coherence-failure.rs:28:1
1212
|
1313
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for <B as ToOwned>::Owned where B: ToOwned {
1414
| ----------------------------------------------------------------------------- first implementation here
1515
...
1616
LL | impl<'a, B: ?Sized> IntoCow<'a, B> for &'a B where B: ToOwned {
17-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `<_ as ToOwned>::Owned`
17+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `&_`
1818

1919
error: aborting due to 2 previous errors
2020

tests/ui/associated-types/suggest-param-env-shadowing-incompatible-args.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ error[E0308]: mismatched types
88
--> $DIR/suggest-param-env-shadowing-incompatible-args.rs:14:9
99
|
1010
LL | fn foo() -> Self::Assoc {
11-
| ----------- expected `<() as Foo>::Assoc` because of return type
11+
| ----------- expected `u8` because of return type
1212
LL | []
1313
| ^^ expected `u8`, found `[_; 0]`
1414
|

tests/ui/coherence/coherence-with-closure.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,6 @@ struct Wrapper<T>(T);
1010
trait Trait {}
1111
impl Trait for Wrapper<OpaqueClosure> {}
1212
impl<T: Sync> Trait for Wrapper<T> {}
13-
//~^ ERROR conflicting implementations of trait `Trait` for type `Wrapper<OpaqueClosure>`
13+
//~^ ERROR: conflicting implementations of trait `Trait` for type
1414

1515
fn main() {}

tests/ui/coherence/coherence-with-closure.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<OpaqueClosure>`
1+
error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<_>`
22
--> $DIR/coherence-with-closure.rs:12:1
33
|
44
LL | impl Trait for Wrapper<OpaqueClosure> {}
55
| ------------------------------------- first implementation here
66
LL | impl<T: Sync> Trait for Wrapper<T> {}
7-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueClosure>`
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<_>`
88

99
error: aborting due to 1 previous error
1010

tests/ui/coherence/coherence-with-coroutine.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,6 @@ struct Wrapper<T>(T);
2121
trait Trait {}
2222
impl Trait for Wrapper<OpaqueCoroutine> {}
2323
impl<T: Sync> Trait for Wrapper<T> {}
24-
//[stock]~^ ERROR conflicting implementations of trait `Trait` for type `Wrapper<OpaqueCoroutine>`
24+
//[stock]~^ ERROR: conflicting implementations of trait `Trait` for type
2525

2626
fn main() {}

tests/ui/coherence/coherence-with-coroutine.stock.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<OpaqueCoroutine>`
1+
error[E0119]: conflicting implementations of trait `Trait` for type `Wrapper<_>`
22
--> $DIR/coherence-with-coroutine.rs:23:1
33
|
44
LL | impl Trait for Wrapper<OpaqueCoroutine> {}
55
| --------------------------------------- first implementation here
66
LL | impl<T: Sync> Trait for Wrapper<T> {}
7-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<OpaqueCoroutine>`
7+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `Wrapper<_>`
88

99
error: aborting due to 1 previous error
1010

tests/ui/coherence/normalize-for-errors.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, <_ as Iterator>::Item)`
1+
error[E0119]: conflicting implementations of trait `MyTrait<_>` for type `(Box<(MyType,)>, _)`
22
--> $DIR/normalize-for-errors.rs:13:1
33
|
44
LL | impl<T: Copy, S: Iterator> MyTrait<S> for (T, S::Item) {}
55
| ------------------------------------------------------ first implementation here
66
LL |
77
LL | impl<S: Iterator> MyTrait<S> for (Box<<(MyType,) as Mirror>::Assoc>, S::Item) {}
8-
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, <_ as Iterator>::Item)`
8+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation for `(Box<(MyType,)>, _)`
99
|
1010
= note: upstream crates may add a new impl of trait `std::clone::Clone` for type `std::boxed::Box<(MyType,)>` in future versions
1111
= note: upstream crates may add a new impl of trait `std::marker::Copy` for type `std::boxed::Box<(MyType,)>` in future versions

0 commit comments

Comments
 (0)