rust/tests/ui/error-codes/E0225.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

11 lines
344 B
Rust
Raw Normal View History

2019-03-26 12:23:09 -05:00
#![feature(trait_alias)]
trait Foo = std::io::Read + std::io::Write;
2016-08-03 18:51:52 -05:00
fn main() {
2019-05-01 20:21:20 -05:00
let _: Box<dyn std::io::Read + std::io::Write>;
//~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
2019-05-01 20:21:20 -05:00
let _: Box<dyn Foo>;
2019-03-26 12:23:09 -05:00
//~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
2016-08-03 18:51:52 -05:00
}