]> git.lizzy.rs Git - rust.git/commit
syntax: desugar a `for` loop to a let binding to get better error
authorHuon Wilson <dbau.pp+github@gmail.com>
Mon, 26 May 2014 12:01:09 +0000 (22:01 +1000)
committerHuon Wilson <dbau.pp+github@gmail.com>
Mon, 26 May 2014 23:24:37 +0000 (09:24 +1000)
commitf2a137829e07505aaaa2be4ae97d6ecfb6ef6823
treeedf00264307375720e7d501d6f273b5960b5c754
parent6ddd40d4368b1dbbc6bfa18d73d47beb05a55447
syntax: desugar a `for` loop to a let binding to get better error
messages when the pattern is refutable.

This means the compiler points directly to the pattern and said that the
problem is the pattern being refutable (rather than just saying that
some value isn't covered in the `match` as it did previously).

Fixes #14390.
src/librustc/middle/check_match.rs
src/libsyntax/ext/expand.rs
src/test/compile-fail/for-loop-refutable-pattern-error-message.rs [new file with mode: 0644]