11error: consider implementing `TryFrom` instead
2- --> $DIR/fallible_impl_from.rs:6 :1
2+ --> $DIR/fallible_impl_from.rs:5 :1
33 |
44LL | / impl From<String> for Foo {
55LL | | fn from(s: String) -> Self {
@@ -15,13 +15,13 @@ LL | #![deny(clippy::fallible_impl_from)]
1515 | ^^^^^^^^^^^^^^^^^^^^^^^^^^
1616 = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
1717note: potential failure(s)
18- --> $DIR/fallible_impl_from.rs:8 :13
18+ --> $DIR/fallible_impl_from.rs:7 :13
1919 |
2020LL | Foo(s.parse().unwrap())
2121 | ^^^^^^^^^^^^^^^^^^
2222
2323error: consider implementing `TryFrom` instead
24- --> $DIR/fallible_impl_from.rs:27 :1
24+ --> $DIR/fallible_impl_from.rs:26 :1
2525 |
2626LL | / impl From<usize> for Invalid {
2727LL | | fn from(i: usize) -> Invalid {
@@ -34,14 +34,14 @@ LL | | }
3434 |
3535 = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
3636note: potential failure(s)
37- --> $DIR/fallible_impl_from.rs:30 :13
37+ --> $DIR/fallible_impl_from.rs:29 :13
3838 |
3939LL | panic!();
4040 | ^^^^^^^^^
4141 = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
4242
4343error: consider implementing `TryFrom` instead
44- --> $DIR/fallible_impl_from.rs:36 :1
44+ --> $DIR/fallible_impl_from.rs:35 :1
4545 |
4646LL | / impl From<Option<String>> for Invalid {
4747LL | | fn from(s: Option<String>) -> Invalid {
@@ -54,7 +54,7 @@ LL | | }
5454 |
5555 = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
5656note: potential failure(s)
57- --> $DIR/fallible_impl_from.rs:38 :17
57+ --> $DIR/fallible_impl_from.rs:37 :17
5858 |
5959LL | let s = s.unwrap();
6060 | ^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | panic!("{:?}", s);
6868 = note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
6969
7070error: consider implementing `TryFrom` instead
71- --> $DIR/fallible_impl_from.rs:54 :1
71+ --> $DIR/fallible_impl_from.rs:53 :1
7272 |
7373LL | / impl<'a> From<&'a mut <Box<u32> as ProjStrTrait>::ProjString> for Invalid {
7474LL | | fn from(s: &'a mut <Box<u32> as ProjStrTrait>::ProjString) -> Invalid {
@@ -81,7 +81,7 @@ LL | | }
8181 |
8282 = help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
8383note: potential failure(s)
84- --> $DIR/fallible_impl_from.rs:56 :12
84+ --> $DIR/fallible_impl_from.rs:55 :12
8585 |
8686LL | if s.parse::<u32>().ok().unwrap() != 42 {
8787 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments