Update clippy tests
This commit is contained in:
parent
1d57c3e1fb
commit
09a9ea69bf
@ -312,17 +312,18 @@ mod issue4140 {
|
||||
fn try_from(value: T) -> Result<Self, Error<Self::From, Self::To>>;
|
||||
}
|
||||
|
||||
impl<F, T> TryFrom<F> for T
|
||||
where
|
||||
T: From<F>,
|
||||
{
|
||||
type From = Self;
|
||||
type To = Self;
|
||||
// FIXME: Suggested fix results in infinite recursion.
|
||||
// impl<F, T> TryFrom<F> for T
|
||||
// where
|
||||
// T: From<F>,
|
||||
// {
|
||||
// type From = Self::From;
|
||||
// type To = Self::To;
|
||||
|
||||
fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
|
||||
Ok(From::from(value))
|
||||
}
|
||||
}
|
||||
// fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
|
||||
// Ok(From::from(value))
|
||||
// }
|
||||
// }
|
||||
|
||||
impl From<bool> for i64 {
|
||||
type From = bool;
|
||||
|
@ -312,17 +312,18 @@ mod issue4140 {
|
||||
fn try_from(value: T) -> Result<Self, Error<Self::From, Self::To>>;
|
||||
}
|
||||
|
||||
impl<F, T> TryFrom<F> for T
|
||||
where
|
||||
T: From<F>,
|
||||
{
|
||||
type From = T::From;
|
||||
type To = T::To;
|
||||
// FIXME: Suggested fix results in infinite recursion.
|
||||
// impl<F, T> TryFrom<F> for T
|
||||
// where
|
||||
// T: From<F>,
|
||||
// {
|
||||
// type From = Self::From;
|
||||
// type To = Self::To;
|
||||
|
||||
fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
|
||||
Ok(From::from(value))
|
||||
}
|
||||
}
|
||||
// fn try_from(value: F) -> Result<Self, Error<Self::From, Self::To>> {
|
||||
// Ok(From::from(value))
|
||||
// }
|
||||
// }
|
||||
|
||||
impl From<bool> for i64 {
|
||||
type From = bool;
|
||||
|
@ -157,22 +157,10 @@ LL | Foo { value }
|
||||
| ^^^ help: use the applicable keyword: `Self`
|
||||
|
||||
error: unnecessary structure name repetition
|
||||
--> $DIR/use_self.rs:319:21
|
||||
|
|
||||
LL | type From = T::From;
|
||||
| ^^^^^^^ help: use the applicable keyword: `Self`
|
||||
|
||||
error: unnecessary structure name repetition
|
||||
--> $DIR/use_self.rs:320:19
|
||||
|
|
||||
LL | type To = T::To;
|
||||
| ^^^^^ help: use the applicable keyword: `Self`
|
||||
|
||||
error: unnecessary structure name repetition
|
||||
--> $DIR/use_self.rs:453:13
|
||||
--> $DIR/use_self.rs:454:13
|
||||
|
|
||||
LL | A::new::<submod::B>(submod::B {})
|
||||
| ^ help: use the applicable keyword: `Self`
|
||||
|
||||
error: aborting due to 29 previous errors
|
||||
error: aborting due to 27 previous errors
|
||||
|
||||
|
@ -83,7 +83,7 @@ error: map with zero-sized value type
|
||||
--> $DIR/zero_sized_btreemap_values.rs:64:35
|
||||
|
|
||||
LL | let _: BTreeMap<String, ()> = BTreeMap::new();
|
||||
| ^^^^^^^^^^^^^
|
||||
| ^^^^^^^^
|
||||
|
|
||||
= help: consider using a set instead
|
||||
|
||||
|
@ -83,7 +83,7 @@ error: map with zero-sized value type
|
||||
--> $DIR/zero_sized_hashmap_values.rs:64:34
|
||||
|
|
||||
LL | let _: HashMap<String, ()> = HashMap::new();
|
||||
| ^^^^^^^^^^^^
|
||||
| ^^^^^^^
|
||||
|
|
||||
= help: consider using a set instead
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user