-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Move methods from Map
to TyCtxt
, part 5.
#139232
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
Conversation
This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR.
Some changes occurred in compiler/rustc_passes/src/check_attr.rs HIR ty lowering was modified cc @fmease Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred to the CTFE machinery Some changes occurred in match checking cc @Nadrieril Some changes occurred in need_type_info.rs cc @lcnr |
Nice. @bors r+ |
Move methods from `Map` to `TyCtxt`, part 5. This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR. A follow-up to rust-lang#137504. r? `@Zalathar`
pub fn hir_span_if_local(self, id: DefId) -> Option<Span> { | ||
id.is_local().then(|| self.def_span(id)) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
followup once this PR lands
I think we should remove this method. It's just a wrapper for def_span
which doesn't return stuff if the definition isn't local. I feel like this behavior should be explicit and that most places actually should to use the span regardless of whether it's local 🤔
Rollup of 5 pull requests Successful merges: - rust-lang#139178 (Remove cjgillot from automated review assignment) - rust-lang#139184 (Add unstable `--print=crate-root-lint-levels`) - rust-lang#139215 (Add `opt-level = "s"` for more std symbolication crates) - rust-lang#139232 (Move methods from `Map` to `TyCtxt`, part 5.) - rust-lang#139239 (Remove `aux_build` run-make rustc helpers) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of rust-lang#139232 - nnethercote:remove-Map-5, r=Zalathar Move methods from `Map` to `TyCtxt`, part 5. This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR. A follow-up to rust-lang#137504. r? `@Zalathar`
@rust-timer build 5c9cf68 Trying if this caused the regression from #139257. |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (5c9cf68): comparison URL. Overall result: ❌ regressions - please read the text belowBenchmarking this pull request likely means that it is perf-sensitive, so we're automatically marking it as not fit for rolling up. While you can manually mark this PR as fit for rollup, we strongly recommend not doing so since this PR may lead to changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please indicate this with @bors rollup=never Instruction countThis is the most reliable metric that we have; it was used to determine the overall result at the top of this comment. However, even this metric can sometimes exhibit noise.
Max RSS (memory usage)Results (primary -0.3%, secondary -2.4%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
CyclesResults (secondary -2.5%)This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 776.507s -> 776.299s (-0.03%) |
Huh, surprising this had a perf effect! I will try to work out what happened. |
I wonder if the measured regressions are bogus/transient. The affected benchmarks (html5ever, deep-vector, tuple-stress, etc.) look like they've gotten noisy over the past few measurements. I tried reproducing the regression with And this PR should be perf-neutral: it just moves some methods from |
The primary benchmarks do look a bit noisy recently, yeah. It could indeed be a fluke, I'll leave it up to you to mark it as triaged, unless you want to continue investigating. |
@rustbot label: +perf-regression-triaged |
Move methods from `Map` to `TyCtxt`, part 5. This eliminates all methods on `Map`. Actually removing `Map` will occur in a follow-up PR. A follow-up to rust-lang#137504. r? `@Zalathar`
Remove `hir::Map` A follow-up to rust-lang#139232. r? `@Zalathar`
Rollup merge of rust-lang#139772 - nnethercote:rm-hir-Map, r=Zalathar Remove `hir::Map` A follow-up to rust-lang#139232. r? `@Zalathar`
Remove `hir::Map` A follow-up to rust-lang/rust#139232. r? `@Zalathar`
This eliminates all methods on
Map
. Actually removingMap
will occur in a follow-up PR.A follow-up to #137504.
r? @Zalathar