diff options
author | Alex Macleod <alex@macleod.io> | 2024-06-07 14:54:42 +0000 |
---|---|---|
committer | Alex Macleod <alex@macleod.io> | 2024-06-12 12:34:47 +0000 |
commit | d0112c68498470fe2945956b7ed24c5053cbf182 (patch) | |
tree | 3bc761dce6745fa2ca40f7759b7c712036636702 /tests/ui/on-unimplemented | |
parent | 02c7a5921e3de5c2b3ecb2e0082c1dafce0729a1 (diff) |
Spell out other trait diagnostic
Diffstat (limited to 'tests/ui/on-unimplemented')
-rw-r--r-- | tests/ui/on-unimplemented/multiple-impls.stderr | 24 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/slice-index.stderr | 4 | ||||
-rw-r--r-- | tests/ui/on-unimplemented/sum.stderr | 8 |
3 files changed, 18 insertions, 18 deletions
diff --git a/tests/ui/on-unimplemented/multiple-impls.stderr b/tests/ui/on-unimplemented/multiple-impls.stderr index b50dc251baa..ba4e43ff359 100644 --- a/tests/ui/on-unimplemented/multiple-impls.stderr +++ b/tests/ui/on-unimplemented/multiple-impls.stderr @@ -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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `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<Bar<usize>>> - <[i32] as Index<Foo<usize>>> + `[i32]` implements `Index<Bar<usize>>` + `[i32]` implements `Index<Foo<usize>>` error: aborting due to 6 previous errors diff --git a/tests/ui/on-unimplemented/slice-index.stderr b/tests/ui/on-unimplemented/slice-index.stderr index f17f3cfce8d..0f8d105abef 100644 --- a/tests/ui/on-unimplemented/slice-index.stderr +++ b/tests/ui/on-unimplemented/slice-index.stderr @@ -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<[T]>> - <RangeTo<usize> as SliceIndex<str>> + `RangeTo<usize>` implements `SliceIndex<[T]>` + `RangeTo<usize>` implements `SliceIndex<str>` = note: required for `[i32]` to implement `Index<RangeTo<i32>>` error: aborting due to 2 previous errors diff --git a/tests/ui/on-unimplemented/sum.stderr b/tests/ui/on-unimplemented/sum.stderr index 65bab458cf1..f8e266a8727 100644 --- a/tests/ui/on-unimplemented/sum.stderr +++ b/tests/ui/on-unimplemented/sum.stderr @@ -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<&'a i32>> - <i32 as Sum> + `i32` implements `Sum<&'a i32>` + `i32` implements `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<&'a i32>> - <i32 as Product> + `i32` implements `Product<&'a i32>` + `i32` implements `Product` note: the method call chain might not have had the expected associated types --> $DIR/sum.rs:7:18 | |