File tree 2 files changed +4
-4
lines changed
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;
14
14
trait Bar = Foo ;
15
15
16
16
fn 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
19
19
}
Original file line number Diff line number Diff line change 1
1
error[E0225]: only auto traits can be used as additional traits in a trait object
2
2
--> $DIR/E0225.rs:17:32
3
3
|
4
- LL | let _: Box<std::io::Read + std::io::Write>;
4
+ LL | let _: Box<std::io::Read + std::io::Write>; //~ ERROR E0225
5
5
| ^^^^^^^^^^^^^^ non-auto additional trait
6
6
7
7
error[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;
12
12
LL | trait Bar = Foo;
13
13
| --- referenced by this alias
14
14
...
15
- LL | let _: Box<Bar>;
15
+ LL | let _: Box<Bar>; //~ ERROR E0225
16
16
| ^^^
17
17
18
18
error: aborting due to 2 previous errors
You can’t perform that action at this time.
0 commit comments