`macro!();` statements sometimes don't seem to include `;` in `stmt.span` (HIR)
Open
Nobody has claimed this yet.
A-diagnostics
A-HIR
C-bug
E-needs-investigation
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
cc #133833 and #133834 in suggestions such as
#![crate_type = "lib"]
fn foo() -> String {
let mut bar = {
unknown_macro!();
};
return bar;
}
Opened while looking at #133843 to not lose the FIXME.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading the example in this issue together with #133833, #133834, and #133843, then trace how the HIR statement span is produced for the shown macro statement. Done means establishing the expected semicolon coverage and resolving the noted FIXME with appropriate validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 32/100