Remove unused features in tests

This commit is contained in:
mu001999
2026-02-28 21:38:09 +08:00
parent 7ffaa41662
commit 0436634084
82 changed files with 51 additions and 96 deletions
@@ -9,7 +9,6 @@
//@ ignore-backends: gcc
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![crate_type = "rlib"]
@@ -9,7 +9,6 @@
//@ ignore-backends: gcc
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![crate_type = "rlib"]
+1 -1
View File
@@ -8,7 +8,7 @@
//@ build-pass (FIXME(62277): could be check-pass?)
//@ ignore-backends: gcc
#![feature(panic_unwind)]
#![cfg_attr(cfail1, feature(panic_unwind))]
// Turn the panic_unwind crate from an explicit into an implicit query:
#[cfg(cfail1)]
@@ -7,7 +7,6 @@
//@ ignore-backends: gcc
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![crate_type = "rlib"]
@@ -9,7 +9,6 @@
#![crate_type = "rlib"]
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![rustc_partition_reused(module="struct_point-fn_calls_methods_in_same_impl", cfg="cfail2")]
@@ -7,7 +7,6 @@
//@ ignore-backends: gcc
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![crate_type = "rlib"]
@@ -9,7 +9,6 @@
#![crate_type = "rlib"]
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![rustc_partition_reused(module="struct_point-fn_read_field", cfg="cfail2")]
@@ -7,7 +7,6 @@
#![crate_type = "rlib"]
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
#![rustc_partition_codegened(module="struct_point-point", cfg="cfail2")]
@@ -7,7 +7,6 @@
#![crate_type = "rlib"]
#![feature(rustc_attrs)]
#![feature(stmt_expr_attributes)]
#![allow(dead_code)]
// These are expected to require codegen.
@@ -6,7 +6,6 @@
//@ ignore-remote
#![feature(rustc_private)]
#![feature(ascii_char, ascii_char_variants)]
extern crate rustc_driver;
extern crate rustc_hir;
@@ -6,7 +6,6 @@
//@ ignore-remote
#![feature(rustc_private)]
#![feature(ascii_char, ascii_char_variants)]
extern crate rustc_hir;
extern crate rustc_middle;
-1
View File
@@ -5,7 +5,6 @@
//@ aux-build:helper.rs
//@ no-prefer-dynamic
#![feature(allocator_api)]
extern crate custom;
extern crate custom_as_global;
@@ -9,7 +9,6 @@
// for `ByRef`. The right answer was to consider the result ambiguous
// until more type information was available.
#![feature(lang_items)]
#![no_implicit_prelude]
use std::marker::Sized;
@@ -8,7 +8,6 @@
// for `ByRef`. The right answer was to consider the result ambiguous
// until more type information was available.
#![feature(lang_items)]
#![no_implicit_prelude]
use std::marker::Sized;
@@ -5,7 +5,7 @@
// please consider modifying miri's async drop test at
// `src/tools/miri/tests/pass/async-drop.rs`.
#![feature(async_drop, impl_trait_in_assoc_type)]
#![feature(async_drop)]
#![allow(incomplete_features, dead_code)]
//@ edition: 2021
-1
View File
@@ -18,7 +18,6 @@
//@ needs-unwind
//@ aux-build: line-tables-only-helper.rs
#![feature(backtrace_frames)]
extern crate line_tables_only_helper;
@@ -7,7 +7,7 @@
//@ [borrowck] check-fail
#![allow(dropping_references)]
#![feature(super_let, stmt_expr_attributes)]
#![feature(super_let)]
use std::convert::identity;
-1
View File
@@ -3,7 +3,6 @@
#![allow(unused_mut)]
#![allow(unused_variables)]
#![deny(non_snake_case)]
#![feature(stmt_expr_attributes)]
fn main() {
let a = 413;
-1
View File
@@ -1,6 +1,5 @@
//@ run-pass
#![feature(generic_const_exprs)]
#![feature(transmute_generic_consts)]
#![allow(incomplete_features)]
fn ident<const W: usize, const H: usize>(v: [[u32; H]; W]) -> [[u32; H]; W] {
-1
View File
@@ -1,7 +1,6 @@
//@ run-pass
#![feature(core_intrinsics)]
#![feature(const_type_name)]
#![allow(dead_code)]
const fn type_name_wrapper<T>(_: &T) -> &'static str {
+1 -1
View File
@@ -1,6 +1,6 @@
//@ run-pass
#![feature(ptr_internals, test)]
#![feature(test)]
extern crate test;
use test::black_box as b; // prevent promotion of the argument and const-propagation of the result
-1
View File
@@ -1,7 +1,6 @@
//@ ignore-backends: gcc
//@ run-pass
#![feature(try_trait_v2)]
#![feature(const_trait_impl)]
#![feature(const_try)]
@@ -1,6 +1,6 @@
//@ run-pass
#![expect(incomplete_features)]
#![feature(contracts, cfg_contract_checks, contracts_internals, core_intrinsics)]
#![feature(contracts, contracts_internals, core_intrinsics)]
extern crate core;
+1 -1
View File
@@ -3,7 +3,7 @@
//@ revisions: default nomiropt
//@[nomiropt]compile-flags: -Z mir-opt-level=0
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
#![feature(coroutines, coroutine_trait)]
use std::ops::{CoroutineState, Coroutine};
use std::pin::Pin;
@@ -1,6 +1,6 @@
//@ run-rustfix
#![feature(coroutines, gen_blocks, stmt_expr_attributes)]
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let _ = #[coroutine] || yield;
@@ -1,6 +1,6 @@
//@ run-rustfix
#![feature(coroutines, gen_blocks, stmt_expr_attributes)]
#![feature(coroutines, stmt_expr_attributes)]
fn main() {
let _ = || yield;
+1 -1
View File
@@ -3,7 +3,7 @@
//@[next] compile-flags: -Znext-solver
//@ run-pass
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
#![feature(coroutines)]
#![allow(dropping_copy_types)]
use std::marker::PhantomPinned;
@@ -2,7 +2,6 @@
//@ run-pass
#![feature(gen_blocks)]
#![feature(optimize_attribute)]
#![feature(stmt_expr_attributes)]
#![feature(async_iterator)]
#![allow(dead_code)]
+1 -1
View File
@@ -1,6 +1,6 @@
//@ run-pass
#![feature(coroutines, coroutine_trait, stmt_expr_attributes)]
#![feature(coroutines, coroutine_trait)]
use std::ops::Coroutine;
+1 -1
View File
@@ -2,7 +2,7 @@
//@ aux-build:xcrate.rs
#![feature(coroutines, coroutine_trait)]
#![feature(coroutine_trait)]
extern crate xcrate;
-1
View File
@@ -7,7 +7,6 @@
//@ ignore-windows
// Tests EIIs with default implementations.
// When there's no explicit declaration, the default should be called from the declaring crate.
#![feature(extern_item_impls)]
extern crate decl_with_default;
@@ -23,7 +23,6 @@
// ```
// This is a simple test to make sure that we can unwind through these,
// and that this wrapper function effectively doesn't show up in the trace.
#![feature(extern_item_impls)]
extern crate decl_with_default_panics;
-1
View File
@@ -9,7 +9,6 @@
// Tests EIIs with default implementations.
// When an explicit implementation is given in one dependency, and the declaration is in another,
// the explicit implementation is preferred.
#![feature(extern_item_impls)]
extern crate decl_with_default;
extern crate impl1;
@@ -6,7 +6,6 @@
// FIXME: linking on windows (speciifcally mingw) not yet supported, see tracking issue #125418
//@ ignore-windows
// Tests whether calling EIIs works with the declaration in another crate.
#![feature(extern_item_impls)]
extern crate codegen_cross_crate_other_crate as codegen;
-1
View File
@@ -5,7 +5,6 @@
// FIXME: linking on windows (specifically mingw) not yet supported, see tracking issue #125418
//@ ignore-windows
// Tests whether re-exports work.
#![feature(extern_item_impls)]
extern crate other_crate_privacy1 as codegen;
-1
View File
@@ -1,5 +1,4 @@
//@ run-pass
#![feature(lang_items)]
#![no_std]
extern crate std as other;
@@ -22,7 +22,6 @@
//@ [future_feature] compile-flags: -Z unstable-options
#![cfg_attr(future_feature, feature(explicit_extern_abis))]
#![cfg_attr(current_feature, feature(explicit_extern_abis))]
extern "C" fn _foo() {}
//[current]~^ WARN `extern` declarations without an explicit ABI are deprecated
@@ -1,5 +1,5 @@
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:27:1
--> $DIR/feature-gate-explicit-extern-abis.rs:26:1
|
LL | extern fn _foo() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -7,13 +7,13 @@ LL | extern fn _foo() {}
= note: `#[warn(missing_abi)]` on by default
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:33:8
--> $DIR/feature-gate-explicit-extern-abis.rs:32:8
|
LL | unsafe extern fn _bar() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:39:8
--> $DIR/feature-gate-explicit-extern-abis.rs:38:8
|
LL | unsafe extern {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -22,7 +22,6 @@
//@ [future_feature] compile-flags: -Z unstable-options
#![cfg_attr(future_feature, feature(explicit_extern_abis))]
#![cfg_attr(current_feature, feature(explicit_extern_abis))]
extern "C" fn _foo() {}
//[current]~^ WARN `extern` declarations without an explicit ABI are deprecated
@@ -1,5 +1,5 @@
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:27:1
--> $DIR/feature-gate-explicit-extern-abis.rs:26:1
|
LL | extern fn _foo() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -7,13 +7,13 @@ LL | extern fn _foo() {}
= note: `#[warn(missing_abi)]` on by default
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:33:8
--> $DIR/feature-gate-explicit-extern-abis.rs:32:8
|
LL | unsafe extern fn _bar() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:39:8
--> $DIR/feature-gate-explicit-extern-abis.rs:38:8
|
LL | unsafe extern {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -22,7 +22,6 @@
//@ [future_feature] compile-flags: -Z unstable-options
#![cfg_attr(future_feature, feature(explicit_extern_abis))]
#![cfg_attr(current_feature, feature(explicit_extern_abis))]
extern "C" fn _foo() {}
//[current]~^ WARN `extern` declarations without an explicit ABI are deprecated
@@ -1,5 +1,5 @@
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:27:1
--> $DIR/feature-gate-explicit-extern-abis.rs:26:1
|
LL | extern fn _foo() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -7,13 +7,13 @@ LL | extern fn _foo() {}
= note: `#[warn(missing_abi)]` on by default
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:33:8
--> $DIR/feature-gate-explicit-extern-abis.rs:32:8
|
LL | unsafe extern fn _bar() {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
warning: `extern` declarations without an explicit ABI are deprecated
--> $DIR/feature-gate-explicit-extern-abis.rs:39:8
--> $DIR/feature-gate-explicit-extern-abis.rs:38:8
|
LL | unsafe extern {}
| ^^^^^^ help: explicitly specify the "C" ABI: `extern "C"`
@@ -1,5 +1,5 @@
error: `extern` declarations without an explicit ABI are disallowed
--> $DIR/feature-gate-explicit-extern-abis.rs:27:1
--> $DIR/feature-gate-explicit-extern-abis.rs:26:1
|
LL | extern fn _foo() {}
| ^^^^^^ help: specify an ABI: `extern "<abi>"`
@@ -7,7 +7,7 @@ LL | extern fn _foo() {}
= help: prior to Rust 2024, a default ABI was inferred
error: `extern` declarations without an explicit ABI are disallowed
--> $DIR/feature-gate-explicit-extern-abis.rs:33:8
--> $DIR/feature-gate-explicit-extern-abis.rs:32:8
|
LL | unsafe extern fn _bar() {}
| ^^^^^^ help: specify an ABI: `extern "<abi>"`
@@ -15,7 +15,7 @@ LL | unsafe extern fn _bar() {}
= help: prior to Rust 2024, a default ABI was inferred
error: `extern` declarations without an explicit ABI are disallowed
--> $DIR/feature-gate-explicit-extern-abis.rs:39:8
--> $DIR/feature-gate-explicit-extern-abis.rs:38:8
|
LL | unsafe extern {}
| ^^^^^^ help: specify an ABI: `extern "<abi>"`
@@ -22,7 +22,6 @@
//@ [future_feature] compile-flags: -Z unstable-options
#![cfg_attr(future_feature, feature(explicit_extern_abis))]
#![cfg_attr(current_feature, feature(explicit_extern_abis))]
extern fn _foo() {}
//[current]~^ WARN `extern` declarations without an explicit ABI are deprecated
-2
View File
@@ -6,8 +6,6 @@
// This tests the float classification functions, for regular runtime code and for const evaluation.
#![feature(f16)]
#![feature(f128)]
use std::num::FpCategory::*;
+3 -2
View File
@@ -3,9 +3,10 @@
// This tests the float classification functions, for regular runtime code and for const evaluation.
#![feature(f16)]
#![feature(f128)]
#![feature(cfg_target_has_reliable_f16_f128)]
#![cfg_attr(target_has_reliable_f16, feature(f16))]
#![cfg_attr(target_has_reliable_f128, feature(f128))]
#![allow(unused_macro_rules)]
// expect the unexpected (`target_has_reliable_*` are not "known" configs since they are unstable)
#![expect(unexpected_cfgs)]
-1
View File
@@ -4,7 +4,6 @@
//@ ignore-emscripten no no_std executables
//@ ignore-wasm different `main` convention
#![feature(lang_items)]
#![no_std]
#![no_main]
@@ -6,8 +6,8 @@
#![allow(unreachable_patterns)]
#![feature(cfg_target_has_reliable_f16_f128)]
#![feature(f128)]
#![feature(f16)]
#![cfg_attr(target_has_reliable_f16, feature(f16))]
#![cfg_attr(target_has_reliable_f128, feature(f128))]
macro_rules! yes {
($scrutinee:expr, $($t:tt)+) => {
-1
View File
@@ -3,7 +3,6 @@
//@ aux-build:xcrate.rs
#![feature(decl_macro)]
extern crate xcrate;
+1 -2
View File
@@ -1,7 +1,6 @@
//@ run-pass
#![feature(fn_traits,
step_trait,
#![feature(step_trait,
unboxed_closures,
)]
+1 -1
View File
@@ -1,6 +1,6 @@
//@ run-pass
#![feature(core_intrinsics, rustc_attrs)]
#![feature(rustc_attrs)]
#[cfg(any(
target_os = "aix",
-1
View File
@@ -4,7 +4,6 @@
//@ run-pass
//@ needs-unwind
#![feature(io_error_uncategorized)]
use std::fmt;
use std::io::{self, Error, Write};
@@ -15,7 +15,7 @@
#![allow(incomplete_features)]
#![feature(raw_dylib_elf)]
#![feature(native_link_modifiers_as_needed)]
#![cfg_attr(not(no_modifier), feature(native_link_modifiers_as_needed))]
#[cfg_attr(
as_needed,
@@ -1,6 +1,5 @@
//@ run-pass
#![feature(stmt_expr_attributes)]
#![deny(unused_parens)]
// Tests that lint attributes on statements/expressions are
-1
View File
@@ -4,6 +4,5 @@
#![allow(stable_features)]
// FIXME(#44232) we should warn that this isn't used.
#![feature(rust1)]
fn main() {}
@@ -2,7 +2,7 @@
//@ edition:2021
#![deny(unused_qualifications)]
#![deny(unused_imports)]
#![feature(coroutines, coroutine_trait)]
#![feature(coroutine_trait)]
use std::ops::{
Coroutine,
@@ -2,7 +2,7 @@
//@ edition:2021
#![deny(unused_qualifications)]
#![deny(unused_imports)]
#![feature(coroutines, coroutine_trait)]
#![feature(coroutine_trait)]
use std::ops::{
Coroutine,
@@ -1,6 +1,6 @@
//@ run-rustfix
#![allow(dead_code, path_statements)]
#![allow(dead_code, path_statements, unused_features)]
#![deny(unused_attributes, unused_must_use)]
#![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
@@ -1,6 +1,6 @@
//@ run-rustfix
#![allow(dead_code, path_statements)]
#![allow(dead_code, path_statements, unused_features)]
#![deny(unused_attributes, unused_must_use)]
#![feature(asm_experimental_arch, stmt_expr_attributes, trait_alias)]
-1
View File
@@ -3,7 +3,6 @@
// Test that this doesn't abort during AST lowering. In #96847 it did abort
// because the attribute was being lowered twice.
#![feature(stmt_expr_attributes)]
#![feature(lang_items)]
fn main() {
+1 -1
View File
@@ -1,5 +1,5 @@
error[E0522]: definition of an unknown lang item: `foo`
--> $DIR/issue-96847.rs:11:9
--> $DIR/issue-96847.rs:10:9
|
LL | #![lang="foo"]
| ^^^^^^^^^^^^^^ definition of unknown lang item `foo`
@@ -6,7 +6,6 @@
// This test captures the behavior of macro-generating-macros with fragment
// specifiers across edition boundaries.
#![feature(macro_metavar_expr)]
#![allow(incomplete_features)]
extern crate metavar_2018;
@@ -5,7 +5,7 @@
//@ needs-unwind Asserting on contents of error message
#![allow(path_statements, unused_allocation)]
#![feature(core_intrinsics, generic_assert)]
#![feature(generic_assert)]
macro_rules! test {
(
@@ -4,7 +4,7 @@
//@ run-pass
//@ needs-unwind Asserting on contents of error message
#![feature(core_intrinsics, generic_assert)]
#![feature(generic_assert)]
extern crate common;
@@ -3,7 +3,6 @@
//@ compile-flags: --test -Zpanic_abort_tests
//@ run-pass
#![feature(core_intrinsics, generic_assert)]
#[should_panic(expected = "Custom user message")]
#[test]
@@ -3,7 +3,7 @@
//@ run-pass
//@ needs-unwind Asserting on contents of error message
#![feature(core_intrinsics, generic_assert)]
#![feature(generic_assert)]
extern crate common;
@@ -4,7 +4,7 @@
// ignore-tidy-linelength
//@ run-pass
#![feature(core_intrinsics, generic_assert)]
#![feature(generic_assert)]
use std::fmt::{Debug, Formatter};
-2
View File
@@ -9,12 +9,10 @@
#![feature(const_trait_impl)]
#![feature(coroutines)]
#![feature(decl_macro)]
#![feature(explicit_tail_calls)]
#![feature(more_qualified_paths)]
#![feature(never_patterns)]
#![feature(trait_alias)]
#![feature(try_blocks)]
#![feature(type_ascription)]
#![feature(yeet_expr)]
#![deny(unused_macros)]
+2 -2
View File
@@ -3,8 +3,8 @@
// Makes sure we use `==` (not bitwise) semantics for float comparison.
#![feature(cfg_target_has_reliable_f16_f128)]
#![feature(f128)]
#![feature(f16)]
#![cfg_attr(target_has_reliable_f16, feature(f16))]
#![cfg_attr(target_has_reliable_f128, feature(f128))]
#[cfg(target_has_reliable_f16)]
fn check_f16() {
@@ -1,7 +1,6 @@
//@ run-pass
//@ check-run-results
#![feature(supertrait_item_shadowing)]
#![allow(dead_code)]
mod out_of_scope {
+1 -1
View File
@@ -2,7 +2,7 @@
#![allow(path_statements)]
#![allow(dead_code)]
#![feature(coroutines, coroutine_trait)]
#![feature(coroutines)]
struct WithDrop;
@@ -1,6 +1,6 @@
//@ run-pass
#![feature(lang_items, unboxed_closures, fn_traits)]
#![feature(unboxed_closures, fn_traits)]
struct S1 {
x: i32,
-1
View File
@@ -13,7 +13,6 @@
// This test case intentionally limits the usage of the std,
// since it will be linked with an uninstrumented version of it.
#![feature(core_intrinsics)]
#![allow(invalid_value)]
#![no_main]
+1 -1
View File
@@ -4,12 +4,12 @@
//@ ignore-backends: gcc
#![feature(
repr_simd,
core_intrinsics,
intrinsics,
adt_const_params,
unsized_const_params,
generic_const_exprs
)]
#![cfg_attr(old, feature(core_intrinsics))]
#![allow(incomplete_features)]
#[path = "../../auxiliary/minisimd.rs"]
+1 -1
View File
@@ -3,7 +3,7 @@
#![allow(unused_unsafe)]
// Issue #2303
#![feature(core_intrinsics, rustc_attrs)]
#![feature(rustc_attrs)]
use std::mem;
+1 -1
View File
@@ -4,7 +4,7 @@
// Issue #2303
#![feature(core_intrinsics, rustc_attrs)]
#![feature(rustc_attrs)]
use std::mem;
@@ -1,4 +1,5 @@
#![feature(cfg_target_thread_local, thread_local)]
#![feature(cfg_target_thread_local)]
#![cfg_attr(target_thread_local, feature(thread_local))]
#![crate_type = "lib"]
#[cfg(target_thread_local)]
@@ -2,7 +2,8 @@
//@ ignore-windows FIXME(134939): thread_local + no_mangle doesn't work on Windows
//@ aux-build:thread-local-extern-static.rs
#![feature(cfg_target_thread_local, thread_local)]
#![feature(cfg_target_thread_local)]
#![cfg_attr(target_thread_local, feature(thread_local))]
#[cfg(target_thread_local)]
extern crate thread_local_extern_static;
@@ -1,7 +1,6 @@
//@ run-pass
//@ aux-build:greeter.rs
#![feature(trait_alias)]
extern crate greeter;
@@ -4,7 +4,6 @@
// `MyMarker` if it is either `Debug` or `Display`.
#![feature(marker_trait_attr)]
#![feature(negative_impls)]
use std::fmt::{Debug, Display};
-1
View File
@@ -3,7 +3,6 @@
//@ run-pass
#![allow(deprecated)]
#![feature(core_intrinsics)]
//@ aux-build:typeid-consistency-aux1.rs
//@ aux-build:typeid-consistency-aux2.rs
@@ -1,7 +1,6 @@
// https://github.com/rust-lang/rust/issues/61894
//@ run-pass
#![feature(core_intrinsics)]
use std::any::type_name;