rust-lang/rust — pull request #18339 by chastell (2014-10-26 08:59:20+00:00)
Title: Guide: Patterns: use non-x variables in match blocks

I think it helps to show that the variables introduced in match blocks are indeed independent from the matched variable `x` (especially when `x` is still reachable inside those blocks and might be useful), so this renames them accordingly. Maybe some linter (or language-level warning?) will warn about shadowing `x` in such cases. ;)

I’m not super happy about the matching-on-range example, as it’s too contrived (`e` and `x` are exactly the same here), but I couldn’t come up with something both simple non-redundant.