Skip to content

Commit

Permalink
Omit 'obsolete' note for warning if -Awarning
Browse files Browse the repository at this point in the history
  • Loading branch information
mvdnes authored and steveklabnik committed Apr 17, 2015
1 parent 1014ac4 commit 0afdab1
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/libsyntax/parse/obsolete.rs
Expand Up @@ -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()
Expand Down

0 comments on commit 0afdab1

Please sign in to comment.