File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -14,6 +14,6 @@ trait Foo = std::io::Read + std::io::Write;
1414trait Bar = Foo ;
1515
1616fn main ( ) {
17- let _: Box < std:: io:: Read + std:: io:: Write > ;
18- let _: Box < Bar > ;
17+ let _: Box < std:: io:: Read + std:: io:: Write > ; //~ ERROR E0225
18+ let _: Box < Bar > ; //~ ERROR E0225
1919}
Original file line number Diff line number Diff line change 11error[E0225]: only auto traits can be used as additional traits in a trait object
22 --> $DIR/E0225.rs:17:32
33 |
4- LL | let _: Box<std::io::Read + std::io::Write>;
4+ LL | let _: Box<std::io::Read + std::io::Write>; //~ ERROR E0225
55 | ^^^^^^^^^^^^^^ non-auto additional trait
66
77error[E0225]: only auto traits can be used as additional traits in a trait object
@@ -12,7 +12,7 @@ LL | trait Foo = std::io::Read + std::io::Write;
1212LL | trait Bar = Foo;
1313 | --- referenced by this alias
1414...
15- LL | let _: Box<Bar>;
15+ LL | let _: Box<Bar>; //~ ERROR E0225
1616 | ^^^
1717
1818error: aborting due to 2 previous errors
You can’t perform that action at this time.
0 commit comments