fork/rust
git clone https://git.julia.blue/fork/rust
3bcad65fbf6
master
1error[E0308]: `match` arms have incompatible types 2 --> $DIR/issue-101465.rs:20:18 3 | 4LL | / match true { 5LL | | true => B, 6 | | - this is found to be of type `B` 7LL | | false => C, 8 | | ^ expected `B`, found `C` 9LL | | 10LL | | } 11 | |_____- `match` arms have incompatible types 12 | 13help: you could change the return type to be a boxed trait object 14 | 15LL | fn foo() -> Box<dyn Tr> { 16 | ~~~~~~~ + 17help: if you change the return type to expect trait objects, box the returned expressions 18 | 19LL ~ true => Box::new(B), 20LL ~ false => Box::new(C), 21 | 22 23error: aborting due to previous error 24 25For more information about this error, try `rustc --explain E0308`.