1
1
error: consider implementing `TryFrom` instead
2
- --> $DIR/fallible_impl_from.rs:6 :1
2
+ --> $DIR/fallible_impl_from.rs:5 :1
3
3
|
4
4
LL | / impl From<String> for Foo {
5
5
LL | | fn from(s: String) -> Self {
@@ -15,13 +15,13 @@ LL | #![deny(clippy::fallible_impl_from)]
15
15
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
16
16
= help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
17
17
note: potential failure(s)
18
- --> $DIR/fallible_impl_from.rs:8 :13
18
+ --> $DIR/fallible_impl_from.rs:7 :13
19
19
|
20
20
LL | Foo(s.parse().unwrap())
21
21
| ^^^^^^^^^^^^^^^^^^
22
22
23
23
error: consider implementing `TryFrom` instead
24
- --> $DIR/fallible_impl_from.rs:27 :1
24
+ --> $DIR/fallible_impl_from.rs:26 :1
25
25
|
26
26
LL | / impl From<usize> for Invalid {
27
27
LL | | fn from(i: usize) -> Invalid {
@@ -34,14 +34,14 @@ LL | | }
34
34
|
35
35
= help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
36
36
note: potential failure(s)
37
- --> $DIR/fallible_impl_from.rs:30 :13
37
+ --> $DIR/fallible_impl_from.rs:29 :13
38
38
|
39
39
LL | panic!();
40
40
| ^^^^^^^^
41
41
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
42
42
43
43
error: consider implementing `TryFrom` instead
44
- --> $DIR/fallible_impl_from.rs:36 :1
44
+ --> $DIR/fallible_impl_from.rs:35 :1
45
45
|
46
46
LL | / impl From<Option<String>> for Invalid {
47
47
LL | | fn from(s: Option<String>) -> Invalid {
@@ -54,7 +54,7 @@ LL | | }
54
54
|
55
55
= help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
56
56
note: potential failure(s)
57
- --> $DIR/fallible_impl_from.rs:38 :17
57
+ --> $DIR/fallible_impl_from.rs:37 :17
58
58
|
59
59
LL | let s = s.unwrap();
60
60
| ^^^^^^^^^^
@@ -68,7 +68,7 @@ LL | panic!("{:?}", s);
68
68
= note: this error originates in the macro `$crate::panic::panic_2015` (in Nightly builds, run with -Z macro-backtrace for more info)
69
69
70
70
error: consider implementing `TryFrom` instead
71
- --> $DIR/fallible_impl_from.rs:54 :1
71
+ --> $DIR/fallible_impl_from.rs:53 :1
72
72
|
73
73
LL | / impl<'a> From<&'a mut <Box<u32> as ProjStrTrait>::ProjString> for Invalid {
74
74
LL | | fn from(s: &'a mut <Box<u32> as ProjStrTrait>::ProjString) -> Invalid {
@@ -81,7 +81,7 @@ LL | | }
81
81
|
82
82
= help: `From` is intended for infallible conversions only. Use `TryFrom` if there's a possibility for the conversion to fail
83
83
note: potential failure(s)
84
- --> $DIR/fallible_impl_from.rs:56 :12
84
+ --> $DIR/fallible_impl_from.rs:55 :12
85
85
|
86
86
LL | if s.parse::<u32>().ok().unwrap() != 42 {
87
87
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments