Skip to content

Commit bad6ee9

Browse files
committed
Fix the test by using correct feature gate name
1 parent 6749794 commit bad6ee9

File tree

3 files changed

+4
-11
lines changed

3 files changed

+4
-11
lines changed

compiler/rustc_feature/src/builtin_attrs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -656,8 +656,8 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
656656
"allow_internal_unstable side-steps feature gating and stability checks",
657657
),
658658
gated!(
659-
impl_stability, Normal, template!(Word, List: "feat1, feat2, ..."),
660-
DuplicatesOk, EncodeCrossCrate::Yes,
659+
allow_unstable_feature, Normal, template!(Word, List: "feat1, feat2, ..."),
660+
DuplicatesOk, EncodeCrossCrate::No, impl_stability,
661661
"allow unstable impl",
662662
),
663663
gated!(

tests/ui/internal/unstable-feature.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![feature(impl_stability)]
22

3-
#[allow_unstable_feature] //~ ERROR cannot find attribute `allow_unstable_feature` in this scope
4-
//~^ ERROR `allow_unstable_feature` expects a list of feature names
3+
#[allow_unstable_feature] //~ ERROR `allow_unstable_feature` expects a list of feature names
54
fn main() {
65

76
}
Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,8 @@
1-
error: cannot find attribute `allow_unstable_feature` in this scope
2-
--> $DIR/unstable-feature.rs:3:3
3-
|
4-
LL | #[allow_unstable_feature]
5-
| ^^^^^^^^^^^^^^^^^^^^^^
6-
71
error: `allow_unstable_feature` expects a list of feature names
82
--> $DIR/unstable-feature.rs:3:1
93
|
104
LL | #[allow_unstable_feature]
115
| ^^^^^^^^^^^^^^^^^^^^^^^^^
126

13-
error: aborting due to 2 previous errors
7+
error: aborting due to 1 previous error
148

0 commit comments

Comments
 (0)