about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorMathijs van de Nes <git@mathijs.vd-nes.nl>2015-04-16 19:53:19 +0200
committerMathijs van de Nes <git@mathijs.vd-nes.nl>2015-04-16 19:53:19 +0200
commit6de33c22e306505c95cc2f3b775e1a82925560fd (patch)
tree2d7afca0458913388741d4336a09ec999e8c38cb /src/libsyntax
parente9080ec39d9a44eb0773d648b348575b19f655e5 (diff)
downloadrust-6de33c22e306505c95cc2f3b775e1a82925560fd.tar.gz
rust-6de33c22e306505c95cc2f3b775e1a82925560fd.zip
Omit 'obsolete' note for warning if -Awarning
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/parse/obsolete.rs3
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()