Repository navigation
Document the rustc_on_unimplemented attribute. - #163508
Conversation
|
The rustc-dev-guide subtree was changed. If your future PRs only touch the subtree, consider submitting them directly to rust-lang/rustc-dev-guide, which is where the document is primarily maintained (and has faster CI). Some changes occurred in compiler/rustc_attr_ir |
|
r? @TaKO8Ki rustbot has assigned @TaKO8Ki. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This comment has been minimized.
This comment has been minimized.
05c9dc2 to
c55c824
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 comment has been minimized.
This comment has been minimized.
| /// [#160045]:https://github.com/rust-lang/rust/issues/160045 "`iter::Rev`'s `TrustedLen` impl is unsound with trait objects" | ||
| const _: () = (); | ||
|
|
||
| #[doc(attribute = "rustc_on_unimplemented")] |
There was a problem hiding this comment.
like how we document keywords and builtins, this is what makes the docs show up like that
|
r? me |
rustc_on_unimplemented is diagnostic::on_unimplemented, but more, the diagnostic attr only has message/label/note and only some of the formatting options |
c55c824 to
ea97485
Compare
|
@bors r=boxyuwu |
… r=boxyuwu Document the `rustc_on_unimplemented` attribute. Moves/improves `rustc_on_unimplemented`'s docs from the dev guide to the compiler, then in the dev guide adds links to it and other relevant diagnostic/lint attributes Rendered: <img width="974" height="1053" alt="image" src="https://github.com/user-attachments/assets/8042f4a2-e9fe-4f4c-b5d6-1fff1bad8997" /> <img width="958" height="1207" alt="image" src="https://github.com/user-attachments/assets/c400aed7-4bac-44ac-8b86-7e155da4afac" /> <img width="942" height="764" alt="image" src="https://github.com/user-attachments/assets/103c7496-410c-4f24-9cdf-0602d4de293d" /> <img width="968" height="986" alt="image" src="https://github.com/user-attachments/assets/8ed52e6c-638d-4927-8da2-f515c11d6bb9" /> <img width="962" height="1259" alt="image" src="https://github.com/user-attachments/assets/245ad71b-1c75-4d20-b139-8b6e49a1fb7d" />
…uwer Rollup of 25 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #162156 (add IBM f128 type) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163257 (abby DSL: sanity checks on forall where clauses) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
… r=boxyuwu Document the `rustc_on_unimplemented` attribute. Moves/improves `rustc_on_unimplemented`'s docs from the dev guide to the compiler, then in the dev guide adds links to it and other relevant diagnostic/lint attributes Rendered: <img width="974" height="1053" alt="image" src="https://github.com/user-attachments/assets/8042f4a2-e9fe-4f4c-b5d6-1fff1bad8997" /> <img width="958" height="1207" alt="image" src="https://github.com/user-attachments/assets/c400aed7-4bac-44ac-8b86-7e155da4afac" /> <img width="942" height="764" alt="image" src="https://github.com/user-attachments/assets/103c7496-410c-4f24-9cdf-0602d4de293d" /> <img width="968" height="986" alt="image" src="https://github.com/user-attachments/assets/8ed52e6c-638d-4927-8da2-f515c11d6bb9" /> <img width="962" height="1259" alt="image" src="https://github.com/user-attachments/assets/245ad71b-1c75-4d20-b139-8b6e49a1fb7d" />
…uwer Rollup of 24 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163257 (abby DSL: sanity checks on forall where clauses) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
…uwer Rollup of 24 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163257 (abby DSL: sanity checks on forall where clauses) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
…uwer Rollup of 24 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163257 (abby DSL: sanity checks on forall where clauses) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
…uwer Rollup of 24 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163257 (abby DSL: sanity checks on forall where clauses) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
…uwer Rollup of 23 pull requests Successful merges: - #163090 (Run LLDB debuginfo tests on `x86_64-pc-windows-msvc` in CI) - #163806 (even more `tests/crashes` migration for `-Znext-solver`) - #163508 (Document the `rustc_on_unimplemented` attribute.) - #163794 (Use `target_family = "wasm"` instead of `target_arch = "wasm32"`) - #163863 (use the type name instead of `Self` in constructor paths again) - #163864 (Remove CLAUDE.md) - #163877 (Add regression test for duplicated rustdoc search results between std and core) - #163916 (Shrink `PartialRes` and its alignment) - #149753 (On name resolution error in parameter list, suggest possible `const` typo and avoid unnecessary second error) - #152557 (Oneshot `is_ready`) - #157273 (Stabilize `optimize` attribute) - #162000 (peel_transparent_wrappers only works on non-1ZST) - #163343 (`unit` and `[1 x unit]` layouts are incompatible on big-endian targets) - #163348 (perf:cache FFI safety results in improper_ctypes lint) - #163768 (Move more `rustdoc-html` tests in the right location) - #163778 (check is_indirect_first_projection when replacing in RefProp) - #163789 (cg_llvm: Avoid `as_c_char_ptr` in several places) - #163807 (Add `has_reliable_f16b` for Arm) - #163809 (Switch TLS implementation for wasi and bump SDK version to 34) - #163826 (Update books) - #163849 (ci: update to PowerShell 7.6.6) - #163869 (INSTALL.md: use UCRT64 instead of MINGW64 in MSYS2 section) - #163870 (Add if-installed:auto:spellcheck to pre-push script)
Rollup merge of #163508 - mejrs:rustc_on_unimplemented_docs, r=boxyuwu Document the `rustc_on_unimplemented` attribute. Moves/improves `rustc_on_unimplemented`'s docs from the dev guide to the compiler, then in the dev guide adds links to it and other relevant diagnostic/lint attributes Rendered: <img width="974" height="1053" alt="image" src="https://github.com/user-attachments/assets/8042f4a2-e9fe-4f4c-b5d6-1fff1bad8997" /> <img width="958" height="1207" alt="image" src="https://github.com/user-attachments/assets/c400aed7-4bac-44ac-8b86-7e155da4afac" /> <img width="942" height="764" alt="image" src="https://github.com/user-attachments/assets/103c7496-410c-4f24-9cdf-0602d4de293d" /> <img width="968" height="986" alt="image" src="https://github.com/user-attachments/assets/8ed52e6c-638d-4927-8da2-f515c11d6bb9" /> <img width="962" height="1259" alt="image" src="https://github.com/user-attachments/assets/245ad71b-1c75-4d20-b139-8b6e49a1fb7d" />
|
Note This PR was benchmarked as part of triage of its containing rollup: triage URL. Finished benchmarking commit (0033ef0): comparison URL. Overall result: ✅ improvements - no action needed@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 (secondary -2.2%)A less reliable metric. May be of interest, but not used to determine the overall result above.
CyclesThis perf run didn't have relevant results for this metric. Binary sizeThis perf run didn't have relevant results for this metric. Artifact size: 408.59 MiB -> 408.63 MiB (0.01%) |
|
This is noise, all PRs in the rollup have the same results |
Moves/improves
rustc_on_unimplemented's docs from the dev guide to the compiler, then in the dev guide adds links to it and other relevant diagnostic/lint attributesRendered: