diff --git a/src/test/compile-fail/auxiliary/cfg-target-thread-local.rs b/src/test/ui/auxiliary/cfg-target-thread-local.rs similarity index 100% rename from src/test/compile-fail/auxiliary/cfg-target-thread-local.rs rename to src/test/ui/auxiliary/cfg-target-thread-local.rs diff --git a/src/test/compile-fail/feature-gate-abi-msp430-interrupt.rs b/src/test/ui/feature-gate-abi-msp430-interrupt.rs similarity index 100% rename from src/test/compile-fail/feature-gate-abi-msp430-interrupt.rs rename to src/test/ui/feature-gate-abi-msp430-interrupt.rs diff --git a/src/test/ui/feature-gate-abi-msp430-interrupt.stderr b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr new file mode 100644 index 00000000000..b05be6e4391 --- /dev/null +++ b/src/test/ui/feature-gate-abi-msp430-interrupt.stderr @@ -0,0 +1,10 @@ +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi-msp430-interrupt.rs:14:1 + | +14 | extern "msp430-interrupt" fn foo() {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-abi.rs b/src/test/ui/feature-gate-abi.rs similarity index 100% rename from src/test/compile-fail/feature-gate-abi.rs rename to src/test/ui/feature-gate-abi.rs diff --git a/src/test/ui/feature-gate-abi.stderr b/src/test/ui/feature-gate-abi.stderr new file mode 100644 index 00000000000..7d2ad0be391 --- /dev/null +++ b/src/test/ui/feature-gate-abi.stderr @@ -0,0 +1,450 @@ +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:19:1 + | +19 | extern "rust-intrinsic" fn f1() {} //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:20:1 + | +20 | extern "platform-intrinsic" fn f2() {} //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:21:1 + | +21 | extern "vectorcall" fn f3() {} //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:22:1 + | +22 | extern "rust-call" fn f4() {} //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:23:1 + | +23 | extern "msp430-interrupt" fn f5() {} //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:24:1 + | +24 | extern "ptx-kernel" fn f6() {} //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:25:1 + | +25 | extern "x86-interrupt" fn f7() {} //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:26:1 + | +26 | extern "thiscall" fn f8() {} //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:30:5 + | +30 | extern "rust-intrinsic" fn m1(); //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:31:5 + | +31 | extern "platform-intrinsic" fn m2(); //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:32:5 + | +32 | extern "vectorcall" fn m3(); //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:33:5 + | +33 | extern "rust-call" fn m4(); //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:34:5 + | +34 | extern "msp430-interrupt" fn m5(); //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:35:5 + | +35 | extern "ptx-kernel" fn m6(); //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:36:5 + | +36 | extern "x86-interrupt" fn m7(); //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:37:5 + | +37 | extern "thiscall" fn m8(); //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:39:5 + | +39 | extern "rust-intrinsic" fn dm1() {} //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:40:5 + | +40 | extern "platform-intrinsic" fn dm2() {} //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:41:5 + | +41 | extern "vectorcall" fn dm3() {} //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:42:5 + | +42 | extern "rust-call" fn dm4() {} //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:43:5 + | +43 | extern "msp430-interrupt" fn dm5() {} //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:44:5 + | +44 | extern "ptx-kernel" fn dm6() {} //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:45:5 + | +45 | extern "x86-interrupt" fn dm7() {} //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:46:5 + | +46 | extern "thiscall" fn dm8() {} //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:53:5 + | +53 | extern "rust-intrinsic" fn m1() {} //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:54:5 + | +54 | extern "platform-intrinsic" fn m2() {} //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:55:5 + | +55 | extern "vectorcall" fn m3() {} //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:56:5 + | +56 | extern "rust-call" fn m4() {} //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:57:5 + | +57 | extern "msp430-interrupt" fn m5() {} //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:58:5 + | +58 | extern "ptx-kernel" fn m6() {} //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:59:5 + | +59 | extern "x86-interrupt" fn m7() {} //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:60:5 + | +60 | extern "thiscall" fn m8() {} //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:65:5 + | +65 | extern "rust-intrinsic" fn im1() {} //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:66:5 + | +66 | extern "platform-intrinsic" fn im2() {} //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:67:5 + | +67 | extern "vectorcall" fn im3() {} //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:68:5 + | +68 | extern "rust-call" fn im4() {} //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:69:5 + | +69 | extern "msp430-interrupt" fn im5() {} //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:70:5 + | +70 | extern "ptx-kernel" fn im6() {} //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:71:5 + | +71 | extern "x86-interrupt" fn im7() {} //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:72:5 + | +72 | extern "thiscall" fn im8() {} //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:76:11 + | +76 | type A1 = extern "rust-intrinsic" fn(); //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:77:11 + | +77 | type A2 = extern "platform-intrinsic" fn(); //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:78:11 + | +78 | type A3 = extern "vectorcall" fn(); //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:79:11 + | +79 | type A4 = extern "rust-call" fn(); //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:80:11 + | +80 | type A5 = extern "msp430-interrupt" fn(); //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:81:11 + | +81 | type A6 = extern "ptx-kernel" fn (); //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:82:11 + | +82 | type A7 = extern "x86-interrupt" fn(); //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:83:11 + | +83 | type A8 = extern "thiscall" fn(); //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-abi.rs:86:1 + | +86 | extern "rust-intrinsic" {} //~ ERROR intrinsics are subject to change + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: platform intrinsics are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-abi.rs:87:1 + | +87 | extern "platform-intrinsic" {} //~ ERROR platform intrinsics are experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(platform_intrinsics)] to the crate attributes to enable + +error: vectorcall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:88:1 + | +88 | extern "vectorcall" {} //~ ERROR vectorcall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_vectorcall)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-abi.rs:89:1 + | +89 | extern "rust-call" {} //~ ERROR rust-call ABI is subject to change + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: msp430-interrupt ABI is experimental and subject to change (see issue #38487) + --> $DIR/feature-gate-abi.rs:90:1 + | +90 | extern "msp430-interrupt" {} //~ ERROR msp430-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_msp430_interrupt)] to the crate attributes to enable + +error: PTX ABIs are experimental and subject to change + --> $DIR/feature-gate-abi.rs:91:1 + | +91 | extern "ptx-kernel" {} //~ ERROR PTX ABIs are experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_ptx)] to the crate attributes to enable + +error: x86-interrupt ABI is experimental and subject to change (see issue #40180) + --> $DIR/feature-gate-abi.rs:92:1 + | +92 | extern "x86-interrupt" {} //~ ERROR x86-interrupt ABI is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_x86_interrupt)] to the crate attributes to enable + +error: thiscall is experimental and subject to change + --> $DIR/feature-gate-abi.rs:93:1 + | +93 | extern "thiscall" {} //~ ERROR thiscall is experimental and subject to change + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(abi_thiscall)] to the crate attributes to enable + +error: aborting due to 56 previous errors + diff --git a/src/test/compile-fail/feature-gate-advanced-slice-features.rs b/src/test/ui/feature-gate-advanced-slice-features.rs similarity index 100% rename from src/test/compile-fail/feature-gate-advanced-slice-features.rs rename to src/test/ui/feature-gate-advanced-slice-features.rs diff --git a/src/test/ui/feature-gate-advanced-slice-features.stderr b/src/test/ui/feature-gate-advanced-slice-features.stderr new file mode 100644 index 00000000000..815593d07a5 --- /dev/null +++ b/src/test/ui/feature-gate-advanced-slice-features.stderr @@ -0,0 +1,18 @@ +error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) + --> $DIR/feature-gate-advanced-slice-features.rs:18:9 + | +18 | [ xs.., 4, 5 ] => {} //~ ERROR multiple-element slice matches + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable + +error: multiple-element slice matches anywhere but at the end of a slice (e.g. `[0, ..xs, 0]`) are experimental (see issue #23121) + --> $DIR/feature-gate-advanced-slice-features.rs:19:9 + | +19 | [ 1, xs.., 5 ] => {} //~ ERROR multiple-element slice matches + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(advanced_slice_patterns)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/feature-gate-allocator_internals.rs b/src/test/ui/feature-gate-allocator_internals.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allocator_internals.rs rename to src/test/ui/feature-gate-allocator_internals.rs diff --git a/src/test/ui/feature-gate-allocator_internals.stderr b/src/test/ui/feature-gate-allocator_internals.stderr new file mode 100644 index 00000000000..f1f4705b3bb --- /dev/null +++ b/src/test/ui/feature-gate-allocator_internals.stderr @@ -0,0 +1,10 @@ +error: the `#[default_lib_allocator]` attribute is an experimental feature + --> $DIR/feature-gate-allocator_internals.rs:11:1 + | +11 | #![default_lib_allocator] //~ ERROR: attribute is an experimental feature + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(allocator_internals)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-allow-internal-unsafe-nested-macro.rs b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allow-internal-unsafe-nested-macro.rs rename to src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.rs diff --git a/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr new file mode 100644 index 00000000000..40bdde37ee8 --- /dev/null +++ b/src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr @@ -0,0 +1,13 @@ +error: allow_internal_unsafe side-steps the unsafe_code lint + --> $DIR/feature-gate-allow-internal-unsafe-nested-macro.rs:18:9 + | +18 | #[allow_internal_unsafe] //~ ERROR allow_internal_unsafe side-steps + | ^^^^^^^^^^^^^^^^^^^^^^^^ +... +25 | bar!(); + | ------- in this macro invocation + | + = help: add #![feature(allow_internal_unsafe)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allow-internal-unstable-nested-macro.rs rename to src/test/ui/feature-gate-allow-internal-unstable-nested-macro.rs diff --git a/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr new file mode 100644 index 00000000000..60d72fbc3b3 --- /dev/null +++ b/src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr @@ -0,0 +1,13 @@ +error: allow_internal_unstable side-steps feature gating and stability checks + --> $DIR/feature-gate-allow-internal-unstable-nested-macro.rs:18:9 + | +18 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ +... +25 | bar!(); + | ------- in this macro invocation + | + = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable-struct.rs b/src/test/ui/feature-gate-allow-internal-unstable-struct.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allow-internal-unstable-struct.rs rename to src/test/ui/feature-gate-allow-internal-unstable-struct.rs diff --git a/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr new file mode 100644 index 00000000000..2fb86ce8f4e --- /dev/null +++ b/src/test/ui/feature-gate-allow-internal-unstable-struct.stderr @@ -0,0 +1,10 @@ +error: allow_internal_unstable side-steps feature gating and stability checks + --> $DIR/feature-gate-allow-internal-unstable-struct.rs:14:1 + | +14 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-allow-internal-unstable.rs b/src/test/ui/feature-gate-allow-internal-unstable.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allow-internal-unstable.rs rename to src/test/ui/feature-gate-allow-internal-unstable.rs diff --git a/src/test/ui/feature-gate-allow-internal-unstable.stderr b/src/test/ui/feature-gate-allow-internal-unstable.stderr new file mode 100644 index 00000000000..a5740a1a789 --- /dev/null +++ b/src/test/ui/feature-gate-allow-internal-unstable.stderr @@ -0,0 +1,10 @@ +error: allow_internal_unstable side-steps feature gating and stability checks + --> $DIR/feature-gate-allow-internal-unstable.rs:13:1 + | +13 | #[allow_internal_unstable] //~ ERROR allow_internal_unstable side-steps + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(allow_internal_unstable)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-allow_fail.rs b/src/test/ui/feature-gate-allow_fail.rs similarity index 100% rename from src/test/compile-fail/feature-gate-allow_fail.rs rename to src/test/ui/feature-gate-allow_fail.rs diff --git a/src/test/ui/feature-gate-allow_fail.stderr b/src/test/ui/feature-gate-allow_fail.stderr new file mode 100644 index 00000000000..65cd137459a --- /dev/null +++ b/src/test/ui/feature-gate-allow_fail.stderr @@ -0,0 +1,10 @@ +error: allow_fail attribute is currently unstable (see issue #42219) + --> $DIR/feature-gate-allow_fail.rs:13:1 + | +13 | #[allow_fail] //~ ERROR allow_fail attribute is currently unstable + | ^^^^^^^^^^^^^ + | + = help: add #![feature(allow_fail)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-arbitrary-self-types.rs b/src/test/ui/feature-gate-arbitrary-self-types.rs similarity index 100% rename from src/test/compile-fail/feature-gate-arbitrary-self-types.rs rename to src/test/ui/feature-gate-arbitrary-self-types.rs diff --git a/src/test/ui/feature-gate-arbitrary-self-types.stderr b/src/test/ui/feature-gate-arbitrary-self-types.stderr new file mode 100644 index 00000000000..2ef517cc9e1 --- /dev/null +++ b/src/test/ui/feature-gate-arbitrary-self-types.stderr @@ -0,0 +1,29 @@ +error: arbitrary `self` types are unstable (see issue #44874) + --> $DIR/feature-gate-arbitrary-self-types.rs:14:18 + | +14 | fn foo(self: Rc>); //~ ERROR arbitrary `self` types are unstable + | ^^^^^^^^^^^^^ + | + = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable + = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + +error: arbitrary `self` types are unstable (see issue #44874) + --> $DIR/feature-gate-arbitrary-self-types.rs:20:18 + | +20 | fn foo(self: Rc>) {} //~ ERROR arbitrary `self` types are unstable + | ^^^^^^^^^^^^^ + | + = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable + = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + +error: arbitrary `self` types are unstable (see issue #44874) + --> $DIR/feature-gate-arbitrary-self-types.rs:24:18 + | +24 | fn bar(self: Box>) {} //~ ERROR arbitrary `self` types are unstable + | ^^^^^^^^^^^^^ + | + = help: add #![feature(arbitrary_self_types)] to the crate attributes to enable + = help: consider changing to `self`, `&self`, `&mut self`, or `self: Box` + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-assoc-type-defaults.rs b/src/test/ui/feature-gate-assoc-type-defaults.rs similarity index 100% rename from src/test/compile-fail/feature-gate-assoc-type-defaults.rs rename to src/test/ui/feature-gate-assoc-type-defaults.rs diff --git a/src/test/ui/feature-gate-assoc-type-defaults.stderr b/src/test/ui/feature-gate-assoc-type-defaults.stderr new file mode 100644 index 00000000000..5e288469168 --- /dev/null +++ b/src/test/ui/feature-gate-assoc-type-defaults.stderr @@ -0,0 +1,10 @@ +error: associated type defaults are unstable (see issue #29661) + --> $DIR/feature-gate-assoc-type-defaults.rs:14:5 + | +14 | type Bar = u8; //~ ERROR associated type defaults are unstable + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(associated_type_defaults)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-box-expr.rs b/src/test/ui/feature-gate-box-expr.rs similarity index 100% rename from src/test/compile-fail/feature-gate-box-expr.rs rename to src/test/ui/feature-gate-box-expr.rs diff --git a/src/test/ui/feature-gate-box-expr.stderr b/src/test/ui/feature-gate-box-expr.stderr new file mode 100644 index 00000000000..cef5adbd15a --- /dev/null +++ b/src/test/ui/feature-gate-box-expr.stderr @@ -0,0 +1,10 @@ +error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) + --> $DIR/feature-gate-box-expr.rs:22:13 + | +22 | let x = box 'c'; //~ ERROR box expression syntax is experimental + | ^^^^^^^ + | + = help: add #![feature(box_syntax)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-box-pat.rs b/src/test/ui/feature-gate-box-pat.rs similarity index 100% rename from src/test/compile-fail/feature-gate-box-pat.rs rename to src/test/ui/feature-gate-box-pat.rs diff --git a/src/test/ui/feature-gate-box-pat.stderr b/src/test/ui/feature-gate-box-pat.stderr new file mode 100644 index 00000000000..0587995beb9 --- /dev/null +++ b/src/test/ui/feature-gate-box-pat.stderr @@ -0,0 +1,10 @@ +error: box pattern syntax is experimental (see issue #29641) + --> $DIR/feature-gate-box-pat.rs:14:9 + | +14 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental + | ^^^^^ + | + = help: add #![feature(box_patterns)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-catch_expr.rs b/src/test/ui/feature-gate-catch_expr.rs similarity index 100% rename from src/test/compile-fail/feature-gate-catch_expr.rs rename to src/test/ui/feature-gate-catch_expr.rs diff --git a/src/test/ui/feature-gate-catch_expr.stderr b/src/test/ui/feature-gate-catch_expr.stderr new file mode 100644 index 00000000000..f486373d225 --- /dev/null +++ b/src/test/ui/feature-gate-catch_expr.stderr @@ -0,0 +1,14 @@ +error: `catch` expression is experimental (see issue #31436) + --> $DIR/feature-gate-catch_expr.rs:12:24 + | +12 | let catch_result = do catch { //~ ERROR `catch` expression is experimental + | ________________________^ +13 | | let x = 5; +14 | | x +15 | | }; + | |_____^ + | + = help: add #![feature(catch_expr)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-cfg-target-feature.rs b/src/test/ui/feature-gate-cfg-target-feature.rs similarity index 100% rename from src/test/compile-fail/feature-gate-cfg-target-feature.rs rename to src/test/ui/feature-gate-cfg-target-feature.rs diff --git a/src/test/ui/feature-gate-cfg-target-feature.stderr b/src/test/ui/feature-gate-cfg-target-feature.stderr new file mode 100644 index 00000000000..60dc6fbb57e --- /dev/null +++ b/src/test/ui/feature-gate-cfg-target-feature.stderr @@ -0,0 +1,34 @@ +error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) + --> $DIR/feature-gate-cfg-target-feature.rs:12:12 + | +12 | #[cfg_attr(target_feature = "x", x)] //~ ERROR `cfg(target_feature)` is experimental + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_feature)] to the crate attributes to enable + +error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) + --> $DIR/feature-gate-cfg-target-feature.rs:11:7 + | +11 | #[cfg(target_feature = "x")] //~ ERROR `cfg(target_feature)` is experimental + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_feature)] to the crate attributes to enable + +error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) + --> $DIR/feature-gate-cfg-target-feature.rs:15:19 + | +15 | #[cfg(not(any(all(target_feature = "x"))))] //~ ERROR `cfg(target_feature)` is experimental + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_feature)] to the crate attributes to enable + +error: `cfg(target_feature)` is experimental and subject to change (see issue #29717) + --> $DIR/feature-gate-cfg-target-feature.rs:19:10 + | +19 | cfg!(target_feature = "x"); + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_feature)] to the crate attributes to enable + +error: aborting due to 4 previous errors + diff --git a/src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs b/src/test/ui/feature-gate-cfg-target-has-atomic.rs similarity index 100% rename from src/test/compile-fail/feature-gate-cfg-target-has-atomic.rs rename to src/test/ui/feature-gate-cfg-target-has-atomic.rs diff --git a/src/test/ui/feature-gate-cfg-target-has-atomic.stderr b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr new file mode 100644 index 00000000000..5daf5de7123 --- /dev/null +++ b/src/test/ui/feature-gate-cfg-target-has-atomic.stderr @@ -0,0 +1,122 @@ +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:23:7 + | +23 | #[cfg(target_has_atomic = "8")] + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:29:7 + | +29 | #[cfg(target_has_atomic = "8")] + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:34:7 + | +34 | #[cfg(target_has_atomic = "16")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:39:7 + | +39 | #[cfg(target_has_atomic = "16")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:44:7 + | +44 | #[cfg(target_has_atomic = "32")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:49:7 + | +49 | #[cfg(target_has_atomic = "32")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:54:7 + | +54 | #[cfg(target_has_atomic = "64")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:59:7 + | +59 | #[cfg(target_has_atomic = "64")] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:64:7 + | +64 | #[cfg(target_has_atomic = "ptr")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:69:7 + | +69 | #[cfg(target_has_atomic = "ptr")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:76:10 + | +76 | cfg!(target_has_atomic = "8"); + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:78:10 + | +78 | cfg!(target_has_atomic = "16"); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:80:10 + | +80 | cfg!(target_has_atomic = "32"); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:82:10 + | +82 | cfg!(target_has_atomic = "64"); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: `cfg(target_has_atomic)` is experimental and subject to change (see issue #32976) + --> $DIR/feature-gate-cfg-target-has-atomic.rs:84:10 + | +84 | cfg!(target_has_atomic = "ptr"); + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_has_atomic)] to the crate attributes to enable + +error: aborting due to 15 previous errors + diff --git a/src/test/compile-fail/feature-gate-cfg-target-thread-local.rs b/src/test/ui/feature-gate-cfg-target-thread-local.rs similarity index 100% rename from src/test/compile-fail/feature-gate-cfg-target-thread-local.rs rename to src/test/ui/feature-gate-cfg-target-thread-local.rs diff --git a/src/test/ui/feature-gate-cfg-target-thread-local.stderr b/src/test/ui/feature-gate-cfg-target-thread-local.stderr new file mode 100644 index 00000000000..9e2eea6e0a4 --- /dev/null +++ b/src/test/ui/feature-gate-cfg-target-thread-local.stderr @@ -0,0 +1,10 @@ +error: `cfg(target_thread_local)` is experimental and subject to change (see issue #29594) + --> $DIR/feature-gate-cfg-target-thread-local.rs:19:16 + | +19 | #[cfg_attr(target_thread_local, thread_local)] + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_thread_local)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-cfg-target-vendor.rs b/src/test/ui/feature-gate-cfg-target-vendor.rs similarity index 100% rename from src/test/compile-fail/feature-gate-cfg-target-vendor.rs rename to src/test/ui/feature-gate-cfg-target-vendor.rs diff --git a/src/test/ui/feature-gate-cfg-target-vendor.stderr b/src/test/ui/feature-gate-cfg-target-vendor.stderr new file mode 100644 index 00000000000..c5709600dba --- /dev/null +++ b/src/test/ui/feature-gate-cfg-target-vendor.stderr @@ -0,0 +1,34 @@ +error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) + --> $DIR/feature-gate-cfg-target-vendor.rs:12:12 + | +12 | #[cfg_attr(target_vendor = "x", x)] //~ ERROR `cfg(target_vendor)` is experimental + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable + +error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) + --> $DIR/feature-gate-cfg-target-vendor.rs:11:7 + | +11 | #[cfg(target_vendor = "x")] //~ ERROR `cfg(target_vendor)` is experimental + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable + +error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) + --> $DIR/feature-gate-cfg-target-vendor.rs:15:19 + | +15 | #[cfg(not(any(all(target_vendor = "x"))))] //~ ERROR `cfg(target_vendor)` is experimental + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable + +error: `cfg(target_vendor)` is experimental and subject to change (see issue #29718) + --> $DIR/feature-gate-cfg-target-vendor.rs:19:10 + | +19 | cfg!(target_vendor = "x"); + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(cfg_target_vendor)] to the crate attributes to enable + +error: aborting due to 4 previous errors + diff --git a/src/test/compile-fail/feature-gate-clone-closures.rs b/src/test/ui/feature-gate-clone-closures.rs similarity index 100% rename from src/test/compile-fail/feature-gate-clone-closures.rs rename to src/test/ui/feature-gate-clone-closures.rs diff --git a/src/test/ui/feature-gate-clone-closures.stderr b/src/test/ui/feature-gate-clone-closures.stderr new file mode 100644 index 00000000000..3e07aa17440 --- /dev/null +++ b/src/test/ui/feature-gate-clone-closures.stderr @@ -0,0 +1,10 @@ +error[E0599]: no method named `clone` found for type `[closure@$DIR/feature-gate-clone-closures.rs:16:17: 18:6 a:_]` in the current scope + --> $DIR/feature-gate-clone-closures.rs:20:23 + | +20 | let hello = hello.clone(); //~ ERROR no method named `clone` found for type + | ^^^^^ + | + = note: hello is a function, perhaps you wish to call it + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-compiler-builtins.rs b/src/test/ui/feature-gate-compiler-builtins.rs similarity index 100% rename from src/test/compile-fail/feature-gate-compiler-builtins.rs rename to src/test/ui/feature-gate-compiler-builtins.rs diff --git a/src/test/ui/feature-gate-compiler-builtins.stderr b/src/test/ui/feature-gate-compiler-builtins.stderr new file mode 100644 index 00000000000..ebf42b2bdd8 --- /dev/null +++ b/src/test/ui/feature-gate-compiler-builtins.stderr @@ -0,0 +1,10 @@ +error: the `#[compiler_builtins]` attribute is used to identify the `compiler_builtins` crate which contains compiler-rt intrinsics and will never be stable + --> $DIR/feature-gate-compiler-builtins.rs:11:1 + | +11 | #![compiler_builtins] //~ ERROR the `#[compiler_builtins]` attribute is + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(compiler_builtins)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-const-indexing.rs b/src/test/ui/feature-gate-const-indexing.rs similarity index 100% rename from src/test/compile-fail/feature-gate-const-indexing.rs rename to src/test/ui/feature-gate-const-indexing.rs diff --git a/src/test/ui/feature-gate-const-indexing.stderr b/src/test/ui/feature-gate-const-indexing.stderr new file mode 100644 index 00000000000..bc4b687800d --- /dev/null +++ b/src/test/ui/feature-gate-const-indexing.stderr @@ -0,0 +1,8 @@ +error[E0080]: constant evaluation error + --> $DIR/feature-gate-const-indexing.rs:16:24 + | +16 | const BLUB: [i32; (ARR[0] - 41) as usize] = [5]; //~ ERROR constant evaluation error + | ^^^^^^ the index operation on const values is unstable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-copy-closures.rs b/src/test/ui/feature-gate-copy-closures.rs similarity index 100% rename from src/test/compile-fail/feature-gate-copy-closures.rs rename to src/test/ui/feature-gate-copy-closures.rs diff --git a/src/test/ui/feature-gate-copy-closures.stderr b/src/test/ui/feature-gate-copy-closures.stderr new file mode 100644 index 00000000000..9b324672f22 --- /dev/null +++ b/src/test/ui/feature-gate-copy-closures.stderr @@ -0,0 +1,12 @@ +error[E0382]: use of moved value: `hello` + --> $DIR/feature-gate-copy-closures.rs:18:9 + | +17 | let b = hello; + | - value moved here +18 | let c = hello; //~ ERROR use of moved value: `hello` [E0382] + | ^ value used here after move + | + = note: move occurs because `hello` has type `[closure@$DIR/feature-gate-copy-closures.rs:13:17: 15:6 a:&i32]`, which does not implement the `Copy` trait + +error: aborting due to previous error + diff --git a/src/test/compile-fail/rfc-2126-crate-paths/feature-gate-crate_in_paths.rs b/src/test/ui/feature-gate-crate_in_paths.rs similarity index 100% rename from src/test/compile-fail/rfc-2126-crate-paths/feature-gate-crate_in_paths.rs rename to src/test/ui/feature-gate-crate_in_paths.rs diff --git a/src/test/ui/feature-gate-crate_in_paths.stderr b/src/test/ui/feature-gate-crate_in_paths.stderr new file mode 100644 index 00000000000..b13c82ecfc9 --- /dev/null +++ b/src/test/ui/feature-gate-crate_in_paths.stderr @@ -0,0 +1,10 @@ +error: `crate` in paths is experimental (see issue #45477) + --> $DIR/feature-gate-crate_in_paths.rs:14:15 + | +14 | let _ = ::crate::S; //~ ERROR `crate` in paths is experimental + | ^^^^^ + | + = help: add #![feature(crate_in_paths)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-crate_visibility_modifier.rs b/src/test/ui/feature-gate-crate_visibility_modifier.rs similarity index 100% rename from src/test/compile-fail/feature-gate-crate_visibility_modifier.rs rename to src/test/ui/feature-gate-crate_visibility_modifier.rs diff --git a/src/test/ui/feature-gate-crate_visibility_modifier.stderr b/src/test/ui/feature-gate-crate_visibility_modifier.stderr new file mode 100644 index 00000000000..0862744b87b --- /dev/null +++ b/src/test/ui/feature-gate-crate_visibility_modifier.stderr @@ -0,0 +1,10 @@ +error: `crate` visibility modifier is experimental (see issue #45388) + --> $DIR/feature-gate-crate_visibility_modifier.rs:11:1 + | +11 | crate struct Bender { //~ ERROR `crate` visibility modifier is experimental + | ^^^^^ + | + = help: add #![feature(crate_visibility_modifier)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-decl_macro.rs b/src/test/ui/feature-gate-decl_macro.rs similarity index 100% rename from src/test/compile-fail/feature-gate-decl_macro.rs rename to src/test/ui/feature-gate-decl_macro.rs diff --git a/src/test/ui/feature-gate-decl_macro.stderr b/src/test/ui/feature-gate-decl_macro.stderr new file mode 100644 index 00000000000..49ce4eb10b6 --- /dev/null +++ b/src/test/ui/feature-gate-decl_macro.stderr @@ -0,0 +1,10 @@ +error: `macro` is experimental (see issue #39412) + --> $DIR/feature-gate-decl_macro.rs:13:1 + | +13 | macro m() {} //~ ERROR `macro` is experimental (see issue #39412) + | ^^^^^^^^^^^^ + | + = help: add #![feature(decl_macro)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-doc_cfg.rs b/src/test/ui/feature-gate-doc_cfg.rs similarity index 100% rename from src/test/compile-fail/feature-gate-doc_cfg.rs rename to src/test/ui/feature-gate-doc_cfg.rs diff --git a/src/test/ui/feature-gate-doc_cfg.stderr b/src/test/ui/feature-gate-doc_cfg.stderr new file mode 100644 index 00000000000..c2d8a934ab8 --- /dev/null +++ b/src/test/ui/feature-gate-doc_cfg.stderr @@ -0,0 +1,10 @@ +error: #[doc(cfg(...))] is experimental (see issue #43781) + --> $DIR/feature-gate-doc_cfg.rs:11:1 + | +11 | #[doc(cfg(unix))] //~ ERROR: #[doc(cfg(...))] is experimental + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(doc_cfg)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-doc_masked.rs b/src/test/ui/feature-gate-doc_masked.rs similarity index 100% rename from src/test/compile-fail/feature-gate-doc_masked.rs rename to src/test/ui/feature-gate-doc_masked.rs diff --git a/src/test/ui/feature-gate-doc_masked.stderr b/src/test/ui/feature-gate-doc_masked.stderr new file mode 100644 index 00000000000..11020765304 --- /dev/null +++ b/src/test/ui/feature-gate-doc_masked.stderr @@ -0,0 +1,10 @@ +error: #[doc(masked)] is experimental (see issue #44027) + --> $DIR/feature-gate-doc_masked.rs:11:1 + | +11 | #[doc(masked)] //~ ERROR: #[doc(masked)] is experimental + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(doc_masked)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-doc_spotlight.rs b/src/test/ui/feature-gate-doc_spotlight.rs similarity index 100% rename from src/test/compile-fail/feature-gate-doc_spotlight.rs rename to src/test/ui/feature-gate-doc_spotlight.rs diff --git a/src/test/ui/feature-gate-doc_spotlight.stderr b/src/test/ui/feature-gate-doc_spotlight.stderr new file mode 100644 index 00000000000..b743a1e94bc --- /dev/null +++ b/src/test/ui/feature-gate-doc_spotlight.stderr @@ -0,0 +1,10 @@ +error: #[doc(spotlight)] is experimental (see issue #45040) + --> $DIR/feature-gate-doc_spotlight.rs:11:1 + | +11 | #[doc(spotlight)] //~ ERROR: #[doc(spotlight)] is experimental + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(doc_spotlight)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs b/src/test/ui/feature-gate-dotdoteq_in_patterns.rs similarity index 100% rename from src/test/compile-fail/feature-gate-dotdoteq_in_patterns.rs rename to src/test/ui/feature-gate-dotdoteq_in_patterns.rs diff --git a/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr new file mode 100644 index 00000000000..5319dcef2d5 --- /dev/null +++ b/src/test/ui/feature-gate-dotdoteq_in_patterns.stderr @@ -0,0 +1,10 @@ +error: `..=` syntax in patterns is experimental (see issue #28237) + --> $DIR/feature-gate-dotdoteq_in_patterns.rs:13:9 + | +13 | 0 ..= 3 => {} //~ ERROR `..=` syntax in patterns is experimental + | ^^^^^^^ + | + = help: add #![feature(dotdoteq_in_patterns)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh-2.rs b/src/test/ui/feature-gate-dropck-ugeh-2.rs similarity index 100% rename from src/test/compile-fail/feature-gate-dropck-ugeh-2.rs rename to src/test/ui/feature-gate-dropck-ugeh-2.rs diff --git a/src/test/ui/feature-gate-dropck-ugeh-2.stderr b/src/test/ui/feature-gate-dropck-ugeh-2.stderr new file mode 100644 index 00000000000..0555b485d4c --- /dev/null +++ b/src/test/ui/feature-gate-dropck-ugeh-2.stderr @@ -0,0 +1,14 @@ +error: use of deprecated attribute `dropck_parametricity`: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future. See https://github.com/rust-lang/rust/issues/34761 + --> $DIR/feature-gate-dropck-ugeh-2.rs:17:5 + | +17 | #[unsafe_destructor_blind_to_params] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: remove this attribute + | +note: lint level defined here + --> $DIR/feature-gate-dropck-ugeh-2.rs:11:9 + | +11 | #![deny(deprecated)] + | ^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-dropck-ugeh.rs b/src/test/ui/feature-gate-dropck-ugeh.rs similarity index 100% rename from src/test/compile-fail/feature-gate-dropck-ugeh.rs rename to src/test/ui/feature-gate-dropck-ugeh.rs diff --git a/src/test/ui/feature-gate-dropck-ugeh.stderr b/src/test/ui/feature-gate-dropck-ugeh.stderr new file mode 100644 index 00000000000..b030ebcd881 --- /dev/null +++ b/src/test/ui/feature-gate-dropck-ugeh.stderr @@ -0,0 +1,10 @@ +error: unsafe_destructor_blind_to_params has been replaced by may_dangle and will be removed in the future (see issue #28498) + --> $DIR/feature-gate-dropck-ugeh.rs:29:5 + | +29 | #[unsafe_destructor_blind_to_params] // This is the UGEH attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(dropck_parametricity)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-dyn-trait.rs b/src/test/ui/feature-gate-dyn-trait.rs similarity index 100% rename from src/test/compile-fail/feature-gate-dyn-trait.rs rename to src/test/ui/feature-gate-dyn-trait.rs diff --git a/src/test/ui/feature-gate-dyn-trait.stderr b/src/test/ui/feature-gate-dyn-trait.stderr new file mode 100644 index 00000000000..28ecfdf1131 --- /dev/null +++ b/src/test/ui/feature-gate-dyn-trait.stderr @@ -0,0 +1,10 @@ +error: `dyn Trait` syntax is unstable (see issue #44662) + --> $DIR/feature-gate-dyn-trait.rs:12:14 + | +12 | type A = Box; //~ ERROR `dyn Trait` syntax is unstable + | ^^^^^^^^^ + | + = help: add #![feature(dyn_trait)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-exclusive-range-pattern.rs b/src/test/ui/feature-gate-exclusive-range-pattern.rs similarity index 100% rename from src/test/compile-fail/feature-gate-exclusive-range-pattern.rs rename to src/test/ui/feature-gate-exclusive-range-pattern.rs diff --git a/src/test/ui/feature-gate-exclusive-range-pattern.stderr b/src/test/ui/feature-gate-exclusive-range-pattern.stderr new file mode 100644 index 00000000000..c6785d6f29d --- /dev/null +++ b/src/test/ui/feature-gate-exclusive-range-pattern.stderr @@ -0,0 +1,10 @@ +error: exclusive range pattern syntax is experimental (see issue #37854) + --> $DIR/feature-gate-exclusive-range-pattern.rs:13:9 + | +13 | 0 .. 3 => {} //~ ERROR exclusive range pattern syntax is experimental + | ^^^^^^ + | + = help: add #![feature(exclusive_range_pattern)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-extern_types.rs b/src/test/ui/feature-gate-extern_types.rs similarity index 100% rename from src/test/compile-fail/feature-gate-extern_types.rs rename to src/test/ui/feature-gate-extern_types.rs diff --git a/src/test/ui/feature-gate-extern_types.stderr b/src/test/ui/feature-gate-extern_types.stderr new file mode 100644 index 00000000000..3815862e899 --- /dev/null +++ b/src/test/ui/feature-gate-extern_types.stderr @@ -0,0 +1,10 @@ +error: extern types are experimental (see issue #43467) + --> $DIR/feature-gate-extern_types.rs:12:5 + | +12 | type T; //~ ERROR extern types are experimental + | ^^^^^^^ + | + = help: add #![feature(extern_types)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-external_doc.rs b/src/test/ui/feature-gate-external_doc.rs similarity index 100% rename from src/test/compile-fail/feature-gate-external_doc.rs rename to src/test/ui/feature-gate-external_doc.rs diff --git a/src/test/ui/feature-gate-external_doc.stderr b/src/test/ui/feature-gate-external_doc.stderr new file mode 100644 index 00000000000..5479ab8bc91 --- /dev/null +++ b/src/test/ui/feature-gate-external_doc.stderr @@ -0,0 +1,10 @@ +error: #[doc(include = "...")] is experimental (see issue #44732) + --> $DIR/feature-gate-external_doc.rs:11:1 + | +11 | #[doc(include="asdf.md")] //~ ERROR: #[doc(include = "...")] is experimental + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(external_doc)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-feature-gate.rs b/src/test/ui/feature-gate-feature-gate.rs similarity index 100% rename from src/test/compile-fail/feature-gate-feature-gate.rs rename to src/test/ui/feature-gate-feature-gate.rs diff --git a/src/test/ui/feature-gate-feature-gate.stderr b/src/test/ui/feature-gate-feature-gate.stderr new file mode 100644 index 00000000000..3d5f0d70bb2 --- /dev/null +++ b/src/test/ui/feature-gate-feature-gate.stderr @@ -0,0 +1,14 @@ +error: unstable feature + --> $DIR/feature-gate-feature-gate.rs:12:12 + | +12 | #![feature(intrinsics)] //~ ERROR unstable feature + | ^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/feature-gate-feature-gate.rs:11:11 + | +11 | #![forbid(unstable_features)] + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-fn_must_use-cap-lints-allow.rs b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.rs similarity index 100% rename from src/test/compile-fail/feature-gate-fn_must_use-cap-lints-allow.rs rename to src/test/ui/feature-gate-fn_must_use-cap-lints-allow.rs diff --git a/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr new file mode 100644 index 00000000000..9b16e9be68a --- /dev/null +++ b/src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr @@ -0,0 +1,6 @@ +error: compilation successful + --> $DIR/feature-gate-fn_must_use-cap-lints-allow.rs:22:1 + | +22 | fn main() {} //~ ERROR compilation successful + | ^^^^^^^^^^^^ + diff --git a/src/test/compile-fail/feature-gate-fn_must_use.rs b/src/test/ui/feature-gate-fn_must_use.rs similarity index 100% rename from src/test/compile-fail/feature-gate-fn_must_use.rs rename to src/test/ui/feature-gate-fn_must_use.rs diff --git a/src/test/ui/feature-gate-fn_must_use.stderr b/src/test/ui/feature-gate-fn_must_use.stderr new file mode 100644 index 00000000000..ed4953d27b8 --- /dev/null +++ b/src/test/ui/feature-gate-fn_must_use.stderr @@ -0,0 +1,22 @@ +warning: `#[must_use]` on methods is experimental (see issue #43302) + --> $DIR/feature-gate-fn_must_use.rs:16:5 + | +16 | #[must_use] //~ WARN `#[must_use]` on methods is experimental + | ^^^^^^^^^^^ + | + = help: add #![feature(fn_must_use)] to the crate attributes to enable + +warning: `#[must_use]` on functions is experimental (see issue #43302) + --> $DIR/feature-gate-fn_must_use.rs:20:1 + | +20 | #[must_use] //~ WARN `#[must_use]` on functions is experimental + | ^^^^^^^^^^^ + | + = help: add #![feature(fn_must_use)] to the crate attributes to enable + +error: compilation successful + --> $DIR/feature-gate-fn_must_use.rs:31:1 + | +31 | fn main() {} //~ ERROR compilation successful + | ^^^^^^^^^^^^ + diff --git a/src/test/compile-fail/feature-gate-fundamental.rs b/src/test/ui/feature-gate-fundamental.rs similarity index 100% rename from src/test/compile-fail/feature-gate-fundamental.rs rename to src/test/ui/feature-gate-fundamental.rs diff --git a/src/test/ui/feature-gate-fundamental.stderr b/src/test/ui/feature-gate-fundamental.stderr new file mode 100644 index 00000000000..0fc75ee30b9 --- /dev/null +++ b/src/test/ui/feature-gate-fundamental.stderr @@ -0,0 +1,10 @@ +error: the `#[fundamental]` attribute is an experimental feature (see issue #29635) + --> $DIR/feature-gate-fundamental.rs:11:1 + | +11 | #[fundamental] //~ ERROR the `#[fundamental]` attribute is an experimental feature + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(fundamental)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-generators.rs b/src/test/ui/feature-gate-generators.rs similarity index 100% rename from src/test/compile-fail/feature-gate-generators.rs rename to src/test/ui/feature-gate-generators.rs diff --git a/src/test/ui/feature-gate-generators.stderr b/src/test/ui/feature-gate-generators.stderr new file mode 100644 index 00000000000..82acb401338 --- /dev/null +++ b/src/test/ui/feature-gate-generators.stderr @@ -0,0 +1,10 @@ +error: yield syntax is experimental + --> $DIR/feature-gate-generators.rs:12:5 + | +12 | yield true; //~ ERROR yield syntax is experimental + | ^^^^^^^^^^ + | + = help: add #![feature(generators)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-generic_associated_types.rs b/src/test/ui/feature-gate-generic_associated_types.rs similarity index 100% rename from src/test/compile-fail/feature-gate-generic_associated_types.rs rename to src/test/ui/feature-gate-generic_associated_types.rs diff --git a/src/test/ui/feature-gate-generic_associated_types.stderr b/src/test/ui/feature-gate-generic_associated_types.stderr new file mode 100644 index 00000000000..7b2507e1fb1 --- /dev/null +++ b/src/test/ui/feature-gate-generic_associated_types.stderr @@ -0,0 +1,34 @@ +error: generic associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:14:5 + | +14 | type Pointer: Deref; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: generic associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:16:5 + | +16 | type Pointer2: Deref where T: Clone, U: Clone; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: generic associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:22:5 + | +22 | type Pointer = Box; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: generic associated types are unstable (see issue #44265) + --> $DIR/feature-gate-generic_associated_types.rs:24:5 + | +24 | type Pointer2 = Box; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_associated_types)] to the crate attributes to enable + +error: aborting due to 4 previous errors + diff --git a/src/test/compile-fail/feature-gate-global_allocator.rs b/src/test/ui/feature-gate-global_allocator.rs similarity index 100% rename from src/test/compile-fail/feature-gate-global_allocator.rs rename to src/test/ui/feature-gate-global_allocator.rs diff --git a/src/test/ui/feature-gate-global_allocator.stderr b/src/test/ui/feature-gate-global_allocator.stderr new file mode 100644 index 00000000000..7e6c4288ff3 --- /dev/null +++ b/src/test/ui/feature-gate-global_allocator.stderr @@ -0,0 +1,10 @@ +error: the `#[global_allocator]` attribute is an experimental feature + --> $DIR/feature-gate-global_allocator.rs:11:1 + | +11 | #[global_allocator] //~ ERROR: attribute is an experimental feature + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(global_allocator)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-global_asm.rs b/src/test/ui/feature-gate-global_asm.rs similarity index 100% rename from src/test/compile-fail/feature-gate-global_asm.rs rename to src/test/ui/feature-gate-global_asm.rs diff --git a/src/test/ui/feature-gate-global_asm.stderr b/src/test/ui/feature-gate-global_asm.stderr new file mode 100644 index 00000000000..de0ba1a7b32 --- /dev/null +++ b/src/test/ui/feature-gate-global_asm.stderr @@ -0,0 +1,10 @@ +error: `global_asm!` is not stable enough for use and is subject to change (see issue #35119) + --> $DIR/feature-gate-global_asm.rs:11:1 + | +11 | global_asm!(""); //~ ERROR `global_asm!` is not stable + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(global_asm)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-in_band_lifetimes.rs b/src/test/ui/feature-gate-in_band_lifetimes.rs similarity index 100% rename from src/test/compile-fail/feature-gate-in_band_lifetimes.rs rename to src/test/ui/feature-gate-in_band_lifetimes.rs diff --git a/src/test/ui/feature-gate-in_band_lifetimes.stderr b/src/test/ui/feature-gate-in_band_lifetimes.stderr new file mode 100644 index 00000000000..3b03ef2dd33 --- /dev/null +++ b/src/test/ui/feature-gate-in_band_lifetimes.stderr @@ -0,0 +1,104 @@ +error[E0261]: use of undeclared lifetime name `'x` + --> $DIR/feature-gate-in_band_lifetimes.rs:13:12 + | +13 | fn foo(x: &'x u8) -> &'x u8 { x } + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'x` + --> $DIR/feature-gate-in_band_lifetimes.rs:13:23 + | +13 | fn foo(x: &'x u8) -> &'x u8 { x } + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:25:12 + | +25 | impl<'a> X<'b> { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:27:27 + | +27 | fn inner_2(&self) -> &'b u8 { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:33:8 + | +33 | impl X<'b> { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:35:27 + | +35 | fn inner_3(&self) -> &'b u8 { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:43:9 + | +43 | impl Y<&'a u8> { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:45:25 + | +45 | fn inner(&self) -> &'a u8 { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:53:27 + | +53 | fn any_lifetime() -> &'b u8; + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:55:27 + | +55 | fn borrowed_lifetime(&'b self) -> &'b u8; + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:55:40 + | +55 | fn borrowed_lifetime(&'b self) -> &'b u8; + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:60:14 + | +60 | impl MyTrait<'a> for Y<&'a u8> { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:60:25 + | +60 | impl MyTrait<'a> for Y<&'a u8> { + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'a` + --> $DIR/feature-gate-in_band_lifetimes.rs:63:31 + | +63 | fn my_lifetime(&self) -> &'a u8 { self.0 } + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:65:27 + | +65 | fn any_lifetime() -> &'b u8 { &0 } + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:67:27 + | +67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } + | ^^ undeclared lifetime + +error[E0261]: use of undeclared lifetime name `'b` + --> $DIR/feature-gate-in_band_lifetimes.rs:67:40 + | +67 | fn borrowed_lifetime(&'b self) -> &'b u8 { &*self.0 } + | ^^ undeclared lifetime + +error: aborting due to 17 previous errors + diff --git a/src/test/compile-fail/feature-gate-intrinsics.rs b/src/test/ui/feature-gate-intrinsics.rs similarity index 100% rename from src/test/compile-fail/feature-gate-intrinsics.rs rename to src/test/ui/feature-gate-intrinsics.rs diff --git a/src/test/ui/feature-gate-intrinsics.stderr b/src/test/ui/feature-gate-intrinsics.stderr new file mode 100644 index 00000000000..5382122e30e --- /dev/null +++ b/src/test/ui/feature-gate-intrinsics.stderr @@ -0,0 +1,21 @@ +error: intrinsics are subject to change + --> $DIR/feature-gate-intrinsics.rs:11:1 + | +11 | / extern "rust-intrinsic" { //~ ERROR intrinsics are subject to change +12 | | fn bar(); +13 | | } + | |_^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: intrinsics are subject to change + --> $DIR/feature-gate-intrinsics.rs:15:1 + | +15 | / extern "rust-intrinsic" fn baz() { //~ ERROR intrinsics are subject to change +16 | | } + | |_^ + | + = help: add #![feature(intrinsics)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/feature-gate-lang-items.rs b/src/test/ui/feature-gate-lang-items.rs similarity index 100% rename from src/test/compile-fail/feature-gate-lang-items.rs rename to src/test/ui/feature-gate-lang-items.rs diff --git a/src/test/ui/feature-gate-lang-items.stderr b/src/test/ui/feature-gate-lang-items.stderr new file mode 100644 index 00000000000..dab8ce23192 --- /dev/null +++ b/src/test/ui/feature-gate-lang-items.stderr @@ -0,0 +1,10 @@ +error: language items are subject to change + --> $DIR/feature-gate-lang-items.rs:11:1 + | +11 | #[lang="foo"] //~ ERROR language items are subject to change + | ^^^^^^^^^^^^^ + | + = help: add #![feature(lang_items)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-linker-flavor.rs b/src/test/ui/feature-gate-linker-flavor.rs similarity index 100% rename from src/test/compile-fail/feature-gate-linker-flavor.rs rename to src/test/ui/feature-gate-linker-flavor.rs diff --git a/src/test/ui/feature-gate-linker-flavor.stderr b/src/test/ui/feature-gate-linker-flavor.stderr new file mode 100644 index 00000000000..383e75e3d17 --- /dev/null +++ b/src/test/ui/feature-gate-linker-flavor.stderr @@ -0,0 +1,10 @@ +error: the `#[used]` attribute is an experimental feature (see issue #40289) + --> $DIR/feature-gate-linker-flavor.rs:16:1 + | +16 | #[used] + | ^^^^^^^ + | + = help: add #![feature(used)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-macro-vis-matcher.rs b/src/test/ui/feature-gate-macro-vis-matcher.rs similarity index 100% rename from src/test/compile-fail/feature-gate-macro-vis-matcher.rs rename to src/test/ui/feature-gate-macro-vis-matcher.rs diff --git a/src/test/ui/feature-gate-macro-vis-matcher.stderr b/src/test/ui/feature-gate-macro-vis-matcher.stderr new file mode 100644 index 00000000000..09db5009165 --- /dev/null +++ b/src/test/ui/feature-gate-macro-vis-matcher.stderr @@ -0,0 +1,10 @@ +error: :vis fragment specifier is experimental and subject to change (see issue #41022) + --> $DIR/feature-gate-macro-vis-matcher.rs:14:19 + | +14 | macro_rules! m { ($v:vis) => {} } + | ^^^^^^ + | + = help: add #![feature(macro_vis_matcher)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-main.rs b/src/test/ui/feature-gate-main.rs similarity index 100% rename from src/test/compile-fail/feature-gate-main.rs rename to src/test/ui/feature-gate-main.rs diff --git a/src/test/ui/feature-gate-main.stderr b/src/test/ui/feature-gate-main.stderr new file mode 100644 index 00000000000..90cf12822c8 --- /dev/null +++ b/src/test/ui/feature-gate-main.stderr @@ -0,0 +1,10 @@ +error: declaration of a nonstandard #[main] function may change over time, for now a top-level `fn main()` is required (see issue #29634) + --> $DIR/feature-gate-main.rs:12:1 + | +12 | fn foo() {} //~ ERROR: declaration of a nonstandard #[main] function may change over time + | ^^^^^^^^^^^ + | + = help: add #![feature(main)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-match_beginning_vert.rs b/src/test/ui/feature-gate-match_beginning_vert.rs similarity index 100% rename from src/test/compile-fail/feature-gate-match_beginning_vert.rs rename to src/test/ui/feature-gate-match_beginning_vert.rs diff --git a/src/test/ui/feature-gate-match_beginning_vert.stderr b/src/test/ui/feature-gate-match_beginning_vert.stderr new file mode 100644 index 00000000000..88053adfafa --- /dev/null +++ b/src/test/ui/feature-gate-match_beginning_vert.stderr @@ -0,0 +1,26 @@ +error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) + --> $DIR/feature-gate-match_beginning_vert.rs:24:9 + | +24 | | A => println!("A"), + | ^ + | + = help: add #![feature(match_beginning_vert)] to the crate attributes to enable + +error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) + --> $DIR/feature-gate-match_beginning_vert.rs:26:9 + | +26 | | B | C => println!("BC!"), + | ^ + | + = help: add #![feature(match_beginning_vert)] to the crate attributes to enable + +error: Use of a '|' at the beginning of a match arm is experimental (see issue #44101) + --> $DIR/feature-gate-match_beginning_vert.rs:28:9 + | +28 | | _ => {}, + | ^ + | + = help: add #![feature(match_beginning_vert)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-match_default_bindings.rs b/src/test/ui/feature-gate-match_default_bindings.rs similarity index 100% rename from src/test/compile-fail/feature-gate-match_default_bindings.rs rename to src/test/ui/feature-gate-match_default_bindings.rs diff --git a/src/test/ui/feature-gate-match_default_bindings.stderr b/src/test/ui/feature-gate-match_default_bindings.stderr new file mode 100644 index 00000000000..d86e8248f08 --- /dev/null +++ b/src/test/ui/feature-gate-match_default_bindings.stderr @@ -0,0 +1,10 @@ +error: non-reference pattern used to match a reference (see issue #42640) + --> $DIR/feature-gate-match_default_bindings.rs:13:9 + | +13 | Some(n) => {}, + | ^^^^^^^ help: consider using a reference: `&Some(n)` + | + = help: add #![feature(match_default_bindings)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-may-dangle.rs b/src/test/ui/feature-gate-may-dangle.rs similarity index 100% rename from src/test/compile-fail/feature-gate-may-dangle.rs rename to src/test/ui/feature-gate-may-dangle.rs diff --git a/src/test/ui/feature-gate-may-dangle.stderr b/src/test/ui/feature-gate-may-dangle.stderr new file mode 100644 index 00000000000..e51723d058e --- /dev/null +++ b/src/test/ui/feature-gate-may-dangle.stderr @@ -0,0 +1,10 @@ +error: may_dangle has unstable semantics and may be removed in the future (see issue #34761) + --> $DIR/feature-gate-may-dangle.rs:18:6 + | +18 | impl<#[may_dangle] A> Drop for Pt { + | ^^^^^^^^^^^^^ + | + = help: add #![feature(dropck_eyepatch)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-needs-allocator.rs b/src/test/ui/feature-gate-needs-allocator.rs similarity index 100% rename from src/test/compile-fail/feature-gate-needs-allocator.rs rename to src/test/ui/feature-gate-needs-allocator.rs diff --git a/src/test/ui/feature-gate-needs-allocator.stderr b/src/test/ui/feature-gate-needs-allocator.stderr new file mode 100644 index 00000000000..5124c10cb47 --- /dev/null +++ b/src/test/ui/feature-gate-needs-allocator.stderr @@ -0,0 +1,10 @@ +error: the `#[needs_allocator]` attribute is an experimental feature + --> $DIR/feature-gate-needs-allocator.rs:11:1 + | +11 | #![needs_allocator] //~ ERROR the `#[needs_allocator]` attribute is + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(allocator_internals)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-negate-unsigned.rs b/src/test/ui/feature-gate-negate-unsigned.rs similarity index 100% rename from src/test/compile-fail/feature-gate-negate-unsigned.rs rename to src/test/ui/feature-gate-negate-unsigned.rs diff --git a/src/test/ui/feature-gate-negate-unsigned.stderr b/src/test/ui/feature-gate-negate-unsigned.stderr new file mode 100644 index 00000000000..d4311594517 --- /dev/null +++ b/src/test/ui/feature-gate-negate-unsigned.stderr @@ -0,0 +1,14 @@ +error[E0600]: cannot apply unary operator `-` to type `usize` + --> $DIR/feature-gate-negate-unsigned.rs:20:23 + | +20 | let _max: usize = -1; + | ^^ + +error[E0600]: cannot apply unary operator `-` to type `u8` + --> $DIR/feature-gate-negate-unsigned.rs:24:14 + | +24 | let _y = -x; + | ^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/feature-gate-no-debug-2.rs b/src/test/ui/feature-gate-no-debug-2.rs similarity index 100% rename from src/test/compile-fail/feature-gate-no-debug-2.rs rename to src/test/ui/feature-gate-no-debug-2.rs diff --git a/src/test/ui/feature-gate-no-debug-2.stderr b/src/test/ui/feature-gate-no-debug-2.stderr new file mode 100644 index 00000000000..231fc400115 --- /dev/null +++ b/src/test/ui/feature-gate-no-debug-2.stderr @@ -0,0 +1,14 @@ +error: use of deprecated attribute `no_debug`: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand. See https://github.com/rust-lang/rust/issues/29721 + --> $DIR/feature-gate-no-debug-2.rs:14:1 + | +14 | #[no_debug] //~ ERROR use of deprecated attribute `no_debug` + | ^^^^^^^^^^^ help: remove this attribute + | +note: lint level defined here + --> $DIR/feature-gate-no-debug-2.rs:11:9 + | +11 | #![deny(deprecated)] + | ^^^^^^^^^^ + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-no-debug.rs b/src/test/ui/feature-gate-no-debug.rs similarity index 100% rename from src/test/compile-fail/feature-gate-no-debug.rs rename to src/test/ui/feature-gate-no-debug.rs diff --git a/src/test/ui/feature-gate-no-debug.stderr b/src/test/ui/feature-gate-no-debug.stderr new file mode 100644 index 00000000000..83a8189c095 --- /dev/null +++ b/src/test/ui/feature-gate-no-debug.stderr @@ -0,0 +1,10 @@ +error: the `#[no_debug]` attribute was an experimental feature that has been deprecated due to lack of demand (see issue #29721) + --> $DIR/feature-gate-no-debug.rs:13:1 + | +13 | #[no_debug] //~ ERROR the `#[no_debug]` attribute was + | ^^^^^^^^^^^ + | + = help: add #![feature(no_debug)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-non_exhaustive.rs b/src/test/ui/feature-gate-non_exhaustive.rs similarity index 100% rename from src/test/compile-fail/feature-gate-non_exhaustive.rs rename to src/test/ui/feature-gate-non_exhaustive.rs diff --git a/src/test/ui/feature-gate-non_exhaustive.stderr b/src/test/ui/feature-gate-non_exhaustive.stderr new file mode 100644 index 00000000000..775e65b90fa --- /dev/null +++ b/src/test/ui/feature-gate-non_exhaustive.stderr @@ -0,0 +1,10 @@ +error: non exhaustive is an experimental feature (see issue #44109) + --> $DIR/feature-gate-non_exhaustive.rs:13:1 + | +13 | #[non_exhaustive] //~ERROR non exhaustive is an experimental feature (see issue #44109) + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(non_exhaustive)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.rs similarity index 100% rename from src/test/compile-fail/feature-gate-omit-gdb-pretty-printer-section.rs rename to src/test/ui/feature-gate-omit-gdb-pretty-printer-section.rs diff --git a/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr new file mode 100644 index 00000000000..e50e1b4c0b5 --- /dev/null +++ b/src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr @@ -0,0 +1,10 @@ +error: the `#[omit_gdb_pretty_printer_section]` attribute is just used for the Rust test suite + --> $DIR/feature-gate-omit-gdb-pretty-printer-section.rs:11:1 + | +11 | #[omit_gdb_pretty_printer_section] //~ ERROR the `#[omit_gdb_pretty_printer_section]` attribute is + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(omit_gdb_pretty_printer_section)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-on-unimplemented.rs b/src/test/ui/feature-gate-on-unimplemented.rs similarity index 100% rename from src/test/compile-fail/feature-gate-on-unimplemented.rs rename to src/test/ui/feature-gate-on-unimplemented.rs diff --git a/src/test/ui/feature-gate-on-unimplemented.stderr b/src/test/ui/feature-gate-on-unimplemented.stderr new file mode 100644 index 00000000000..06944a14736 --- /dev/null +++ b/src/test/ui/feature-gate-on-unimplemented.stderr @@ -0,0 +1,10 @@ +error: the `#[rustc_on_unimplemented]` attribute is an experimental feature (see issue #29628) + --> $DIR/feature-gate-on-unimplemented.rs:14:1 + | +14 | #[rustc_on_unimplemented = "test error `{Self}` with `{Bar}`"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(on_unimplemented)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-optin-builtin-traits.rs b/src/test/ui/feature-gate-optin-builtin-traits.rs similarity index 100% rename from src/test/compile-fail/feature-gate-optin-builtin-traits.rs rename to src/test/ui/feature-gate-optin-builtin-traits.rs diff --git a/src/test/ui/feature-gate-optin-builtin-traits.stderr b/src/test/ui/feature-gate-optin-builtin-traits.stderr new file mode 100644 index 00000000000..c5e9614c29a --- /dev/null +++ b/src/test/ui/feature-gate-optin-builtin-traits.stderr @@ -0,0 +1,26 @@ +error: auto traits are experimental and possibly buggy (see issue #13231) + --> $DIR/feature-gate-optin-builtin-traits.rs:20:1 + | +20 | auto trait AutoDummyTrait {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable + +error: auto trait implementations are experimental and possibly buggy (see issue #13231) + --> $DIR/feature-gate-optin-builtin-traits.rs:24:1 + | +24 | impl DummyTrait for .. {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable + +error: negative trait bounds are not yet fully implemented; use marker types for now (see issue #13231) + --> $DIR/feature-gate-optin-builtin-traits.rs:27:1 + | +27 | impl !DummyTrait for DummyStruct {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(optin_builtin_traits)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-overlapping_marker_traits.rs b/src/test/ui/feature-gate-overlapping_marker_traits.rs similarity index 100% rename from src/test/compile-fail/feature-gate-overlapping_marker_traits.rs rename to src/test/ui/feature-gate-overlapping_marker_traits.rs diff --git a/src/test/ui/feature-gate-overlapping_marker_traits.stderr b/src/test/ui/feature-gate-overlapping_marker_traits.stderr new file mode 100644 index 00000000000..9028b14fcd7 --- /dev/null +++ b/src/test/ui/feature-gate-overlapping_marker_traits.stderr @@ -0,0 +1,10 @@ +error[E0119]: conflicting implementations of trait `MyMarker`: + --> $DIR/feature-gate-overlapping_marker_traits.rs:16:1 + | +15 | impl MyMarker for T {} + | ---------------------------------- first implementation here +16 | impl MyMarker for T {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ conflicting implementation + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-placement-expr.rs b/src/test/ui/feature-gate-placement-expr.rs similarity index 100% rename from src/test/compile-fail/feature-gate-placement-expr.rs rename to src/test/ui/feature-gate-placement-expr.rs diff --git a/src/test/ui/feature-gate-placement-expr.stderr b/src/test/ui/feature-gate-placement-expr.stderr new file mode 100644 index 00000000000..fdb7b506711 --- /dev/null +++ b/src/test/ui/feature-gate-placement-expr.stderr @@ -0,0 +1,10 @@ +error: placement-in expression syntax is experimental and subject to change. (see issue #27779) + --> $DIR/feature-gate-placement-expr.rs:24:13 + | +24 | let x = HEAP <- 'c'; //~ ERROR placement-in expression syntax is experimental + | ^^^^^^^^^^^ + | + = help: add #![feature(placement_in_syntax)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-plugin.rs b/src/test/ui/feature-gate-plugin.rs similarity index 100% rename from src/test/compile-fail/feature-gate-plugin.rs rename to src/test/ui/feature-gate-plugin.rs diff --git a/src/test/ui/feature-gate-plugin.stderr b/src/test/ui/feature-gate-plugin.stderr new file mode 100644 index 00000000000..b94d3299abc --- /dev/null +++ b/src/test/ui/feature-gate-plugin.stderr @@ -0,0 +1,10 @@ +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/feature-gate-plugin.rs:13:1 + | +13 | #![plugin(foo)] + | ^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-prelude_import.rs b/src/test/ui/feature-gate-prelude_import.rs similarity index 100% rename from src/test/compile-fail/feature-gate-prelude_import.rs rename to src/test/ui/feature-gate-prelude_import.rs diff --git a/src/test/ui/feature-gate-prelude_import.stderr b/src/test/ui/feature-gate-prelude_import.stderr new file mode 100644 index 00000000000..df44dfff40b --- /dev/null +++ b/src/test/ui/feature-gate-prelude_import.stderr @@ -0,0 +1,10 @@ +error: `#[prelude_import]` is for use by rustc only + --> $DIR/feature-gate-prelude_import.rs:11:1 + | +11 | #[prelude_import] //~ ERROR `#[prelude_import]` is for use by rustc only + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(prelude_import)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-profiler-runtime.rs b/src/test/ui/feature-gate-profiler-runtime.rs similarity index 100% rename from src/test/compile-fail/feature-gate-profiler-runtime.rs rename to src/test/ui/feature-gate-profiler-runtime.rs diff --git a/src/test/ui/feature-gate-profiler-runtime.stderr b/src/test/ui/feature-gate-profiler-runtime.stderr new file mode 100644 index 00000000000..c3165438cdb --- /dev/null +++ b/src/test/ui/feature-gate-profiler-runtime.stderr @@ -0,0 +1,10 @@ +error: the `#[profiler_runtime]` attribute is used to identify the `profiler_builtins` crate which contains the profiler runtime and will never be stable + --> $DIR/feature-gate-profiler-runtime.rs:11:1 + | +11 | #![profiler_runtime] //~ ERROR the `#[profiler_runtime]` attribute is + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(profiler_runtime)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-repr-simd.rs b/src/test/ui/feature-gate-repr-simd.rs similarity index 100% rename from src/test/compile-fail/feature-gate-repr-simd.rs rename to src/test/ui/feature-gate-repr-simd.rs diff --git a/src/test/ui/feature-gate-repr-simd.stderr b/src/test/ui/feature-gate-repr-simd.stderr new file mode 100644 index 00000000000..a2ff06dd59f --- /dev/null +++ b/src/test/ui/feature-gate-repr-simd.stderr @@ -0,0 +1,10 @@ +error: SIMD types are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-repr-simd.rs:11:1 + | +11 | #[repr(simd)] //~ error: SIMD types are experimental + | ^^^^^^^^^^^^^ + | + = help: add #![feature(repr_simd)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-repr128.rs b/src/test/ui/feature-gate-repr128.rs similarity index 100% rename from src/test/compile-fail/feature-gate-repr128.rs rename to src/test/ui/feature-gate-repr128.rs diff --git a/src/test/ui/feature-gate-repr128.stderr b/src/test/ui/feature-gate-repr128.stderr new file mode 100644 index 00000000000..2d32eda3b37 --- /dev/null +++ b/src/test/ui/feature-gate-repr128.stderr @@ -0,0 +1,13 @@ +error: repr with 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-repr128.rs:12:1 + | +12 | / enum A { //~ ERROR repr with 128-bit type is unstable +13 | | //~| HELP: add #![feature(repr128)] +14 | | A(u64) +15 | | } + | |_^ + | + = help: add #![feature(repr128)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-repr_align.rs b/src/test/ui/feature-gate-repr_align.rs similarity index 100% rename from src/test/compile-fail/feature-gate-repr_align.rs rename to src/test/ui/feature-gate-repr_align.rs diff --git a/src/test/ui/feature-gate-repr_align.stderr b/src/test/ui/feature-gate-repr_align.stderr new file mode 100644 index 00000000000..16fdc135a5f --- /dev/null +++ b/src/test/ui/feature-gate-repr_align.stderr @@ -0,0 +1,10 @@ +error: the struct `#[repr(align(u16))]` attribute is experimental (see issue #33626) + --> $DIR/feature-gate-repr_align.rs:12:1 + | +12 | #[repr(align(64))] //~ error: the struct `#[repr(align(u16))]` attribute is experimental + | ^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(repr_align)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-rustc-attrs.rs b/src/test/ui/feature-gate-rustc-attrs.rs similarity index 100% rename from src/test/compile-fail/feature-gate-rustc-attrs.rs rename to src/test/ui/feature-gate-rustc-attrs.rs diff --git a/src/test/ui/feature-gate-rustc-attrs.stderr b/src/test/ui/feature-gate-rustc-attrs.stderr new file mode 100644 index 00000000000..c818b57ef12 --- /dev/null +++ b/src/test/ui/feature-gate-rustc-attrs.stderr @@ -0,0 +1,26 @@ +error: the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) + --> $DIR/feature-gate-rustc-attrs.rs:15:1 + | +15 | #[rustc_variance] //~ ERROR the `#[rustc_variance]` attribute is just used for rustc unit tests and will never be stable + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_attrs)] to the crate attributes to enable + +error: the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable (see issue #29642) + --> $DIR/feature-gate-rustc-attrs.rs:16:1 + | +16 | #[rustc_error] //~ ERROR the `#[rustc_error]` attribute is just used for rustc unit tests and will never be stable + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_attrs)] to the crate attributes to enable + +error: unless otherwise specified, attributes with the prefix `rustc_` are reserved for internal compiler diagnostics (see issue #29642) + --> $DIR/feature-gate-rustc-attrs.rs:17:1 + | +17 | #[rustc_foo] + | ^^^^^^^^^^^^ + | + = help: add #![feature(rustc_attrs)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-rustc-diagnostic-macros.rs b/src/test/ui/feature-gate-rustc-diagnostic-macros.rs similarity index 100% rename from src/test/compile-fail/feature-gate-rustc-diagnostic-macros.rs rename to src/test/ui/feature-gate-rustc-diagnostic-macros.rs diff --git a/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr new file mode 100644 index 00000000000..843879036ed --- /dev/null +++ b/src/test/ui/feature-gate-rustc-diagnostic-macros.stderr @@ -0,0 +1,20 @@ +error: cannot find macro `__build_diagnostic_array!` in this scope + --> $DIR/feature-gate-rustc-diagnostic-macros.rs:22:1 + | +22 | __build_diagnostic_array!(DIAGNOSTICS); + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +error: cannot find macro `__register_diagnostic!` in this scope + --> $DIR/feature-gate-rustc-diagnostic-macros.rs:14:1 + | +14 | __register_diagnostic!(E0001); + | ^^^^^^^^^^^^^^^^^^^^^ + +error: cannot find macro `__diagnostic_used!` in this scope + --> $DIR/feature-gate-rustc-diagnostic-macros.rs:18:5 + | +18 | __diagnostic_used!(E0001); + | ^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-rustc_const_unstable.rs b/src/test/ui/feature-gate-rustc_const_unstable.rs similarity index 100% rename from src/test/compile-fail/feature-gate-rustc_const_unstable.rs rename to src/test/ui/feature-gate-rustc_const_unstable.rs diff --git a/src/test/ui/feature-gate-rustc_const_unstable.stderr b/src/test/ui/feature-gate-rustc_const_unstable.stderr new file mode 100644 index 00000000000..c32abb8b857 --- /dev/null +++ b/src/test/ui/feature-gate-rustc_const_unstable.stderr @@ -0,0 +1,10 @@ +error: the `#[rustc_const_unstable]` attribute is an internal feature + --> $DIR/feature-gate-rustc_const_unstable.rs:18:1 + | +18 | #[rustc_const_unstable(feature="fzzzzzt")] //~ERROR internal feature + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(rustc_const_unstable)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-sanitizer-runtime.rs b/src/test/ui/feature-gate-sanitizer-runtime.rs similarity index 100% rename from src/test/compile-fail/feature-gate-sanitizer-runtime.rs rename to src/test/ui/feature-gate-sanitizer-runtime.rs diff --git a/src/test/ui/feature-gate-sanitizer-runtime.stderr b/src/test/ui/feature-gate-sanitizer-runtime.stderr new file mode 100644 index 00000000000..b9a43f8098d --- /dev/null +++ b/src/test/ui/feature-gate-sanitizer-runtime.stderr @@ -0,0 +1,10 @@ +error: the `#[sanitizer_runtime]` attribute is used to identify crates that contain the runtime of a sanitizer and will never be stable + --> $DIR/feature-gate-sanitizer-runtime.rs:11:1 + | +11 | #![sanitizer_runtime] //~ ERROR the `#[sanitizer_runtime]` attribute is + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(sanitizer_runtime)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-simd-ffi.rs b/src/test/ui/feature-gate-simd-ffi.rs similarity index 100% rename from src/test/compile-fail/feature-gate-simd-ffi.rs rename to src/test/ui/feature-gate-simd-ffi.rs diff --git a/src/test/ui/feature-gate-simd-ffi.stderr b/src/test/ui/feature-gate-simd-ffi.stderr new file mode 100644 index 00000000000..fa47e1a2903 --- /dev/null +++ b/src/test/ui/feature-gate-simd-ffi.stderr @@ -0,0 +1,18 @@ +error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code + --> $DIR/feature-gate-simd-ffi.rs:20:17 + | +20 | fn baz() -> LocalSimd; //~ ERROR use of SIMD type + | ^^^^^^^^^ + | + = help: add #![feature(simd_ffi)] to the crate attributes to enable + +error: use of SIMD type `LocalSimd` in FFI is highly experimental and may result in invalid code + --> $DIR/feature-gate-simd-ffi.rs:21:15 + | +21 | fn qux(x: LocalSimd); //~ ERROR use of SIMD type + | ^^^^^^^^^ + | + = help: add #![feature(simd_ffi)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/feature-gate-simd.rs b/src/test/ui/feature-gate-simd.rs similarity index 100% rename from src/test/compile-fail/feature-gate-simd.rs rename to src/test/ui/feature-gate-simd.rs diff --git a/src/test/ui/feature-gate-simd.stderr b/src/test/ui/feature-gate-simd.stderr new file mode 100644 index 00000000000..b3225d580bf --- /dev/null +++ b/src/test/ui/feature-gate-simd.stderr @@ -0,0 +1,10 @@ +error: SIMD types are experimental and possibly buggy (see issue #27731) + --> $DIR/feature-gate-simd.rs:14:1 + | +14 | #[repr(simd)] //~ ERROR SIMD types are experimental + | ^^^^^^^^^^^^^ + | + = help: add #![feature(repr_simd)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-slice-patterns.rs b/src/test/ui/feature-gate-slice-patterns.rs similarity index 100% rename from src/test/compile-fail/feature-gate-slice-patterns.rs rename to src/test/ui/feature-gate-slice-patterns.rs diff --git a/src/test/ui/feature-gate-slice-patterns.stderr b/src/test/ui/feature-gate-slice-patterns.stderr new file mode 100644 index 00000000000..e5ba318b336 --- /dev/null +++ b/src/test/ui/feature-gate-slice-patterns.stderr @@ -0,0 +1,10 @@ +error: slice pattern syntax is experimental (see issue #23121) + --> $DIR/feature-gate-slice-patterns.rs:16:9 + | +16 | [1, 2, xs..] => {} //~ ERROR slice pattern syntax is experimental + | ^^^^^^^^^^^^ + | + = help: add #![feature(slice_patterns)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-staged_api.rs b/src/test/ui/feature-gate-staged_api.rs similarity index 100% rename from src/test/compile-fail/feature-gate-staged_api.rs rename to src/test/ui/feature-gate-staged_api.rs diff --git a/src/test/ui/feature-gate-staged_api.stderr b/src/test/ui/feature-gate-staged_api.stderr new file mode 100644 index 00000000000..30593d45760 --- /dev/null +++ b/src/test/ui/feature-gate-staged_api.stderr @@ -0,0 +1,14 @@ +error: stability attributes may not be used outside of the standard library + --> $DIR/feature-gate-staged_api.rs:11:1 + | +11 | #![stable(feature = "a", since = "b")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/feature-gate-staged_api.rs:18:1 + | +18 | #[stable(feature = "a", since = "b")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/feature-gate-start.rs b/src/test/ui/feature-gate-start.rs similarity index 100% rename from src/test/compile-fail/feature-gate-start.rs rename to src/test/ui/feature-gate-start.rs diff --git a/src/test/ui/feature-gate-start.stderr b/src/test/ui/feature-gate-start.stderr new file mode 100644 index 00000000000..b36fae2aacf --- /dev/null +++ b/src/test/ui/feature-gate-start.stderr @@ -0,0 +1,10 @@ +error: a #[start] function is an experimental feature whose signature may change over time (see issue #29633) + --> $DIR/feature-gate-start.rs:12:1 + | +12 | fn foo() {} //~ ERROR: a #[start] function is an experimental feature + | ^^^^^^^^^^^ + | + = help: add #![feature(start)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-static-nobundle.rs b/src/test/ui/feature-gate-static-nobundle.rs similarity index 100% rename from src/test/compile-fail/feature-gate-static-nobundle.rs rename to src/test/ui/feature-gate-static-nobundle.rs diff --git a/src/test/ui/feature-gate-static-nobundle.stderr b/src/test/ui/feature-gate-static-nobundle.stderr new file mode 100644 index 00000000000..052516fad76 --- /dev/null +++ b/src/test/ui/feature-gate-static-nobundle.stderr @@ -0,0 +1,10 @@ +error: kind="static-nobundle" is feature gated (see issue #37403) + --> $DIR/feature-gate-static-nobundle.rs:11:1 + | +11 | #[link(name="foo", kind="static-nobundle")] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(static_nobundle)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-stmt_expr_attributes.rs b/src/test/ui/feature-gate-stmt_expr_attributes.rs similarity index 100% rename from src/test/compile-fail/feature-gate-stmt_expr_attributes.rs rename to src/test/ui/feature-gate-stmt_expr_attributes.rs diff --git a/src/test/ui/feature-gate-stmt_expr_attributes.stderr b/src/test/ui/feature-gate-stmt_expr_attributes.stderr new file mode 100644 index 00000000000..80910594d1c --- /dev/null +++ b/src/test/ui/feature-gate-stmt_expr_attributes.stderr @@ -0,0 +1,10 @@ +error: attributes on non-item statements and expressions are experimental. (see issue #15701) + --> $DIR/feature-gate-stmt_expr_attributes.rs:11:16 + | +11 | const X: i32 = #[allow(dead_code)] 8; + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(stmt_expr_attributes)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-unboxed-closures-manual-impls.rs b/src/test/ui/feature-gate-unboxed-closures-manual-impls.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unboxed-closures-manual-impls.rs rename to src/test/ui/feature-gate-unboxed-closures-manual-impls.rs diff --git a/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr new file mode 100644 index 00000000000..280fc12f1a6 --- /dev/null +++ b/src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr @@ -0,0 +1,34 @@ +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:20:5 + | +20 | extern "rust-call" fn call(self, args: ()) -> () {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:25:5 + | +25 | extern "rust-call" fn call_once(self, args: ()) -> () {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:30:5 + | +30 | extern "rust-call" fn call_mut(&self, args: ()) -> () {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-manual-impls.rs:35:5 + | +35 | extern "rust-call" fn call_once(&self, args: ()) -> () {} + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: aborting due to 4 previous errors + diff --git a/src/test/compile-fail/feature-gate-unboxed-closures-method-calls.rs b/src/test/ui/feature-gate-unboxed-closures-method-calls.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unboxed-closures-method-calls.rs rename to src/test/ui/feature-gate-unboxed-closures-method-calls.rs diff --git a/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr new file mode 100644 index 00000000000..1167bf0a696 --- /dev/null +++ b/src/test/ui/feature-gate-unboxed-closures-method-calls.stderr @@ -0,0 +1,26 @@ +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:14:7 + | +14 | f.call(()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:15:7 + | +15 | f.call_mut(()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-method-calls.rs:16:7 + | +16 | f.call_once(()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^^^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-unboxed-closures-ufcs-calls.rs b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unboxed-closures-ufcs-calls.rs rename to src/test/ui/feature-gate-unboxed-closures-ufcs-calls.rs diff --git a/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr new file mode 100644 index 00000000000..7eb491cebfe --- /dev/null +++ b/src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr @@ -0,0 +1,26 @@ +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:14:5 + | +14 | Fn::call(&f, ()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:15:5 + | +15 | FnMut::call_mut(&mut f, ()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^^^^^^^^^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: use of unstable library feature 'fn_traits' (see issue #29625) + --> $DIR/feature-gate-unboxed-closures-ufcs-calls.rs:16:5 + | +16 | FnOnce::call_once(f, ()); //~ ERROR use of unstable library feature 'fn_traits' + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(fn_traits)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-unboxed-closures.rs b/src/test/ui/feature-gate-unboxed-closures.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unboxed-closures.rs rename to src/test/ui/feature-gate-unboxed-closures.rs diff --git a/src/test/ui/feature-gate-unboxed-closures.stderr b/src/test/ui/feature-gate-unboxed-closures.stderr new file mode 100644 index 00000000000..b79165147e5 --- /dev/null +++ b/src/test/ui/feature-gate-unboxed-closures.stderr @@ -0,0 +1,12 @@ +error: rust-call ABI is subject to change (see issue #29625) + --> $DIR/feature-gate-unboxed-closures.rs:16:5 + | +16 | / extern "rust-call" fn call_once(self, (a, b): (u32, u32)) -> u32 { +17 | | a + b +18 | | } + | |_____^ + | + = help: add #![feature(unboxed_closures)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-underscore-lifetimes.rs b/src/test/ui/feature-gate-underscore-lifetimes.rs similarity index 100% rename from src/test/compile-fail/feature-gate-underscore-lifetimes.rs rename to src/test/ui/feature-gate-underscore-lifetimes.rs diff --git a/src/test/ui/feature-gate-underscore-lifetimes.stderr b/src/test/ui/feature-gate-underscore-lifetimes.stderr new file mode 100644 index 00000000000..875b958aa88 --- /dev/null +++ b/src/test/ui/feature-gate-underscore-lifetimes.stderr @@ -0,0 +1,10 @@ +error: underscore lifetimes are unstable (see issue #44524) + --> $DIR/feature-gate-underscore-lifetimes.rs:13:23 + | +13 | fn foo(x: &u8) -> Foo<'_> { //~ ERROR underscore lifetimes are unstable + | ^^ + | + = help: add #![feature(underscore_lifetimes)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/impl-trait/feature-gate-universal.rs b/src/test/ui/feature-gate-universal.rs similarity index 100% rename from src/test/compile-fail/impl-trait/feature-gate-universal.rs rename to src/test/ui/feature-gate-universal.rs diff --git a/src/test/ui/feature-gate-universal.stderr b/src/test/ui/feature-gate-universal.stderr new file mode 100644 index 00000000000..7f889f96224 --- /dev/null +++ b/src/test/ui/feature-gate-universal.stderr @@ -0,0 +1,10 @@ +error: `impl Trait` in argument position is experimental (see issue #34511) + --> $DIR/feature-gate-universal.rs:13:11 + | +13 | fn foo(x: impl std::fmt::Debug) { print!("{:?}", x); } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(universal_impl_trait)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-unsized_tuple_coercion.rs b/src/test/ui/feature-gate-unsized_tuple_coercion.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unsized_tuple_coercion.rs rename to src/test/ui/feature-gate-unsized_tuple_coercion.rs diff --git a/src/test/ui/feature-gate-unsized_tuple_coercion.stderr b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr new file mode 100644 index 00000000000..f166b10613a --- /dev/null +++ b/src/test/ui/feature-gate-unsized_tuple_coercion.stderr @@ -0,0 +1,10 @@ +error: Unsized tuple coercion is not stable enough for use and is subject to change (see issue #42877) + --> $DIR/feature-gate-unsized_tuple_coercion.rs:12:24 + | +12 | let _ : &(Send,) = &((),); + | ^^^^^^ + | + = help: add #![feature(unsized_tuple_coercion)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-unwind-attributes.rs b/src/test/ui/feature-gate-unwind-attributes.rs similarity index 100% rename from src/test/compile-fail/feature-gate-unwind-attributes.rs rename to src/test/ui/feature-gate-unwind-attributes.rs diff --git a/src/test/ui/feature-gate-unwind-attributes.stderr b/src/test/ui/feature-gate-unwind-attributes.stderr new file mode 100644 index 00000000000..02d8bf914eb --- /dev/null +++ b/src/test/ui/feature-gate-unwind-attributes.stderr @@ -0,0 +1,10 @@ +error: #[unwind] is experimental + --> $DIR/feature-gate-unwind-attributes.rs:21:5 + | +21 | #[unwind] //~ ERROR #[unwind] is experimental + | ^^^^^^^^^ + | + = help: add #![feature(unwind_attributes)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-use_nested_groups.rs b/src/test/ui/feature-gate-use_nested_groups.rs similarity index 100% rename from src/test/compile-fail/feature-gate-use_nested_groups.rs rename to src/test/ui/feature-gate-use_nested_groups.rs diff --git a/src/test/ui/feature-gate-use_nested_groups.stderr b/src/test/ui/feature-gate-use_nested_groups.stderr new file mode 100644 index 00000000000..79f1d1a168f --- /dev/null +++ b/src/test/ui/feature-gate-use_nested_groups.stderr @@ -0,0 +1,26 @@ +error: nested groups in `use` are experimental (see issue #44494) + --> $DIR/feature-gate-use_nested_groups.rs:27:12 + | +27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental + | ^^^^^^^^^^^^ + | + = help: add #![feature(use_nested_groups)] to the crate attributes to enable + +error: glob imports in `use` groups are experimental (see issue #44494) + --> $DIR/feature-gate-use_nested_groups.rs:27:16 + | +27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental + | ^ + | + = help: add #![feature(use_nested_groups)] to the crate attributes to enable + +error: paths in `use` groups are experimental (see issue #44494) + --> $DIR/feature-gate-use_nested_groups.rs:27:19 + | +27 | use a::{B, d::{*, g::H}}; //~ ERROR glob imports in `use` groups are experimental + | ^^^^ + | + = help: add #![feature(use_nested_groups)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate-used.rs b/src/test/ui/feature-gate-used.rs similarity index 100% rename from src/test/compile-fail/feature-gate-used.rs rename to src/test/ui/feature-gate-used.rs diff --git a/src/test/ui/feature-gate-used.stderr b/src/test/ui/feature-gate-used.stderr new file mode 100644 index 00000000000..228cf12a08b --- /dev/null +++ b/src/test/ui/feature-gate-used.stderr @@ -0,0 +1,10 @@ +error: the `#[used]` attribute is an experimental feature (see issue #40289) + --> $DIR/feature-gate-used.rs:11:1 + | +11 | #[used] + | ^^^^^^^ + | + = help: add #![feature(used)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate-wasm_import_memory.rs b/src/test/ui/feature-gate-wasm_import_memory.rs similarity index 100% rename from src/test/compile-fail/feature-gate-wasm_import_memory.rs rename to src/test/ui/feature-gate-wasm_import_memory.rs diff --git a/src/test/ui/feature-gate-wasm_import_memory.stderr b/src/test/ui/feature-gate-wasm_import_memory.stderr new file mode 100644 index 00000000000..c0486d0d5f5 --- /dev/null +++ b/src/test/ui/feature-gate-wasm_import_memory.stderr @@ -0,0 +1,10 @@ +error: wasm_import_memory attribute is currently unstable + --> $DIR/feature-gate-wasm_import_memory.rs:11:1 + | +11 | #![wasm_import_memory] //~ ERROR: currently unstable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(wasm_import_memory)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-bench.rs b/src/test/ui/feature-gate/issue-43106-gating-of-bench.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-bench.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-bench.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr new file mode 100644 index 00000000000..f7d5473f443 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr @@ -0,0 +1,4 @@ +error[E0601]: main function not found + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-builtin-attrs.rs b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-builtin-attrs.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr new file mode 100644 index 00000000000..0e72442143b --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr @@ -0,0 +1,1354 @@ +warning: macro_escape is a deprecated synonym for macro_use + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:532:1 + | +532 | #[macro_escape] + | ^^^^^^^^^^^^^^^ + +warning: macro_escape is a deprecated synonym for macro_use + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:535:17 + | +535 | mod inner { #![macro_escape] } + | ^^^^^^^^^^^^^^^^ + | + = help: consider an outer attribute, #[macro_use] mod ... + +warning: `#[must_use]` on functions is experimental (see issue #43302) + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:682:5 + | +682 | #[must_use = "1400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(fn_must_use)] to the crate attributes to enable + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:49:33 + | +49 | #![warn (x5400)] //~ WARN unknown lint: `x5400` + | ^^^^^ + | +note: lint level defined here + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:28 + | +44 | #![warn(unused_attributes, unknown_lints)] + | ^^^^^^^^^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:50:33 + | +50 | #![allow (x5300)] //~ WARN unknown lint: `x5300` + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:51:33 + | +51 | #![forbid (x5200)] //~ WARN unknown lint: `x5200` + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:52:33 + | +52 | #![deny (x5100)] //~ WARN unknown lint: `x5100` + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:114:8 + | +114 | #[warn(x5400)] + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:117:25 + | +117 | mod inner { #![warn(x5400)] } + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:120:12 + | +120 | #[warn(x5400)] fn f() { } + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:123:12 + | +123 | #[warn(x5400)] struct S; + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:126:12 + | +126 | #[warn(x5400)] type T = S; + | ^^^^^ + +warning: unknown lint: `x5400` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:129:12 + | +129 | #[warn(x5400)] impl S { } + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:133:9 + | +133 | #[allow(x5300)] + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:136:26 + | +136 | mod inner { #![allow(x5300)] } + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:139:13 + | +139 | #[allow(x5300)] fn f() { } + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:142:13 + | +142 | #[allow(x5300)] struct S; + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:145:13 + | +145 | #[allow(x5300)] type T = S; + | ^^^^^ + +warning: unknown lint: `x5300` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:148:13 + | +148 | #[allow(x5300)] impl S { } + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:152:10 + | +152 | #[forbid(x5200)] + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:155:27 + | +155 | mod inner { #![forbid(x5200)] } + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:158:14 + | +158 | #[forbid(x5200)] fn f() { } + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:161:14 + | +161 | #[forbid(x5200)] struct S; + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:164:14 + | +164 | #[forbid(x5200)] type T = S; + | ^^^^^ + +warning: unknown lint: `x5200` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:167:14 + | +167 | #[forbid(x5200)] impl S { } + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:171:8 + | +171 | #[deny(x5100)] + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:174:25 + | +174 | mod inner { #![deny(x5100)] } + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:177:12 + | +177 | #[deny(x5100)] fn f() { } + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:180:12 + | +180 | #[deny(x5100)] struct S; + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:183:12 + | +183 | #[deny(x5100)] type T = S; + | ^^^^^ + +warning: unknown lint: `x5100` + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:186:12 + | +186 | #[deny(x5100)] impl S { } + | ^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:193:17 + | +193 | mod inner { #![macro_reexport="5000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | +note: lint level defined here + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:44:9 + | +44 | #![warn(unused_attributes, unknown_lints)] + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:196:5 + | +196 | #[macro_reexport = "5000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:199:5 + | +199 | #[macro_reexport = "5000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:202:5 + | +202 | #[macro_reexport = "5000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:205:5 + | +205 | #[macro_reexport = "5000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:190:1 + | +190 | #[macro_reexport = "5000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:213:5 + | +213 | #[macro_use] fn f() { } + | ^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:216:5 + | +216 | #[macro_use] struct S; + | ^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:219:5 + | +219 | #[macro_use] type T = S; + | ^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:222:5 + | +222 | #[macro_use] impl S { } + | ^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:229:17 + | +229 | mod inner { #![macro_export="4800"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:232:5 + | +232 | #[macro_export = "4800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:235:5 + | +235 | #[macro_export = "4800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:238:5 + | +238 | #[macro_export = "4800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:241:5 + | +241 | #[macro_export = "4800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:226:1 + | +226 | #[macro_export = "4800"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:248:17 + | +248 | mod inner { #![plugin_registrar="4700"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:253:5 + | +253 | #[plugin_registrar = "4700"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:256:5 + | +256 | #[plugin_registrar = "4700"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:259:5 + | +259 | #[plugin_registrar = "4700"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:245:1 + | +245 | #[plugin_registrar = "4700"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:266:17 + | +266 | mod inner { #![main="4300"] } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:271:5 + | +271 | #[main = "4400"] struct S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:274:5 + | +274 | #[main = "4400"] type T = S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:277:5 + | +277 | #[main = "4400"] impl S { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:263:1 + | +263 | #[main = "4400"] + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:284:17 + | +284 | mod inner { #![start="4300"] } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:289:5 + | +289 | #[start = "4300"] struct S; + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:292:5 + | +292 | #[start = "4300"] type T = S; + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:295:5 + | +295 | #[start = "4300"] impl S { } + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:281:1 + | +281 | #[start = "4300"] + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:334:17 + | +334 | mod inner { #![simd="4000"] } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:337:5 + | +337 | #[simd = "4000"] fn f() { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:342:5 + | +342 | #[simd = "4000"] type T = S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:345:5 + | +345 | #[simd = "4000"] impl S { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:331:1 + | +331 | #[simd = "4000"] + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:352:17 + | +352 | mod inner { #![repr="3900"] } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:355:5 + | +355 | #[repr = "3900"] fn f() { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:360:5 + | +360 | #[repr = "3900"] type T = S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:363:5 + | +363 | #[repr = "3900"] impl S { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:349:1 + | +349 | #[repr = "3900"] + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:371:5 + | +371 | #[path = "3800"] fn f() { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:374:5 + | +374 | #[path = "3800"] struct S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:377:5 + | +377 | #[path = "3800"] type T = S; + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:380:5 + | +380 | #[path = "3800"] impl S { } + | ^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:387:17 + | +387 | mod inner { #![abi="3700"] } + | ^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:390:5 + | +390 | #[abi = "3700"] fn f() { } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:393:5 + | +393 | #[abi = "3700"] struct S; + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:396:5 + | +396 | #[abi = "3700"] type T = S; + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:399:5 + | +399 | #[abi = "3700"] impl S { } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:384:1 + | +384 | #[abi = "3700"] + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:406:17 + | +406 | mod inner { #![automatically_derived="3600"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:409:5 + | +409 | #[automatically_derived = "3600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:412:5 + | +412 | #[automatically_derived = "3600"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:415:5 + | +415 | #[automatically_derived = "3600"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:418:5 + | +418 | #[automatically_derived = "3600"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:403:1 + | +403 | #[automatically_derived = "3600"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: function is marked #[no_mangle], but not exported + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:426:27 + | +426 | #[no_mangle = "3500"] fn f() { } + | -^^^^^^^^^ + | | + | help: try making it public: `pub ` + | + = note: #[warn(private_no_mangle_fns)] on by default + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:439:17 + | +439 | mod inner { #![no_link="3400"] } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:442:5 + | +442 | #[no_link = "3400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:445:5 + | +445 | #[no_link = "3400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:448:5 + | +448 | #[no_link = "3400"]type T = S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:451:5 + | +451 | #[no_link = "3400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:436:1 + | +436 | #[no_link = "3400"] + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:458:17 + | +458 | mod inner { #![should_panic="3200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:461:5 + | +461 | #[should_panic = "3200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:464:5 + | +464 | #[should_panic = "3200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:467:5 + | +467 | #[should_panic = "3200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:470:5 + | +470 | #[should_panic = "3200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:455:1 + | +455 | #[should_panic = "3200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:477:17 + | +477 | mod inner { #![ignore="3100"] } + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:480:5 + | +480 | #[ignore = "3100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:483:5 + | +483 | #[ignore = "3100"] struct S; + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:486:5 + | +486 | #[ignore = "3100"] type T = S; + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:489:5 + | +489 | #[ignore = "3100"] impl S { } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:474:1 + | +474 | #[ignore = "3100"] + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:496:17 + | +496 | mod inner { #![no_implicit_prelude="3000"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:499:5 + | +499 | #[no_implicit_prelude = "3000"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:502:5 + | +502 | #[no_implicit_prelude = "3000"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:505:5 + | +505 | #[no_implicit_prelude = "3000"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:508:5 + | +508 | #[no_implicit_prelude = "3000"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:493:1 + | +493 | #[no_implicit_prelude = "3000"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:515:17 + | +515 | mod inner { #![reexport_test_harness_main="2900"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:518:5 + | +518 | #[reexport_test_harness_main = "2900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:521:5 + | +521 | #[reexport_test_harness_main = "2900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:524:5 + | +524 | #[reexport_test_harness_main = "2900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:527:5 + | +527 | #[reexport_test_harness_main = "2900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:512:1 + | +512 | #[reexport_test_harness_main = "2900"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:538:5 + | +538 | #[macro_escape] fn f() { } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:541:5 + | +541 | #[macro_escape] struct S; + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:544:5 + | +544 | #[macro_escape] type T = S; + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:547:5 + | +547 | #[macro_escape] impl S { } + | ^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:17 + | +555 | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:555:17 + | +555 | mod inner { #![no_std="2600"] } + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:559:5 + | +559 | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:559:5 + | +559 | #[no_std = "2600"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:563:5 + | +563 | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:563:5 + | +563 | #[no_std = "2600"] struct S; + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:5 + | +567 | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:567:5 + | +567 | #[no_std = "2600"] type T = S; + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5 + | +571 | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:571:5 + | +571 | #[no_std = "2600"] impl S { } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:1 + | +551 | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:551:1 + | +551 | #[no_std = "2600"] + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17 + | +711 | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:711:17 + | +711 | mod inner { #![crate_name="0900"] } + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 + | +715 | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:715:5 + | +715 | #[crate_name = "0900"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 + | +719 | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:719:5 + | +719 | #[crate_name = "0900"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5 + | +723 | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:723:5 + | +723 | #[crate_name = "0900"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5 + | +727 | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:727:5 + | +727 | #[crate_name = "0900"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1 + | +707 | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:707:1 + | +707 | #[crate_name = "0900"] + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:17 + | +736 | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:736:17 + | +736 | mod inner { #![crate_type="0800"] } + | ^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5 + | +740 | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:740:5 + | +740 | #[crate_type = "0800"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:5 + | +744 | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:744:5 + | +744 | #[crate_type = "0800"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:748:5 + | +748 | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:748:5 + | +748 | #[crate_type = "0800"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5 + | +752 | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:752:5 + | +752 | #[crate_type = "0800"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:1 + | +732 | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:732:1 + | +732 | #[crate_type = "0800"] + | ^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:17 + | +761 | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:761:17 + | +761 | mod inner { #![feature(x0600)] } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5 + | +765 | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:765:5 + | +765 | #[feature(x0600)] fn f() { } + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:5 + | +769 | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:769:5 + | +769 | #[feature(x0600)] struct S; + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5 + | +773 | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:773:5 + | +773 | #[feature(x0600)] type T = S; + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5 + | +777 | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:777:5 + | +777 | #[feature(x0600)] impl S { } + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:1 + | +757 | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:757:1 + | +757 | #[feature(x0600)] + | ^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:787:17 + | +787 | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:787:17 + | +787 | mod inner { #![no_main="0400"] } + | ^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5 + | +791 | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:791:5 + | +791 | #[no_main = "0400"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:5 + | +795 | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:795:5 + | +795 | #[no_main = "0400"] struct S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:5 + | +799 | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:799:5 + | +799 | #[no_main = "0400"] type T = S; + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:5 + | +803 | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:803:5 + | +803 | #[no_main = "0400"] impl S { } + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:783:1 + | +783 | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:783:1 + | +783 | #[no_main = "0400"] + | ^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:17 + | +825 | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:825:17 + | +825 | mod inner { #![recursion_limit="0200"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:829:5 + | +829 | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:829:5 + | +829 | #[recursion_limit="0200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:833:5 + | +833 | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:833:5 + | +833 | #[recursion_limit="0200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:837:5 + | +837 | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:837:5 + | +837 | #[recursion_limit="0200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:841:5 + | +841 | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:841:5 + | +841 | #[recursion_limit="0200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1 + | +821 | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:821:1 + | +821 | #[recursion_limit="0200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:17 + | +850 | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be in the root module + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:850:17 + | +850 | mod inner { #![type_length_limit="0100"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5 + | +854 | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:854:5 + | +854 | #[type_length_limit="0100"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5 + | +858 | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:858:5 + | +858 | #[type_length_limit="0100"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5 + | +862 | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:862:5 + | +862 | #[type_length_limit="0100"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:5 + | +866 | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:866:5 + | +866 | #[type_length_limit="0100"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:1 + | +846 | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: crate-level attribute should be an inner attribute: add an exclamation mark: #![foo] + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:846:1 + | +846 | #[type_length_limit="0100"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:53:1 + | +53 | #![macro_reexport = "5000"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:55:1 + | +55 | #![macro_export = "4800"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:56:1 + | +56 | #![plugin_registrar = "4700"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:59:1 + | +59 | #![main = "x4400"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:60:1 + | +60 | #![start = "x4300"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:63:1 + | +63 | #![simd = "4000"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:64:1 + | +64 | #![repr = "3900"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:65:1 + | +65 | #![path = "3800"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:66:1 + | +66 | #![abi = "3700"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:67:1 + | +67 | #![automatically_derived = "3600"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:69:1 + | +69 | #![no_link = "3400"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:71:1 + | +71 | #![should_panic = "3200"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:72:1 + | +72 | #![ignore = "3100"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +warning: unused attribute + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:78:1 + | +78 | #![proc_macro_derive = "2500"] //~ WARN unused attribute + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: compilation successful + --> $DIR/issue-43106-gating-of-builtin-attrs.rs:877:1 + | +877 | / fn main() { //~ ERROR compilation successful +878 | | println!("Hello World"); +879 | | } + | |_^ + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-deprecated.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-deprecated.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr new file mode 100644 index 00000000000..a413fcc56a0 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr @@ -0,0 +1,8 @@ +error: compilation successful + --> $DIR/issue-43106-gating-of-deprecated.rs:29:1 + | +29 | / fn main() { //~ ERROR compilation successful +30 | | println!("Hello World"); +31 | | } + | |_^ + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive-2.rs b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-derive-2.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-derive-2.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr new file mode 100644 index 00000000000..c5b33384b91 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr @@ -0,0 +1,20 @@ +error: cannot find derive macro `x3300` in this scope + --> $DIR/issue-43106-gating-of-derive-2.rs:14:14 + | +14 | #[derive(x3300)] + | ^^^^^ + +error: cannot find derive macro `x3300` in this scope + --> $DIR/issue-43106-gating-of-derive-2.rs:18:14 + | +18 | #[derive(x3300)] + | ^^^^^ + +error: cannot find derive macro `x3300` in this scope + --> $DIR/issue-43106-gating-of-derive-2.rs:22:14 + | +22 | #[derive(x3300)] + | ^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-derive.rs b/src/test/ui/feature-gate/issue-43106-gating-of-derive.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-derive.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-derive.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr new file mode 100644 index 00000000000..a0b12585f3c --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr @@ -0,0 +1,38 @@ +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:14:1 + | +14 | #![derive(Debug)] + | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` + +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:17:1 + | +17 | #[derive(Debug)] + | ^^^^^^^^^^^^^^^^ + +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:20:17 + | +20 | mod inner { #![derive(Debug)] } + | ^^^^^^^^^^^^^^^^^ help: try an outer attribute: `#[derive(Debug)]` + +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:23:5 + | +23 | #[derive(Debug)] + | ^^^^^^^^^^^^^^^^ + +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:36:5 + | +36 | #[derive(Debug)] + | ^^^^^^^^^^^^^^^^ + +error: `derive` may only be applied to structs, enums and unions + --> $DIR/issue-43106-gating-of-derive.rs:40:5 + | +40 | #[derive(Debug)] + | ^^^^^^^^^^^^^^^^ + +error: aborting due to 6 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs b/src/test/ui/feature-gate/issue-43106-gating-of-inline.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-inline.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-inline.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr new file mode 100644 index 00000000000..92bda4d0446 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr @@ -0,0 +1,43 @@ +error[E0518]: attribute should be applied to function + --> $DIR/issue-43106-gating-of-inline.rs:21:1 + | +21 | #[inline = "2100"] + | ^^^^^^^^^^^^^^^^^^ +22 | //~^ ERROR attribute should be applied to function +23 | / mod inline { +24 | | mod inner { #![inline="2100"] } +25 | | //~^ ERROR attribute should be applied to function +26 | | +... | +36 | | //~^ ERROR attribute should be applied to function +37 | | } + | |_- not a function + +error[E0518]: attribute should be applied to function + --> $DIR/issue-43106-gating-of-inline.rs:24:17 + | +24 | mod inner { #![inline="2100"] } + | ------------^^^^^^^^^^^^^^^^^-- not a function + +error[E0518]: attribute should be applied to function + --> $DIR/issue-43106-gating-of-inline.rs:29:5 + | +29 | #[inline = "2100"] struct S; + | ^^^^^^^^^^^^^^^^^^ --------- not a function + +error[E0518]: attribute should be applied to function + --> $DIR/issue-43106-gating-of-inline.rs:32:5 + | +32 | #[inline = "2100"] type T = S; + | ^^^^^^^^^^^^^^^^^^ ----------- not a function + +error[E0518]: attribute should be applied to function + --> $DIR/issue-43106-gating-of-inline.rs:35:5 + | +35 | #[inline = "2100"] impl S { } + | ^^^^^^^^^^^^^^^^^^ ---------- not a function + +error[E0601]: main function not found + +error: aborting due to 6 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_escape.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_escape.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr new file mode 100644 index 00000000000..60a9382bdb8 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr @@ -0,0 +1,12 @@ +warning: macro_escape is a deprecated synonym for macro_use + --> $DIR/issue-43106-gating-of-macro_escape.rs:16:1 + | +16 | #![macro_escape] + | ^^^^^^^^^^^^^^^^ + | + = help: consider an outer attribute, #[macro_use] mod ... + +error[E0601]: main function not found + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_use.rs b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-macro_use.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-macro_use.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr new file mode 100644 index 00000000000..2977384f62d --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr @@ -0,0 +1,20 @@ +error: arguments to macro_use are not allowed here + --> $DIR/issue-43106-gating-of-macro_use.rs:16:1 + | +16 | #![macro_use = "4900"] //~ ERROR arguments to macro_use are not allowed here + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: arguments to macro_use are not allowed here + --> $DIR/issue-43106-gating-of-macro_use.rs:18:1 + | +18 | #[macro_use = "2700"] + | ^^^^^^^^^^^^^^^^^^^^^ + +error: arguments to macro_use are not allowed here + --> $DIR/issue-43106-gating-of-macro_use.rs:21:17 + | +21 | mod inner { #![macro_use="2700"] } + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-proc_macro_derive.rs b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-proc_macro_derive.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr new file mode 100644 index 00000000000..a76f0219f7a --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr @@ -0,0 +1,40 @@ +error: the `#[proc_macro_derive]` attribute may only be used on bare functions + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:20:1 + | +20 | #[proc_macro_derive = "2500"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: the `#[proc_macro_derive]` attribute may only be used on bare functions + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:28:17 + | +28 | mod inner { #![proc_macro_derive="2500"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: the `#[proc_macro_derive]` attribute is only usable with crates of the `proc-macro` crate type + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:31:5 + | +31 | #[proc_macro_derive = "2500"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: the `#[proc_macro_derive]` attribute may only be used on bare functions + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:34:5 + | +34 | #[proc_macro_derive = "2500"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: the `#[proc_macro_derive]` attribute may only be used on bare functions + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:37:5 + | +37 | #[proc_macro_derive = "2500"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: the `#[proc_macro_derive]` attribute may only be used on bare functions + --> $DIR/issue-43106-gating-of-proc_macro_derive.rs:40:5 + | +40 | #[proc_macro_derive = "2500"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error[E0601]: main function not found + +error: aborting due to 7 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-rustc_deprecated.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr new file mode 100644 index 00000000000..6f6f587cb53 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr @@ -0,0 +1,46 @@ +error[E0601]: main function not found + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:17:1 + | +17 | #![rustc_deprecated = "1500"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:20:1 + | +20 | #[rustc_deprecated = "1500"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:23:17 + | +23 | mod inner { #![rustc_deprecated="1500"] } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:26:5 + | +26 | #[rustc_deprecated = "1500"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:29:5 + | +29 | #[rustc_deprecated = "1500"] struct S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:32:5 + | +32 | #[rustc_deprecated = "1500"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-rustc_deprecated.rs:35:5 + | +35 | #[rustc_deprecated = "1500"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 9 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs b/src/test/ui/feature-gate/issue-43106-gating-of-stable.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-stable.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-stable.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr new file mode 100644 index 00000000000..59f0431c708 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr @@ -0,0 +1,46 @@ +error[E0601]: main function not found + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:17:1 + | +17 | #![stable = "1300"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:20:1 + | +20 | #[stable = "1300"] + | ^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:23:17 + | +23 | mod inner { #![stable="1300"] } + | ^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:26:5 + | +26 | #[stable = "1300"] fn f() { } + | ^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:29:5 + | +29 | #[stable = "1300"] struct S; + | ^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:32:5 + | +32 | #[stable = "1300"] type T = S; + | ^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-stable.rs:35:5 + | +35 | #[stable = "1300"] impl S { } + | ^^^^^^^^^^^^^^^^^^ + +error: aborting due to 9 previous errors + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-test.rs b/src/test/ui/feature-gate/issue-43106-gating-of-test.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-test.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-test.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr new file mode 100644 index 00000000000..f7d5473f443 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-test.stderr @@ -0,0 +1,4 @@ +error[E0601]: main function not found + +error: aborting due to previous error + diff --git a/src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.rs similarity index 100% rename from src/test/compile-fail/feature-gate/issue-43106-gating-of-unstable.rs rename to src/test/ui/feature-gate/issue-43106-gating-of-unstable.rs diff --git a/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr new file mode 100644 index 00000000000..00cbc62ab47 --- /dev/null +++ b/src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr @@ -0,0 +1,46 @@ +error[E0601]: main function not found + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:17:1 + | +17 | #![unstable = "1200"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:20:1 + | +20 | #[unstable = "1200"] + | ^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:23:17 + | +23 | mod inner { #![unstable="1200"] } + | ^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:26:5 + | +26 | #[unstable = "1200"] fn f() { } + | ^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:29:5 + | +29 | #[unstable = "1200"] struct S; + | ^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:32:5 + | +32 | #[unstable = "1200"] type T = S; + | ^^^^^^^^^^^^^^^^^^^^ + +error: stability attributes may not be used outside of the standard library + --> $DIR/issue-43106-gating-of-unstable.rs:35:5 + | +35 | #[unstable = "1200"] impl S { } + | ^^^^^^^^^^^^^^^^^^^^ + +error: aborting due to 9 previous errors +