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
We weren't passing the node id for the enum and hence it couldn't retrieve the field types for the struct variant we were trying to destructure.
Fixes#11577.
new lint: `unnecessary_fallible_conversions`
Closesrust-lang#11577
A new lint that looks for calls such as `i64::try_from(1i32)` and suggests `i64::from(1i32)`. See lint description (and linked issue) for more details for why.
There's a tiny bit of overlap with the `useless_conversion` lint, in that the other one warns `T::try_from(T)` (i.e., fallibly converting to the same type), so this lint ignores cases like `i32::try_from(1i32)` to avoid emitting two warnings for the same expression.
Also, funnily enough, with this one exception, this lint would warn on exactly every case in the `useless_conversion_try` ui test that `useless_conversion` didn't cover (but never two warnings at the same time), which is neat. I did add an `#![allow]` though since we don't want interleaved warnings from multiple lints in the same uitest.
changelog: new lint: `unnecessary_fallible_conversions`
task 'rustc' failed at 'explicit failure', /Users/pzol/rust/rust/src/libsyntax/diagnostic.rs:75
' failed at 'explicit failure', /Users/pzol/rust/rust/src/librustc/lib.rs:453task '
rustc -v
rustc 0.10-pre (29070c3 2014-01-14 23:01:51 -0800)
host: x86_64-apple-darwin
The text was updated successfully, but these errors were encountered: