remove #![allow(stable_features)] from most tests

This commit is contained in:
cyrgani 2026-02-17 08:45:08 +00:00
parent d1a11b670b
commit 28fc413c8f
36 changed files with 4 additions and 101 deletions

View file

@ -1,5 +1,3 @@
#![allow(stable_features)]
use std::ptr::{read_volatile, write_volatile}; use std::ptr::{read_volatile, write_volatile};
#[test] #[test]

View file

@ -1,8 +1,5 @@
//@ run-pass //@ run-pass
#![allow(dead_code)] #![allow(dead_code)]
#![allow(stable_features)]
#![feature(const_indexing)]
fn main() { fn main() {
const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47]; const ARR: [i32; 6] = [42, 43, 44, 45, 46, 47];

View file

@ -1,10 +1,6 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
//@ compile-flags: -C debug-assertions //@ compile-flags: -C debug-assertions
#![feature(iter_to_slice)]
use std::slice; use std::slice;
fn foo<T>(v: &[T]) -> Option<&[T]> { fn foo<T>(v: &[T]) -> Option<&[T]> {

View file

@ -1,11 +1,9 @@
//@ run-pass //@ run-pass
#![allow(non_camel_case_types)] #![allow(non_camel_case_types)]
#![allow(stable_features)]
// Issue 4691: Ensure that functional-struct-updates operates // Issue 4691: Ensure that functional-struct-updates operates
// correctly and moves rather than copy when appropriate. // correctly and moves rather than copy when appropriate.
#![feature(core)]
struct ncint { v: isize } struct ncint { v: isize }
fn ncint(v: isize) -> ncint { ncint { v: v } } fn ncint(v: isize) -> ncint { ncint { v: v } }

View file

@ -1,10 +1,6 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
//@ compile-flags:-C target-feature=-crt-static -Z unstable-options //@ compile-flags:-C target-feature=-crt-static -Z unstable-options
//@ ignore-musl - requires changing the linker which is hard //@ ignore-musl - requires changing the linker which is hard
#![feature(cfg_target_feature)]
#[cfg(not(target_feature = "crt-static"))] #[cfg(not(target_feature = "crt-static"))]
fn main() {} fn main() {}

View file

@ -1,10 +1,6 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
// A very basic test of const fn functionality. // A very basic test of const fn functionality.
#![feature(const_indexing)]
const fn add(x: u32, y: u32) -> u32 { const fn add(x: u32, y: u32) -> u32 {
x + y x + y
} }

View file

@ -1,8 +1,4 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![feature(const_indexing)]
const ARR: [usize; 5] = [5, 4, 3, 2, 1]; const ARR: [usize; 5] = [5, 4, 3, 2, 1];
fn main() { fn main() {

View file

@ -1,13 +1,9 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![allow(unused_imports)] #![allow(unused_imports)]
// Test that cleanup scope for temporaries created in a match // Test that cleanup scope for temporaries created in a match
// arm is confined to the match arm itself. // arm is confined to the match arm itself.
#![feature(os)]
use std::os; use std::os;
struct Test { x: isize } struct Test { x: isize }

View file

@ -1,10 +1,7 @@
//@ run-pass //@ run-pass
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
// Test a very simple custom DST coercion. // Test a very simple custom DST coercion.
#![feature(core, rc_weak)]
use std::cell::RefCell; use std::cell::RefCell;
use std::rc::{Rc, Weak}; use std::rc::{Rc, Weak};

View file

@ -1,6 +1,5 @@
//@ run-pass //@ run-pass
#![allow(stable_features)] #![feature(core_intrinsics)]
#![feature(core, core_intrinsics)]
extern crate core; extern crate core;
use core::intrinsics::discriminant_value; use core::intrinsics::discriminant_value;

View file

@ -1,15 +1,12 @@
//@ run-pass //@ run-pass
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
// Tests parallel codegen - this can fail if the symbol for the anonymous // Tests parallel codegen - this can fail if the symbol for the anonymous
// closure in `sum` pollutes the second codegen unit from the first. // closure in `sum` pollutes the second codegen unit from the first.
//@ compile-flags: -C codegen_units=2 //@ compile-flags: -C codegen_units=2
#![feature(iter_arith)]
mod a { mod a {
fn foo() { fn foo() {
let x = ["a", "bob", "c"]; let x = ["a", "bob", "c"];

View file

@ -1,9 +1,6 @@
//! Regression test for https://github.com/rust-lang/rust/issues/15673 //! Regression test for https://github.com/rust-lang/rust/issues/15673
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![feature(iter_arith)]
fn main() { fn main() {
let x: [u64; 3] = [1, 2, 3]; let x: [u64; 3] = [1, 2, 3];

View file

@ -1,14 +1,10 @@
//@ build-pass //@ build-pass
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_imports)] #![allow(unused_imports)]
#![allow(stable_features)]
// A reduced version of the rustbook ice. The problem this encountered // A reduced version of the rustbook ice. The problem this encountered
// had to do with codegen ignoring binders. // had to do with codegen ignoring binders.
#![feature(os)]
use std::iter; use std::iter;
use std::os; use std::os;
use std::fs::File; use std::fs::File;

View file

@ -1,7 +1,4 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![feature(cfg_target_feature)]
#[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))] #[cfg(any(not(target_arch = "x86"), target_feature = "sse2"))]
fn main() { fn main() {

View file

@ -1,8 +1,6 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
// write_volatile causes an LLVM assert with composite types // write_volatile causes an LLVM assert with composite types
#![feature(volatile)]
use std::ptr::{read_volatile, write_volatile}; use std::ptr::{read_volatile, write_volatile};
#[derive(Debug, Eq, PartialEq)] #[derive(Debug, Eq, PartialEq)]

View file

@ -1,6 +1,4 @@
//@ check-pass //@ check-pass
#![allow(stable_features)]
#![feature(associated_consts)]
use std::marker::PhantomData; use std::marker::PhantomData;

View file

@ -1,7 +1,5 @@
//@ check-pass //@ check-pass
#![allow(dead_code)] #![allow(dead_code)]
#![allow(stable_features)]
#![feature(associated_consts)]
impl A for i32 { impl A for i32 {
type Foo = u32; type Foo = u32;

View file

@ -1,11 +1,7 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
// Test to see that the element type of .cloned() can be inferred // Test to see that the element type of .cloned() can be inferred
// properly. Previously this would fail to deduce the type of `sum`. // properly. Previously this would fail to deduce the type of `sum`.
#![feature(iter_arith)]
fn square_sum(v: &[i64]) -> i64 { fn square_sum(v: &[i64]) -> i64 {
let sum: i64 = v.iter().cloned().sum(); let sum: i64 = v.iter().cloned().sum();
sum * sum sum * sum

View file

@ -1,8 +1,5 @@
// https://github.com/rust-lang/rust/issues/15673 // https://github.com/rust-lang/rust/issues/15673
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![feature(iter_arith)]
fn main() { fn main() {
let x: [u64; 3] = [1, 2, 3]; let x: [u64; 3] = [1, 2, 3];

View file

@ -1,5 +1,4 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![allow(unused_labels)] #![allow(unused_labels)]
#![allow(unreachable_code)] #![allow(unreachable_code)]

View file

@ -3,14 +3,10 @@
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_assignments)] #![allow(unused_assignments)]
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
#![allow(dropping_copy_types)] #![allow(dropping_copy_types)]
// Test parsing binary operators after macro invocations. // Test parsing binary operators after macro invocations.
#![feature(macro_rules)]
macro_rules! id { macro_rules! id {
($e: expr) => { $e } ($e: expr) => { $e }
} }

View file

@ -1,7 +1,6 @@
//@ run-pass //@ run-pass
#![allow(dead_code)] #![allow(dead_code)]
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
// Test that we handle projection types which wind up important for // Test that we handle projection types which wind up important for
// resolving methods. This test was reduced from a larger example; the // resolving methods. This test was reduced from a larger example; the
@ -10,8 +9,6 @@
// type projection. // type projection.
#![feature(associated_types)]
trait Hasher { trait Hasher {
type Output; type Output;
fn finish(&self) -> Self::Output; fn finish(&self) -> Self::Output;

View file

@ -1,10 +1,7 @@
//@ run-pass //@ run-pass
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
// test that ordinary fat pointer operations work. // test that ordinary fat pointer operations work.
#![feature(braced_empty_structs)]
#![feature(rustc_attrs)] #![feature(rustc_attrs)]
use std::sync::atomic; use std::sync::atomic;

View file

@ -6,8 +6,7 @@
//@ run-pass //@ run-pass
#![allow(stable_features)] #![feature(no_core)]
#![feature(no_core, core)]
#![no_core] #![no_core]
extern crate core; extern crate core;

View file

@ -1,6 +1,5 @@
//@ run-pass //@ run-pass
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
use std::cell::RefCell; use std::cell::RefCell;
use std::rc::Rc; use std::rc::Rc;

View file

@ -1,6 +1,4 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
// Test overloaded indexing combined with autoderef. // Test overloaded indexing combined with autoderef.
use std::ops::{Index, IndexMut}; use std::ops::{Index, IndexMut};

View file

@ -1,11 +1,8 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
#![allow(stable_features)]
//@ needs-threads //@ needs-threads
//@ ignore-backends: gcc //@ ignore-backends: gcc
#![feature(std_panic)]
#![feature(panic_update_hook)] #![feature(panic_update_hook)]
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};

View file

@ -2,9 +2,6 @@
//@ needs-unwind //@ needs-unwind
//@ needs-threads //@ needs-threads
//@ ignore-backends: gcc //@ ignore-backends: gcc
#![allow(stable_features)]
#![feature(std_panic)]
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use std::panic; use std::panic;

View file

@ -1,14 +1,11 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
#![allow(stable_features)]
#![allow(unused_must_use)] #![allow(unused_must_use)]
//@ needs-threads //@ needs-threads
//@ ignore-backends: gcc //@ ignore-backends: gcc
#![feature(std_panic)]
use std::panic; use std::panic;
use std::thread; use std::thread;

View file

@ -1,9 +1,6 @@
//@ run-pass //@ run-pass
//@ needs-unwind //@ needs-unwind
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
#![feature(std_panic)]
//@ needs-threads //@ needs-threads
//@ ignore-backends: gcc //@ ignore-backends: gcc

View file

@ -1,12 +1,9 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![allow(unused_variables)] #![allow(unused_variables)]
// #45662 // #45662
#![feature(repr_align)]
#[repr(align(16))] #[repr(align(16))]
pub struct A(#[allow(dead_code)] i64); pub struct A(#[allow(dead_code)] i64);

View file

@ -1,13 +1,12 @@
//@ run-pass //@ run-pass
#![allow(unused_variables)] #![allow(unused_variables)]
#![allow(stable_features)]
#![allow(overflowing_literals)] #![allow(overflowing_literals)]
//@ needs-subprocess //@ needs-subprocess
//@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590) //@ ignore-fuchsia must translate zircon signal to SIGILL, FIXME (#58590)
//@ ignore-backends: gcc //@ ignore-backends: gcc
#![feature(repr_simd, target_feature, cfg_target_feature)] #![feature(repr_simd)]
#[path = "../../auxiliary/minisimd.rs"] #[path = "../../auxiliary/minisimd.rs"]
mod minisimd; mod minisimd;

View file

@ -4,9 +4,6 @@
//@ run-pass //@ run-pass
//@ ignore-i586 (no SSE2) //@ ignore-i586 (no SSE2)
#![allow(stable_features)]
#![feature(cfg_target_feature)]
fn main() { fn main() {
if cfg!(any(target_arch = "x86", target_arch = "x86_64")) { if cfg!(any(target_arch = "x86", target_arch = "x86_64")) {
assert!( assert!(

View file

@ -1,7 +1,5 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
//@ needs-threads //@ needs-threads
#![feature(thread_local_try_with)]
use std::sync::atomic::{AtomicUsize, Ordering}; use std::sync::atomic::{AtomicUsize, Ordering};
use std::thread; use std::thread;

View file

@ -1,7 +1,5 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
//@ needs-threads //@ needs-threads
#![feature(thread_local_try_with)]
use std::thread; use std::thread;

View file

@ -1,9 +1,7 @@
//@ run-pass //@ run-pass
#![allow(stable_features)]
#![allow(unused_imports)] #![allow(unused_imports)]
#![feature(no_core, core)] #![feature(no_core)]
#![no_core] #![no_core]
extern crate std; extern crate std;