summaryrefslogtreecommitdiffstats
path: root/tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-17 12:20:29 +0000
commit631cd5845e8de329d0e227aaa707d7ea228b8f8f (patch)
treea1b87c8f8cad01cf18f7c5f57a08f102771ed303 /tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
parentAdding debian version 1.69.0+dfsg1-1. (diff)
downloadrustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.tar.xz
rustc-631cd5845e8de329d0e227aaa707d7ea228b8f8f.zip
Merging upstream version 1.70.0+dfsg1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr')
-rw-r--r--tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr15
1 files changed, 4 insertions, 11 deletions
diff --git a/tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr b/tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
index 4470e287c..ffc24ec6e 100644
--- a/tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
+++ b/tests/ui/rfc-2632-const-trait-impl/const-closure-trait-method-fail.stderr
@@ -1,22 +1,15 @@
error[E0277]: the trait bound `(): ~const Tr` is not satisfied in `fn(()) -> i32 {<() as Tr>::a}`
- --> $DIR/const-closure-trait-method-fail.rs:16:42
+ --> $DIR/const-closure-trait-method-fail.rs:16:23
|
LL | const _: () = assert!(need_const_closure(Tr::a) == 42);
- | ------------------ ^^^^^ within `fn(()) -> i32 {<() as Tr>::a}`, the trait `~const Tr` is not implemented for `()`
- | |
- | required by a bound introduced by this call
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^ within `fn(()) -> i32 {<() as Tr>::a}`, the trait `~const Tr` is not implemented for `()`
|
note: the trait `Tr` is implemented for `()`, but that implementation is not `const`
- --> $DIR/const-closure-trait-method-fail.rs:16:42
+ --> $DIR/const-closure-trait-method-fail.rs:16:23
|
LL | const _: () = assert!(need_const_closure(Tr::a) == 42);
- | ^^^^^
+ | ^^^^^^^^^^^^^^^^^^^^^^^^^
= note: required because it appears within the type `fn(()) -> i32 {<() as Tr>::a}`
-note: required by a bound in `need_const_closure`
- --> $DIR/const-closure-trait-method-fail.rs:12:32
- |
-LL | const fn need_const_closure<T: ~const FnOnce(()) -> i32>(x: T) -> i32 {
- | ^^^^^^^^^^^^^^^^^^^^^^^^ required by this bound in `need_const_closure`
error: aborting due to previous error