Skip to content

Commit e647566

Browse files
committed
Fix the test by using correct feature gate name
1 parent b5d4c8c commit e647566

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
@@ -635,8 +635,8 @@ pub static BUILTIN_ATTRIBUTES: &[BuiltinAttribute] = &[
635635
"allow_internal_unstable side-steps feature gating and stability checks",
636636
),
637637
gated!(
638-
impl_stability, Normal, template!(Word, List: "feat1, feat2, ..."),
639-
DuplicatesOk, EncodeCrossCrate::Yes,
638+
allow_unstable_feature, Normal, template!(Word, List: "feat1, feat2, ..."),
639+
DuplicatesOk, EncodeCrossCrate::No, impl_stability,
640640
"allow unstable impl",
641641
),
642642
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)