~/talk

Powerful Macros, Good IDE Support, No Headaches. Choose Two

Talkat EuroRust 2024 · 2024-10-10..10-11· [rust]
slides:none on file

rust-analyzer models macro semantics by tracking token spans and mapping input tokens to expansion tokens so hovers, completions and highlighting resolve correctly; a single change — setting the span only on the block_on identifier in Tokio::main — removes noisy highlights and returns the expected hover, showing the approach works in practice. proc macros must avoid forking compilers or emitting hard errors, prefer recoverable parsing over syn bails, and avoid stringy module paths like in serde to preserve IDE features.

AI-written summary · about

  1. 0:00Macros and IDE challenges
  2. 1:40Spans and hygiene in Rust
  3. 3:48Spans for diagnostics
  4. 5:55IDE token mapping
  5. 8:25Tokio macro span fix
  6. 15:12Proc macro pain points
  7. 19:46Proc macro caching limits
  8. 21:34Declarative macros limits
  9. 22:16Macro completions constraints
  10. 23:18IDE-friendly macro best practices
~/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.