-
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
Move methods from Map to TyCtxt, part 4. #137504
base: master
Are you sure you want to change the base?
Conversation
Some changes occurred in match checking cc @Nadrieril The rustc-dev-guide subtree was changed. If this PR only touches the dev guide consider submitting a PR directly to rust-lang/rustc-dev-guide otherwise thank you for updating the dev guide with your changes. cc @BoxyUwU, @jieyouxu, @Kobzol Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred to the CTFE machinery cc @rust-lang/wg-const-eval Some changes occurred in need_type_info.rs cc @lcnr HIR ty lowering was modified cc @fmease Some changes occurred in compiler/rustc_codegen_ssa/src/codegen_attrs.rs |
☔ The latest upstream changes (presumably #135726) made this pull request unmergeable. Please resolve the merge conflicts. |
4bdbebd
to
8207838
Compare
Feedback: From the perspective of reviewing bulk changes, I would prefer not to have things like the inlining/renaming of (Partly because it expands the scope of the review to include non-trivial changes, and partly because many-file PRs make GitHub very slow in ways that make me want to avoid any other kind of review friction.) |
Huh. So this is part 4 of my work to get rid of And in this PR I could have just renamed IIUC, you would have preferred me to leave the trivial wrapper in place and remove it in a separate PR, because that would make reviewing easier. Is that right? |
That's right. For context, my workflow for reviewing these renamings has been to scroll through the list of changes, look at each change and say “that's trivial”, and then mark the file as viewed in the GitHub review UI. That UI for marking files doesn't work properly when viewing individual commits, which is why splitting off a separate commit didn't help in this case, even though it's normally a good idea. So for a bulk-renaming PR like this, my approach as an author would have been to avoid any complication that isn't absolutely necessary (with |
Huh, I've never noticed that the per-commit view lacks the "viewed" checkbox. Probably because I just click on the chevron in the top left if I've finished reviewing a file. That collapses it, just like clicking on the "viewed" checkbox does. |
8207838
to
89c6c61
Compare
Some changes occurred to constck cc @fee1-dead |
I rebased and fixed the broken link in the guide. |
This comment has been minimized.
This comment has been minimized.
89c6c61
to
1047768
Compare
Updated again to fix the compile errors. |
@Zalathar: any other changes needed here? |
Ah sorry, I lost track of this. I'll have another look at it today. |
@bors r+ |
Move methods from Map to TyCtxt, part 4. A follow-up to rust-lang#137350. r? `@Zalathar`
Rollup of 18 pull requests Successful merges: - rust-lang#126856 (remove deprecated tool `rls`) - rust-lang#137314 (change definitely unproductive cycles to error) - rust-lang#137504 (Move methods from Map to TyCtxt, part 4.) - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - rust-lang#137967 ([AIX] Fix hangs during testing) - rust-lang#138002 (Disable CFI for weakly linked syscalls) - rust-lang#138052 (strip `-Wlinker-messages` wrappers from `rust-lld` rmake test) - rust-lang#138063 (Improve `-Zunpretty=hir` for parsed attrs) - rust-lang#138109 (make precise capturing args in rustdoc Json typed) - rust-lang#138147 (Add maintainers for powerpc64le-unknown-linux-gnu) - rust-lang#138245 (stabilize `ci_rustc_if_unchanged_logic` test for local environments) - rust-lang#138296 (Remove `AdtFlags::IS_ANONYMOUS` and `Copy`/`Clone` condition for anonymous ADT) - rust-lang#138300 (add tracking issue for unqualified_local_imports) - rust-lang#138307 (Allow specifying glob patterns for try jobs) - rust-lang#138313 (Update books) - rust-lang#138315 (use next_back() instead of last() on DoubleEndedIterator) - rust-lang#138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js) - rust-lang#138330 (Remove unnecessary `[lints.rust]` sections.) Failed merges: - rust-lang#137147 (Add exclude to config.toml) r? `@ghost` `@rustbot` modify labels: rollup
Move methods from Map to TyCtxt, part 4. A follow-up to rust-lang#137350. r? ``@Zalathar``
@bors r- |
@bors try |
⌛ Trying commit 1047768 with merge 8becda10ff5df6b1ec2906c25213890fcd1921dd... |
Move methods from Map to TyCtxt, part 4. A follow-up to rust-lang#137350. r? `@Zalathar`
☀️ Try build successful - checks-actions |
`Map::node_to_string` just calls the free function `hir_id_to_string`. This commit removes the former and changes the latter into a `TyCtxt` method.
To make room for the moving of `Map::attrs` to `TyCtxt::hir_attrs` in the next commit. (It makes sense to rename the query, because it has many fewer uses than the method.)
Continuing the work from rust-lang#137350. Removes the unused methods: `expect_variant`, `expect_field`, `expect_foreign_item`. Every method gains a `hir_` prefix.
1047768
to
256c27e
Compare
Some changes occurred in compiler/rustc_codegen_ssa |
I rebased. @bors r=Zalathar |
Move methods from Map to TyCtxt, part 4. A follow-up to rust-lang#137350. r? `@Zalathar`
Move methods from Map to TyCtxt, part 4. A follow-up to rust-lang#137350. r? ``@Zalathar``
Rollup of 25 pull requests Successful merges: - rust-lang#134076 (Stabilize `std::io::ErrorKind::InvalidFilename`) - rust-lang#136842 (Add libstd support for Trusty targets) - rust-lang#137314 (change definitely unproductive cycles to error) - rust-lang#137504 (Move methods from Map to TyCtxt, part 4.) - rust-lang#137621 (Add std support to cygwin target) - rust-lang#137701 (Convert `ShardedHashMap` to use `hashbrown::HashTable`) - rust-lang#138109 (make precise capturing args in rustdoc Json typed) - rust-lang#138161 (Add PeekMut::refresh) - rust-lang#138162 (Update the standard library to Rust 2024) - rust-lang#138174 (Elaborate trait assumption in `receiver_is_dispatchable`) - rust-lang#138175 (Support rmeta inputs for --crate-type=bin --emit=obj) - rust-lang#138269 (uefi: fs: Implement FileType, FilePermissions and FileAttr) - rust-lang#138313 (Update books) - rust-lang#138318 (Rustdoc: remove a bunch of `@ts-expect-error` from main.js) - rust-lang#138331 (Use `RUSTC_LINT_FLAGS` more) - rust-lang#138333 (Rebuild llvm spuriously less frequently) - rust-lang#138343 (Enable `f16` tests for `powf`) - rust-lang#138345 (Some autodiff cleanups) - rust-lang#138346 (naked functions: on windows emit `.endef` without the symbol name) - rust-lang#138347 (Reduce `kw::Empty` usage, part 2) - rust-lang#138360 (Fix false-positive in `expr_or_init` and in the `invalid_from_utf8` lint) - rust-lang#138371 (Update compiletest's `has_asm_support` to match rustc) - rust-lang#138372 (Refactor `pick2_mut` & `pick3_mut` to use `get_disjoint_mut`) - rust-lang#138376 (Item-related cleanups) - rust-lang#138377 (Remove unnecessary lifetime from `PatInfo`.) r? `@ghost` `@rustbot` modify labels: rollup
A follow-up to #137350.
r? @Zalathar