-
Notifications
You must be signed in to change notification settings - Fork 13.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
rustc: Move crate_types
and stable_crate_id
from Session
to GlobalCtxt
#114622
Conversation
r? @TaKO8Ki (rustbot has picked a reviewer for you, use r? to override) |
Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_codegen_cranelift cc @bjorn3 The Miri subtree was changed cc @rust-lang/miri |
This comment has been minimized.
This comment has been minimized.
r? @oli-obk |
r=me with fallout fixed |
Removes a piece of mutable state. Follow up to rust-lang#114578.
Removes a piece of mutable state. Follow up to rust-lang#114578.
@rustbot ready |
@bors r+ |
…mpiler-errors Rollup of 7 pull requests Successful merges: - rust-lang#114599 (Add impl trait declarations to SMIR) - rust-lang#114622 (rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt`) - rust-lang#114662 (Unlock trailing where-clauses for lazy type aliases) - rust-lang#114693 (Remove myself from the review rotation) - rust-lang#114694 (make the provisional cache slightly less broken) - rust-lang#114705 (Add spastorino to mailmap) - rust-lang#114712 (Fix a couple of bad comments) r? `@ghost` `@rustbot` modify labels: rollup
Removes two pieces of mutable state. Follow up to rust-lang#114622.
This seems to be part of a general push to remove interior mutability from |
Ah I see. :) I was just curious why interior mutability in |
Interior mutability in |
rustc: Move `features` from `Session` to `GlobalCtxt` Removes one more piece of mutable state. Follow up to rust-lang#114622. The rule I used for passing feature in function signatures: - if a crate already depends on `rustc_middle`, then `Session` is replaced with `TyCtxt` - otherwise session and features are passed as a pair `sess: &Session, features: &Features` The code in `rustc_lint` is ultimately used for implementing a trait from `rustc_expand`, so it also doesn't use tcx despite the dependency on `rustc_middle`.
rustc: Move `crate_types` and `stable_crate_id` from `Session` to `GlobalCtxt` Removes two pieces of mutable state. Follow up to rust-lang#114578.
Removes two pieces of mutable state.
Follow up to #114578.