Skip to content
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

Rollup of 7 pull requests #130768

Merged
merged 20 commits into from
Sep 24, 2024
Merged
Changes from 3 commits
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
d05323c
rustdoc: redesign toolbar and disclosure widgets
notriddle Aug 25, 2024
5b1b2e9
rustdoc: make the header show all three buttons
notriddle Sep 3, 2024
df307d0
rustdoc: tweak spacing in toolbar
notriddle Sep 3, 2024
7a19b17
Skip query in get_parent_item when possible.
m-ou-se Sep 20, 2024
c0c569f
Update compiler/rustc_middle/src/hir/map/mod.rs
m-ou-se Sep 23, 2024
9ab7046
Add new Tier-3 target: `loongarch64-unknown-linux-ohos`
yetist Sep 13, 2024
e31a719
Fix up standard library intro
notriddle Sep 11, 2024
cc3ffe4
Tweak breadcrumbs list
notriddle Sep 11, 2024
de66639
Revert "Add recursion limit to FFI safety lint"
compiler-errors Sep 23, 2024
9050b33
Add a test
compiler-errors Sep 23, 2024
c3f57f3
Update books
rustbot Sep 23, 2024
2787179
stabilize const_intrinsic_copy
RalfJung Sep 23, 2024
702a644
Check vtable projections for validity in miri
compiler-errors Sep 23, 2024
0a0ea28
Rollup merge of #129545 - notriddle:notriddle/toolbar-v2, r=Guillaume…
compiler-errors Sep 24, 2024
c0f1a69
Rollup merge of #130618 - m-ou-se:skip-query, r=compiler-errors
compiler-errors Sep 24, 2024
ec1ccff
Rollup merge of #130727 - compiler-errors:objects, r=RalfJung
compiler-errors Sep 24, 2024
4d0b44a
Rollup merge of #130750 - heiher:loong-linux-ohos-tier3, r=jieyouxu
compiler-errors Sep 24, 2024
fa1bd9b
Rollup merge of #130758 - compiler-errors:ctype-recursion-limit, r=ji…
compiler-errors Sep 24, 2024
fdd4d64
Rollup merge of #130759 - rustbot:docs-update, r=ehuss
compiler-errors Sep 24, 2024
64aa4c6
Rollup merge of #130762 - RalfJung:const_intrinsic_copy, r=dtolnay
compiler-errors Sep 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion compiler/rustc_middle/src/hir/map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -598,7 +598,10 @@ impl<'hir> Map<'hir> {
/// in the HIR which is recorded by the map and is an item, either an item
/// in a module, trait, or impl.
pub fn get_parent_item(self, hir_id: HirId) -> OwnerId {
if let Some((def_id, _node)) = self.parent_owner_iter(hir_id).next() {
if hir_id.local_id != ItemLocalId::ZERO {
// If this is a child of a HIR owner, return the owner.
hir_id.owner
} else if let Some((def_id, _node)) = self.parent_owner_iter(hir_id).next() {
def_id
} else {
CRATE_OWNER_ID
Expand Down