From: bors Date: Thu, 30 Oct 2014 20:17:15 +0000 (+0000) Subject: auto merge of #18339 : chastell/rust/guide_pattern_fixes, r=nikomatsakis X-Git-Url: https://git.lizzy.rs/?a=commitdiff_plain;h=fd53657484d78d0b7c00ce3264d99c051cf07d26;p=rust.git auto merge of #18339 : chastell/rust/guide_pattern_fixes, r=nikomatsakis 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 eventually 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 and non-redundant. --- fd53657484d78d0b7c00ce3264d99c051cf07d26