instead of during ast lowering, where it's not easily possible to obtain all the right information in time
19 lines
544 B
Plaintext
19 lines
544 B
Plaintext
error[E0379]: functions in traits cannot be declared const
|
|
--> $DIR/const-closure-in-non-const-trait-method.rs:6:5
|
|
|
|
|
LL | const fn test() {
|
|
| ^^^^^-
|
|
| |
|
|
| functions in traits cannot be const
|
|
| help: remove the `const`
|
|
|
|
error: cannot use `const` closures outside of const contexts
|
|
--> $DIR/const-closure-in-non-const-trait-method.rs:8:10
|
|
|
|
|
LL | (const || {})()
|
|
| ^^^^^^^^
|
|
|
|
error: aborting due to 2 previous errors
|
|
|
|
For more information about this error, try `rustc --explain E0379`.
|