update tests, adding known-bug
This commit is contained in:
parent
e6b423aebb
commit
2d59451274
65 changed files with 289 additions and 661 deletions
|
@ -1,16 +1,21 @@
|
|||
error[E0277]: the trait bound `(): ~const Tr` is not satisfied in `fn(()) -> i32 {<() as Tr>::a}`
|
||||
--> $DIR/const-closure-trait-method-fail.rs:18:23
|
||||
error[E0080]: evaluation of constant value failed
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
|
|
||||
LL | const _: () = assert!(need_const_closure(Tr::a) == 42);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^ within `fn(()) -> i32 {<() as Tr>::a}`, the trait `~const Tr` is not implemented for `()`
|
||||
= note: calling non-const function `<() as Tr>::a`
|
||||
|
|
||||
note: the trait `Tr` is implemented for `()`, but that implementation is not `const`
|
||||
note: inside `<fn(()) -> i32 {<() as Tr>::a} as FnOnce<((),)>>::call_once - shim(fn(()) -> i32 {<() as Tr>::a})`
|
||||
--> $SRC_DIR/core/src/ops/function.rs:LL:COL
|
||||
note: inside `need_const_closure::<fn(()) -> i32 {<() as Tr>::a}>`
|
||||
--> $DIR/const-closure-trait-method-fail.rs:15:5
|
||||
|
|
||||
LL | x(())
|
||||
| ^^^^^
|
||||
note: inside `_`
|
||||
--> $DIR/const-closure-trait-method-fail.rs:18:23
|
||||
|
|
||||
LL | const _: () = assert!(need_const_closure(Tr::a) == 42);
|
||||
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
||||
= note: required because it appears within the type `fn(()) -> i32 {<() as Tr>::a}`
|
||||
|
||||
error: aborting due to previous error
|
||||
|
||||
For more information about this error, try `rustc --explain E0277`.
|
||||
For more information about this error, try `rustc --explain E0080`.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue