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
Discussion in #7946 seems relevant, although it only directly relates to CR-only line endings. The Rust repository specifically disables that feature of git via .gitattributes (see #9214) which is something one could do in the meantime/if this issue is determined to be a non-issue.
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`
Using Windows style (or Mac OS 9) style line endings results in "unknown string escape: \r" when attempting to use a multiline string literal.
When cloning a rust library, git automatically converted the Linux style line endings to Windows which caused compilation to fail.
The text was updated successfully, but these errors were encountered: