summaryrefslogtreecommitdiffstats
path: root/tests/ui/error-codes/E0225.rs
blob: b50f68e64516f9ee6a9f19e25cef36537dc61a6b (plain)
1
2
3
4
5
6
7
8
9
10
#![feature(trait_alias)]

trait Foo = std::io::Read + std::io::Write;

fn main() {
    let _: Box<dyn std::io::Read + std::io::Write>;
    //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
    let _: Box<dyn Foo>;
    //~^ ERROR only auto traits can be used as additional traits in a trait object [E0225]
}