-
Notifications
You must be signed in to change notification settings - Fork 13.5k
Rewrite inline
attribute parser to use new infrastructure and improve diagnostics for all parsed attributes
#138165
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
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
@@ -584,7 +546,6 @@ fn codegen_fn_attrs(tcx: TyCtxt<'_>, did: LocalDefId) -> CodegenFnAttrs { | |||
return OptimizeAttr::Default; | |||
}; | |||
|
|||
inline_span = Some(attr.span()); |
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 fixes #137950
e6dad01
to
2a707bf
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
☔ The latest upstream changes (presumably #138302) made this pull request unmergeable. Please resolve the merge conflicts. |
b7dda57
to
88a713a
Compare
This comment has been minimized.
This comment has been minimized.
@rustbot review |
This comment has been minimized.
This comment has been minimized.
ah shit, broke clippy 😭 |
☀️ Test successful - checks-actions |
What is this?This is an experimental post-merge analysis report that shows differences in test outcomes between the merged PR and its parent PR.Comparing 27733d4 (parent) -> 1bb3352 (this PR) Test differencesShow 284 test diffsStage 1
Stage 2
(and 184 additional test diffs) Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 1bb335244c311a07cee165c28c553c869e6f64a9 --output-dir test-dashboard And then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
Yay! |
// Latest feature: rustdoc JSON: Don't apply #[repr] privacy heuristics | ||
pub const FORMAT_VERSION: u32 = 46; | ||
// Latest feature: Pretty printing of inline attributes changed | ||
pub const FORMAT_VERSION: u32 = 48; |
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.
Uh, we skipped 47. Oh well, not much to be done about it now.
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.
@GuillaumeGomez: when you add the (tidy?) check for updating the number and comment in tandem, could you also add a check that the number is being increased by one?
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 opened #142677 for that. But that's a good point. Added to my TODO list.
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.
#138165 (comment), earlier it was thaught that someone else was going to do 46->47, to this should do 47->48. I think the takeaways are:
a) Don't try to be too clever and do a double bounce
b) #142601 should fix this. 🤞
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've published rustdoc-types = "0.48.0"
, with a note that 0.47.0/format_version=47 will never exist. https://github.com/rust-lang/rustdoc-types/blob/trunk/CHANGELOG.md#v0.48.0
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've published rustdoc-types = "0.48.0"
, with a note that 0.47.0/format_version=47 will never exist. https://github.com/rust-lang/rustdoc-types/blob/trunk/CHANGELOG.md#v0.48.0
Finished benchmarking commit (1bb3352): comparison URL. Overall result: ❌ regressions - please read the text belowOur benchmarks found a performance regression caused by this PR. Next Steps:
@rustbot label: +perf-regression 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 -0.8%, secondary -1.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 4.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary 0.1%, secondary 0.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 693.071s -> 692.01s (-0.15%) |
rewrite `optimize` attribute to use new attribute parsing infrastructure r? `@oli-obk` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on rust-lang#138165 first
rewrite `optimize` attribute to use new attribute parsing infrastructure r? ``@oli-obk`` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on rust-lang#138165 first
rewrite `optimize` attribute to use new attribute parsing infrastructure r? ```@oli-obk``` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on rust-lang#138165 first
@jdonszelmann Is the binary size jump expected? I thought this would only change the infrastructure but not actual inlining? |
@oli-obk and I have been looking at this this morning. It has to do with attribute encoding cross crate and I'm working on a fix. The fix is luckily rather simple, but it was definitely an unexpected side effect. I expect to be busy for an hour or so more and then have a pr ready :) |
Encode hir attributes cross-crate properly r? `@oli-obk` This should return the lost perf in #138165 cc: `@therealprof`
Rollup merge of #138291 - jdonszelmann:optimize-attr, r=oli-obk rewrite `optimize` attribute to use new attribute parsing infrastructure r? ```@oli-obk``` I'm afraid we'll get quite a few of these PRs in the future. If we get a lot of trivial changes I'll start merging multiple into one PR. They should be easy to review :) Waiting on #138165 first
r? @oli-obk
This PR:
Builds on top of #138164
Closes #137950