Move bail into lint to prevent no-linting, move to unfixable
This commit is contained in:
parent
16f1cf8fd4
commit
b2c85b31bb
5 changed files with 24 additions and 26 deletions
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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() {}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue