Files
rust/tests/ui/traits/const-traits/non-const-op-const-closure-non-const-outer.stderr
Oli Scherer 8e1c34f5cc Check closure's constness validity in the constness query
instead of during ast lowering, where it's not easily possible to obtain all the right information in time
2026-04-27 07:44:19 +02:00

9 lines
227 B
Plaintext

error: cannot use `const` closures outside of const contexts
--> $DIR/non-const-op-const-closure-non-const-outer.rs:14:6
|
LL | (const || { (()).foo() })();
| ^^^^^^^^
error: aborting due to 1 previous error