diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-04 22:27:31 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-04 22:27:31 +0200 |
| commit | 7fbfd8d7708f87d4d1dd48ba49f18004a5cd625c (patch) | |
| tree | e11938be4eb42f1c1397474d6ee1785d9a689281 /tests | |
| parent | f4d0776b4fb81539ff4a7a493612a022043d88b4 (diff) | |
| parent | 6714216eaa8e3431706e451e2ff26401551207ea (diff) | |
| download | rust-7fbfd8d7708f87d4d1dd48ba49f18004a5cd625c.tar.gz rust-7fbfd8d7708f87d4d1dd48ba49f18004a5cd625c.zip | |
Rollup merge of #124690 - compiler-errors:only-ambig-if-ambig, r=lcnr
Only consider ambiguous goals when finding best obligation for ambiguities We don't care about ambiguous goals when reporting true errors, and vice versa for ambiguities. r? lcnr
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs | 2 | ||||
| -rw-r--r-- | tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs index bc9bb6ce2d7..8bb4ff46907 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.rs @@ -61,7 +61,7 @@ where // entering the cycle from `A` fails, but would work if we were to use the cache // result of `B<X>`. impls_trait::<A<X>, _, _, _>(); - //~^ ERROR the trait bound `X: IncompleteGuidance<_, _>` is not satisfied + //~^ ERROR the trait bound `A<X>: Trait<i32, u8, u8>` is not satisfied } fn main() { diff --git a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr index 78116ebba82..cdb4ff4588f 100644 --- a/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr +++ b/tests/ui/traits/next-solver/cycles/coinduction/incompleteness-unstable-result.stderr @@ -1,26 +1,28 @@ -error[E0277]: the trait bound `X: IncompleteGuidance<_, _>` is not satisfied +error[E0277]: the trait bound `A<X>: Trait<i32, u8, u8>` is not satisfied --> $DIR/incompleteness-unstable-result.rs:63:19 | LL | impls_trait::<A<X>, _, _, _>(); - | ^^^^ the trait `IncompleteGuidance<_, _>` is not implemented for `X`, which is required by `A<X>: Trait<_, _, _>` + | ^^^^ the trait `Trait<i32, u8, u8>` is not implemented for `A<X>`, which is required by `A<X>: Trait<_, _, _>` | - = help: the following other types implement trait `IncompleteGuidance<T, V>`: - <T as IncompleteGuidance<U, i16>> - <T as IncompleteGuidance<U, i8>> - <T as IncompleteGuidance<U, u8>> -note: required for `A<X>` to implement `Trait<_, _, u8>` +note: required for `A<X>` to implement `Trait<i32, u8, u8>` --> $DIR/incompleteness-unstable-result.rs:32:50 | LL | impl<T: ?Sized, U: ?Sized, V: ?Sized, D: ?Sized> Trait<U, V, D> for A<T> | ^^^^^^^^^^^^^^ ^^^^ -LL | where -LL | T: IncompleteGuidance<U, V>, - | ------------------------ unsatisfied trait bound introduced here +... +LL | A<T>: Trait<U, D, V>, + | -------------- unsatisfied trait bound introduced here + = note: 8 redundant requirements hidden + = note: required for `A<X>` to implement `Trait<i32, u8, u8>` note: required by a bound in `impls_trait` --> $DIR/incompleteness-unstable-result.rs:51:28 | LL | fn impls_trait<T: ?Sized + Trait<U, V, D>, U: ?Sized, V: ?Sized, D: ?Sized>() {} | ^^^^^^^^^^^^^^ required by this bound in `impls_trait` +help: consider extending the `where` clause, but there might be an alternative better way to express this requirement + | +LL | X: IncompleteGuidance<u32, i16>, A<X>: Trait<i32, u8, u8> + | ~~~~~~~~~~~~~~~~~~~~~~~~~~ error: aborting due to 1 previous error |
