diff options
| author | bors <bors@rust-lang.org> | 2014-10-30 20:17:15 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2014-10-30 20:17:15 +0000 |
| commit | fd53657484d78d0b7c00ce3264d99c051cf07d26 (patch) | |
| tree | 6f0b9ed71f785bb7defa77ccaa2cea0cc2bdafc0 /src/rustllvm/RustWrapper.cpp | |
| parent | 52c3fe953377d922ecfe29b55861b01e05e9229c (diff) | |
| parent | aa1cd6e707734d04df7f16fade00202e30a519d2 (diff) | |
| download | rust-fd53657484d78d0b7c00ce3264d99c051cf07d26.tar.gz rust-fd53657484d78d0b7c00ce3264d99c051cf07d26.zip | |
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.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
0 files changed, 0 insertions, 0 deletions
