Skip to content

rustc: Don't use DelimToken::None if possible #44745

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

Merged
merged 1 commit into from
Sep 23, 2017

Conversation

alexcrichton
Copy link
Member

This commit fixes a regression from #44601 where lowering attribute to HIR now
involves expanding interpolated tokens to their actual tokens. In that commit
all interpolated tokens were surrounded with a DelimToken::None group of
tokens, but this ended up causing regressions like #44730 where the various
attribute parsers in syntax/attr.rs weren't ready to cope with
DelimToken::None. Instead of fixing the parser in attr.rs this commit
instead opts to just avoid the DelimToken::None in the first place, ensuring
that the token stream should look the same as it did before where possible.

Closes #44730

This commit fixes a regression from rust-lang#44601 where lowering attribute to HIR now
involves expanding interpolated tokens to their actual tokens. In that commit
all interpolated tokens were surrounded with a `DelimToken::None` group of
tokens, but this ended up causing regressions like rust-lang#44730 where the various
attribute parsers in `syntax/attr.rs` weren't ready to cope with
`DelimToken::None`. Instead of fixing the parser in `attr.rs` this commit
instead opts to just avoid the `DelimToken::None` in the first place, ensuring
that the token stream should look the same as it did before where possible.

Closes rust-lang#44730
@rust-highfive
Copy link
Contributor

r? @pnkfelix

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton alexcrichton added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 21, 2017
@estebank
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 22, 2017

📌 Commit 5053442 has been approved by estebank

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Sep 23, 2017
rustc: Don't use DelimToken::None if possible

This commit fixes a regression from rust-lang#44601 where lowering attribute to HIR now
involves expanding interpolated tokens to their actual tokens. In that commit
all interpolated tokens were surrounded with a `DelimToken::None` group of
tokens, but this ended up causing regressions like rust-lang#44730 where the various
attribute parsers in `syntax/attr.rs` weren't ready to cope with
`DelimToken::None`. Instead of fixing the parser in `attr.rs` this commit
instead opts to just avoid the `DelimToken::None` in the first place, ensuring
that the token stream should look the same as it did before where possible.

Closes rust-lang#44730
bors added a commit that referenced this pull request Sep 23, 2017
Rollup of 14 pull requests

- Successful merges: #44554, #44648, #44658, #44712, #44717, #44726, #44745, #44746, #44749, #44759, #44770, #44773, #44776, #44778
- Failed merges:
@bors bors merged commit 5053442 into rust-lang:master Sep 23, 2017
@alexcrichton alexcrichton deleted the no-delim-none branch October 10, 2017 18:46
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

#[doc = $expr] in macro silently fails to generate docs
5 participants