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