-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Port #[path]
to the new attribute parsing infrastructure
#143344
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
Conversation
#[path]
to the new attribute parsing infrastructure
@@ -267,6 +267,36 @@ pub fn check_builtin_meta_item( | |||
deny_unsafety: bool, | |||
) { | |||
if !is_attr_template_compatible(&template, &meta.kind) { | |||
// attrs with new parsers are locally validated so excluded here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This move is in a separate commit for reviewability.
It is needed because
pub fn emit_fatal_malformed_builtin_attribute( |
@@ -26,6 +26,7 @@ use crate::attributes::link_attrs::{LinkNameParser, LinkSectionParser}; | |||
use crate::attributes::lint_helpers::{AsPtrParser, PubTransparentParser}; | |||
use crate::attributes::loop_match::{ConstContinueParser, LoopMatchParser}; | |||
use crate::attributes::must_use::MustUseParser; | |||
use crate::attributes::path::PathParser as PathAttributeParser; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needed because this file contains an unrelated thing called PathParser
already
☔ The latest upstream changes (presumably #143338) made this pull request unmergeable. Please resolve the merge conflicts. |
f18c6f3
to
02fb831
Compare
^ Rebased on master |
|
Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
☔ The latest upstream changes (presumably #143434) made this pull request unmergeable. Please resolve the merge conflicts. |
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
Signed-off-by: Jonathan Brouwer <jonathantbrouwer@gmail.com>
02fb831
to
244d64e
Compare
@jdonszelmann ^ Rebased on master |
@bors r+ rollup |
Rollup of 9 pull requests Successful merges: - #143206 (Align attr fixes) - #143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - #143344 (Port `#[path]` to the new attribute parsing infrastructure ) - #143359 (Link to 2024 edition page for `!` fallback changes) - #143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - #143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - #143535 (Remove duplicate word) - #143544 (compiler: rename BareFn to FnPtr) - #143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
Rollup merge of #143344 - JonathanBrouwer:path-parser, r=jdonszelmann Port `#[path]` to the new attribute parsing infrastructure Ports `#[path]` to the new attribute parsing infrastructure for #131229 (comment) This PR duplicates a change from #143237 Draft until that one is merged
Rollup of 9 pull requests Successful merges: - rust-lang/rust#143206 (Align attr fixes) - rust-lang/rust#143236 (Stabilize `mixed_integer_ops_unsigned_sub`) - rust-lang/rust#143344 (Port `#[path]` to the new attribute parsing infrastructure ) - rust-lang/rust#143359 (Link to 2024 edition page for `!` fallback changes) - rust-lang/rust#143456 (mbe: Change `unused_macro_rules` to a `DenseBitSet`) - rust-lang/rust#143529 (Renamed retain_mut to retain on LinkedList as mentioned in the ACP) - rust-lang/rust#143535 (Remove duplicate word) - rust-lang/rust#143544 (compiler: rename BareFn to FnPtr) - rust-lang/rust#143552 (lib: more eagerly return `self.len()` from `ceil_char_boundary`) r? `@ghost` `@rustbot` modify labels: rollup
Ports
#[path]
to the new attribute parsing infrastructure for #131229 (comment)This PR duplicates a change from #143237
Draft until that one is merged