Closed
Description
https://is.gd/Z7Xp3U
This code is giving much worse error message on nightly than on stable.
#[derive(Debug)]
enum Shape {
Square { size: i32 },
Circle { radius: i32 },
}
fn main() {
println!("My shapre is {:?}", Shape::Squareee{ size: 5});
}
Nightly error message:
rustc 1.15.0-nightly (3bf2be9ce 2016-11-22)
error[E0223]: ambiguous associated type
--> <anon>:10:35
|
10 | println!("My shapre is {:?}", Shape::Squareee{ size: 5});
| ^^^^^^^^^^^^^^ ambiguous associated type
|
= note: specify the type using the syntax `<Shape as Trait>::Squareee`
error: aborting due to previous error
Stable error message:
rustc 1.13.0 (2c6933acc 2016-11-07)
error[E0422]: `Shape::Squaree` does not name a structure
--> <anon>:10:35
|
10 | println!("My shapre is {:?}", Shape::Squaree{ size: 5});
| ^^^^^^^^^^^^^^ not a structure
error: aborting due to previous error
The new error message is much less helpful