Skip to content

Commit 8efd236

Browse files
committed
Adjust tests after rebase
1 parent 340737d commit 8efd236

File tree

3 files changed

+27
-2
lines changed

3 files changed

+27
-2
lines changed

tests/ui/associated-inherent-types/issue-111404-1.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,7 @@ impl<'a> Foo<fn(&'a ())> {
1010
fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
1111
//~^ ERROR mismatched types [E0308]
1212
//~| ERROR mismatched types [E0308]
13+
//~| ERROR higher-ranked subtype error
14+
//~| ERROR higher-ranked subtype error
1315

1416
fn main() {}

tests/ui/associated-inherent-types/issue-111404-1.stderr

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,20 @@ LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
1717
found struct `Foo<for<'b> fn(&'b ())>`
1818
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
1919

20-
error: aborting due to 2 previous errors
20+
error: higher-ranked subtype error
21+
--> $DIR/issue-111404-1.rs:10:1
22+
|
23+
LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
24+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
25+
26+
error: higher-ranked subtype error
27+
--> $DIR/issue-111404-1.rs:10:1
28+
|
29+
LL | fn bar(_: fn(Foo<for<'b> fn(Foo<fn(&'b ())>::Assoc)>::Assoc)) {}
30+
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
31+
|
32+
= note: duplicate diagnostic emitted due to `-Z deduplicate-diagnostics=no`
33+
34+
error: aborting due to 4 previous errors
2135

2236
For more information about this error, try `rustc --explain E0308`.

tests/ui/const-generics/generic_const_exprs/typeid-equality-by-subtyping.stderr

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ error[E0277]: the trait bound `for<'a, 'b> fn(&'a (), &'b ()): WithAssoc<T>` is
1313
LL | fn unsound<T>(x: <One as WithAssoc<T>>::Assoc) -> <Two as WithAssoc<T>>::Assoc
1414
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `WithAssoc<T>` is not implemented for `for<'a, 'b> fn(&'a (), &'b ())`
1515

16-
error: aborting due to 2 previous errors
16+
error[E0277]: the trait bound `for<'a, 'b> fn(&'a (), &'b ()): WithAssoc<T>` is not satisfied
17+
--> $DIR/typeid-equality-by-subtyping.rs:47:1
18+
|
19+
LL | / {
20+
LL | | let x: <Two as WithAssoc<T>>::Assoc = generic::<One, T>(x);
21+
LL | | x
22+
LL | | }
23+
| |_^ the trait `WithAssoc<T>` is not implemented for `for<'a, 'b> fn(&'a (), &'b ())`
24+
25+
error: aborting due to 3 previous errors
1726

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

0 commit comments

Comments
 (0)