Update tests.
This commit is contained in:
parent
aea954b74d
commit
fd7c253acc
38 changed files with 1263 additions and 64 deletions
|
|
@ -4,9 +4,7 @@ fn f<T: (Copy) + (?Sized) + (for<'a> Trait<'a>)>() {}
|
|||
|
||||
fn main() {
|
||||
let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
|
||||
//~^ ERROR `?Trait` is not permitted in trait object types
|
||||
let _: Box<(?Sized) + (for<'a> Trait<'a>) + (Copy)>;
|
||||
let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
||||
//~^ ERROR `?Trait` is not permitted in trait object types
|
||||
//~| ERROR use of undeclared lifetime name `'a`
|
||||
//~^ ERROR use of undeclared lifetime name `'a`
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,21 +1,9 @@
|
|||
error: `?Trait` is not permitted in trait object types
|
||||
--> $DIR/trait-object-trait-parens.rs:6:25
|
||||
|
|
||||
LL | let _: Box<(Copy) + (?Sized) + (for<'a> Trait<'a>)>;
|
||||
| ^^^^^^^^
|
||||
|
||||
error: `?Trait` is not permitted in trait object types
|
||||
--> $DIR/trait-object-trait-parens.rs:9:47
|
||||
|
|
||||
LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
||||
| ^^^^^^^^
|
||||
|
||||
error[E0261]: use of undeclared lifetime name `'a`
|
||||
--> $DIR/trait-object-trait-parens.rs:9:31
|
||||
--> $DIR/trait-object-trait-parens.rs:8:31
|
||||
|
|
||||
LL | let _: Box<(for<'a> Trait<'a>) + (Copy) + (?Sized)>;
|
||||
| ^^ undeclared lifetime
|
||||
|
||||
error: aborting due to 3 previous errors
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0261`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue