You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just a "bonus" or two for this one. E0326 already uses the new format, but it isn't getting as much benefit as it could. Here, also show the conflicting part of the trait, so updating it from:
error[E0326]: implemented const `BAR` has an incompatible type for trait
--> src/test/compile-fail/associated-const-impl-wrong-type.rs:20:5
|
20 | const BAR: i32 = -1;
| ^^^^^^^^^^^^^^^^^^^^ expected u32, found i32
To:
error[E0326]: implemented const `BAR` has an incompatible type for trait
--> src/test/compile-fail/associated-const-impl-wrong-type.rs:20:5
|
14 | const BAR: u32;
| --------------- original trait requirement
...
20 | const BAR: i32 = -1;
| ^^^^^^^^^^^^^^^^^^^^ expected u32, found i32
If we really wanted to get fancy, we could narrow the spans on the type itself:
error[E0326]: implemented const `BAR` has an incompatible type for trait
--> src/test/compile-fail/associated-const-impl-wrong-type.rs:20:5
|
14 | const BAR: u32;
| --- original trait requirement
...
20 | const BAR: i32 = -1;
| ^^^ expected u32
Activity
trixnz commentedon Aug 5, 2016
Taking care of this one.
Rollup merge of rust-lang#35375 - trixnz:update-error-326, r=jonathan…
Rollup merge of rust-lang#35375 - trixnz:update-error-326, r=jonathan…
Rollup merge of rust-lang#35375 - trixnz:update-error-326, r=jonathan…