diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2023-01-12 06:52:38 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-01-12 06:52:38 +0100 |
| commit | 8a13157c16f279dfa46d0ef92ceb39bcbbcfe729 (patch) | |
| tree | 43614549ba4666633eb562f502ca9f21db3c9a3c /tests/ui/const-generics/generic_const_exprs | |
| parent | d42d952afc58e2325524d3b025281838449f74a4 (diff) | |
| parent | 317adda649763de4c15692da327c216f05106a94 (diff) | |
| download | rust-8a13157c16f279dfa46d0ef92ceb39bcbbcfe729.tar.gz rust-8a13157c16f279dfa46d0ef92ceb39bcbbcfe729.zip | |
Rollup merge of #106702 - estebank:trait-bounds, r=compiler-errors
Conserve cause of `ImplDerivedObligation` in E0599 CC #86377.
Diffstat (limited to 'tests/ui/const-generics/generic_const_exprs')
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/issue-69654.stderr | 10 | ||||
| -rw-r--r-- | tests/ui/const-generics/generic_const_exprs/issue-80742.stderr | 13 |
2 files changed, 19 insertions, 4 deletions
diff --git a/tests/ui/const-generics/generic_const_exprs/issue-69654.stderr b/tests/ui/const-generics/generic_const_exprs/issue-69654.stderr index c3e2f8e1646..eb4ff8305da 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-69654.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-69654.stderr @@ -15,8 +15,14 @@ LL | struct Foo<const N: usize> {} LL | Foo::foo(); | ^^^ function or associated item cannot be called on `Foo<_>` due to unsatisfied trait bounds | - = note: the following trait bounds were not satisfied: - `[u8; _]: Bar<[(); _]>` +note: trait bound `[u8; _]: Bar<[(); _]>` was not satisfied + --> $DIR/issue-69654.rs:11:14 + | +LL | impl<const N: usize> Foo<N> + | ------ +LL | where +LL | [u8; N]: Bar<[(); N]>, + | ^^^^^^^^^^^^ unsatisfied trait bound introduced here error: aborting due to 2 previous errors diff --git a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr index a08c9912527..6aa8ee13b79 100644 --- a/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr +++ b/tests/ui/const-generics/generic_const_exprs/issue-80742.stderr @@ -23,8 +23,17 @@ LL | let dst = Inline::<dyn Debug>::new(0); | = note: doesn't satisfy `dyn Debug: Sized` | - = note: the following trait bounds were not satisfied: - `dyn Debug: Sized` +note: trait bound `dyn Debug: Sized` was not satisfied + --> $DIR/issue-80742.rs:20:6 + | +LL | impl<T> Inline<T> + | ^ --------- + | | + | unsatisfied trait bound introduced here +help: consider relaxing the type parameter's implicit `Sized` bound + | +LL | impl<T: ?Sized> Inline<T> + | ++++++++ error[E0080]: evaluation of `Inline::<dyn std::fmt::Debug>::{constant#0}` failed --> $SRC_DIR/core/src/mem/mod.rs:LL:COL |
