-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Separate definitions and HIR owners in the type system #102040
Separate definitions and HIR owners in the type system #102040
Conversation
Some changes occurred to MIR optimizations cc @rust-lang/wg-mir-opt Some changes occurred in src/tools/clippy cc @rust-lang/clippy Some changes occurred in src/librustdoc/clean/types.rs cc @camelid |
c8f5d30
to
c6f5ed6
Compare
HIR
owners
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit 9ef994ecf1e229cfe0bc915893e872779822e484 with merge fc0ede293f9529a80d346d21cf20f5f8cb8b6b8d... |
☀️ Try build successful - checks-actions |
Queued fc0ede293f9529a80d346d21cf20f5f8cb8b6b8d with parent acb8934, future comparison URL. |
This comment has been minimized.
This comment has been minimized.
Finished benchmarking commit (fc0ede293f9529a80d346d21cf20f5f8cb8b6b8d): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
@bors try @rust-timer queue |
Awaiting bors try build completion. @rustbot label: +S-waiting-on-perf |
⌛ Trying commit a61e3632316cb4a90370ca420cac7486efeeb414 with merge ec9258ea1ae0965d54d386a2c3c7e90f70fc8494... |
☀️ Try build successful - checks-actions |
Queued ec9258ea1ae0965d54d386a2c3c7e90f70fc8494 with parent 8fd6d03, future comparison URL. |
Finished benchmarking commit (ec9258ea1ae0965d54d386a2c3c7e90f70fc8494): comparison URL. Overall result: ❌ regressions - no action neededBenchmarking 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. @bors rollup=never Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)This benchmark run did not return any relevant results for this metric. CyclesResultsThis 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.
Footnotes |
@@ -2206,14 +2206,14 @@ pub struct FnSig<'hir> { | |||
// so it can fetched later. | |||
#[derive(Copy, Clone, PartialEq, Eq, Encodable, Decodable, Debug, HashStable_Generic)] | |||
pub struct TraitItemId { | |||
pub def_id: LocalDefId, | |||
pub def_id: OwnerId, |
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.
I think any OwnerId
fields or variables should not be named def_id
.
@@ -302,7 +302,9 @@ impl<'tcx> MirBorrowckCtxt<'_, 'tcx> { | |||
if free_region.bound_region.is_named() { | |||
// A named region that is actually named. | |||
Some(RegionName { name, source: RegionNameSource::NamedFreeRegion(span) }) | |||
} else if let hir::IsAsync::Async = tcx.asyncness(self.mir_hir_id().owner) { | |||
} else if let hir::IsAsync::Async = | |||
tcx.asyncness(self.mir_hir_id().owner.def_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.
Pre-existing: why mir_hir_id().owner
and not mir_def_id()
?
@@ -1588,7 +1588,7 @@ rustc_queries! { | |||
arena_cache | |||
desc { "resolving lifetimes" } | |||
} | |||
query named_region_map(_: LocalDefId) -> | |||
query named_region_map(_: hir::OwnerId) -> |
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.
This requires to add an impl DepNodeParams for OwnerId
which copies the one for LocalDefId
.
It would be cool to add some documentation here: in comments in the code and maybe the HIR chapter in the rustc dev guide. The body of #83158 can be used as a base for |
fix a ui test use `into` fix clippy ui test fix a run-make-fulldeps test implement `IntoQueryParam<DefId>` for `OwnerId` use `OwnerId` for more queries change the type of `ParentOwnerIterator::Item` to `(OwnerId, OwnerNode)`
fcc8399
to
8fe9360
Compare
@bors r=cjgillot |
⌛ Testing commit 8fe9360 with merge c61dde4cc4662710d7acef61383403d04a0a5d31... |
💔 Test failed - checks-actions |
@bors r=cjgillot |
💡 This pull request was already approved, no need to approve it again.
|
@bors retry |
☀️ Test successful - checks-actions |
Finished benchmarking commit (d0ece44): comparison URL. Overall result: ❌ regressions - no action needed@rustbot label: -perf-regression Instruction countThis is a highly reliable metric that was used to determine the overall result at the top of this comment.
Max RSS (memory usage)ResultsThis 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.
CyclesResultsThis 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.
Footnotes |
…tead of `LocalDefId` <rust-lang/rust#102040>
…tead of `LocalDefId` <rust-lang/rust#102040>
Fixes #83158
r? @cjgillot