about summary refs log tree commit diff
path: root/src/libsyntax
diff options
context:
space:
mode:
authorTyler Mandry <tmandry@gmail.com>2019-11-26 17:56:19 -0600
committerGitHub <noreply@github.com>2019-11-26 17:56:19 -0600
commitbb6236cd749dc5e708d6846c9b2c004766627851 (patch)
tree91b8b5047b7b19a969896a00057916ac68a0c7db /src/libsyntax
parent0b3d4a1fa45c2926fe133a17f42a40b75eafd885 (diff)
parent5ea922aec4a66458728fbe74a6e8096ab76f9aec (diff)
downloadrust-bb6236cd749dc5e708d6846c9b2c004766627851.tar.gz
rust-bb6236cd749dc5e708d6846c9b2c004766627851.zip
Rollup merge of #66754 - estebank:rustdoc-capitalization, r=Dylan-DPC
Various tweaks to diagnostic output
Diffstat (limited to 'src/libsyntax')
-rw-r--r--src/libsyntax/feature_gate/check.rs5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/libsyntax/feature_gate/check.rs b/src/libsyntax/feature_gate/check.rs
index 846508bd0cd..ec0eaa56812 100644
--- a/src/libsyntax/feature_gate/check.rs
+++ b/src/libsyntax/feature_gate/check.rs
@@ -688,10 +688,9 @@ pub fn get_features(span_handler: &Handler, krate_attrs: &[ast::Attribute],
                     crate_edition: Edition, allow_features: &Option<Vec<String>>) -> Features {
     fn feature_removed(span_handler: &Handler, span: Span, reason: Option<&str>) {
         let mut err = struct_span_err!(span_handler, span, E0557, "feature has been removed");
+        err.span_label(span, "feature has been removed");
         if let Some(reason) = reason {
-            err.span_note(span, reason);
-        } else {
-            err.span_label(span, "feature has been removed");
+            err.note(reason);
         }
         err.emit();
     }