mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-27 18:57:42 +03:00
19b70ac34d
Rollup merge of #155772 - oli-obk:const-closures-everywhere, r=fee1-dead Check closure's constness validity in the constness query fixes rust-lang/rust#155584 instead of checking during ast lowering, where it's not easily possible to obtain all the right information in time. While lowering an assoc item we don't know if the parent was a const trait or a const impl. Tracing this information is quite annoying, and complicates a lot of code, which checking here after the fact is trivial.
For more information about how rustc works, see the rustc dev guide.