diff options
| author | Niko Matsakis <niko@alum.mit.edu> | 2017-03-17 09:51:31 -0400 |
|---|---|---|
| committer | Niko Matsakis <niko@alum.mit.edu> | 2017-03-30 07:55:29 -0400 |
| commit | 56847af9163284f928d5632a3d0d29399716414f (patch) | |
| tree | c24655c7585a84a0e9f09db0d3552b11af72ed0c /src/libsyntax/parse | |
| parent | dad314040764122fc78a7f8b70ffa9ef77bde3c5 (diff) | |
| download | rust-56847af9163284f928d5632a3d0d29399716414f.tar.gz rust-56847af9163284f928d5632a3d0d29399716414f.zip | |
port the match code to use `CoerceMany`
`match { }` now (correctly?) indicates divergence, which results in more
unreachable warnings. We also avoid fallback to `!` if there is just one
arm (see new test: `match-unresolved-one-arm.rs`).
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index a46a788ca08..d5baec675e4 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -36,6 +36,7 @@ pub trait ParserObsoleteMethods { impl<'a> ParserObsoleteMethods for parser::Parser<'a> { /// Reports an obsolete syntax non-fatal error. #[allow(unused_variables)] + #[allow(unreachable_code)] fn obsolete(&mut self, sp: Span, kind: ObsoleteSyntax) { let (kind_str, desc, error) = match kind { // Nothing here at the moment |
