rust/compiler/rustc_passes/src
Guillaume Gomez f948c79911
Rollup merge of #142472 - GuillaumeGomez:doc-attribute-attribute, r=fmease
Add new `doc(attribute = "...")` attribute

Fixes rust-lang/rust#141123.

The implementation and purpose of this new `#[doc(attribute = "...")]` attribute is very close to `#[doc(keyword = "...")]`. Which means that luckily for us, most of the code needed was already in place and `@Noratrieb` nicely wrote a first draft that helped me implement this new attribute very fast.

Now with all this said, there is one thing I didn't do yet: adding a `rustdoc-js-std` test. I added GUI tests with search results for attributes so should be fine but I still plan on adding one for it once documentation for builtin attributes will be written into the core/std libs.

You can test it [here](https://rustdoc.crud.net/imperio/doc-attribute-attribute/foo/index.html).

cc `@Noratrieb` `@Veykril`
2025-08-28 21:41:00 +02:00
..
liveness use div_ceil instead of manual logic 2025-07-05 10:55:42 +02:00
abi_test.rs Generalize TyCtxt::item_name. 2025-07-13 13:50:00 +00:00
check_attr.rs Rollup merge of #142472 - GuillaumeGomez:doc-attribute-attribute, r=fmease 2025-08-28 21:41:00 +02:00
check_export.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
dead.rs add a flag to codegen fn attrs for foreign items 2025-08-26 13:05:51 +02:00
debugger_visualizer.rs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
diagnostic_items.rs Implement lint against direct uses of rustc_type_ir in compiler crates 2025-06-18 16:01:41 +02:00
entry.rs use slice::contains where applicable 2025-03-28 12:21:21 +00:00
errors.rs Add new doc(attribute = "...") attribute 2025-08-28 15:56:29 +02:00
hir_id_validator.rs Adjust Map's to_string functionality. 2025-03-12 08:30:03 +11:00
input_stats.rs remove P 2025-08-09 15:47:01 +08:00
lang_items.rs Improved Target type 2025-08-14 18:11:47 +02:00
layout_test.rs Replace infallible name_or_empty methods with fallible name methods. 2025-04-17 09:50:52 +10:00
lib.rs Simplify maybe_record_as_seed. 2025-08-04 23:00:45 +00:00
lib_features.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
liveness.rs remove rustc_attr_data_structures 2025-07-31 14:19:27 +02:00
reachable.rs add a flag to codegen fn attrs for foreign items 2025-08-26 13:05:51 +02:00
stability.rs Propagate TraitImplHeader to hir 2025-08-11 17:05:42 -05:00
upvars.rs use let chains in mir, resolve, target 2025-07-28 06:10:36 +05:00
weak_lang_items.rs Initial support for dynamically linked crates 2025-05-04 22:03:15 +03:00