Skip to content

Commit 6a29fab

Browse files
committed
Mark even more tests as gate tests
Now, no feature outside of the whitelist is without a test marked as its gate test.
1 parent 4045729 commit 6a29fab

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+96
-0
lines changed

src/test/compile-fail/asm-gated.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-asm
12+
1113
fn main() {
1214
unsafe {
1315
asm!(""); //~ ERROR inline assembly is not stable enough

src/test/compile-fail/asm-gated2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-asm
12+
1113
fn main() {
1214
unsafe {
1315
println!("{}", asm!("")); //~ ERROR inline assembly is not stable

src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@
1616
// using `rustc_attrs` feature. There is a separate compile-fail/ test
1717
// ensuring that the attribute feature-gating works in this context.)
1818

19+
// gate-test-generic_param_attrs
20+
1921
#![feature(rustc_attrs)]
2022
#![allow(dead_code)]
2123

src/test/compile-fail/check-static-values-constraints.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Verifies all possible restrictions for statics values.
1212

13+
// gate-test-drop_types_in_const
14+
1315
#![feature(box_syntax)]
1416

1517
use std::marker;

src/test/compile-fail/concat_idents-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-concat_idents
12+
1113
const XY_1: i32 = 10;
1214

1315
fn main() {

src/test/compile-fail/concat_idents-gate2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-concat_idents
12+
1113
const XY_1: i32 = 10;
1214

1315
fn main() {

src/test/compile-fail/const-fn-stability.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-const_fn
12+
1113
// Test use of const fn without feature gate.
1214

1315
const fn foo() -> usize { 0 } //~ ERROR const fn is unstable

src/test/compile-fail/feature-gate-abi.rs

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-intrinsics
12+
// gate-test-platform_intrinsics
13+
// gate-test-abi_vectorcall
14+
1115
// Functions
1216
extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change
1317
extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental

src/test/compile-fail/feature-gate-advanced-slice-features.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-advanced_slice_patterns
12+
1113
#![feature(slice_patterns)]
1214

1315
fn main() {

src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-allow_internal_unstable
12+
1113
macro_rules! bar {
1214
() => {
1315
// more layers don't help:

src/test/compile-fail/feature-gate-assoc-type-defaults.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-associated_type_defaults
12+
1113
trait Foo {
1214
type Bar = u8; //~ ERROR associated type defaults are unstable
1315
}

src/test/compile-fail/feature-gate-box-expr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-box_syntax
12+
1113
// Check that `box EXPR` is feature-gated.
1214
//
1315
// See also feature-gate-placement-expr.rs

src/test/compile-fail/feature-gate-box-pat.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-box_patterns
12+
1113
fn main() {
1214
let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental
1315
println!("x: {}", x);

src/test/compile-fail/feature-gate-dropck-ugeh.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-dropck_parametricity
12+
1113
// Ensure that attempts to use the unsafe attribute are feature-gated.
1214

1315
// Example adapted from RFC 1238 text (just left out the feature gate).

src/test/compile-fail/feature-gate-may-dangle.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-dropck_eyepatch
12+
1113
// Check that `may_dangle` is rejected if `dropck_eyepatch` feature gate is absent.
1214

1315
#![feature(generic_param_attrs)]

src/test/compile-fail/feature-gate-placement-expr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-placement_in_syntax
12+
1113
// Check that `in PLACE { EXPR }` is feature-gated.
1214
//
1315
// See also feature-gate-box-expr.rs

src/test/compile-fail/gated-associated_consts.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-associated_consts
12+
1113
trait MyTrait {
1214
const C: bool;
1315
//~^ associated constants are experimental

src/test/compile-fail/gated-box-syntax.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Test that the use of the box syntax is gated by `box_syntax` feature gate.
1212

13+
// gate-test-box_syntax
14+
1315
fn main() {
1416
let x = box 3;
1517
//~^ ERROR box expression syntax is experimental; you can call `Box::new` instead.

src/test/compile-fail/gated-concat_idents.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-concat_idents
12+
1113
fn main() {
1214
concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough
1315
}

src/test/compile-fail/gated-link-args.rs

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
// Test that `#[link_args]` attribute is gated by `link_args`
1212
// feature gate.
1313

14+
// gate-test-link_args
15+
1416
#[link_args = "aFdEfSeVEEE"]
1517
extern {}
1618
//~^ ERROR the `link_args` attribute is not portable across platforms

src/test/compile-fail/gated-link-llvm-intrinsics.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-link_llvm_intrinsics
12+
1113
extern {
1214
#[link_name = "llvm.sqrt.f32"]
1315
fn sqrt(x: f32) -> f32;

src/test/compile-fail/gated-no-core.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-no_core
12+
1113
#![no_core] //~ ERROR no_core is experimental
1214

1315
fn main() {}

src/test/compile-fail/gated-non-ascii-idents.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-non_ascii_idents
12+
1113
extern crate core as bäz; //~ ERROR non-ascii idents
1214

1315
use föö::bar; //~ ERROR non-ascii idents

src/test/compile-fail/gated-plugin_registrar.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-plugin_registrar
12+
1113
// Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar`
1214
// feature gate.
1315

src/test/compile-fail/gated-target_feature.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-target_feature
12+
1113
#[target_feature = "+sse2"]
1214
//~^ the `#[target_feature]` attribute is an experimental feature
1315
fn foo() {}

src/test/compile-fail/gated-thread-local.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-thread_local
12+
1113
// Test that `#[thread_local]` attribute is gated by `thread_local`
1214
// feature gate.
1315
//

src/test/compile-fail/gated-trace_macros.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-trace_macros
1112

1213
fn main() {
1314
trace_macros!(true); //~ ERROR: `trace_macros` is not stable

src/test/compile-fail/i128-feature-2.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
11+
// gate-test-i128_type
12+
1013
fn test1() -> i128 { //~ ERROR 128-bit type is unstable
1114
0
1215
}

src/test/compile-fail/i128-feature.rs

+3
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10+
11+
// gate-test-i128_type
12+
1013
fn test2() {
1114
0i128; //~ ERROR 128-bit integers are not stable
1215
}

src/test/compile-fail/impl-trait/feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-conservative_impl_trait
12+
1113
fn foo() -> impl Fn() { || {} }
1214
//~^ ERROR `impl Trait` is experimental
1315

src/test/compile-fail/link-cfg-gated.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-link_cfg
12+
1113
#[link(name = "foo", cfg(foo))]
1214
//~^ ERROR: is feature gated
1315
extern {}

src/test/compile-fail/linkage1.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-linkage
12+
1113
extern {
1214
#[linkage = "extern_weak"] static foo: isize;
1315
//~^ ERROR: the `linkage` attribute is experimental and not portable

src/test/compile-fail/log-syntax-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-log_syntax
12+
1113
fn main() {
1214
log_syntax!() //~ ERROR `log_syntax!` is not stable enough
1315
}

src/test/compile-fail/log-syntax-gate2.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-log_syntax
12+
1113
fn main() {
1214
println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable
1315
}

src/test/compile-fail/no-core-gated.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-no_core
12+
1113
#![no_core] //~ ERROR no_core is experimental
1214

1315
fn main() {}

src/test/compile-fail/numeric-fields-feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-relaxed_adts
12+
1113
struct S(u8);
1214

1315
fn main() {

src/test/compile-fail/panic-runtime/needs-gate.rs

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-needs_panic_runtime
12+
// gate-test-panic_runtime
13+
1114
#![panic_runtime] //~ ERROR: is an experimental feature
1215
#![needs_panic_runtime] //~ ERROR: is an experimental feature
1316

src/test/compile-fail/privacy/restricted/feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-pub_restricted
12+
1113
pub(crate) //~ ERROR experimental
1214
mod foo {}
1315

src/test/compile-fail/rfc1445/feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@
1414

1515
// revisions: with_gate no_gate
1616

17+
// gate-test-structural_match
18+
1719
#![allow(dead_code)]
1820
#![deny(future_incompatible)]
1921
#![feature(rustc_attrs)]

src/test/compile-fail/single-derive-attr.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-custom_derive
12+
1113
#[derive_Clone]
1214
//~^ ERROR attributes of the form `#[derive_*]` are reserved
1315
struct Test;

src/test/compile-fail/specialization/specialization-feature-gate-default.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Check that specialization must be ungated to use the `default` keyword
1212

13+
// gate-test-specialization
14+
1315
trait Foo {
1416
fn foo(&self);
1517
}

src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs

+2
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,8 @@
1010

1111
// Check that writing an overlapping impl is not allow unless specialization is ungated.
1212

13+
// gate-test-specialization
14+
1315
trait Foo {
1416
fn foo(&self);
1517
}

src/test/compile-fail/static-mut-not-constant.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-drop_types_in_const
12+
1113
#![feature(box_syntax)]
1214

1315
static mut a: Box<isize> = box 3;

src/test/compile-fail/type-ascription-feature-gate.rs

+2
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// gate-test-type_ascription
12+
1113
// Type ascription is feature gated
1214

1315
fn main() {

0 commit comments

Comments
 (0)