Skip to content

Commit cb71150

Browse files
committed
tests: update tests with unconstrained parameters
With the addition of new bounds to the unconstrained parameters, there are more errors which just need blessed.
1 parent 3c3ba37 commit cb71150

6 files changed

+32
-7
lines changed

tests/ui/layout/unconstrained-param-ice-137308.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,6 @@ impl<C: ?Sized> A for u8 { //~ ERROR: the type parameter `C` is not constrained
1515
}
1616

1717
#[rustc_layout(debug)]
18-
struct S([u8; <u8 as A>::B]); //~ ERROR: the type has an unknown layout
18+
struct S([u8; <u8 as A>::B]);
19+
//~^ ERROR: the type has an unknown layout
20+
//~| ERROR: type annotations needed

tests/ui/layout/unconstrained-param-ice-137308.stderr

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,19 @@ error[E0207]: the type parameter `C` is not constrained by the impl trait, self
44
LL | impl<C: ?Sized> A for u8 {
55
| ^ unconstrained type parameter
66

7+
error[E0282]: type annotations needed
8+
--> $DIR/unconstrained-param-ice-137308.rs:18:16
9+
|
10+
LL | struct S([u8; <u8 as A>::B]);
11+
| ^^ cannot infer type for type parameter `C`
12+
713
error: the type has an unknown layout
814
--> $DIR/unconstrained-param-ice-137308.rs:18:1
915
|
1016
LL | struct S([u8; <u8 as A>::B]);
1117
| ^^^^^^^^
1218

13-
error: aborting due to 2 previous errors
19+
error: aborting due to 3 previous errors
1420

15-
For more information about this error, try `rustc --explain E0207`.
21+
Some errors have detailed explanations: E0207, E0282.
22+
For more information about an error, try `rustc --explain E0207`.

tests/ui/traits/resolve-impl-before-constrain-check.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ use foo::*;
1515

1616
fn test() -> impl Sized {
1717
<() as Callable>::call()
18+
//~^ ERROR: type annotations needed
1819
}
1920

2021
fn main() {}

tests/ui/traits/resolve-impl-before-constrain-check.stderr

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ error[E0207]: the type parameter `V` is not constrained by the impl trait, self
44
LL | impl<V: ?Sized> Callable for () {
55
| ^ unconstrained type parameter
66

7-
error: aborting due to 1 previous error
7+
error[E0282]: type annotations needed
8+
--> $DIR/resolve-impl-before-constrain-check.rs:17:6
9+
|
10+
LL | <() as Callable>::call()
11+
| ^^ cannot infer type for type parameter `V`
12+
13+
error: aborting due to 2 previous errors
814

9-
For more information about this error, try `rustc --explain E0207`.
15+
Some errors have detailed explanations: E0207, E0282.
16+
For more information about an error, try `rustc --explain E0207`.

tests/ui/traits/unconstrained-projection-normalization-2.next.stderr

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,13 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
44
LL | impl<T: ?Sized> Every for Thing {
55
| ^ unconstrained type parameter
66

7-
error: aborting due to 1 previous error
7+
error[E0282]: type annotations needed
8+
--> $DIR/unconstrained-projection-normalization-2.rs:19:11
9+
|
10+
LL | fn foo(_: <Thing as Every>::Assoc) {}
11+
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for associated type `<Thing as Every>::Assoc`
12+
13+
error: aborting due to 2 previous errors
814

9-
For more information about this error, try `rustc --explain E0207`.
15+
Some errors have detailed explanations: E0207, E0282.
16+
For more information about an error, try `rustc --explain E0207`.

tests/ui/traits/unconstrained-projection-normalization-2.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,5 +17,6 @@ impl<T: ?Sized> Every for Thing {
1717
}
1818

1919
fn foo(_: <Thing as Every>::Assoc) {}
20+
//[next]~^ ERROR: type annotations needed
2021

2122
fn main() {}

0 commit comments

Comments
 (0)