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

Ensure that generic arguments don't end up in attribute paths. #43948

Merged
merged 2 commits into from
Aug 23, 2017

Conversation

jseyfried
Copy link
Contributor

Fixes #43424.
r? @petrochenkov or @nrc

@alexcrichton alexcrichton added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 17, 2017
maybe_whole!(self, NtPath, |path| {
if style == PathStyle::Mod && path.segments.iter().any(|segment| segment.parameters.is_some()) {
self.diagnostic().span_err(path.span, "unexpected generic arguments in path");
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This won't catch arguments produced by procedural macros, but I guess that's more or less okay.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Legacy procedural macros or procedural macros 2.0?
I don't think this is an issue for procedural macros 2.0 since they can't generate AST directly.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, the legacy ones.

@petrochenkov
Copy link
Contributor

IIRC, there should be fallout from other compile-fail / ui tests.

@petrochenkov
Copy link
Contributor

tidy error: /checkout/src/libsyntax/parse/parser.rs:1776: line longer than 100 chars

@petrochenkov
Copy link
Contributor

Needs rebase as well.

@bors
Copy link
Contributor

bors commented Aug 22, 2017

☔ The latest upstream changes (presumably #43540) made this pull request unmergeable. Please resolve the merge conflicts.

@alexcrichton
Copy link
Member

@bors: p=1

(beta backport)

@arielb1 arielb1 added the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Aug 22, 2017
@arielb1
Copy link
Contributor

arielb1 commented Aug 22, 2017

ping @petrochenkov for review - this is getting close to beta

@arielb1 arielb1 added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Aug 22, 2017
@petrochenkov
Copy link
Contributor

@bors r+
(Didn't notice this was rebased.)

@bors
Copy link
Contributor

bors commented Aug 22, 2017

📌 Commit 7e19168 has been approved by petrochenkov

@bors
Copy link
Contributor

bors commented Aug 23, 2017

⌛ Testing commit 7e19168 with merge 06b0273ed2b8c2d38fe4c1257169a4287377015a...

@bors
Copy link
Contributor

bors commented Aug 23, 2017

💔 Test failed - status-appveyor

@alexcrichton
Copy link
Member

@bors
Copy link
Contributor

bors commented Aug 23, 2017

⌛ Testing commit 7e19168 with merge ca89841...

bors added a commit that referenced this pull request Aug 23, 2017
…henkov

Ensure that generic arguments don't end up in attribute paths.

Fixes #43424.
r? @petrochenkov or @nrc
@bors
Copy link
Contributor

bors commented Aug 23, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: petrochenkov
Pushing ca89841 to master...

@bors bors merged commit 7e19168 into rust-lang:master Aug 23, 2017
@nikomatsakis nikomatsakis added the beta-accepted Accepted for backporting to the compiler in the beta channel. label Aug 23, 2017
@nikomatsakis
Copy link
Contributor

Marking as beta-accepted. Small patch. Stops us from accepting bad paths.

cc @rust-lang/compiler

bors added a commit that referenced this pull request Aug 23, 2017
[beta] Final round of beta backports

Includes:

* [x] #43723
* [x] #43830
* [x] #43844
* [x] #44013
* [x] #44049
* [x] #43948
@jseyfried jseyfried deleted the generic_arguments_in_paths branch August 23, 2017 20:59
@alexcrichton alexcrichton removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Aug 23, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
beta-accepted Accepted for backporting to the compiler in the beta channel. 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.

6 participants