1

Query-ify global limit attribute handling by Aaron1011 · Pull Request #86674 · r...

 2 years ago
source link: https://github.com/rust-lang/rust/pull/86674
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Copy link

Member

Aaron1011 commented 26 days ago

edited

Currently, we read various 'global limits' from inner attributes the crate root (recursion_limit, move_size_limit, type_length_limit, const_eval_limit). These limits are then stored in Sessions, allowing them to be access from a TyCtxt without registering a dependency on the crate root attributes.

This PR moves the calculation of these global limits behind queries, so that we properly track dependencies on crate root attributes. During the setup of macro expansion (before we've created a TyCtxt), we need to access the recursion limit, which is now done by directly calling into the code shared by the normal query implementations.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK