2021-01-02 09:29:43 -06:00
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2022-11-28 23:20:53 -06:00
|
|
|
--> $DIR/from_over_into.rs:10:1
|
2021-01-02 09:29:43 -06:00
|
|
|
|
|
2021-01-15 03:56:44 -06:00
|
|
|
LL | impl Into<StringWrapper> for String {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-02 09:29:43 -06:00
|
|
|
|
|
2022-09-22 11:04:22 -05:00
|
|
|
= note: `-D clippy::from-over-into` implied by `-D warnings`
|
2023-04-13 16:59:01 -05:00
|
|
|
help: replace the `Into` implementation with `From<std::string::String>`
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL ~ impl From<String> for StringWrapper {
|
|
|
|
LL ~ fn from(val: String) -> Self {
|
|
|
|
LL ~ StringWrapper(val)
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2022-11-28 23:20:53 -06:00
|
|
|
--> $DIR/from_over_into.rs:18:1
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL | impl Into<SelfType> for String {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-04-13 16:59:01 -05:00
|
|
|
help: replace the `Into` implementation with `From<std::string::String>`
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL ~ impl From<String> for SelfType {
|
|
|
|
LL ~ fn from(val: String) -> Self {
|
|
|
|
LL ~ SelfType(String::new())
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2022-11-28 23:20:53 -06:00
|
|
|
--> $DIR/from_over_into.rs:33:1
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL | impl Into<SelfKeywords> for X {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-04-13 16:59:01 -05:00
|
|
|
help: replace the `Into` implementation with `From<X>`
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL ~ impl From<X> for SelfKeywords {
|
|
|
|
LL ~ fn from(val: X) -> Self {
|
2023-05-03 13:07:02 -05:00
|
|
|
LL ~ let _ = X;
|
2022-10-14 17:50:23 -05:00
|
|
|
LL ~ let _ = X::FOO;
|
|
|
|
LL ~ let _: X = val;
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2022-11-28 23:20:53 -06:00
|
|
|
--> $DIR/from_over_into.rs:45:1
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL | impl core::convert::Into<bool> for crate::ExplicitPaths {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
|
|
|
|
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
|
2023-04-13 16:59:01 -05:00
|
|
|
help: replace the `Into` implementation with `From<ExplicitPaths>`
|
2022-10-14 17:50:23 -05:00
|
|
|
|
|
|
|
|
LL ~ impl core::convert::From<crate::ExplicitPaths> for bool {
|
|
|
|
LL ~ fn from(mut val: crate::ExplicitPaths) -> Self {
|
|
|
|
LL ~ let in_closure = || val.0;
|
|
|
|
LL |
|
|
|
|
LL ~ val.0 = false;
|
|
|
|
LL ~ val.0
|
|
|
|
|
|
2021-01-02 09:29:43 -06:00
|
|
|
|
2022-10-21 16:35:39 -05:00
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2023-05-28 16:50:08 -05:00
|
|
|
--> $DIR/from_over_into.rs:65:1
|
|
|
|
|
|
|
|
|
LL | impl Into<String> for PathInExpansion {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
|
|
|
= help: `impl From<Local> for Foreign` is allowed by the orphan rules, for more information see
|
|
|
|
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
|
|
|
|
help: replace the `Into` implementation with `From<PathInExpansion>`
|
|
|
|
|
|
|
|
|
LL ~ impl From<PathInExpansion> for String {
|
|
|
|
LL ~ fn from(val: PathInExpansion) -> Self {
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
|
|
|
--> $DIR/from_over_into.rs:87:5
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL | impl<T> Into<FromOverInto<T>> for Vec<T> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-04-13 16:59:01 -05:00
|
|
|
help: replace the `Into` implementation with `From<std::vec::Vec<T>>`
|
2022-10-21 16:35:39 -05:00
|
|
|
|
|
|
|
|
LL ~ impl<T> From<Vec<T>> for FromOverInto<T> {
|
|
|
|
LL ~ fn from(val: Vec<T>) -> Self {
|
|
|
|
LL ~ FromOverInto(val)
|
|
|
|
|
|
|
|
|
|
2023-05-28 16:50:08 -05:00
|
|
|
error: aborting due to 6 previous errors
|
2021-01-02 09:29:43 -06:00
|
|
|
|