Skip to content

Commit 76618e7

Browse files
authored
Rollup merge of #152746 - cyrgani:stable-features, r=petrochenkov
remove `#![allow(stable_features)]` from most tests The only remaining usages are tests that specifically deal with feature gates. This also deletes the very weird `#![feature(issue_5723_bootstrap)]`, a 13 year old "temporary fix" (#5723).
2 parents 47a677d + 609fde8 commit 76618e7

40 files changed

Lines changed: 7 additions & 110 deletions

compiler/rustc_feature/src/accepted.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,6 @@ declare_features! (
2525
// feature-group-start: for testing purposes
2626
// -------------------------------------------------------------------------
2727

28-
/// A temporary feature gate used to enable parser extensions needed
29-
/// to bootstrap fix for #5723.
30-
(accepted, issue_5723_bootstrap, "1.0.0", None),
3128
/// These are used to test this portion of the compiler,
3229
/// they don't actually mean anything.
3330
(accepted, test_accepted_feature, "1.0.0", None),

compiler/rustc_feature/src/removed.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,9 @@ declare_features! (
172172
/// Allow anonymous constants from an inline `const` block in pattern position
173173
(removed, inline_const_pat, "1.88.0", Some(76001),
174174
Some("removed due to implementation concerns as it requires significant refactorings"), 138492),
175+
/// A temporary feature gate used to enable parser extensions needed
176+
/// to bootstrap fix for #5723.
177+
(removed, issue_5723_bootstrap, "CURRENT_RUSTC_VERSION", None, None),
175178
/// Lazily evaluate constants. This allows constants to depend on type parameters.
176179
(removed, lazy_normalization_consts, "1.56.0", Some(72219), Some("superseded by `generic_const_exprs`"), 88369),
177180
/// Changes `impl Trait` to capture all lifetimes in scope.

library/std/tests/volatile-fat-ptr.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#![allow(stable_features)]
2-
31
use std::ptr::{read_volatile, write_volatile};
42

53
#[test]

tests/ui/array-slice-vec/array_const_index-2.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
//@ run-pass
22
#![allow(dead_code)]
3-
#![allow(stable_features)]
4-
5-
#![feature(const_indexing)]
63

74
fn main() {
85
const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47];

tests/ui/array-slice-vec/slice-of-zero-size-elements.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
//@ run-pass
2-
#![allow(stable_features)]
3-
42
//@ compile-flags: -C debug-assertions
53

6-
#![feature(iter_to_slice)]
7-
84
use std::slice;
95

106
fn foo<T>(v: &[T]) -> Option<&[T]> {

tests/ui/borrowck/fsu-moves-and-copies.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,9 @@
11
//@ run-pass
22

33
#![allow(non_camel_case_types)]
4-
#![allow(stable_features)]
54
// Issue 4691: Ensure that functional-struct-updates operates
65
// correctly and moves rather than copy when appropriate.
76

8-
#![feature(core)]
97

108
struct ncint { v: isize }
119
fn ncint(v: isize) -> ncint { ncint { v: v } }
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
//@ run-pass
2-
3-
#![allow(stable_features)]
42
//@ compile-flags:-C target-feature=-crt-static -Z unstable-options
53
//@ ignore-musl - requires changing the linker which is hard
64

7-
#![feature(cfg_target_feature)]
8-
95
#[cfg(not(target_feature = "crt-static"))]
106
fn main() {}

tests/ui/consts/const-fn.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
//@ run-pass
2-
#![allow(stable_features)]
3-
42
// A very basic test of const fn functionality.
53

6-
#![feature(const_indexing)]
7-
84
const fn add(x: u32, y: u32) -> u32 {
95
x + y
106
}

tests/ui/consts/issue-29914.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
//@ run-pass
2-
#![allow(stable_features)]
3-
4-
#![feature(const_indexing)]
5-
62
const ARR: [usize; 5] = [5, 4, 3, 2, 1];
73

84
fn main() {

tests/ui/dropck/cleanup-arm-conditional.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
11
//@ run-pass
22

3-
#![allow(stable_features)]
43
#![allow(unused_imports)]
54
// Test that cleanup scope for temporaries created in a match
65
// arm is confined to the match arm itself.
76

8-
9-
#![feature(os)]
10-
117
use std::os;
128

139
struct Test { x: isize }

0 commit comments

Comments
 (0)