Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign uprustc: Search all derives for inert attributes #52230
Conversation
rust-highfive
assigned
nikomatsakis
Jul 10, 2018
This comment has been minimized.
This comment has been minimized.
|
(rust_highfive has picked a reviewer for you, use r? to override) |
rust-highfive
added
the
S-waiting-on-review
label
Jul 10, 2018
This comment has been minimized.
This comment has been minimized.
rust-highfive
assigned
petrochenkov
and unassigned
nikomatsakis
Jul 10, 2018
alexcrichton
referenced this pull request
Jul 10, 2018
Closed
#![feature(proc_macro)] breaks some custom derive attributes #52219
alexcrichton
force-pushed the
alexcrichton:attr-and-derive
branch
from
6dcf8e1
to
f8d67a9
Jul 10, 2018
petrochenkov
reviewed
Jul 10, 2018
src/librustc_resolve/macros.rs
Outdated
| @@ -412,7 +428,7 @@ impl<'a> Resolver<'a> { | |||
| attrs | |||
| }); | |||
| } | |||
| return Err(Determinacy::Undetermined); | |||
This comment has been minimized.
This comment has been minimized.
petrochenkov
Jul 10, 2018
Contributor
Hmm, I think the return was actually correct, but misplaced - we can return once we've found an inert attribute and processed it, we don't need to go through remaining traits and possibly repeat the process, so the return should go inside if inert_attrs.contains(&attr_name) { ... }
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
petrochenkov
added
S-waiting-on-author
and removed
S-waiting-on-review
labels
Jul 10, 2018
alexcrichton
force-pushed the
alexcrichton:attr-and-derive
branch
from
f8d67a9
to
743a817
Jul 10, 2018
This comment has been minimized.
This comment has been minimized.
|
@bors r+ |
This comment has been minimized.
This comment has been minimized.
|
|
bors
added
S-waiting-on-bors
and removed
S-waiting-on-author
labels
Jul 10, 2018
This comment has been minimized.
This comment has been minimized.
bors
added a commit
that referenced
this pull request
Jul 12, 2018
This comment has been minimized.
This comment has been minimized.
|
|
bors
merged commit 743a817
into
rust-lang:master
Jul 12, 2018
alexcrichton
deleted the
alexcrichton:attr-and-derive
branch
Jul 18, 2018
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
alexcrichton commentedJul 10, 2018
This commit fixes an apparent mistake in librustc_resolve where when the
proc_macrofeature is enabled (orrust_2018_preview) the resolution ofcustom attributes for custom derive was tweaked. Previously when an attribute
failed to resolve it was attempted to locate if there is a custom derive also in
scope which declares the attribute, but only the first custom derive directive
was search.
Instead this commit fixes the loop to search all custom derive invocations
looking for any which register the attribute in question.
Closes #52219