]>
Commit | Line | Data |
---|---|---|
2b03887a | 1 | error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true |
c620b35d | 2 | --> tests/ui/from_over_into_unfixable.rs:11:1 |
2b03887a FG |
3 | | |
4 | LL | impl Into<InMacro> for String { | |
5 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
6 | | | |
49aad941 | 7 | = help: replace the `Into` implementation with `From<std::string::String>` |
2b03887a | 8 | = note: `-D clippy::from-over-into` implied by `-D warnings` |
781aab86 | 9 | = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]` |
2b03887a FG |
10 | |
11 | error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true | |
c620b35d | 12 | --> tests/ui/from_over_into_unfixable.rs:20:1 |
2b03887a FG |
13 | | |
14 | LL | impl Into<WeirdUpperSelf> for &'static [u8] { | |
15 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
16 | | | |
49aad941 | 17 | = help: replace the `Into` implementation with `From<&'static [u8]>` |
2b03887a FG |
18 | |
19 | error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true | |
c620b35d | 20 | --> tests/ui/from_over_into_unfixable.rs:30:1 |
2b03887a FG |
21 | | |
22 | LL | impl Into<u8> for ContainsVal { | |
23 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
24 | | | |
25 | = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see | |
26 | https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence | |
49aad941 | 27 | = help: replace the `Into` implementation with `From<ContainsVal>` |
2b03887a | 28 | |
fe692bf9 | 29 | error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true |
c620b35d | 30 | --> tests/ui/from_over_into_unfixable.rs:42:1 |
fe692bf9 FG |
31 | | |
32 | LL | impl<T> Into<Rval<Self>> for Lval<T> { | |
33 | | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ | |
34 | | | |
35 | = help: replace the `Into` implementation with `From<Lval<T>>` | |
36 | ||
37 | error: aborting due to 4 previous errors | |
2b03887a | 38 |