-
-
Notifications
You must be signed in to change notification settings - Fork 14.1k
Port doc attributes to new attribute API
#149645
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
|
Some changes occurred in compiler/rustc_passes/src/check_attr.rs Some changes occurred in compiler/rustc_attr_parsing These commits modify the If this was unintentional then you should revert the changes before this PR is merged. Some changes occurred in compiler/rustc_hir/src/attrs |
|
Just to be safe: @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 `doc` attributes to new attribute API
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
fc40ba1 to
b27592e
Compare
This comment has been minimized.
This comment has been minimized.
|
Ah right, forgot about clippy. Updating it as well. |
|
Some changes occurred in src/tools/clippy cc @rust-lang/clippy |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (4f24013): 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 -0.2%, secondary 1.5%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (secondary 2.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.5%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 468.725s -> 473.041s (0.92%) |
|
Strange, one doc test has a regression but all others are faster. |
This comment has been minimized.
This comment has been minimized.
|
☔ The latest upstream changes (presumably #149646) made this pull request unmergeable. Please resolve the merge conflicts. |
|
I'd say since perf looks very good on primary benchmarks and is mixed on secondary benchmarks, I'm happy with perf as-is. I am wondering what caused the regression on |
|
☀️ 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 f520900 (parent) -> 5b150d2 (this PR) Test differencesShow 949 test diffsStage 0
Stage 1
Stage 2
(and 682 additional test diffs) Additionally, 167 doctest diffs were found. These are ignored, as they are noisy. Job group index
Test dashboardRun cargo run --manifest-path src/ci/citool/Cargo.toml -- \
test-dashboard 5b150d238fbd4fe7bc2cd3140d8e6fb4406099fa --output-dir test-dashboardAnd then open Job duration changes
How to interpret the job duration changes?Job durations can vary a lot, based on the actual runner instance |
|
Finished benchmarking commit (5b150d2): comparison URL. Overall result: ❌✅ regressions and improvements - 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.9%, secondary 0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesResults (primary -2.4%, secondary 2.4%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (primary -0.4%, secondary -0.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 472.896s -> 473.727s (0.18%) |
|
Improvements outweigh the regressions. icount regressions are mostly for @rustbot label: +perf-regression-triaged |
|
The binary size changes are a bit curious, I wouldn't have expected this change to have an impact on the compiled outputs. |
|
Side effects of big PR: mix of unknown perf changes. ^^' |
|
Remember that there’s rustdoc-only metadata in rmetas, so reducing this (willingly or unexpectedly) will reduce the binary size that encompasses crate metadata. |
|
That's the thing: normally it shouldn't have been changed. |
|
Also from my experience the binary size is just quite noisy in the benchmarks, not sure why. Small changes in code sometimes cause large changes in binary size |
|
The change looks to be in rmetas should you need to investigate. |
|
Already on it. ;) |
Part of #131229.
This PR ports the
docattributes to the new attribute API. However, there are things that will need to be fixed in a follow-up:cfg_old.rsare likely unused now, so they should be removed.doc(test(attr(...)))is handled in a horrifying manner currently. Until we can handle it correctly with theAttributesystem, it'll remain that thing we're all very ashamed of. 😈Docare suboptimal, likeinlinewhich instead of being anOptionis aThinVecbecause we report the error later on. Part of the things I'm not super happy about but can be postponed to future me.src/librustdoc/clean/cfg.rs, thepub(crate) fn parse(cfg: &MetaItemInner) -> Result<Cfg, InvalidCfgError> {function should be removed oncecfg_tracehas been ported to newcfgAPI.DocFragmentwent from 32 to 48. Would be nice to get it back to 32.malformed `doc` attribute inputwasn't meant for so many candidates, should be improved.check_attrwe can move to attribute parsingdoc(alias)on fields & patternsAnd finally, once this PR is merged, I plan to finally stabilize
doc_cfgfeature. :)cc @jdonszelmann
r? @JonathanBrouwer