-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Fix handling of item names for HIR #78345
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
r? @varkor (rust_highfive has picked a reviewer for you, use r? to override) |
I don't understand this failure:
Is the test maybe wrong and depending that both the names are |
Oh - maybe the issue is that |
ping @varkor - do you know what's going wrong here? |
This comment has been minimized.
This comment has been minimized.
Ok I think I see the issue - if |
Ugh - this still doesn't do what I want because it still panics if you call
|
ping @varkor - is this waiting on anything from me? |
I thought you were waiting for #77820 to land if this is rebased on top of it? |
The thing is there's no tests for this outside of #77820, which is why I've been constantly rebasing it. |
Ah, my mistake. If the extra line can be removed, that'd be preferable. In either case r=me after checking that. |
- Handle variants, fields, macros in `Node::ident()` - Handle the crate root in `opt_item_name` - Factor out `item_name_from_def_id` to reduce duplication - Look at HIR before the DefId for `opt_item_name` This gives accurate spans, which are not available from serialized metadata. - Don't panic on the crate root in `opt_item_name` - Add comments
If CI passes this is good to go, otherwise I need to add back the call to |
@bors r=varkor |
📌 Commit f60fd49 has been approved by |
Fix handling of item names for HIR - Handle variants, fields, macros in `Node::ident()` - Handle the crate root in `opt_item_name` - Rewrite `item_name` in terms of `opt_item_name` I need this for both rust-lang#77820 and rust-lang#78082, so splitting it out into a separate PR so it can land early.
Fix handling of item names for HIR - Handle variants, fields, macros in `Node::ident()` - Handle the crate root in `opt_item_name` - Rewrite `item_name` in terms of `opt_item_name` I need this for both rust-lang#77820 and rust-lang#78082, so splitting it out into a separate PR so it can land early.
Rollup of 12 pull requests Successful merges: - rust-lang#77640 (Refactor IntErrorKind to avoid "underflow" terminology) - rust-lang#78026 (Define `fs::hard_link` to not follow symlinks.) - rust-lang#78114 (Recognize `private_intra_doc_links` as a lint) - rust-lang#78228 (Promote aarch64-unknown-linux-gnu to Tier 1) - rust-lang#78345 (Fix handling of item names for HIR) - rust-lang#78437 (BTreeMap: stop mistaking node for an orderly place) - rust-lang#78476 (fix some incorrect aliasing in the BTree) - rust-lang#78674 (inliner: Use substs_for_mir_body) - rust-lang#78748 (Implement destructuring assignment for tuples) - rust-lang#78868 (Fix tab focus on restyled switches) - rust-lang#78878 (Avoid overlapping cfg attributes when both macOS and aarch64) - rust-lang#78882 (Nicer hunk headers for rust files) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
Node::ident()
opt_item_name
item_name
in terms ofopt_item_name
I need this for both #77820 and #78082, so splitting it out into a separate PR so it can land early.