Skip to content

Commit 259fa93

Browse files
committed
bless ui tests
1 parent 45c571c commit 259fa93

13 files changed

+289
-90
lines changed

tests/ui/associated-types/defaults-unsound-62211-1.next.stderr

+17-4
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,29 @@ help: consider further restricting `Self`
3131
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
3232
| +++++++++++++++++++++++++
3333

34-
error[E0277]: the trait bound `Self: Deref` is not satisfied
34+
error[E0271]: type mismatch resolving `<Self as Deref>::Target normalizes-to _`
3535
--> $DIR/defaults-unsound-62211-1.rs:24:96
3636
|
3737
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
38-
| ^^^^ the trait `Deref` is not implemented for `Self`
38+
| ^^^^ types differ
3939
|
4040
note: required by a bound in `UncheckedCopy::Output`
4141
--> $DIR/defaults-unsound-62211-1.rs:24:31
4242
|
4343
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
4444
| ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
45+
46+
error[E0277]: the trait bound `Self: Deref` is not satisfied
47+
--> $DIR/defaults-unsound-62211-1.rs:24:96
48+
|
49+
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
50+
| ^^^^ the trait `Deref` is not implemented for `Self`
51+
|
52+
note: required by a bound in `UncheckedCopy::Output`
53+
--> $DIR/defaults-unsound-62211-1.rs:24:25
54+
|
55+
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
56+
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
4557
help: consider further restricting `Self`
4658
|
4759
LL | trait UncheckedCopy: Sized + Deref {
@@ -63,6 +75,7 @@ help: consider further restricting `Self`
6375
LL | trait UncheckedCopy: Sized + Copy {
6476
| ++++++
6577

66-
error: aborting due to 4 previous errors
78+
error: aborting due to 5 previous errors
6779

68-
For more information about this error, try `rustc --explain E0277`.
80+
Some errors have detailed explanations: E0271, E0277.
81+
For more information about an error, try `rustc --explain E0271`.

tests/ui/associated-types/defaults-unsound-62211-2.next.stderr

+17-4
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,29 @@ help: consider further restricting `Self`
3131
LL | trait UncheckedCopy: Sized + AddAssign<&'static str> {
3232
| +++++++++++++++++++++++++
3333

34-
error[E0277]: the trait bound `Self: Deref` is not satisfied
34+
error[E0271]: type mismatch resolving `<Self as Deref>::Target normalizes-to _`
3535
--> $DIR/defaults-unsound-62211-2.rs:24:96
3636
|
3737
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
38-
| ^^^^ the trait `Deref` is not implemented for `Self`
38+
| ^^^^ types differ
3939
|
4040
note: required by a bound in `UncheckedCopy::Output`
4141
--> $DIR/defaults-unsound-62211-2.rs:24:31
4242
|
4343
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
4444
| ^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
45+
46+
error[E0277]: the trait bound `Self: Deref` is not satisfied
47+
--> $DIR/defaults-unsound-62211-2.rs:24:96
48+
|
49+
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
50+
| ^^^^ the trait `Deref` is not implemented for `Self`
51+
|
52+
note: required by a bound in `UncheckedCopy::Output`
53+
--> $DIR/defaults-unsound-62211-2.rs:24:25
54+
|
55+
LL | type Output: Copy + Deref<Target = str> + AddAssign<&'static str> + From<Self> + Display = Self;
56+
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `UncheckedCopy::Output`
4557
help: consider further restricting `Self`
4658
|
4759
LL | trait UncheckedCopy: Sized + Deref {
@@ -63,6 +75,7 @@ help: consider further restricting `Self`
6375
LL | trait UncheckedCopy: Sized + Copy {
6476
| ++++++
6577

66-
error: aborting due to 4 previous errors
78+
error: aborting due to 5 previous errors
6779

68-
For more information about this error, try `rustc --explain E0277`.
80+
Some errors have detailed explanations: E0271, E0277.
81+
For more information about an error, try `rustc --explain E0271`.
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
error[E0271]: type mismatch resolving `<<T as SubEncoder>::ActualSize as Add>::Output normalizes-to _`
2+
--> $DIR/issue-54108.rs:23:17
3+
|
4+
LL | type Size = <Self as SubEncoder>::ActualSize;
5+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
6+
|
7+
note: required by a bound in `Encoder::Size`
8+
--> $DIR/issue-54108.rs:8:20
9+
|
10+
LL | type Size: Add<Output = Self::Size>;
11+
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
12+
113
error[E0277]: cannot add `<T as SubEncoder>::ActualSize` to `<T as SubEncoder>::ActualSize`
214
--> $DIR/issue-54108.rs:23:17
315
|
@@ -6,16 +18,17 @@ LL | type Size = <Self as SubEncoder>::ActualSize;
618
|
719
= help: the trait `Add` is not implemented for `<T as SubEncoder>::ActualSize`
820
note: required by a bound in `Encoder::Size`
9-
--> $DIR/issue-54108.rs:8:20
21+
--> $DIR/issue-54108.rs:8:16
1022
|
1123
LL | type Size: Add<Output = Self::Size>;
12-
| ^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
24+
| ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `Encoder::Size`
1325
help: consider further restricting the associated type
1426
|
1527
LL - T: SubEncoder,
1628
LL + T: SubEncoder, <T as SubEncoder>::ActualSize: Add
1729
|
1830

19-
error: aborting due to 1 previous error
31+
error: aborting due to 2 previous errors
2032

21-
For more information about this error, try `rustc --explain E0277`.
33+
Some errors have detailed explanations: E0271, E0277.
34+
For more information about an error, try `rustc --explain E0271`.

tests/ui/auto-traits/assoc-ty.next.stderr

+13-12
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@ LL | | }
2121
= help: add `#![feature(auto_traits)]` to the crate attributes to enable
2222
= note: this compiler was built on YYYY-MM-DD; consider upgrading it if it is out of date
2323

24-
error[E0308]: mismatched types
25-
--> $DIR/assoc-ty.rs:15:36
24+
error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
25+
--> $DIR/assoc-ty.rs:15:12
2626
|
2727
LL | let _: <() as Trait>::Output = ();
28-
| --------------------- ^^ types differ
29-
| |
30-
| expected due to this
28+
| ^^^^^^^^^^^^^^^^^^^^^ types differ
29+
30+
error[E0271]: type mismatch resolving `<() as Trait>::Output normalizes-to _`
31+
--> $DIR/assoc-ty.rs:15:12
32+
|
33+
LL | let _: <() as Trait>::Output = ();
34+
| ^^^^^^^^^^^^^^^^^^^^^ types differ
3135
|
32-
= note: expected associated type `<() as Trait>::Output`
33-
found unit type `()`
34-
= help: consider constraining the associated type `<() as Trait>::Output` to `()` or calling a method that returns `<() as Trait>::Output`
35-
= note: for more information, visit https://doc.rust-lang.org/book/ch19-03-advanced-traits.html
36+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
3637

37-
error: aborting due to 3 previous errors
38+
error: aborting due to 4 previous errors
3839

39-
Some errors have detailed explanations: E0308, E0380, E0658.
40-
For more information about an error, try `rustc --explain E0308`.
40+
Some errors have detailed explanations: E0271, E0380, E0658.
41+
For more information about an error, try `rustc --explain E0271`.

tests/ui/for/issue-20605.next.stderr

+13-1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,18 @@ help: consider mutably borrowing here
1111
LL | for item in &mut *things { *item = 0 }
1212
| ++++
1313

14-
error: aborting due to 1 previous error
14+
error: the type `fn(&{type error}) -> &<{type error} as Deref>::Target` is not well-formed
15+
--> $DIR/issue-20605.rs:6:27
16+
|
17+
LL | for item in *things { *item = 0 }
18+
| ^^^^^
19+
20+
error: the type `fn(&mut {type error}) -> &mut <{type error} as Deref>::Target` is not well-formed
21+
--> $DIR/issue-20605.rs:6:27
22+
|
23+
LL | for item in *things { *item = 0 }
24+
| ^^^^^
25+
26+
error: aborting due to 3 previous errors
1527

1628
For more information about this error, try `rustc --explain E0277`.

tests/ui/impl-trait/call_method_ambiguous.next.stderr

+17-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,22 @@ help: consider giving `iter` an explicit type
1212
LL | let mut iter: /* Type */ = foo(n - 1, m);
1313
| ++++++++++++
1414

15-
error: aborting due to 1 previous error
15+
error: the type `fn(&{type error}) -> &<{type error} as Deref>::Target` is not well-formed
16+
--> $DIR/call_method_ambiguous.rs:28:9
17+
|
18+
LL | assert_eq!(iter.get(), 1);
19+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
20+
|
21+
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
22+
23+
error: the type `fn(&{type error}) -> &<{type error} as Deref>::Target` is not well-formed
24+
--> $DIR/call_method_ambiguous.rs:28:9
25+
|
26+
LL | assert_eq!(iter.get(), 1);
27+
| ^^^^^^^^^^^^^^^^^^^^^^^^^
28+
|
29+
= note: this error originates in the macro `assert_eq` (in Nightly builds, run with -Z macro-backtrace for more info)
30+
31+
error: aborting due to 3 previous errors
1632

1733
For more information about this error, try `rustc --explain E0282`.

tests/ui/impl-trait/ice-unexpected-param-type-whensubstituting-in-region-112823.next.stderr

+13-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,19 @@ error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> == ()`
2323
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
2424
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
2525

26-
error: aborting due to 3 previous errors
26+
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
27+
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:73
28+
|
29+
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
30+
| ^^ types differ
31+
32+
error[E0271]: type mismatch resolving `<Y as X>::LineStreamFut<'a, Repr> normalizes-to _`
33+
--> $DIR/ice-unexpected-param-type-whensubstituting-in-region-112823.rs:28:5
34+
|
35+
LL | fn line_stream<'a, Repr>(&'a self) -> Self::LineStreamFut<'a, Repr> {}
36+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
37+
38+
error: aborting due to 5 previous errors
2739

2840
Some errors have detailed explanations: E0049, E0271, E0407.
2941
For more information about an error, try `rustc --explain E0049`.

tests/ui/mismatched_types/closure-arg-type-mismatch-issue-45727.next.stderr

+23-1
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,17 @@ LL | let _ = (-10..=10).find(|x: i32| x.signum() == 0);
1212
note: required by a bound in `find`
1313
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
1414

15+
error[E0271]: type mismatch resolving `<{[email protected]:6:29} as FnOnce<(&{integer},)>>::Output normalizes-to _`
16+
--> $DIR/closure-arg-type-mismatch-issue-45727.rs:6:29
17+
|
18+
LL | let _ = (-10..=10).find(|x: i32| x.signum() == 0);
19+
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^ types differ
20+
| |
21+
| required by a bound introduced by this call
22+
|
23+
note: required by a bound in `find`
24+
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
25+
1526
error[E0271]: expected `RangeInclusive<{integer}>` to be an iterator that yields `&&i32`, but it yields `{integer}`
1627
--> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:24
1728
|
@@ -32,7 +43,18 @@ LL | let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
3243
note: required by a bound in `find`
3344
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
3445

35-
error: aborting due to 3 previous errors
46+
error[E0271]: type mismatch resolving `<{[email protected]:9:29} as FnOnce<(&{integer},)>>::Output normalizes-to _`
47+
--> $DIR/closure-arg-type-mismatch-issue-45727.rs:9:29
48+
|
49+
LL | let _ = (-10..=10).find(|x: &&&i32| x.signum() == 0);
50+
| ---- ^^^^^^^^^^^^^^^^^^^^^^^^^^^ types differ
51+
| |
52+
| required by a bound introduced by this call
53+
|
54+
note: required by a bound in `find`
55+
--> $SRC_DIR/core/src/iter/traits/iterator.rs:LL:COL
56+
57+
error: aborting due to 5 previous errors
3658

3759
Some errors have detailed explanations: E0271, E0277.
3860
For more information about an error, try `rustc --explain E0271`.

tests/ui/traits/next-solver/coroutine.fail.stderr

+39-2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,43 @@ note: required by a bound in `needs_coroutine`
1616
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
1717
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `needs_coroutine`
1818

19-
error: aborting due to 1 previous error
19+
error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Yield normalizes-to _`
20+
--> $DIR/coroutine.rs:20:9
21+
|
22+
LL | needs_coroutine(
23+
| --------------- required by a bound introduced by this call
24+
LL | #[coroutine]
25+
LL | / || {
26+
LL | |
27+
LL | | yield ();
28+
LL | | },
29+
| |_________^ types differ
30+
|
31+
note: required by a bound in `needs_coroutine`
32+
--> $DIR/coroutine.rs:14:41
33+
|
34+
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
35+
| ^^^^^^^^^ required by this bound in `needs_coroutine`
36+
37+
error[E0271]: type mismatch resolving `<{coroutine@$DIR/coroutine.rs:20:9: 20:11} as Coroutine<A>>::Return normalizes-to _`
38+
--> $DIR/coroutine.rs:20:9
39+
|
40+
LL | needs_coroutine(
41+
| --------------- required by a bound introduced by this call
42+
LL | #[coroutine]
43+
LL | / || {
44+
LL | |
45+
LL | | yield ();
46+
LL | | },
47+
| |_________^ types differ
48+
|
49+
note: required by a bound in `needs_coroutine`
50+
--> $DIR/coroutine.rs:14:52
51+
|
52+
LL | fn needs_coroutine(_: impl Coroutine<A, Yield = B, Return = C>) {}
53+
| ^^^^^^^^^^ required by this bound in `needs_coroutine`
54+
55+
error: aborting due to 3 previous errors
2056

21-
For more information about this error, try `rustc --explain E0277`.
57+
Some errors have detailed explanations: E0271, E0277.
58+
For more information about an error, try `rustc --explain E0271`.

tests/ui/traits/next-solver/diagnostics/projection-trait-ref.stderr

+31-2
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,20 @@ help: consider restricting type parameter `T` with trait `Trait`
99
LL | fn test_poly<T: Trait>() {
1010
| +++++++
1111

12+
error[E0271]: type mismatch resolving `<T as Trait>::Assoc normalizes-to _`
13+
--> $DIR/projection-trait-ref.rs:8:12
14+
|
15+
LL | let x: <T as Trait>::Assoc = ();
16+
| ^^^^^^^^^^^^^^^^^^^ types differ
17+
18+
error[E0271]: type mismatch resolving `<T as Trait>::Assoc normalizes-to _`
19+
--> $DIR/projection-trait-ref.rs:8:12
20+
|
21+
LL | let x: <T as Trait>::Assoc = ();
22+
| ^^^^^^^^^^^^^^^^^^^ types differ
23+
|
24+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
25+
1226
error[E0277]: the trait bound `i32: Trait` is not satisfied
1327
--> $DIR/projection-trait-ref.rs:13:12
1428
|
@@ -21,6 +35,21 @@ help: this trait has no implementations, consider adding one
2135
LL | trait Trait {
2236
| ^^^^^^^^^^^
2337

24-
error: aborting due to 2 previous errors
38+
error[E0271]: type mismatch resolving `<i32 as Trait>::Assoc normalizes-to _`
39+
--> $DIR/projection-trait-ref.rs:13:12
40+
|
41+
LL | let x: <i32 as Trait>::Assoc = ();
42+
| ^^^^^^^^^^^^^^^^^^^^^ types differ
43+
44+
error[E0271]: type mismatch resolving `<i32 as Trait>::Assoc normalizes-to _`
45+
--> $DIR/projection-trait-ref.rs:13:12
46+
|
47+
LL | let x: <i32 as Trait>::Assoc = ();
48+
| ^^^^^^^^^^^^^^^^^^^^^ types differ
49+
|
50+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
51+
52+
error: aborting due to 6 previous errors
2553

26-
For more information about this error, try `rustc --explain E0277`.
54+
Some errors have detailed explanations: E0271, E0277.
55+
For more information about an error, try `rustc --explain E0271`.

0 commit comments

Comments
 (0)