2021-01-02 15:29:43 +00:00
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:8:1
|
2021-01-02 15:29:43 +00:00
|
|
|
|
|
2021-01-15 09:56:44 +00:00
|
|
|
LL | impl Into<StringWrapper> for String {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
2021-01-02 15:29:43 +00:00
|
|
|
|
|
2022-09-22 16:04:22 +00:00
|
|
|
= note: `-D clippy::from-over-into` implied by `-D warnings`
|
2023-08-01 12:02:21 +00:00
|
|
|
= help: to override `-D warnings` add `#[allow(clippy::from_over_into)]`
|
2023-05-05 15:45:49 +00:00
|
|
|
help: replace the `Into` implementation with `From<std::string::String>`
|
2022-10-23 13:18:45 +00: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
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:16:1
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | impl Into<SelfType> for String {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-05-05 15:45:49 +00:00
|
|
|
help: replace the `Into` implementation with `From<std::string::String>`
|
2022-10-23 13:18:45 +00: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
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:31:1
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | impl Into<SelfKeywords> for X {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-05-05 15:45:49 +00:00
|
|
|
help: replace the `Into` implementation with `From<X>`
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL ~ impl From<X> for SelfKeywords {
|
|
|
|
LL ~ fn from(val: X) -> Self {
|
2023-05-05 15:45:49 +00:00
|
|
|
LL ~ let _ = X;
|
2022-10-23 13:18:45 +00: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
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:43:1
|
2022-10-23 13:18:45 +00: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-05-05 15:45:49 +00:00
|
|
|
help: replace the `Into` implementation with `From<ExplicitPaths>`
|
2022-10-23 13:18:45 +00: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
|
|
|
|
|
|
|
|
|
|
|
|
|
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:63:1
|
2023-07-02 12:35:19 +00:00
|
|
|
|
|
|
|
|
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
|
2023-08-24 19:32:12 +00:00
|
|
|
--> $DIR/from_over_into.rs:85:5
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL | impl<T> Into<FromOverInto<T>> for Vec<T> {
|
|
|
|
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
|
|
|
|
|
2023-05-05 15:45:49 +00:00
|
|
|
help: replace the `Into` implementation with `From<std::vec::Vec<T>>`
|
2022-10-23 13:18:45 +00:00
|
|
|
|
|
|
|
|
LL ~ impl<T> From<Vec<T>> for FromOverInto<T> {
|
|
|
|
LL ~ fn from(val: Vec<T>) -> Self {
|
|
|
|
LL ~ FromOverInto(val)
|
|
|
|
|
|
2021-01-02 15:29:43 +00:00
|
|
|
|
2023-07-02 12:35:19 +00:00
|
|
|
error: aborting due to 6 previous errors
|
2021-01-02 15:29:43 +00:00
|
|
|
|