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>;
|
2017-11-04 16:44:19 -05:00
|
|
|
//~^ 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
|
|
|
}
|