-
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 :)
const ATTRIBUTE_ORDER: AttributeOrder = AttributeOrder::KeepFirst; | ||
const ON_DUPLICATE: OnDuplicate<S> = OnDuplicate::Error; | ||
|
||
const TEMPLATE: AttributeTemplate = template!(List: "array, boxed_slice"); |
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 wish we had a better way to say in templates that it's one or more of these. I think I'll at some point have a pass over all the templates we have tbh... Not related to your pr
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
Part of #131229
r? @jdonszelmann