~/talk

Design and Implementation of the `#[diagnostic]` attribute namespace

Talkat RustLab 2024 · 2024-11-09..11-11· [compilers-and-language-design, rust]
links:none on file
slides:none on file

Introduces a compiler attribute namespace stabilized in Rust 1.78 that lets crates override or hide compiler diagnostics; two attributes exist now: unimplemented replaces trait-bound error text with templated strings and type placeholders, and do not recommend hides specific trait impls so error output becomes concise. Implementation follows an AFC, edits to the rustc emitter, diagnostic tests that assert output diffs, and real-world usage in crates like diesel, and the feature is available on stable.

AI-written summary · about

  1. 0:00Introduction
  2. 1:11Motivation for better errors
  3. 2:34Diagnostic namespace overview
  4. 5:03Rules and limitations
  5. 5:24The #[unimplemented] attribute
  6. 7:53The #[do_not_recommend] attribute
  7. 12:06Combining attributes for errors
  8. 12:29Proposing Rust features
  9. 14:38Writing an RFC
  10. 16:25Implementing in Rust compiler
  11. 17:31Navigating Rust codebase
  12. 19:43Stabilizing the feature
  13. 21:08Summary
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.