-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Port #[rustc_skip_during_method_dispatch]
to the new attribute system
#142695
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
base: master
Are you sure you want to change the base?
Port #[rustc_skip_during_method_dispatch]
to the new attribute system
#142695
Conversation
|
Some changes occurred in compiler/rustc_attr_data_structures Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
@@ -1093,22 +1094,11 @@ fn trait_def(tcx: TyCtxt<'_>, def_id: LocalDefId) -> ty::TraitDef { | |||
let rustc_coinductive = tcx.has_attr(def_id, sym::rustc_coinductive); | |||
let is_fundamental = tcx.has_attr(def_id, sym::fundamental); | |||
|
|||
// FIXME: We could probably do way better attribute validation 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.
Hehe, fixed the fixme :)
84a4a9a
to
e015bc7
Compare
@rustbot ready |
☔ The latest upstream changes (presumably #142697) made this pull request unmergeable. Please resolve the merge conflicts. |
e015bc7
to
961a2cd
Compare
@@ -310,6 +322,24 @@ impl<'f, 'sess: 'f, S: Stage> AcceptContext<'f, 'sess, S> { | |||
}, | |||
}) | |||
} | |||
|
|||
pub(crate) fn expect_no_args(&self, args: &ArgParser<'_>) -> Result<(), ErrorGuaranteed> { | |||
if let Some(span) = match args { |
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.
I think for #[cold]
I implemented this exact method. Could you rebase on that branch? Unfortunately it's taking a bit for everything to merge in. #142491
☔ The latest upstream changes (presumably #142770) made this pull request unmergeable. Please resolve the merge conflicts. |
961a2cd
to
6e29774
Compare
☔ The latest upstream changes (presumably #142826) made this pull request unmergeable. Please resolve the merge conflicts. |
6e29774
to
48290c7
Compare
attribute: self.attr_path.clone(), | ||
reason: AttributeParseErrorReason::ExpectedNoArgs, | ||
}) | ||
pub(crate) fn expect_no_args(&self, args: &ArgParser<'_>) -> Result<(), ErrorGuaranteed> { |
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.
I don't really like this method, it's different from all the other ones on here, and other parsers already solve this issue just inline. I don't really want the context to do any parsing really. I just want the methods to emit the errors, parsing happens in the parser.
@rustbot author |
Reminder, once the PR becomes ready for a review, use |
Part of #131229
r? @jdonszelmann