about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2015-04-17 05:52:35 +0000
committerbors <bors@rust-lang.org>2015-04-17 05:52:35 +0000
commitb7fb57529aded92c4f470568e6b5ea7a5a28f6a4 (patch)
treea906315439fb7dcdab8d025229a0e5e2028af7da /src/libsyntax
parent7fbedc58e3b0e102ece926a7f99041fc3ad3037a (diff)
parenta4be1ec140e7c61b8f73834ab722f7b056ad21b9 (diff)
downloadrust-b7fb57529aded92c4f470568e6b5ea7a5a28f6a4.tar.gz
rust-b7fb57529aded92c4f470568e6b5ea7a5a28f6a4.zip
Auto merge of #24512 - steveklabnik:rollup, r=steveklabnik
- Successful merges: #23782, #24455, #24490, #24493, #24494, #24496, #24498, #24499, #24501, #24502, #24506, #24507, #24508, #24509, #24510
- Failed merges: #24488
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate.rs2
-rw-r--r--src/libsyntax/parse/obsolete.rs3
2 files changed, 3 insertions, 2 deletions
diff --git a/src/libsyntax/feature_gate.rs b/src/libsyntax/feature_gate.rs
index 659eb343232..d0975c76e93 100644
--- a/src/libsyntax/feature_gate.rs
+++ b/src/libsyntax/feature_gate.rs
@@ -10,7 +10,7 @@
 
 //! Feature gating
 //!
-//! This modules implements the gating necessary for preventing certain compiler
+//! This module implements the gating necessary for preventing certain compiler
 //! features from being used by default. This module will crawl a pre-expanded
 //! AST to ensure that there are no features which are used that are not
 //! enabled.
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()