Move bail into lint to prevent no-linting, move to unfixable

This commit is contained in:
MarcusGrass 2023-06-01 16:02:42 +02:00
parent 16f1cf8fd4
commit b2c85b31bb
No known key found for this signature in database
GPG key ID: B3F995FE064E3AA9
5 changed files with 24 additions and 26 deletions

View file

@ -88,14 +88,4 @@ impl Into<Opaque> for IntoOpaque {
fn into(self) -> Opaque {}
}
pub struct Lval<T>(T);
pub struct Rval<T>(T);
impl<T> Into<Rval<Self>> for Lval<T> {
fn into(self) -> Rval<Self> {
Rval(self)
}
}
fn main() {}

View file

@ -88,14 +88,4 @@ impl Into<Opaque> for IntoOpaque {
fn into(self) -> Opaque {}
}
pub struct Lval<T>(T);
pub struct Rval<T>(T);
impl<T> Into<Rval<Self>> for Lval<T> {
fn into(self) -> Rval<Self> {
Rval(self)
}
}
fn main() {}

View file

@ -32,4 +32,14 @@ impl Into<u8> for ContainsVal {
}
}
pub struct Lval<T>(T);
pub struct Rval<T>(T);
impl<T> Into<Rval<Self>> for Lval<T> {
fn into(self) -> Rval<Self> {
Rval(self)
}
}
fn main() {}

View file

@ -25,5 +25,13 @@ LL | impl Into<u8> for ContainsVal {
https://doc.rust-lang.org/reference/items/implementations.html#trait-implementation-coherence
= help: replace the `Into` implementation with `From<ContainsVal>`
error: aborting due to 3 previous errors
error: an implementation of `From` is preferred since it gives you `Into<_>` for free where the reverse isn't true
--> $DIR/from_over_into_unfixable.rs:39:1
|
LL | impl<T> Into<Rval<Self>> for Lval<T> {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: replace the `Into` implementation with `From<Lval<T>>`
error: aborting due to 4 previous errors