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 |
| 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.
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
| } | ||
|
|
||
| pub(crate) fn expect_no_args(&self, args: &ArgParser<'_>) -> Result<(), ErrorGuaranteed> { | ||
| if let Some(span) = match args { |
There was a problem hiding this comment.
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.
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 |
|
☔ The latest upstream changes (presumably #142878) made this pull request unmergeable. Please resolve the merge conflicts. |
48290c7 to
b830801
Compare
|
@rustbot ready |
| /// Assert that there were no args. | ||
| /// If there were, get a span to the arguments | ||
| /// (to pass to [`AcceptContext::expected_no_args`](crate::context::AcceptContext::expected_no_args)). | ||
| pub fn no_args(&self) -> Result<(), Span> { |
b830801 to
0b69b02
Compare
0b69b02 to
aa80a2b
Compare
|
@bors r+ rollup |
…_during_method_dispatch, r=jdonszelmann Port `#[rustc_skip_during_method_dispatch]` to the new attribute system Part of rust-lang#131229 r? `@jdonszelmann`
Rollup of 8 pull requests Successful merges: - #140622 (compiletest: Improve diagnostics for line annotation mismatches) - #142641 (Generate symbols.o for proc-macros too) - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system) - #142742 ([win][aarch64] Fix linking statics on Arm64EC, take 2) - #142894 (phantom_variance_markers: fix identifier usage in macro) - #142928 (Fix hang in --print=file-names in bootstrap) - #142930 (Account for beta revisions when normalizing versions) - #142932 (rustdoc-json: Keep empty generic args if parenthesized) r? `@ghost` `@rustbot` modify labels: rollup
Rollup of 9 pull requests Successful merges: - #140005 (Set MSG_NOSIGNAL for UnixStream) - #140622 (compiletest: Improve diagnostics for line annotation mismatches) - #142354 (Fixes firefox copy paste issue) - #142695 (Port `#[rustc_skip_during_method_dispatch]` to the new attribute system) - #142779 (Add note about `str::split` handling of no matches.) - #142894 (phantom_variance_markers: fix identifier usage in macro) - #142928 (Fix hang in --print=file-names in bootstrap) - #142932 (rustdoc-json: Keep empty generic args if parenthesized) - #142933 (Simplify root goal API of solver a bit) r? `@ghost` `@rustbot` modify labels: rollup
Part of #131229
r? @jdonszelmann