rust/tests
bors 5b150d238f Auto merge of #149645 - GuillaumeGomez:doc-attr-based, r=jdonszelmann,jonathanbrouwer
Port `doc` attributes to new attribute API

Part of https://github.com/rust-lang/rust/issues/131229.

This PR ports the `doc` attributes to the new attribute API. However, there are things that will need to be fixed in a follow-up:

* Some part of `cfg_old.rs` are likely unused now, so they should be removed.
* Not all error/lints are emitted at the same time anymore, making them kinda less useful considering that you need to run and fix rustc/rustdoc multiple times to get through all of them.
* For coherency with the other attribute errors, I didn't modify the default output too much, meaning that we have some new messages now. I'll likely come back to that to check if the previous ones were better in a case-by-case approach.
* `doc(test(attr(...)))` is handled in a horrifying manner currently. Until we can handle it correctly with the `Attribute` system, it'll remain that thing we're all very ashamed of. 😈
* A type in rustdoc got its size increased, I'll check the impact on performance. But in any case, I plan to improve it in a follow-up so should be "ok".
* Because of error reporting, some fields of `Doc` are suboptimal, like `inline` which instead of being an `Option` is a `ThinVec` because we report the error later on. Part of the things I'm not super happy about but can be postponed to future me.
* In `src/librustdoc/clean/cfg.rs`, the `pub(crate) fn parse(cfg: &MetaItemInner) -> Result<Cfg, InvalidCfgError> {` function should be removed once `cfg_trace` has been ported to new `cfg` API.
* Size of type `DocFragment` went from 32 to 48. Would be nice to get it back to 32.
* ``malformed `doc` attribute input`` wasn't meant for so many candidates, should be improved.
* See how many of the checks in `check_attr` we can move to attribute parsing
* Port target checking to be in the attribute parser completely
* Fix target checking for `doc(alias)` on fields & patterns

And finally, once this PR is merged, I plan to finally stabilize `doc_cfg` feature. :)

cc `@jdonszelmann`
r? `@JonathanBrouwer`
2025-12-11 21:08:19 +00:00
..
assembly-llvm Rollup merge of #149409 - cezarbbb:stable_ssp, r=SparrowLii 2025-11-29 21:12:26 +11:00
auxiliary Rework c_variadic 2025-12-04 10:51:34 +01:00
codegen-llvm Rollup merge of #149679 - pmur:murp/ppc-inline-improvements, r=Amanieu 2025-12-10 07:54:20 +01:00
codegen-units Add #[inline] to Layout::is_size_align_valid 2025-12-06 19:47:13 -06:00
coverage Auto merge of #142821 - cjgillot:jump-threading-single, r=saethlin 2025-12-01 23:44:49 +00:00
coverage-run-rustdoc
crashes Auto merge of #148602 - BoxyUwU:coercion_cleanup_uncontroversial, r=lcnr 2025-12-05 11:46:41 +00:00
debuginfo debuginfo/macro-stepping test: extend comments 2025-12-01 22:32:36 +01:00
incremental Add unsafe to no_mangle incremental tests 2025-12-03 17:00:22 +01:00
mir-opt Auto merge of #149426 - antoyo:libgccjit-targets, r=Kobzol 2025-12-09 01:58:46 +00:00
pretty Rollup merge of #149489 - scottmcm:try-bikeshed, r=nnethercote 2025-12-10 17:16:47 +01:00
run-make Rollup merge of #149400 - Skgland:tracked_mod, r=Amanieu 2025-12-09 17:36:48 +01:00
run-make-cargo Skip the panic-immediate-abort-works test when cross-compiling 2025-09-22 21:13:38 -04:00
rustdoc Correctly iterate doc comments in intra-doc resolution in rustc_resolve 2025-12-10 12:28:07 +01:00
rustdoc-gui Fix invalid link generation for type alias methods 2025-11-24 17:01:32 +01:00
rustdoc-js Auto merge of #149370 - Zalathar:rollup-6fkk5x4, r=Zalathar 2025-11-27 07:30:25 +00:00
rustdoc-js-std std: Use more unix.rs code on WASI targets 2025-12-08 06:46:28 -08:00
rustdoc-json Add tests for doc(attribute = "...") attribute 2025-08-28 15:56:30 +02:00
rustdoc-ui Update to new API, allowing to remove check_doc_cfg.rs file from librustdoc 2025-12-10 12:28:08 +01:00
ui Auto merge of #149645 - GuillaumeGomez:doc-attr-based, r=jdonszelmann,jonathanbrouwer 2025-12-11 21:08:19 +00:00
ui-fulldeps Make typo in field and name suggestions verbose 2025-12-09 17:29:23 +00:00
COMPILER_TESTS.md