Skip to content

Do not accidentally treat multi-segment meta-items as single-segment #58899

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 7 commits into from
Mar 17, 2019

Conversation

petrochenkov
Copy link
Contributor

Fixes #55168 and many other regressions from #50030

Basically, attributes like #[any::prefix::foo] were commonly interpreted as #[foo] due to name() successfully returning the last segment (this applies to nested things as well #[attr(any::prefix::foo)]).

@rust-highfive
Copy link
Contributor

r? @eddyb

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

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Mar 3, 2019
@petrochenkov petrochenkov added S-waiting-on-crater Status: Waiting on a crater run to be completed. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 3, 2019
@petrochenkov
Copy link
Contributor Author

@bors try

@bors
Copy link
Collaborator

bors commented Mar 3, 2019

⌛ Trying commit f922e0d with merge 290ac7b29f41ff9fa5232f9a1116ea71a3501063...

@bors
Copy link
Collaborator

bors commented Mar 3, 2019

☀️ Try build successful - checks-travis
Build commit: 290ac7b29f41ff9fa5232f9a1116ea71a3501063

@petrochenkov
Copy link
Contributor Author

@craterbot run start=master#c0086b9e8972fef9fd4af24bae20d45021ed06c6 end=try#290ac7b29f41ff9fa5232f9a1116ea71a3501063 mode=check-only

@craterbot
Copy link
Collaborator

👌 Experiment pr-58899 created and queued.
🔍 You can check out the queue and this experiment's details.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚧 Experiment pr-58899 is now running on agent aws-2.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚨 Experiment pr-58899 has encountered an error: invalid type: map, expected a tuple of size 2
🛠️ If the error is fixed use the retry command.

🆘 Can someone from the infra team check in on this? @rust-lang/infra
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Mark-Simulacrum
Copy link
Member

@craterbot retry

@craterbot
Copy link
Collaborator

🛠️ Experiment pr-58899 queued again.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚧 Experiment pr-58899 is now running on agent aws-2.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚨 Experiment pr-58899 has encountered an error: invalid type: map, expected a tuple of size 2
🛠️ If the error is fixed use the retry command.

🆘 Can someone from the infra team check in on this? @rust-lang/infra
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@Mark-Simulacrum
Copy link
Member

@craterbot retry

@craterbot
Copy link
Collaborator

🛠️ Experiment pr-58899 queued again.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🚧 Experiment pr-58899 is now running on agent aws-2.

ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot
Copy link
Collaborator

🎉 Experiment pr-58899 is completed!
📊 0 regressed and 0 fixed (50551 total)
📰 Open the full report.

⚠️ If you notice any spurious failure please add them to the blacklist!
ℹ️ Crater is a tool to run experiments across parts of the Rust ecosystem. Learn more

@craterbot craterbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-crater Status: Waiting on a crater run to be completed. labels Mar 6, 2019
@petrochenkov
Copy link
Contributor Author

Oh, great, no regressions.

@petrochenkov
Copy link
Contributor Author

I'm going to beta-nominate the first three commits (https://github.com/rust-lang/rust/pull/58899/files/cd71788b8cbc55eb89a391eb65bcc6cb27c5a107) despite the size.
The regression these commits fix has large scope and backward-compatibility implications, so it would be good to fix it sooner.

@petrochenkov petrochenkov added the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 6, 2019
@Centril Centril added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Mar 7, 2019
@petrochenkov
Copy link
Contributor Author

@bors r=estebank

@bors
Copy link
Collaborator

bors commented Mar 16, 2019

📌 Commit 2fd4cbb has been approved by estebank

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. labels Mar 16, 2019
@bors
Copy link
Collaborator

bors commented Mar 16, 2019

⌛ Testing commit 2fd4cbb with merge 7cf074a...

bors added a commit that referenced this pull request Mar 16, 2019
Do not accidentally treat multi-segment meta-items as single-segment

Fixes #55168 and many other regressions from #50030

Basically, attributes like `#[any::prefix::foo]` were commonly interpreted as `#[foo]` due to `name()` successfully returning the last segment (this applies to nested things as well `#[attr(any::prefix::foo)]`).
@bors
Copy link
Collaborator

bors commented Mar 17, 2019

☀️ Test successful - checks-travis, status-appveyor
Approved by: estebank
Pushing 7cf074a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Mar 17, 2019
@bors bors merged commit 2fd4cbb into rust-lang:master Mar 17, 2019
@petrochenkov
Copy link
Contributor Author

Backport candidate prepared in #59259

@petrochenkov petrochenkov removed the beta-nominated Nominated for backporting to the compiler in the beta channel. label Mar 17, 2019
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 18, 2019
Rustup

Supersedes #3889

Addresses some review comments from previous PR and rustups to rust-lang/rust#58899
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 18, 2019
Rustup

Supersedes #3889

Addresses some review comments from previous PR and rustups to rust-lang/rust#58899
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 18, 2019
Rustup

Supersedes #3889

Addresses some review comments from previous PR and rustups to rust-lang/rust#58899
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 18, 2019
Rustup

Supersedes #3889

Addresses some review comments from previous PR and rustups to rust-lang/rust#58899
bors added a commit to rust-lang/rust-clippy that referenced this pull request Mar 18, 2019
Rustup

Supersedes #3889

Addresses some review comments from previous PR and rustups to rust-lang/rust#58899
shepmaster added a commit to shepmaster/snafu that referenced this pull request Mar 23, 2019
Turns out, this was never supposed to be supported in the first place.

- rust-lang/rust#58899
shepmaster added a commit to shepmaster/snafu that referenced this pull request Mar 23, 2019
Turns out, this was never supposed to be supported in the first place.

- rust-lang/rust#58899
bors added a commit that referenced this pull request Mar 26, 2019
[beta] Do not accidentally treat multi-segment meta-items as single-segment

Partial backport of #58899 to beta
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

proc_macro_derive(attributes(path::to)) both does and doesn't work
10 participants