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