1 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
2 --> $DIR/from_over_into.rs:8:1
4 LL | impl Into<StringWrapper> for String {
5 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
7 = note: `-D clippy::from-over-into` implied by `-D warnings`
8 = help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
9 help: replace the `Into` implementation with `From<std::string::String>`
11 LL ~ impl From<String> for StringWrapper {
12 LL ~ fn from(val: String) -> Self {
13 LL ~ StringWrapper(val)
16 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
17 --> $DIR/from_over_into.rs:16:1
19 LL | impl Into<SelfType> for String {
20 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
22 help: replace the `Into` implementation with `From<std::string::String>`
24 LL ~ impl From<String> for SelfType {
25 LL ~ fn from(val: String) -> Self {
26 LL ~ SelfType(String::new())
29 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
30 --> $DIR/from_over_into.rs:31:1
32 LL | impl Into<SelfKeywords> for X {
33 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
35 help: replace the `Into` implementation with `From<X>`
37 LL ~ impl From<X> for SelfKeywords {
38 LL ~ fn from(val: X) -> Self {
44 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
45 --> $DIR/from_over_into.rs:43:1
47 LL | impl core::convert::Into<bool> for crate::ExplicitPaths {
48 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
50 = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
51 https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
52 help: replace the `Into` implementation with `From<ExplicitPaths>`
54 LL ~ impl core::convert::From<crate::ExplicitPaths> for bool {
55 LL ~ fn from(mut val: crate::ExplicitPaths) -> Self {
56 LL ~ let in_closure = || val.0;
62 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
63 --> $DIR/from_over_into.rs:63:1
65 LL | impl Into<String> for PathInExpansion {
66 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
68 = help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
69 https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
70 help: replace the `Into` implementation with `From<PathInExpansion>`
72 LL ~ impl From<PathInExpansion> for String {
73 LL ~ fn from(val: PathInExpansion) -> Self {
76 error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
77 --> $DIR/from_over_into.rs:85:5
79 LL | impl<T> Into<FromOverInto<T>> for Vec<T> {
80 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
82 help: replace the `Into` implementation with `From<std::vec::Vec<T>>`
84 LL ~ impl<T> From<Vec<T>> for FromOverInto<T> {
85 LL ~ fn from(val: Vec<T>) -> Self {
86 LL ~ FromOverInto(val)
89 error: aborting due to 6 previous errors