Repository navigation
rustdoc: notable trait badge and popover enhancements - #160370
Conversation
|
Some changes occurred in GUI tests. Some changes occurred in HTML/CSS/JS. cc @GuillaumeGomez, @lolbinarycat Some changes occurred in compiler/rustc_attr_parsing cc @jdonszelmann, @JonathanBrouwer Some changes occurred in compiler/rustc_hir/src/attrs |
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
| border-color: #0f1419; | ||
| } | ||
| /* https://github.com/rust-lang/rust/pull/91480 */ | ||
| .notabletrait-badge.light.grey { |
There was a problem hiding this comment.
I'm really not sure it's worth it to show people how to add their own colors.
There was a problem hiding this comment.
I kept the list, but got rid of the examples.
| --notable-badge-violet: oklch(0.88 0.21 300); | ||
| --notable-badge-magenta: oklch(0.88 0.21 320); | ||
| --notable-badge-cyan: oklch(0.88 0.21 180); | ||
| --notable-badge-transparent: white; |
There was a problem hiding this comment.
I don't think having text floating around is a good idea, especially when it's a color picked by rustdoc automatically...
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
…uillaumeGomez,lolbinarycat rustdoc: notable trait badge and popover enhancements Part of rust-lang#45040 Preview ------- https://notriddle.com/rustdoc-html-demo-13/gui-tests/lib2/notable_trait_colors/struct.NotableTraitColors.html Screenshots ----------- <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/4c65db6f-61cf-4e90-864c-e0c4d7c62ef0" /> <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/ccb6bda0-7f74-4b7b-964d-88defc09987b" /> <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/bd766a67-9f45-4207-b260-5c63a489630f" /> --- <img width="2410" height="476" alt="image" src="https://github.com/user-attachments/assets/aa22a598-af10-4076-9382-6b84541e456c" /> <img width="1209" height="346" alt="Screenshot 2026-09-18 at 19 19 03" src="https://github.com/user-attachments/assets/48d69baf-b118-4844-bf1f-d32d6b00e7ce" /> --- <img width="1351" height="981" alt="Screenshot 2026-09-18 at 19 15 02" src="https://github.com/user-attachments/assets/bf84f185-5ab8-476f-85b0-b92805c5ff7c" /> <img width="1351" height="981" alt="Screenshot 2026-09-18 at 19 15 38" src="https://github.com/user-attachments/assets/8300989e-8768-4914-b314-b0c9471d2603" />
Rollup of 19 pull requests Successful merges: - #160370 (rustdoc: notable trait badge and popover enhancements) - #163410 (Use a macro to reduce duplication in `core/src/num/f{16,32,64,128}.rs` (part 1)) - #164290 (virtual function elimination: only use `type.checked.load` for function pointers) - #165113 (Limit lldb string summary length) - #165146 (Stop using LLVM struct types for array/pointer offset GEPs (rebase)) - #165197 (Inline usages of `is_doc_keyword_or_attribute` and `is_rustc_doc_primitive`) - #165209 (Don't ICE when making diagnostic in `point_at_dyn_trait_in_field_def` if there's no `dyn Trait` field to point at) - #153633 (feat: improve `Cell` doc) - #164686 (Add regression test for new solver hang on cyclic projection bound) - #164937 (Add example for misaligned elements in `subslice_range`) - #164981 (Reflection add TypeId::name) - #165035 (Suggest `gca!` for path const args that use generic params) - #165106 (Windows: Disallow some special chars in bat script names) - #165120 (Add regression test for overlap check hang with unresolved type in where clause) - #165158 (Tiny optimization to `TypeErrCtxt::report_inference_failure()`) - #165184 (GCI: Check where-clauses of associated constants for well-formedness) - #165190 (Improve delayed bug comment and message on first_method_vtable_slot) - #165196 (inhabitedness: use try_normalize_erasing_regions on ADT fields) - #165206 (tests: clarify dead_code_pub_in_binary FIXME after Cargo workaround)
This comment has been minimized.
This comment has been minimized.
…uwer Rollup of 23 pull requests Successful merges: - #163410 (Use a macro to reduce duplication in `core/src/num/f{16,32,64,128}.rs` (part 1)) - #164290 (virtual function elimination: only use `type.checked.load` for function pointers) - #165113 (Limit lldb string summary length) - #165146 (Stop using LLVM struct types for array/pointer offset GEPs (rebase)) - #165197 (Inline usages of `is_doc_keyword_or_attribute` and `is_rustc_doc_primitive`) - #165209 (Don't ICE when making diagnostic in `point_at_dyn_trait_in_field_def` if there's no `dyn Trait` field to point at) - #165228 (Fix error output for invalid `SBValue` children) - #153633 (feat: improve `Cell` doc) - #164686 (Add regression test for new solver hang on cyclic projection bound) - #164730 (core: Rename `abort_immediate` to `crash`) - #164937 (Add example for misaligned elements in `subslice_range`) - #165019 (Add safety section for from_utf8_unchecked/from_raw_parts) - #165035 (Suggest `gca!` for path const args that use generic params) - #165106 (Windows: Disallow some special chars in bat script names) - #165120 (Add regression test for overlap check hang with unresolved type in where clause) - #165158 (Tiny optimization to `TypeErrCtxt::report_inference_failure()`) - #165184 (GCI: Check where-clauses of associated constants for well-formedness) - #165190 (Improve delayed bug comment and message on first_method_vtable_slot) - #165196 (inhabitedness: use try_normalize_erasing_regions on ADT fields) - #165206 (tests: clarify dead_code_pub_in_binary FIXME after Cargo workaround) - #165214 (add MaybeUninit::from_ref) - #165225 (LoongArch: Restore `feature(stdarch_loongarch)` for bootstrap) - #165235 (two LLVM backend cleanups) Failed merges: - #160370 (rustdoc: notable trait badge and popover enhancements) - #164981 (Reflection add TypeId::name)
ba790b3 to
ff0d714
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. |
|
This PR was contained in a rollup (#165217), which was closed. |
|
@bors r=GuillaumeGomez,lolbinarycat Applied the suggestion and resolved merge conflicts. |
Rollup of 10 pull requests Successful merges: - #160186 (Implement `Fn` traits for safe functions of any ABI) - #160370 (rustdoc: notable trait badge and popover enhancements) - #165077 (Fix alloctests for panic=abort) - #163623 (Make docblock `<code>` elements inline so they behave better) - #163833 (Fix RISC-V inline ASM `clobber_abi` when extra target features are enabled) - #165067 (cg_llvm: Use an invariant lifetime brand for LLVM modules ) - #165227 (Respect `--color=never` when printing `--explain` output to the terminal) - #165254 (Cleanup `rustdoc-html` tests) - #165258 (impl Eq for AllocRange) - #165259 (rustc-dev-guide subtree update)
Rollup merge of #160370 - notriddle:notable-trait-color, r=GuillaumeGomez,lolbinarycat rustdoc: notable trait badge and popover enhancements Part of #45040 Preview ------- https://notriddle.com/rustdoc-html-demo-13/gui-tests/lib2/notable_trait_colors/struct.NotableTraitColors.html Screenshots ----------- <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/4c65db6f-61cf-4e90-864c-e0c4d7c62ef0" /> <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/ccb6bda0-7f74-4b7b-964d-88defc09987b" /> <img width="2448" height="1514" alt="image" src="https://github.com/user-attachments/assets/bd766a67-9f45-4207-b260-5c63a489630f" /> --- <img width="2410" height="476" alt="image" src="https://github.com/user-attachments/assets/aa22a598-af10-4076-9382-6b84541e456c" /> <img width="1209" height="346" alt="Screenshot 2026-09-18 at 19 19 03" src="https://github.com/user-attachments/assets/48d69baf-b118-4844-bf1f-d32d6b00e7ce" /> --- <img width="1351" height="981" alt="Screenshot 2026-09-18 at 19 15 02" src="https://github.com/user-attachments/assets/bf84f185-5ab8-476f-85b0-b92805c5ff7c" /> <img width="1351" height="981" alt="Screenshot 2026-09-18 at 19 15 38" src="https://github.com/user-attachments/assets/8300989e-8768-4914-b314-b0c9471d2603" />
Rollup of 10 pull requests Successful merges: - rust-lang/rust#160186 (Implement `Fn` traits for safe functions of any ABI) - rust-lang/rust#160370 (rustdoc: notable trait badge and popover enhancements) - rust-lang/rust#165077 (Fix alloctests for panic=abort) - rust-lang/rust#163623 (Make docblock `<code>` elements inline so they behave better) - rust-lang/rust#163833 (Fix RISC-V inline ASM `clobber_abi` when extra target features are enabled) - rust-lang/rust#165067 (cg_llvm: Use an invariant lifetime brand for LLVM modules ) - rust-lang/rust#165227 (Respect `--color=never` when printing `--explain` output to the terminal) - rust-lang/rust#165254 (Cleanup `rustdoc-html` tests) - rust-lang/rust#165258 (impl Eq for AllocRange) - rust-lang/rust#165259 (rustc-dev-guide subtree update)
Rollup of 10 pull requests Successful merges: - rust-lang/rust#160186 (Implement `Fn` traits for safe functions of any ABI) - rust-lang/rust#160370 (rustdoc: notable trait badge and popover enhancements) - rust-lang/rust#165077 (Fix alloctests for panic=abort) - rust-lang/rust#163623 (Make docblock `<code>` elements inline so they behave better) - rust-lang/rust#163833 (Fix RISC-V inline ASM `clobber_abi` when extra target features are enabled) - rust-lang/rust#165067 (cg_llvm: Use an invariant lifetime brand for LLVM modules ) - rust-lang/rust#165227 (Respect `--color=never` when printing `--explain` output to the terminal) - rust-lang/rust#165254 (Cleanup `rustdoc-html` tests) - rust-lang/rust#165258 (impl Eq for AllocRange) - rust-lang/rust#165259 (rustc-dev-guide subtree update)
Rollup of 10 pull requests Successful merges: - rust-lang/rust#160186 (Implement `Fn` traits for safe functions of any ABI) - rust-lang/rust#160370 (rustdoc: notable trait badge and popover enhancements) - rust-lang/rust#165077 (Fix alloctests for panic=abort) - rust-lang/rust#163623 (Make docblock `<code>` elements inline so they behave better) - rust-lang/rust#163833 (Fix RISC-V inline ASM `clobber_abi` when extra target features are enabled) - rust-lang/rust#165067 (cg_llvm: Use an invariant lifetime brand for LLVM modules ) - rust-lang/rust#165227 (Respect `--color=never` when printing `--explain` output to the terminal) - rust-lang/rust#165254 (Cleanup `rustdoc-html` tests) - rust-lang/rust#165258 (impl Eq for AllocRange) - rust-lang/rust#165259 (rustc-dev-guide subtree update)
View all comments
Part of #45040
Preview
https://notriddle.com/rustdoc-html-demo-13/gui-tests/lib2/notable_trait_colors/struct.NotableTraitColors.html
Screenshots