diff options
| author | Mathijs van de Nes <git@mathijs.vd-nes.nl> | 2015-04-16 19:53:19 +0200 |
|---|---|---|
| committer | Steve Klabnik <steve@steveklabnik.com> | 2015-04-16 22:23:36 -0400 |
| commit | 0afdab11ec42ccf5dbe12cd37f71f30cca581f14 (patch) | |
| tree | 466164deecc4dc83bb67b695e6658d820ffa739f /src/libsyntax/parse | |
| parent | 1014ac44f6271a55249b0488a2ce1cc49deed338 (diff) | |
| download | rust-0afdab11ec42ccf5dbe12cd37f71f30cca581f14.tar.gz rust-0afdab11ec42ccf5dbe12cd37f71f30cca581f14.zip | |
Omit 'obsolete' note for warning if -Awarning
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/obsolete.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/libsyntax/parse/obsolete.rs b/src/libsyntax/parse/obsolete.rs index 3b21b5059da..00d9b7f4ea6 100644 --- a/src/libsyntax/parse/obsolete.rs +++ b/src/libsyntax/parse/obsolete.rs @@ -80,7 +80,8 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> { self.span_warn(sp, &format!("obsolete syntax: {}", kind_str)); } - if !self.obsolete_set.contains(&kind) { + if !self.obsolete_set.contains(&kind) && + (error || self.sess.span_diagnostic.handler().can_emit_warnings) { self.sess .span_diagnostic .handler() |
