Skip to content

Don't assume plugin-whitelisted attributes are proc macro attributes #40039

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

Merged
merged 1 commit into from
Feb 23, 2017

Conversation

abonander
Copy link
Contributor

closes #40001

@rust-highfive
Copy link
Contributor

r? @nrc

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

@abonander
Copy link
Contributor Author

r? @jseyfried
cc @keeperofdakeys

@rust-highfive rust-highfive assigned jseyfried and unassigned nrc Feb 22, 2017
@jseyfried
Copy link
Contributor

Excellent, thanks!
@bors r+

@bors
Copy link
Collaborator

bors commented Feb 22, 2017

📌 Commit 0bf59b5 has been approved by jseyfried

@@ -181,6 +181,11 @@ impl<'a> base::Resolver for Resolver<'a> {
fn find_legacy_attr_invoc(&mut self, attrs: &mut Vec<ast::Attribute>)
-> Option<ast::Attribute> {
for i in 0..attrs.len() {
if self.session.plugin_attributes.borrow().iter()
.any(|&(ref attr_nm, _)| attrs[i].check_name(attr_nm)) {
Copy link
Contributor

Choose a reason for hiding this comment

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

check_name marks the attribute as used when it returns true, which is breaking plugin-attr-register-deny.rs on Travis.

I would use attrs[i].name() == attr_nm instead.

@jseyfried
Copy link
Contributor

@bors r-
@bors delegate=abonander

@bors
Copy link
Collaborator

bors commented Feb 22, 2017

✌️ @abonander can now approve this pull request

@Manishearth
Copy link
Member

@bors r=jseyfried

@bors
Copy link
Collaborator

bors commented Feb 22, 2017

📌 Commit dac25e2 has been approved by jseyfried

@nox
Copy link
Contributor

nox commented Feb 23, 2017

@Manishearth Could this get a p=1?

@Manishearth
Copy link
Member

@bors p=1

@bors
Copy link
Collaborator

bors commented Feb 23, 2017

⌛ Testing commit dac25e2 with merge 413a975...

bors added a commit that referenced this pull request Feb 23, 2017
Don't assume plugin-whitelisted attributes are proc macro attributes

closes #40001
@bors
Copy link
Collaborator

bors commented Feb 23, 2017

☀️ Test successful - status-appveyor, status-travis
Approved by: jseyfried
Pushing 413a975 to master...

@bors bors merged commit dac25e2 into rust-lang:master Feb 23, 2017
bors-servo pushed a commit to servo/servo that referenced this pull request Feb 24, 2017
Make #[dom_struct] a proc_macro attribute

The rustup is needed for rust-lang/rust#40039.

<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg" height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/15715)
<!-- Reviewable:end -->
moz-v2v-gh pushed a commit to mozilla/gecko-dev that referenced this pull request Feb 25, 2017
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba

--HG--
rename : servo/components/domobject_derive/Cargo.toml => servo/components/dom_struct/Cargo.toml
extra : subtree_source : https%3A//hg.mozilla.org/projects/converted-servo-linear
extra : subtree_revision : 2cad140c3d6b99837f0bd15a6f3ccba0f353e049
JerryShih pushed a commit to JerryShih/gecko-dev that referenced this pull request Mar 1, 2017
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba
Manishearth pushed a commit to Manishearth/gecko-dev that referenced this pull request Mar 9, 2017
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba
gecko-dev-updater pushed a commit to marco-c/gecko-dev-comments-removed that referenced this pull request Oct 1, 2019
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba

UltraBlame original commit: b439aae221f2298caa3f41781ce3dfbd0b36d8ad
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified that referenced this pull request Oct 1, 2019
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba

UltraBlame original commit: b439aae221f2298caa3f41781ce3dfbd0b36d8ad
gecko-dev-updater pushed a commit to marco-c/gecko-dev-wordified-and-comments-removed that referenced this pull request Oct 1, 2019
… nox:custom-derive); r=SimonSapin

The rustup is needed for rust-lang/rust#40039.

Source-Repo: https://github.com/servo/servo
Source-Revision: a204c4176dcccdad8ec99d74055c66794c3f64ba

UltraBlame original commit: b439aae221f2298caa3f41781ce3dfbd0b36d8ad
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Custom attributes from unstable plugins and procedural macro attributes are not compatible
7 participants