about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2022-02-23 12:26:41 +0100
committerGitHub <noreply@github.com>2022-02-23 12:26:41 +0100
commit14ac74d43893be78da7d8ebbb91cecffe0e4e35f (patch)
treef0d89ae3b26707302725a37ca9122640d579aefe
parent8bb6051317f9972bc077bc003f3b480425bcc913 (diff)
parentb673c6332ab5435bdb3a03b64fb4e865ba0092d5 (diff)
downloadrust-14ac74d43893be78da7d8ebbb91cecffe0e4e35f.tar.gz
rust-14ac74d43893be78da7d8ebbb91cecffe0e4e35f.zip
Rollup merge of #94213 - digama0:patch-4, r=Dylan-DPC
fix names in feature(...) suggestion
-rw-r--r--compiler/rustc_feature/src/builtin_attrs.rs2
-rw-r--r--src/test/ui/feature-gates/gated-bad-feature.stderr4
2 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_feature/src/builtin_attrs.rs b/compiler/rustc_feature/src/builtin_attrs.rs
index 1fb1a38a927..53762eef785 100644
--- a/compiler/rustc_feature/src/builtin_attrs.rs
+++ b/compiler/rustc_feature/src/builtin_attrs.rs
@@ -453,7 +453,7 @@ pub const BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
     // Internal attributes: Stability, deprecation, and unsafe:
     // ==========================================================================
 
-    ungated!(feature, CrateLevel, template!(List: "name1, name1, ..."), DuplicatesOk),
+    ungated!(feature, CrateLevel, template!(List: "name1, name2, ..."), DuplicatesOk),
     // DuplicatesOk since it has its own validation
     ungated!(
         rustc_deprecated, Normal,
diff --git a/src/test/ui/feature-gates/gated-bad-feature.stderr b/src/test/ui/feature-gates/gated-bad-feature.stderr
index a8ec9391523..477bf5e866e 100644
--- a/src/test/ui/feature-gates/gated-bad-feature.stderr
+++ b/src/test/ui/feature-gates/gated-bad-feature.stderr
@@ -20,13 +20,13 @@ error: malformed `feature` attribute input
   --> $DIR/gated-bad-feature.rs:5:1
    |
 LL | #![feature]
-   | ^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name1, ...)]`
+   | ^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name2, ...)]`
 
 error: malformed `feature` attribute input
   --> $DIR/gated-bad-feature.rs:6:1
    |
 LL | #![feature = "foo"]
-   | ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name1, ...)]`
+   | ^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![feature(name1, name2, ...)]`
 
 error: aborting due to 5 previous errors