tests: update tests with unconstrained parameters
With the addition of new bounds to the unconstrained parameters, there are more errors which just need blessed.
This commit is contained in:
parent
3c3ba37ba5
commit
cb711504bd
6 changed files with 32 additions and 7 deletions
|
|
@ -15,4 +15,6 @@ impl<C: ?Sized> A for u8 { //~ ERROR: the type parameter `C` is not constrained
|
|||
}
|
||||
|
||||
#[rustc_layout(debug)]
|
||||
struct S([u8; <u8 as A>::B]); //~ ERROR: the type has an unknown layout
|
||||
struct S([u8; <u8 as A>::B]);
|
||||
//~^ ERROR: the type has an unknown layout
|
||||
//~| ERROR: type annotations needed
|
||||
|
|
|
|||
|
|
@ -4,12 +4,19 @@ error[E0207]: the type parameter `C` is not constrained by the impl trait, self
|
|||
LL | impl<C: ?Sized> A for u8 {
|
||||
| ^ unconstrained type parameter
|
||||
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/unconstrained-param-ice-137308.rs:18:16
|
||||
|
|
||||
LL | struct S([u8; <u8 as A>::B]);
|
||||
| ^^ cannot infer type for type parameter `C`
|
||||
|
||||
error: the type has an unknown layout
|
||||
--> $DIR/unconstrained-param-ice-137308.rs:18:1
|
||||
|
|
||||
LL | struct S([u8; <u8 as A>::B]);
|
||||
| ^^^^^^^^
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
error: aborting due to 3 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0207`.
|
||||
Some errors have detailed explanations: E0207, E0282.
|
||||
For more information about an error, try `rustc --explain E0207`.
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ use foo::*;
|
|||
|
||||
fn test() -> impl Sized {
|
||||
<() as Callable>::call()
|
||||
//~^ ERROR: type annotations needed
|
||||
}
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ error[E0207]: the type parameter `V` is not constrained by the impl trait, self
|
|||
LL | impl<V: ?Sized> Callable for () {
|
||||
| ^ unconstrained type parameter
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/resolve-impl-before-constrain-check.rs:17:6
|
||||
|
|
||||
LL | <() as Callable>::call()
|
||||
| ^^ cannot infer type for type parameter `V`
|
||||
|
||||
For more information about this error, try `rustc --explain E0207`.
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0207, E0282.
|
||||
For more information about an error, try `rustc --explain E0207`.
|
||||
|
|
|
|||
|
|
@ -4,6 +4,13 @@ error[E0207]: the type parameter `T` is not constrained by the impl trait, self
|
|||
LL | impl<T: ?Sized> Every for Thing {
|
||||
| ^ unconstrained type parameter
|
||||
|
||||
error: aborting due to 1 previous error
|
||||
error[E0282]: type annotations needed
|
||||
--> $DIR/unconstrained-projection-normalization-2.rs:19:11
|
||||
|
|
||||
LL | fn foo(_: <Thing as Every>::Assoc) {}
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^ cannot infer type for associated type `<Thing as Every>::Assoc`
|
||||
|
||||
For more information about this error, try `rustc --explain E0207`.
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
Some errors have detailed explanations: E0207, E0282.
|
||||
For more information about an error, try `rustc --explain E0207`.
|
||||
|
|
|
|||
|
|
@ -17,5 +17,6 @@ impl<T: ?Sized> Every for Thing {
|
|||
}
|
||||
|
||||
fn foo(_: <Thing as Every>::Assoc) {}
|
||||
//[next]~^ ERROR: type annotations needed
|
||||
|
||||
fn main() {}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue