Port #[lang] and #[panic_handler] to the new attribute parsers#152568
Port #[lang] and #[panic_handler] to the new attribute parsers#152568JonathanBrouwer wants to merge 2 commits intorust-lang:mainfrom
#[lang] and #[panic_handler] to the new attribute parsers#152568Conversation
|
Some changes occurred in compiler/rustc_attr_parsing Some changes occurred in compiler/rustc_hir/src/attrs Some changes occurred in compiler/rustc_passes/src/check_attr.rs |
|
@bors r+ |
|
@bors r- |
This comment has been minimized.
This comment has been minimized.
e30e67d to
7a99f6f
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
7a99f6f to
0185274
Compare
This comment has been minimized.
This comment has been minimized.
0185274 to
e697bc0
Compare
|
Just in case: |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Port `#[lang]` and `#[panic_handler]` to the new attribute parsers
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (5953e50): comparison URL. Overall result: ❌✅ regressions and improvements - please read the text belowBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. Next Steps: If you can justify the regressions found in this try perf run, please do so in sufficient writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (primary 1.8%, secondary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 0.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 479.255s -> 479.938s (0.14%) |
e697bc0 to
ee8ca0a
Compare
| pub(crate) fn extract_ast(attrs: &[rustc_ast::ast::Attribute]) -> Option<(Symbol, Span)> { | ||
| attrs.iter().find_map(|attr| { | ||
| Some(match attr { | ||
| _ if attr.has_name(sym::lang) => (attr.value_str()?, attr.span()), |
There was a problem hiding this comment.
Kept the old parsers here, because changing it is bad for perf :c
I'll take a further look at this in the future
|
@bors try @rust-timer queue |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Port `#[lang]` and `#[panic_handler]` to the new attribute parsers
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (11ae093): comparison URL. Overall result: ✅ improvements - no action neededBenchmarking this pull request means it may be perf-sensitive – we'll automatically label it not fit for rolling up. You can override this, but we strongly advise not to, due to possible changes in compiler perf. @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)Results (secondary -0.6%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary 2.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeThis benchmark run did not return any relevant results for this metric. Bootstrap: 479.255s -> 479.965s (0.15%) |
|
@jdonszelmann ready to me merged imo :) |
For #131229 (comment)
r? @jdonszelmann