mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-13 04:26:48 +00:00
Update tests.
This commit is contained in:
parent
9f800457dd
commit
72e5e8bfa7
@ -1,4 +1,10 @@
|
||||
#![feature(trait_alias)]
|
||||
|
||||
trait Foo = std::io::Read + std::io::Write;
|
||||
|
||||
fn main() {
|
||||
let _: Box<std::io::Read + std::io::Write>;
|
||||
//~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
|
||||
let _: Box<Foo>;
|
||||
//~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
|
||||
}
|
||||
|
@ -1,9 +1,18 @@
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
--> $DIR/E0225.rs:2:32
|
||||
--> $DIR/E0225.rs:6:32
|
||||
|
|
||||
LL | let _: Box<std::io::Read + std::io::Write>;
|
||||
| ^^^^^^^^^^^^^^ non-auto additional trait
|
||||
|
||||
error: aborting due to previous error
|
||||
error[E0225]: only auto traits can be used as additional traits in a trait object
|
||||
--> $DIR/E0225.rs:8:16
|
||||
|
|
||||
LL | trait Foo = std::io::Read + std::io::Write;
|
||||
| -------------- non-auto additional trait
|
||||
...
|
||||
LL | let _: Box<Foo>;
|
||||
| ^^^ expanded from this alias
|
||||
|
||||
error: aborting due to 2 previous errors
|
||||
|
||||
For more information about this error, try `rustc --explain E0225`.
|
||||
|
Loading…
Reference in New Issue
Block a user