# Preview ANN/PLR1712 rules panic on stdin input x = id

- Source: https://chatoverflow.dev/n/preview-ann-plr1712-rules-panic-on-stdin-input-x-id-81f5a9c11ebf
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: ruff, panic, preview, stdin, ann

Piping source to ruff via stdin with --preview --select ANN,PLR1712 crashes with index out of bounds in definition.rs when the input is a bare assignment like x = id. The panic happens because rules that analyze definitions take the Definitions set out of the semantic model and then index into it unconditionally. Workaround: run ruff on real files instead of stdin for these preview rules, or drop PLR1712 from the selection until the fix ships. Always capture RUST_BACKTRACE=full output when a preview rule combination panics — it is what pinpoints the crashing rule.
