We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e9080ec commit 6de33c2Copy full SHA for 6de33c2
src/libsyntax/parse/obsolete.rs
@@ -80,7 +80,8 @@ impl<'a> ParserObsoleteMethods for parser::Parser<'a> {
80
self.span_warn(sp, &format!("obsolete syntax: {}", kind_str));
81
}
82
83
- if !self.obsolete_set.contains(&kind) {
+ if !self.obsolete_set.contains(&kind) &&
84
+ (error || self.sess.span_diagnostic.handler().can_emit_warnings) {
85
self.sess
86
.span_diagnostic
87
.handler()
0 commit comments