Use TraitRef::to_string sorting in favor of TraitRef::ord, as the latter compares DefIds which we need to avoid

This commit is contained in:
Oli Scherer 2024-03-21 12:55:28 +00:00
parent 2707ac9606
commit ae24fef028
48 changed files with 257 additions and 257 deletions

View File

@ -2117,7 +2117,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
})
.collect();
impl_candidates.sort();
impl_candidates.sort_by_key(|tr| tr.to_string());
impl_candidates.dedup();
return report(impl_candidates, err);
}
@ -2143,7 +2143,7 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
cand
})
.collect();
impl_candidates.sort_by_key(|cand| (cand.similarity, cand.trait_ref));
impl_candidates.sort_by_key(|cand| (cand.similarity, cand.trait_ref.to_string()));
let mut impl_candidates: Vec<_> =
impl_candidates.into_iter().map(|cand| cand.trait_ref).collect();
impl_candidates.dedup();

View File

@ -247,14 +247,14 @@ LL | _ = &&0 == Foo;
|
= help: the trait `PartialEq<Foo>` is not implemented for `&&{integer}`
= help: the following other types implement trait `PartialEq<Rhs>`:
isize
i8
f32
f64
i128
i16
i32
i64
i128
usize
u8
i8
isize
and 6 others
error[E0369]: binary operation `==` cannot be applied to type `Foo`
@ -303,10 +303,10 @@ LL | let _ = FOO & (*"Sized".to_string().into_boxed_str());
|
= help: the trait `BitAnd<str>` is not implemented for `i32`
= help: the following other types implement trait `BitAnd<Rhs>`:
<i32 as BitAnd>
<i32 as BitAnd<&i32>>
<&'a i32 as BitAnd<i32>>
<&i32 as BitAnd<&i32>>
<i32 as BitAnd<&i32>>
<i32 as BitAnd>
error[E0277]: the size for values of type `str` cannot be known at compilation time
--> $DIR/binary-op-suggest-deref.rs:78:17

View File

@ -6,10 +6,10 @@ LL | x * y
|
= help: the trait `Mul<f32>` is not implemented for `i32`
= help: the following other types implement trait `Mul<Rhs>`:
<i32 as Mul>
<i32 as Mul<&i32>>
<&'a i32 as Mul<i32>>
<&i32 as Mul<&i32>>
<i32 as Mul<&i32>>
<i32 as Mul>
error: aborting due to 1 previous error

View File

@ -6,14 +6,14 @@ LL | 22 >> p.char;
|
= help: the trait `Shr<char>` is not implemented for `{integer}`
= help: the following other types implement trait `Shr<Rhs>`:
<isize as Shr>
<isize as Shr<i8>>
<isize as Shr<i16>>
<isize as Shr<i32>>
<isize as Shr<i64>>
<isize as Shr<i128>>
<isize as Shr<usize>>
<isize as Shr<u8>>
<&'a i128 as Shr<i128>>
<&'a i128 as Shr<i16>>
<&'a i128 as Shr<i32>>
<&'a i128 as Shr<i64>>
<&'a i128 as Shr<i8>>
<&'a i128 as Shr<isize>>
<&'a i128 as Shr<u128>>
<&'a i128 as Shr<u16>>
and 568 others
error[E0277]: no implementation for `{integer} >> &str`
@ -24,14 +24,14 @@ LL | 22 >> p.str;
|
= help: the trait `Shr<&str>` is not implemented for `{integer}`
= help: the following other types implement trait `Shr<Rhs>`:
<isize as Shr>
<isize as Shr<i8>>
<isize as Shr<i16>>
<isize as Shr<i32>>
<isize as Shr<i64>>
<isize as Shr<i128>>
<isize as Shr<usize>>
<isize as Shr<u8>>
<&'a i128 as Shr<i128>>
<&'a i128 as Shr<i16>>
<&'a i128 as Shr<i32>>
<&'a i128 as Shr<i64>>
<&'a i128 as Shr<i8>>
<&'a i128 as Shr<isize>>
<&'a i128 as Shr<u128>>
<&'a i128 as Shr<u16>>
and 568 others
error[E0277]: no implementation for `{integer} >> &Panolpy`
@ -42,14 +42,14 @@ LL | 22 >> p;
|
= help: the trait `Shr<&Panolpy>` is not implemented for `{integer}`
= help: the following other types implement trait `Shr<Rhs>`:
<isize as Shr>
<isize as Shr<i8>>
<isize as Shr<i16>>
<isize as Shr<i32>>
<isize as Shr<i64>>
<isize as Shr<i128>>
<isize as Shr<usize>>
<isize as Shr<u8>>
<&'a i128 as Shr<i128>>
<&'a i128 as Shr<i16>>
<&'a i128 as Shr<i32>>
<&'a i128 as Shr<i64>>
<&'a i128 as Shr<i8>>
<&'a i128 as Shr<isize>>
<&'a i128 as Shr<u128>>
<&'a i128 as Shr<u16>>
and 568 others
error[E0308]: mismatched types

View File

@ -6,13 +6,13 @@ LL | <() as Foo<N>>::test()
|
= help: the following other types implement trait `Foo<N>`:
<() as Foo<0>>
<() as Foo<1>>
<() as Foo<2>>
<() as Foo<3>>
<() as Foo<4>>
<() as Foo<5>>
<() as Foo<6>>
<() as Foo<7>>
<() as Foo<100>>
<() as Foo<101>>
<() as Foo<102>>
<() as Foo<103>>
<() as Foo<104>>
<() as Foo<105>>
<() as Foo<106>>
and 248 others
error: aborting due to 1 previous error

View File

@ -6,11 +6,11 @@ LL | let y = Mask::<_, _>::splat(false);
|
= note: cannot satisfy `_: MaskElement`
= help: the following types implement trait `MaskElement`:
isize
i8
i16
i32
i64
i8
isize
note: required by a bound in `Mask::<T, N>::splat`
--> $SRC_DIR/core/src/../../portable-simd/crates/core_simd/src/masks.rs:LL:COL
help: consider giving `y` an explicit type, where the type for type parameter `T` is specified

View File

@ -5,8 +5,8 @@ LL | <u8 as Baz>::Quaks: Bar,
| ^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -20,8 +20,8 @@ LL | [<u8 as Baz>::Quaks; 2]: Bar,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
= help: see issue #48214
help: add `#![feature(trivial_bounds)]` to the crate attributes to enable
|
@ -35,8 +35,8 @@ LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`, which is required by `<u8 as Baz>::Quaks: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:15:25
|
@ -53,8 +53,8 @@ LL | impl Foo for FooImpl {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`, which is required by `[<u8 as Baz>::Quaks; 2]: Bar`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:14:30
|
@ -71,8 +71,8 @@ LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:14:30
|
@ -89,8 +89,8 @@ LL | fn f(_: impl Foo) {}
| ^^^ the trait `Bar` is not implemented for `[u16; 3]`
|
= help: the following other types implement trait `Bar`:
[u16; 4]
[[u16; 3]; 3]
[u16; 4]
note: required by a bound in `Foo`
--> $DIR/issue-67185-2.rs:15:25
|

View File

@ -12,10 +12,10 @@ LL | = [0; (i8::MAX + 1u8) as usize];
|
= help: the trait `Add<u8>` is not implemented for `i8`
= help: the following other types implement trait `Add<Rhs>`:
<i8 as Add>
<i8 as Add<&i8>>
<&'a i8 as Add<i8>>
<&i8 as Add<&i8>>
<i8 as Add<&i8>>
<i8 as Add>
error: aborting due to 2 previous errors

View File

@ -12,10 +12,10 @@ LL | : [u32; (i8::MAX as i8 + 1u8) as usize]
|
= help: the trait `Add<u8>` is not implemented for `i8`
= help: the following other types implement trait `Add<Rhs>`:
<i8 as Add>
<i8 as Add<&i8>>
<&'a i8 as Add<i8>>
<&i8 as Add<&i8>>
<i8 as Add<&i8>>
<i8 as Add>
error[E0604]: only `u8` can be cast as `char`, not `i8`
--> $DIR/const-eval-overflow-4b.rs:22:13

View File

@ -5,14 +5,14 @@ LL | <[X; 35] as Default>::default();
| ^^^^^^^ the trait `Default` is not implemented for `[X; 35]`
|
= help: the following other types implement trait `Default`:
&[T]
&mut [T]
[T; 0]
[T; 1]
[T; 2]
[T; 3]
[T; 4]
[T; 5]
[T; 6]
[T; 7]
[T; 10]
[T; 11]
[T; 12]
[T; 13]
[T; 14]
and 27 others
error: aborting due to 1 previous error

View File

@ -22,14 +22,14 @@ LL | [5; Self::HOST_SIZE] == [6; 0]
|
= help: the trait `PartialEq<[{integer}; 0]>` is not implemented for `[{integer}; Self::HOST_SIZE]`
= help: the following other types implement trait `PartialEq<Rhs>`:
<[T; N] as PartialEq<[U; N]>>
<[T; N] as PartialEq<[U]>>
<&[T] as PartialEq<Vec<U, A>>>
<&[T] as PartialEq<[U; N]>>
<&mut [T] as PartialEq<Vec<U, A>>>
<&mut [T] as PartialEq<[U; N]>>
<[T; N] as PartialEq<&[U]>>
<[T; N] as PartialEq<&mut [U]>>
<[T] as PartialEq<Vec<U, A>>>
<[T] as PartialEq<[U; N]>>
<[T] as PartialEq<[U]>>
<&[T] as PartialEq<Vec<U, A>>>
<[T; N] as PartialEq<[U; N]>>
<[T; N] as PartialEq<[U]>>
and 3 others
error: aborting due to 3 previous errors

View File

@ -8,14 +8,14 @@ LL | Float(Option<f64>),
| ^^^^^^^^^^^ the trait `Eq` is not implemented for `f64`, which is required by `Option<f64>: Eq`
|
= help: the following other types implement trait `Eq`:
isize
i8
i128
i16
i32
i64
i128
usize
u8
i8
isize
u128
u16
and 4 others
= note: required for `Option<f64>` to implement `Eq`
note: required by a bound in `AssertParamIsEq`

View File

@ -7,12 +7,12 @@ LL | f1.foo(1usize);
| required by a bound introduced by this call
|
= help: the following other types implement trait `Foo<A>`:
<Bar as Foo<i8>>
<Bar as Foo<i16>>
<Bar as Foo<i32>>
<Bar as Foo<u8>>
<Bar as Foo<i8>>
<Bar as Foo<u16>>
<Bar as Foo<u32>>
<Bar as Foo<u8>>
error: aborting due to 1 previous error

View File

@ -8,10 +8,10 @@ LL | Foo::<i32>::bar(&1i8);
|
= help: the following other types implement trait `Foo<B>`:
<i8 as Foo<bool>>
<i8 as Foo<u8>>
<i8 as Foo<u16>>
<i8 as Foo<u32>>
<i8 as Foo<u64>>
<i8 as Foo<u8>>
error[E0277]: the trait bound `u8: Foo<i32>` is not satisfied
--> $DIR/issue-39802-show-5-trait-impls.rs:25:21
@ -38,10 +38,10 @@ LL | Foo::<i32>::bar(&true);
= help: the following other types implement trait `Foo<B>`:
<bool as Foo<bool>>
<bool as Foo<i8>>
<bool as Foo<u8>>
<bool as Foo<u16>>
<bool as Foo<u32>>
<bool as Foo<u64>>
<bool as Foo<u8>>
error: aborting due to 3 previous errors

View File

@ -7,14 +7,14 @@ LL | format!("{:X}", "3");
| required by a bound introduced by this call
|
= help: the following other types implement trait `UpperHex`:
isize
i8
&T
&mut T
NonZero<T>
Saturating<T>
Wrapping<T>
i128
i16
i32
i64
i128
usize
u8
and 9 others
= note: required for `&str` to implement `UpperHex`
note: required by a bound in `core::fmt::rt::Argument::<'a>::new_upper_hex`

View File

@ -30,10 +30,10 @@ LL | n + sum_to(n - 1)
|
= help: the trait `Add<impl Foo>` is not implemented for `u32`
= help: the following other types implement trait `Add<Rhs>`:
<u32 as Add>
<u32 as Add<&u32>>
<&'a u32 as Add<u32>>
<&u32 as Add<&u32>>
<u32 as Add<&u32>>
<u32 as Add>
error: aborting due to 2 previous errors; 1 warning emitted

View File

@ -35,14 +35,14 @@ LL | -> <::std::ops::Range<impl Debug> as Iterator>::Item
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Step` is not implemented for `impl Debug`, which is required by `std::ops::Range<impl Debug>: Iterator`
|
= help: the following other types implement trait `Step`:
Char
Ipv4Addr
Ipv6Addr
char
isize
i8
i128
i16
i32
i64
i128
usize
and 8 others
= note: required for `std::ops::Range<impl Debug>` to implement `Iterator`
@ -56,14 +56,14 @@ LL | | }
| |_^ the trait `Step` is not implemented for `impl Debug`, which is required by `std::ops::Range<impl Debug>: Iterator`
|
= help: the following other types implement trait `Step`:
Char
Ipv4Addr
Ipv6Addr
char
isize
i8
i128
i16
i32
i64
i128
usize
and 8 others
= note: required for `std::ops::Range<impl Debug>` to implement `Iterator`

View File

@ -6,14 +6,14 @@ LL | 1 +
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
<isize as Add>
<isize as Add<&isize>>
<i8 as Add>
<i8 as Add<&i8>>
<i16 as Add>
<i16 as Add<&i16>>
<i32 as Add>
<i32 as Add<&i32>>
<&'a f32 as Add<f32>>
<&'a f64 as Add<f64>>
<&'a i128 as Add<i128>>
<&'a i16 as Add<i16>>
<&'a i32 as Add<i32>>
<&'a i64 as Add<i64>>
<&'a i8 as Add<i8>>
<&'a isize as Add<isize>>
and 48 others
error[E0277]: cannot add `()` to `{integer}`
@ -24,14 +24,14 @@ LL | 1 +
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
<isize as Add>
<isize as Add<&isize>>
<i8 as Add>
<i8 as Add<&i8>>
<i16 as Add>
<i16 as Add<&i16>>
<i32 as Add>
<i32 as Add<&i32>>
<&'a f32 as Add<f32>>
<&'a f64 as Add<f64>>
<&'a i128 as Add<i128>>
<&'a i16 as Add<i16>>
<&'a i32 as Add<i32>>
<&'a i64 as Add<i64>>
<&'a i8 as Add<i8>>
<&'a isize as Add<isize>>
and 48 others
error: aborting due to 2 previous errors

View File

@ -6,10 +6,10 @@ LL | 1.0f64 - 1
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
<f64 as Sub>
<f64 as Sub<&f64>>
<&'a f64 as Sub<f64>>
<&f64 as Sub<&f64>>
<f64 as Sub<&f64>>
<f64 as Sub>
help: consider using a floating-point literal by writing it with `.0`
|
LL | 1.0f64 - 1.0

View File

@ -16,14 +16,14 @@ LL | Vec::<[(); 1 + for x in 0..1 {}]>::new();
|
= help: the trait `Add<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
<isize as Add>
<isize as Add<&isize>>
<i8 as Add>
<i8 as Add<&i8>>
<i16 as Add>
<i16 as Add<&i16>>
<i32 as Add>
<i32 as Add<&i32>>
<&'a f32 as Add<f32>>
<&'a f64 as Add<f64>>
<&'a i128 as Add<i128>>
<&'a i16 as Add<i16>>
<&'a i32 as Add<i32>>
<&'a i64 as Add<i64>>
<&'a i8 as Add<i8>>
<&'a isize as Add<isize>>
and 48 others
error: aborting due to 2 previous errors

View File

@ -33,8 +33,8 @@ LL | println!("{}", scores.sum::<i32>());
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:14:10
|
@ -66,8 +66,8 @@ LL | .sum::<i32>(),
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:23:14
|
@ -99,8 +99,8 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-fixable.rs:27:38
|

View File

@ -8,8 +8,8 @@ LL | let x = Some(()).iter().map(|()| 1).sum::<f32>();
|
= help: the trait `Sum<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Sum<A>`:
<f32 as Sum>
<f32 as Sum<&'a f32>>
<f32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain-with-int-infer.rs:2:29
|

View File

@ -33,8 +33,8 @@ LL | println!("{}", scores.sum::<i32>());
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:12:10
|
@ -65,8 +65,8 @@ LL | .sum::<i32>(),
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:25:14
|
@ -104,8 +104,8 @@ LL | .sum::<i32>(),
|
= help: the trait `Sum<f64>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:33:14
|
@ -134,8 +134,8 @@ LL | println!("{}", vec![0, 1].iter().map(|x| { x; }).sum::<i32>());
|
= help: the trait `Sum<()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:38:38
|
@ -162,8 +162,8 @@ LL | println!("{}", vec![(), ()].iter().sum::<i32>());
|
= help: the trait `Sum<&()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/invalid-iterator-chain.rs:39:33
|

View File

@ -5,12 +5,12 @@ LL | let _: Alias<()>;
| ^^ the trait `From<()>` is not implemented for `String`
|
= help: the following other types implement trait `From<T>`:
<String as From<char>>
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
<String as From<Cow<'a, str>>>
<String as From<&str>>
<String as From<&mut str>>
<String as From<&String>>
<String as From<char>>
note: required by a bound in `Alias`
--> $DIR/trailing-where-clause.rs:8:13
|

View File

@ -6,14 +6,14 @@ LL | 1 + Some(1);
|
= help: the trait `Add<Option<{integer}>>` is not implemented for `{integer}`
= help: the following other types implement trait `Add<Rhs>`:
<isize as Add>
<isize as Add<&isize>>
<i8 as Add>
<i8 as Add<&i8>>
<i16 as Add>
<i16 as Add<&i16>>
<i32 as Add>
<i32 as Add<&i32>>
<&'a f32 as Add<f32>>
<&'a f64 as Add<f64>>
<&'a i128 as Add<i128>>
<&'a i16 as Add<i16>>
<&'a i32 as Add<i32>>
<&'a i64 as Add<i64>>
<&'a i8 as Add<i8>>
<&'a isize as Add<isize>>
and 48 others
error[E0277]: cannot subtract `Option<{integer}>` from `usize`
@ -24,10 +24,10 @@ LL | 2 as usize - Some(1);
|
= help: the trait `Sub<Option<{integer}>>` is not implemented for `usize`
= help: the following other types implement trait `Sub<Rhs>`:
<usize as Sub>
<usize as Sub<&usize>>
<&'a usize as Sub<usize>>
<&usize as Sub<&usize>>
<usize as Sub<&usize>>
<usize as Sub>
error[E0277]: cannot multiply `{integer}` by `()`
--> $DIR/binops.rs:4:7
@ -37,14 +37,14 @@ LL | 3 * ();
|
= help: the trait `Mul<()>` is not implemented for `{integer}`
= help: the following other types implement trait `Mul<Rhs>`:
<isize as Mul>
<isize as Mul<&isize>>
<i8 as Mul>
<i8 as Mul<&i8>>
<i16 as Mul>
<i16 as Mul<&i16>>
<i32 as Mul>
<i32 as Mul<&i32>>
<&'a f32 as Mul<f32>>
<&'a f64 as Mul<f64>>
<&'a i128 as Mul<i128>>
<&'a i16 as Mul<i16>>
<&'a i32 as Mul<i32>>
<&'a i64 as Mul<i64>>
<&'a i8 as Mul<i8>>
<&'a isize as Mul<isize>>
and 49 others
error[E0277]: cannot divide `{integer}` by `&str`
@ -55,14 +55,14 @@ LL | 4 / "";
|
= help: the trait `Div<&str>` is not implemented for `{integer}`
= help: the following other types implement trait `Div<Rhs>`:
<isize as Div>
<isize as Div<&isize>>
<i8 as Div>
<i8 as Div<&i8>>
<i16 as Div>
<i16 as Div<&i16>>
<i32 as Div>
<i32 as Div<&i32>>
<&'a f32 as Div<f32>>
<&'a f64 as Div<f64>>
<&'a i128 as Div<i128>>
<&'a i16 as Div<i16>>
<&'a i32 as Div<i32>>
<&'a i64 as Div<i64>>
<&'a i8 as Div<i8>>
<&'a isize as Div<isize>>
and 54 others
error[E0277]: can't compare `{integer}` with `String`
@ -73,14 +73,14 @@ LL | 5 < String::new();
|
= help: the trait `PartialOrd<String>` is not implemented for `{integer}`
= help: the following other types implement trait `PartialOrd<Rhs>`:
isize
i8
f32
f64
i128
i16
i32
i64
i128
usize
u8
i8
isize
and 6 others
error[E0277]: can't compare `{integer}` with `Result<{integer}, _>`
@ -91,14 +91,14 @@ LL | 6 == Ok(1);
|
= help: the trait `PartialEq<Result<{integer}, _>>` is not implemented for `{integer}`
= help: the following other types implement trait `PartialEq<Rhs>`:
isize
i8
f32
f64
i128
i16
i32
i64
i128
usize
u8
i8
isize
and 6 others
error: aborting due to 6 previous errors

View File

@ -7,8 +7,8 @@ LL | unconstrained_arg(return);
| required by a bound introduced by this call
|
= help: the following other types implement trait `Test`:
i32
()
i32
= note: this error might have been caused by changes to Rust's type-inference algorithm (see issue #48950 <https://github.com/rust-lang/rust/issues/48950> for more information)
= help: did you intend to use the type `()` here instead?
note: required by a bound in `unconstrained_arg`

View File

@ -6,10 +6,10 @@ LL | 2_usize + (loop {});
|
= help: the trait `Add<()>` is not implemented for `usize`
= help: the following other types implement trait `Add<Rhs>`:
<usize as Add>
<usize as Add<&usize>>
<&'a usize as Add<usize>>
<&usize as Add<&usize>>
<usize as Add<&usize>>
<usize as Add>
error: aborting due to 1 previous error

View File

@ -6,10 +6,10 @@ LL | x + 100.0
|
= help: the trait `Add<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Add<Rhs>`:
<u8 as Add>
<u8 as Add<&u8>>
<&'a u8 as Add<u8>>
<&u8 as Add<&u8>>
<u8 as Add<&u8>>
<u8 as Add>
error[E0277]: cannot add `&str` to `f64`
--> $DIR/not-suggest-float-literal.rs:6:7
@ -19,10 +19,10 @@ LL | x + "foo"
|
= help: the trait `Add<&str>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
<f64 as Add>
<f64 as Add<&f64>>
<&'a f64 as Add<f64>>
<&f64 as Add<&f64>>
<f64 as Add<&f64>>
<f64 as Add>
error[E0277]: cannot add `{integer}` to `f64`
--> $DIR/not-suggest-float-literal.rs:11:7
@ -32,10 +32,10 @@ LL | x + y
|
= help: the trait `Add<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
<f64 as Add>
<f64 as Add<&f64>>
<&'a f64 as Add<f64>>
<&f64 as Add<&f64>>
<f64 as Add<&f64>>
<f64 as Add>
error[E0277]: cannot subtract `{float}` from `u8`
--> $DIR/not-suggest-float-literal.rs:15:7
@ -45,10 +45,10 @@ LL | x - 100.0
|
= help: the trait `Sub<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Sub<Rhs>`:
<u8 as Sub>
<u8 as Sub<&u8>>
<&'a u8 as Sub<u8>>
<&u8 as Sub<&u8>>
<u8 as Sub<&u8>>
<u8 as Sub>
error[E0277]: cannot subtract `&str` from `f64`
--> $DIR/not-suggest-float-literal.rs:19:7
@ -58,10 +58,10 @@ LL | x - "foo"
|
= help: the trait `Sub<&str>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
<f64 as Sub>
<f64 as Sub<&f64>>
<&'a f64 as Sub<f64>>
<&f64 as Sub<&f64>>
<f64 as Sub<&f64>>
<f64 as Sub>
error[E0277]: cannot subtract `{integer}` from `f64`
--> $DIR/not-suggest-float-literal.rs:24:7
@ -71,10 +71,10 @@ LL | x - y
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
<f64 as Sub>
<f64 as Sub<&f64>>
<&'a f64 as Sub<f64>>
<&f64 as Sub<&f64>>
<f64 as Sub<&f64>>
<f64 as Sub>
error[E0277]: cannot multiply `u8` by `{float}`
--> $DIR/not-suggest-float-literal.rs:28:7
@ -84,10 +84,10 @@ LL | x * 100.0
|
= help: the trait `Mul<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Mul<Rhs>`:
<u8 as Mul>
<u8 as Mul<&u8>>
<&'a u8 as Mul<u8>>
<&u8 as Mul<&u8>>
<u8 as Mul<&u8>>
<u8 as Mul>
error[E0277]: cannot multiply `f64` by `&str`
--> $DIR/not-suggest-float-literal.rs:32:7
@ -97,10 +97,10 @@ LL | x * "foo"
|
= help: the trait `Mul<&str>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
<f64 as Mul>
<f64 as Mul<&f64>>
<&'a f64 as Mul<f64>>
<&f64 as Mul<&f64>>
<f64 as Mul<&f64>>
<f64 as Mul>
error[E0277]: cannot multiply `f64` by `{integer}`
--> $DIR/not-suggest-float-literal.rs:37:7
@ -110,10 +110,10 @@ LL | x * y
|
= help: the trait `Mul<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
<f64 as Mul>
<f64 as Mul<&f64>>
<&'a f64 as Mul<f64>>
<&f64 as Mul<&f64>>
<f64 as Mul<&f64>>
<f64 as Mul>
error[E0277]: cannot divide `u8` by `{float}`
--> $DIR/not-suggest-float-literal.rs:41:7
@ -123,11 +123,11 @@ LL | x / 100.0
|
= help: the trait `Div<{float}>` is not implemented for `u8`
= help: the following other types implement trait `Div<Rhs>`:
<u8 as Div>
<u8 as Div<NonZero<u8>>>
<u8 as Div<&u8>>
<&'a u8 as Div<u8>>
<&u8 as Div<&u8>>
<u8 as Div<&u8>>
<u8 as Div<NonZero<u8>>>
<u8 as Div>
error[E0277]: cannot divide `f64` by `&str`
--> $DIR/not-suggest-float-literal.rs:45:7
@ -137,10 +137,10 @@ LL | x / "foo"
|
= help: the trait `Div<&str>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
<f64 as Div>
<f64 as Div<&f64>>
<&'a f64 as Div<f64>>
<&f64 as Div<&f64>>
<f64 as Div<&f64>>
<f64 as Div>
error[E0277]: cannot divide `f64` by `{integer}`
--> $DIR/not-suggest-float-literal.rs:50:7
@ -150,10 +150,10 @@ LL | x / y
|
= help: the trait `Div<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
<f64 as Div>
<f64 as Div<&f64>>
<&'a f64 as Div<f64>>
<&f64 as Div<&f64>>
<f64 as Div<&f64>>
<f64 as Div>
error: aborting due to 12 previous errors

View File

@ -6,10 +6,10 @@ LL | x + 100
|
= help: the trait `Add<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Add<Rhs>`:
<f32 as Add>
<f32 as Add<&f32>>
<&'a f32 as Add<f32>>
<&f32 as Add<&f32>>
<f32 as Add<&f32>>
<f32 as Add>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x + 100.0
@ -23,10 +23,10 @@ LL | x + 100
|
= help: the trait `Add<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Add<Rhs>`:
<f64 as Add>
<f64 as Add<&f64>>
<&'a f64 as Add<f64>>
<&f64 as Add<&f64>>
<f64 as Add<&f64>>
<f64 as Add>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x + 100.0
@ -40,10 +40,10 @@ LL | x - 100
|
= help: the trait `Sub<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Sub<Rhs>`:
<f32 as Sub>
<f32 as Sub<&f32>>
<&'a f32 as Sub<f32>>
<&f32 as Sub<&f32>>
<f32 as Sub<&f32>>
<f32 as Sub>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x - 100.0
@ -57,10 +57,10 @@ LL | x - 100
|
= help: the trait `Sub<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Sub<Rhs>`:
<f64 as Sub>
<f64 as Sub<&f64>>
<&'a f64 as Sub<f64>>
<&f64 as Sub<&f64>>
<f64 as Sub<&f64>>
<f64 as Sub>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x - 100.0
@ -74,10 +74,10 @@ LL | x * 100
|
= help: the trait `Mul<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Mul<Rhs>`:
<f32 as Mul>
<f32 as Mul<&f32>>
<&'a f32 as Mul<f32>>
<&f32 as Mul<&f32>>
<f32 as Mul<&f32>>
<f32 as Mul>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x * 100.0
@ -91,10 +91,10 @@ LL | x * 100
|
= help: the trait `Mul<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Mul<Rhs>`:
<f64 as Mul>
<f64 as Mul<&f64>>
<&'a f64 as Mul<f64>>
<&f64 as Mul<&f64>>
<f64 as Mul<&f64>>
<f64 as Mul>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x * 100.0
@ -108,10 +108,10 @@ LL | x / 100
|
= help: the trait `Div<{integer}>` is not implemented for `f32`
= help: the following other types implement trait `Div<Rhs>`:
<f32 as Div>
<f32 as Div<&f32>>
<&'a f32 as Div<f32>>
<&f32 as Div<&f32>>
<f32 as Div<&f32>>
<f32 as Div>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x / 100.0
@ -125,10 +125,10 @@ LL | x / 100
|
= help: the trait `Div<{integer}>` is not implemented for `f64`
= help: the following other types implement trait `Div<Rhs>`:
<f64 as Div>
<f64 as Div<&f64>>
<&'a f64 as Div<f64>>
<&f64 as Div<&f64>>
<f64 as Div<&f64>>
<f64 as Div>
help: consider using a floating-point literal by writing it with `.0`
|
LL | x / 100.0

View File

@ -8,8 +8,8 @@ LL | Index::index(&[] as &[i32], 2u32);
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:36:33
@ -21,8 +21,8 @@ LL | Index::index(&[] as &[i32], Foo(2u32));
|
= help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:39:33
@ -34,8 +34,8 @@ LL | Index::index(&[] as &[i32], Bar(2u32));
|
= help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error[E0277]: the trait bound `[i32]: Index<u32>` is not satisfied
--> $DIR/multiple-impls.rs:33:5
@ -45,8 +45,8 @@ LL | Index::index(&[] as &[i32], 2u32);
|
= help: the trait `Index<u32>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error[E0277]: the trait bound `[i32]: Index<Foo<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:36:5
@ -56,8 +56,8 @@ LL | Index::index(&[] as &[i32], Foo(2u32));
|
= help: the trait `Index<Foo<u32>>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error[E0277]: the trait bound `[i32]: Index<Bar<u32>>` is not satisfied
--> $DIR/multiple-impls.rs:39:5
@ -67,8 +67,8 @@ LL | Index::index(&[] as &[i32], Bar(2u32));
|
= help: the trait `Index<Bar<u32>>` is not implemented for `[i32]`
= help: the following other types implement trait `Index<Idx>`:
<[i32] as Index<Foo<usize>>>
<[i32] as Index<Bar<usize>>>
<[i32] as Index<Foo<usize>>>
error: aborting due to 6 previous errors

View File

@ -17,8 +17,8 @@ LL | x[..1i32];
|
= help: the trait `SliceIndex<[i32]>` is not implemented for `RangeTo<i32>`, which is required by `[i32]: Index<_>`
= help: the following other types implement trait `SliceIndex<T>`:
<RangeTo<usize> as SliceIndex<str>>
<RangeTo<usize> as SliceIndex<[T]>>
<RangeTo<usize> as SliceIndex<str>>
= note: required for `[i32]` to implement `Index<RangeTo<i32>>`
error: aborting due to 2 previous errors

View File

@ -8,8 +8,8 @@ LL | vec![(), ()].iter().sum::<i32>();
|
= help: the trait `Sum<&()>` is not implemented for `i32`
= help: the following other types implement trait `Sum<A>`:
<i32 as Sum>
<i32 as Sum<&'a i32>>
<i32 as Sum>
note: the method call chain might not have had the expected associated types
--> $DIR/sum.rs:4:18
|
@ -30,8 +30,8 @@ LL | vec![(), ()].iter().product::<i32>();
|
= help: the trait `Product<&()>` is not implemented for `i32`
= help: the following other types implement trait `Product<A>`:
<i32 as Product>
<i32 as Product<&'a i32>>
<i32 as Product>
note: the method call chain might not have had the expected associated types
--> $DIR/sum.rs:7:18
|

View File

@ -11,14 +11,14 @@ LL | for i in false..true {}
| ^^^^^^^^^^^ the trait `Step` is not implemented for `bool`, which is required by `std::ops::Range<bool>: IntoIterator`
|
= help: the following other types implement trait `Step`:
Char
Ipv4Addr
Ipv6Addr
char
isize
i8
i128
i16
i32
i64
i128
usize
and 8 others
= note: required for `std::ops::Range<bool>` to implement `Iterator`
= note: required for `std::ops::Range<bool>` to implement `IntoIterator`

View File

@ -6,10 +6,10 @@ LL | foo(1 as u32 +
|
= help: the trait `Add<()>` is not implemented for `u32`
= help: the following other types implement trait `Add<Rhs>`:
<u32 as Add>
<u32 as Add<&u32>>
<&'a u32 as Add<u32>>
<&u32 as Add<&u32>>
<u32 as Add<&u32>>
<u32 as Add>
error: aborting due to 1 previous error

View File

@ -16,8 +16,8 @@ LL | fn bar() -> impl Bar {
| ^^^^^^^^ the trait `Bar` is not implemented for `()`
|
= help: the following other types implement trait `Bar`:
i32
Qux
i32
error: aborting due to 2 previous errors

View File

@ -8,12 +8,12 @@ LL | foo(String::new());
|
= note: to coerce a `String` into a `&str`, use `&*` as a prefix
= help: the following other types implement trait `From<T>`:
<String as From<char>>
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
<String as From<Cow<'a, str>>>
<String as From<&str>>
<String as From<&mut str>>
<String as From<&String>>
<String as From<char>>
= note: required for `String` to implement `Into<&str>`
note: required by a bound in `foo`
--> $DIR/into-str.rs:1:31

View File

@ -5,14 +5,14 @@ LL | let _: &[i8] = data.into();
| ^^^^ the trait `From<&[u8]>` is not implemented for `&[i8]`, which is required by `&[u8]: Into<_>`
|
= help: the following other types implement trait `From<T>`:
<[bool; N] as From<Mask<T, N>>>
<[T; N] as From<Simd<T, N>>>
<[T; 10] as From<(T, T, T, T, T, T, T, T, T, T)>>
<[T; 11] as From<(T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 12] as From<(T, T, T, T, T, T, T, T, T, T, T, T)>>
<[T; 1] as From<(T,)>>
<[T; 2] as From<(T, T)>>
<[T; 3] as From<(T, T, T)>>
<[T; 4] as From<(T, T, T, T)>>
<[T; 5] as From<(T, T, T, T, T)>>
<[T; 6] as From<(T, T, T, T, T, T)>>
and 6 others
= note: required for `&[u8]` to implement `Into<&[i8]>`

View File

@ -6,13 +6,13 @@ LL | s.strip_suffix(b'\n').unwrap_or(s)
|
= help: the trait `FnMut<(char,)>` is not implemented for `u8`, which is required by `u8: Pattern<'_>`
= help: the following other types implement trait `Pattern<'a>`:
char
[char; N]
&'b String
&'b [char; N]
&'b [char]
&'c &'b str
&'b str
&'c &'b str
[char; N]
char
= note: required for `u8` to implement `Pattern<'_>`
error: aborting due to 1 previous error

View File

@ -31,12 +31,12 @@ LL | .map_err(|_| ())?;
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
<String as From<char>>
<String as From<&String>>
<String as From<&mut str>>
<String as From<&str>>
<String as From<Box<str>>>
<String as From<Cow<'a, str>>>
<String as From<&str>>
<String as From<&mut str>>
<String as From<&String>>
<String as From<char>>
= note: required for `Result<(), String>` to implement `FromResidual<Result<Infallible, ()>>`
error[E0277]: `?` couldn't convert the error to `String`

View File

@ -10,8 +10,8 @@ LL | Ok(Err(123_i32)?)
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
<u8 as From<bool>>
<u8 as From<Char>>
<u8 as From<bool>>
= note: required for `Result<u64, u8>` to implement `FromResidual<Result<Infallible, i32>>`
error[E0277]: the `?` operator can only be used on `Result`s, not `Option`s, in a function that returns `Result`
@ -24,8 +24,8 @@ LL | Some(3)?;
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u64, String>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Yeet<E>>>
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Result`s in a function that returns `Result`
--> $DIR/bad-interconversion.rs:17:31
@ -37,8 +37,8 @@ LL | Ok(ControlFlow::Break(123)?)
|
= help: the trait `FromResidual<ControlFlow<{integer}, Infallible>>` is not implemented for `Result<u64, String>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Yeet<E>>>
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
--> $DIR/bad-interconversion.rs:22:22

View File

@ -10,7 +10,6 @@ LL | Err(5)?;
|
= note: the question mark operation (`?`) implicitly performs a conversion on the error value using the `From` trait
= help: the following other types implement trait `From<T>`:
<(T,) as From<[T; 1]>>
<(T, T) as From<[T; 2]>>
<(T, T, T) as From<[T; 3]>>
<(T, T, T, T) as From<[T; 4]>>
@ -18,6 +17,7 @@ LL | Err(5)?;
<(T, T, T, T, T, T) as From<[T; 6]>>
<(T, T, T, T, T, T, T) as From<[T; 7]>>
<(T, T, T, T, T, T, T, T) as From<[T; 8]>>
<(T, T, T, T, T, T, T, T, T) as From<[T; 9]>>
and 4 others
= note: required for `Result<i32, ()>` to implement `FromResidual<Result<Infallible, {integer}>>`

View File

@ -9,8 +9,8 @@ LL | a?;
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<(), ()>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Yeet<E>>>
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used on `Option`s, not `Result`s, in a function that returns `Option`
--> $DIR/option-to-result.rs:11:6

View File

@ -9,8 +9,8 @@ LL | x?;
|
= help: the trait `FromResidual<Option<Infallible>>` is not implemented for `Result<u32, ()>`
= help: the following other types implement trait `FromResidual<R>`:
<Result<T, F> as FromResidual<Yeet<E>>>
<Result<T, F> as FromResidual<Result<Infallible, E>>>
<Result<T, F> as FromResidual<Yeet<E>>>
error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `FromResidual`)
--> $DIR/try-on-option.rs:11:6

View File

@ -8,8 +8,8 @@ LL | ()
| -- return type was inferred to be `()` here
|
= help: the following other types implement trait `Foo<A>`:
<() as Foo<u32>>
<() as Foo<()>>
<() as Foo<u32>>
error: aborting due to 1 previous error

View File

@ -66,10 +66,10 @@ LL | trait ProjectionPred<T:Iterator = IntoIter<i32>> where T::Item : Add<u8> {}
|
= help: the trait `Add<u8>` is not implemented for `i32`
= help: the following other types implement trait `Add<Rhs>`:
<i32 as Add>
<i32 as Add<&i32>>
<&'a i32 as Add<i32>>
<&i32 as Add<&i32>>
<i32 as Add<&i32>>
<i32 as Add>
error: aborting due to 7 previous errors

View File

@ -21,10 +21,10 @@ LL | a = c + b * 5;
|
= help: the trait `Add<u16>` is not implemented for `usize`
= help: the following other types implement trait `Add<Rhs>`:
<usize as Add>
<usize as Add<&usize>>
<&'a usize as Add<usize>>
<&usize as Add<&usize>>
<usize as Add<&usize>>
<usize as Add>
error: aborting due to 3 previous errors

View File

@ -7,11 +7,11 @@ LL | func(Path::new("hello").to_path_buf().to_string_lossy(), "world")
| required by a bound introduced by this call
|
= help: the following other types implement trait `From<T>`:
<PathBuf as From<&T>>
<PathBuf as From<Box<Path>>>
<PathBuf as From<Cow<'a, Path>>>
<PathBuf as From<OsString>>
<PathBuf as From<String>>
<PathBuf as From<&T>>
= note: required for `Cow<'_, str>` to implement `Into<PathBuf>`
note: required by a bound in `func`
--> $DIR/issue-90101.rs:3:20

View File

@ -6,10 +6,10 @@ LL | <i32 as Add<u32>>::add(1, 2);
|
= help: the trait `Add<u32>` is not implemented for `i32`
= help: the following other types implement trait `Add<Rhs>`:
<i32 as Add>
<i32 as Add<&i32>>
<&'a i32 as Add<i32>>
<&i32 as Add<&i32>>
<i32 as Add<&i32>>
<i32 as Add>
error[E0277]: cannot add `u32` to `i32`
--> $DIR/ufcs-qpath-self-mismatch.rs:4:5
@ -19,10 +19,10 @@ LL | <i32 as Add<u32>>::add(1, 2);
|
= help: the trait `Add<u32>` is not implemented for `i32`
= help: the following other types implement trait `Add<Rhs>`:
<i32 as Add>
<i32 as Add<&i32>>
<&'a i32 as Add<i32>>
<&i32 as Add<&i32>>
<i32 as Add<&i32>>
<i32 as Add>
error[E0308]: mismatched types
--> $DIR/ufcs-qpath-self-mismatch.rs:7:28