From 8ba9f9ecf05df8cf800f928efa72a8300d90240c Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 6 Dec 2017 09:03:07 +0100 Subject: [PATCH 1/3] Tidy: allow feature-gate tests to be ui tests ui tests are the future, especially since the recent improvement where we have gained checking and requiring of //~ERROR comments. The tidy feature-gate test check is intended to be 50% an actual insurance that there is a check, and 50% to be a teacher that such checks are required. With this commit applied, newbies might interpret stuff wrongly and create tests that don't fail but succeed instead. This is not what feature gate tests are for though. Therefore, in a later step, when only ui tests are allowed to be feature gate tests, we will add checking to ensure that a file marked as gate test is actually required to be a compilation failure. Right now implementing such a check is a bit annoying as one needs to only do it when the compile-fail test is in the ui test suite :/. --- src/tools/tidy/src/features.rs | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/tools/tidy/src/features.rs b/src/tools/tidy/src/features.rs index 9736c03993081..eca225ee8a8c0 100644 --- a/src/tools/tidy/src/features.rs +++ b/src/tools/tidy/src/features.rs @@ -89,7 +89,9 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { let mut contents = String::new(); - super::walk_many(&[&path.join("test/compile-fail"), + super::walk_many(&[&path.join("test/ui-fulldeps"), + &path.join("test/ui"), + &path.join("test/compile-fail"), &path.join("test/compile-fail-fulldeps"), &path.join("test/parse-fail"),], &mut |path| super::filter_dirs(path), @@ -150,9 +152,9 @@ pub fn check(path: &Path, bad: &mut bool, quiet: bool) { for &(name, _) in gate_untested.iter() { println!("Expected a gate test for the feature '{}'.", name); - println!("Hint: create a file named 'feature-gate-{}.rs' in the compile-fail\ - \n test suite, with its failures due to missing usage of\ - \n #![feature({})].", name, name); + println!("Hint: create a failing test file named 'feature-gate-{}.rs'\ + \n in the 'ui' test suite, with its failures due to\ + \n missing usage of #![feature({})].", name, name); println!("Hint: If you already have such a test and don't want to rename it,\ \n you can also add a // gate-test-{} line to the test file.", name); From 38438c618ca0238442e1feb245e0a71174c3db43 Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 6 Dec 2017 09:27:47 +0100 Subject: [PATCH 2/3] Migrate a few feature gate tests to ui Renames only in this commit, and obviously .stderr file additions. --- .../auxiliary/cfg-target-thread-local.rs | 0 .../feature-gate-abi-msp430-interrupt.rs | 0 .../feature-gate-abi-msp430-interrupt.stderr | 10 + .../{compile-fail => ui}/feature-gate-abi.rs | 0 src/test/ui/feature-gate-abi.stderr | 450 ++++++ .../feature-gate-advanced-slice-features.rs | 0 ...eature-gate-advanced-slice-features.stderr | 18 + .../feature-gate-allocator_internals.rs | 0 .../feature-gate-allocator_internals.stderr | 10 + ...gate-allow-internal-unsafe-nested-macro.rs | 0 ...-allow-internal-unsafe-nested-macro.stderr | 13 + ...te-allow-internal-unstable-nested-macro.rs | 0 ...llow-internal-unstable-nested-macro.stderr | 13 + ...ure-gate-allow-internal-unstable-struct.rs | 0 ...gate-allow-internal-unstable-struct.stderr | 10 + .../feature-gate-allow-internal-unstable.rs | 0 ...eature-gate-allow-internal-unstable.stderr | 10 + .../feature-gate-allow_fail.rs | 0 src/test/ui/feature-gate-allow_fail.stderr | 10 + .../feature-gate-arbitrary-self-types.rs | 0 .../feature-gate-arbitrary-self-types.stderr | 29 + .../feature-gate-assoc-type-defaults.rs | 0 .../feature-gate-assoc-type-defaults.stderr | 10 + .../feature-gate-box-expr.rs | 0 src/test/ui/feature-gate-box-expr.stderr | 10 + .../feature-gate-box-pat.rs | 0 src/test/ui/feature-gate-box-pat.stderr | 10 + .../feature-gate-catch_expr.rs | 0 src/test/ui/feature-gate-catch_expr.stderr | 14 + .../feature-gate-cfg-target-feature.rs | 0 .../ui/feature-gate-cfg-target-feature.stderr | 34 + .../feature-gate-cfg-target-has-atomic.rs | 0 .../feature-gate-cfg-target-has-atomic.stderr | 122 ++ .../feature-gate-cfg-target-thread-local.rs | 0 ...eature-gate-cfg-target-thread-local.stderr | 10 + .../feature-gate-cfg-target-vendor.rs | 0 .../ui/feature-gate-cfg-target-vendor.stderr | 34 + .../feature-gate-clone-closures.rs | 0 .../ui/feature-gate-clone-closures.stderr | 10 + .../feature-gate-compiler-builtins.rs | 0 .../ui/feature-gate-compiler-builtins.stderr | 10 + .../feature-gate-const-indexing.rs | 0 .../ui/feature-gate-const-indexing.stderr | 8 + .../feature-gate-copy-closures.rs | 0 src/test/ui/feature-gate-copy-closures.stderr | 12 + .../feature-gate-crate_in_paths.rs | 0 .../ui/feature-gate-crate_in_paths.stderr | 10 + .../feature-gate-crate_visibility_modifier.rs | 0 ...ture-gate-crate_visibility_modifier.stderr | 10 + .../feature-gate-decl_macro.rs | 0 src/test/ui/feature-gate-decl_macro.stderr | 10 + .../feature-gate-doc_cfg.rs | 0 src/test/ui/feature-gate-doc_cfg.stderr | 10 + .../feature-gate-doc_masked.rs | 0 src/test/ui/feature-gate-doc_masked.stderr | 10 + .../feature-gate-doc_spotlight.rs | 0 src/test/ui/feature-gate-doc_spotlight.stderr | 10 + .../feature-gate-dotdoteq_in_patterns.rs | 0 .../feature-gate-dotdoteq_in_patterns.stderr | 10 + .../feature-gate-dropck-ugeh-2.rs | 0 src/test/ui/feature-gate-dropck-ugeh-2.stderr | 14 + .../feature-gate-dropck-ugeh.rs | 0 src/test/ui/feature-gate-dropck-ugeh.stderr | 10 + .../feature-gate-dyn-trait.rs | 0 src/test/ui/feature-gate-dyn-trait.stderr | 10 + .../feature-gate-exclusive-range-pattern.rs | 0 ...eature-gate-exclusive-range-pattern.stderr | 10 + .../feature-gate-extern_types.rs | 0 src/test/ui/feature-gate-extern_types.stderr | 10 + .../feature-gate-external_doc.rs | 0 src/test/ui/feature-gate-external_doc.stderr | 10 + .../feature-gate-feature-gate.rs | 0 src/test/ui/feature-gate-feature-gate.stderr | 14 + ...eature-gate-fn_must_use-cap-lints-allow.rs | 0 ...re-gate-fn_must_use-cap-lints-allow.stderr | 6 + .../feature-gate-fn_must_use.rs | 0 src/test/ui/feature-gate-fn_must_use.stderr | 22 + .../feature-gate-fundamental.rs | 0 src/test/ui/feature-gate-fundamental.stderr | 10 + .../feature-gate-generators.rs | 0 src/test/ui/feature-gate-generators.stderr | 10 + .../feature-gate-generic_associated_types.rs | 0 ...ature-gate-generic_associated_types.stderr | 34 + .../feature-gate-global_allocator.rs | 0 .../ui/feature-gate-global_allocator.stderr | 10 + .../feature-gate-global_asm.rs | 0 src/test/ui/feature-gate-global_asm.stderr | 10 + .../feature-gate-in_band_lifetimes.rs | 0 .../ui/feature-gate-in_band_lifetimes.stderr | 104 ++ .../feature-gate-intrinsics.rs | 0 src/test/ui/feature-gate-intrinsics.stderr | 21 + .../feature-gate-lang-items.rs | 0 src/test/ui/feature-gate-lang-items.stderr | 10 + .../feature-gate-linker-flavor.rs | 0 src/test/ui/feature-gate-linker-flavor.stderr | 10 + .../feature-gate-macro-vis-matcher.rs | 0 .../ui/feature-gate-macro-vis-matcher.stderr | 10 + .../{compile-fail => ui}/feature-gate-main.rs | 0 src/test/ui/feature-gate-main.stderr | 10 + .../feature-gate-match_beginning_vert.rs | 0 .../feature-gate-match_beginning_vert.stderr | 26 + .../feature-gate-match_default_bindings.rs | 0 ...feature-gate-match_default_bindings.stderr | 10 + .../feature-gate-may-dangle.rs | 0 src/test/ui/feature-gate-may-dangle.stderr | 10 + .../feature-gate-needs-allocator.rs | 0 .../ui/feature-gate-needs-allocator.stderr | 10 + .../feature-gate-negate-unsigned.rs | 0 .../ui/feature-gate-negate-unsigned.stderr | 14 + .../feature-gate-no-debug-2.rs | 0 src/test/ui/feature-gate-no-debug-2.stderr | 14 + .../feature-gate-no-debug.rs | 0 src/test/ui/feature-gate-no-debug.stderr | 10 + .../feature-gate-non_exhaustive.rs | 0 .../ui/feature-gate-non_exhaustive.stderr | 10 + ...re-gate-omit-gdb-pretty-printer-section.rs | 0 ...ate-omit-gdb-pretty-printer-section.stderr | 10 + .../feature-gate-on-unimplemented.rs | 0 .../ui/feature-gate-on-unimplemented.stderr | 10 + .../feature-gate-optin-builtin-traits.rs | 0 .../feature-gate-optin-builtin-traits.stderr | 26 + .../feature-gate-overlapping_marker_traits.rs | 0 ...ture-gate-overlapping_marker_traits.stderr | 10 + .../feature-gate-placement-expr.rs | 0 .../ui/feature-gate-placement-expr.stderr | 10 + .../feature-gate-plugin.rs | 0 src/test/ui/feature-gate-plugin.stderr | 10 + .../feature-gate-prelude_import.rs | 0 .../ui/feature-gate-prelude_import.stderr | 10 + .../feature-gate-profiler-runtime.rs | 0 .../ui/feature-gate-profiler-runtime.stderr | 10 + .../feature-gate-repr-simd.rs | 0 src/test/ui/feature-gate-repr-simd.stderr | 10 + .../feature-gate-repr128.rs | 0 src/test/ui/feature-gate-repr128.stderr | 13 + .../feature-gate-repr_align.rs | 0 src/test/ui/feature-gate-repr_align.stderr | 10 + .../feature-gate-rustc-attrs.rs | 0 src/test/ui/feature-gate-rustc-attrs.stderr | 26 + .../feature-gate-rustc-diagnostic-macros.rs | 0 ...eature-gate-rustc-diagnostic-macros.stderr | 20 + .../feature-gate-rustc_const_unstable.rs | 0 .../feature-gate-rustc_const_unstable.stderr | 10 + .../feature-gate-sanitizer-runtime.rs | 0 .../ui/feature-gate-sanitizer-runtime.stderr | 10 + .../feature-gate-simd-ffi.rs | 0 src/test/ui/feature-gate-simd-ffi.stderr | 18 + .../{compile-fail => ui}/feature-gate-simd.rs | 0 src/test/ui/feature-gate-simd.stderr | 10 + .../feature-gate-slice-patterns.rs | 0 .../ui/feature-gate-slice-patterns.stderr | 10 + .../feature-gate-staged_api.rs | 0 src/test/ui/feature-gate-staged_api.stderr | 14 + .../feature-gate-start.rs | 0 src/test/ui/feature-gate-start.stderr | 10 + .../feature-gate-static-nobundle.rs | 0 .../ui/feature-gate-static-nobundle.stderr | 10 + .../feature-gate-stmt_expr_attributes.rs | 0 .../feature-gate-stmt_expr_attributes.stderr | 10 + ...ture-gate-unboxed-closures-manual-impls.rs | 0 ...-gate-unboxed-closures-manual-impls.stderr | 34 + ...ture-gate-unboxed-closures-method-calls.rs | 0 ...-gate-unboxed-closures-method-calls.stderr | 26 + ...eature-gate-unboxed-closures-ufcs-calls.rs | 0 ...re-gate-unboxed-closures-ufcs-calls.stderr | 26 + .../feature-gate-unboxed-closures.rs | 0 .../ui/feature-gate-unboxed-closures.stderr | 12 + .../feature-gate-underscore-lifetimes.rs | 0 .../feature-gate-underscore-lifetimes.stderr | 10 + .../feature-gate-universal.rs | 0 src/test/ui/feature-gate-universal.stderr | 10 + .../feature-gate-unsized_tuple_coercion.rs | 0 ...feature-gate-unsized_tuple_coercion.stderr | 10 + .../feature-gate-unwind-attributes.rs | 0 .../ui/feature-gate-unwind-attributes.stderr | 10 + .../feature-gate-use_nested_groups.rs | 0 .../ui/feature-gate-use_nested_groups.stderr | 26 + .../{compile-fail => ui}/feature-gate-used.rs | 0 src/test/ui/feature-gate-used.stderr | 10 + .../feature-gate-wasm_import_memory.rs | 0 .../ui/feature-gate-wasm_import_memory.stderr | 10 + .../issue-43106-gating-of-bench.rs | 0 .../issue-43106-gating-of-bench.stderr | 4 + .../issue-43106-gating-of-builtin-attrs.rs | 0 ...issue-43106-gating-of-builtin-attrs.stderr | 1354 +++++++++++++++++ .../issue-43106-gating-of-deprecated.rs | 0 .../issue-43106-gating-of-deprecated.stderr | 8 + .../issue-43106-gating-of-derive-2.rs | 0 .../issue-43106-gating-of-derive-2.stderr | 20 + .../issue-43106-gating-of-derive.rs | 0 .../issue-43106-gating-of-derive.stderr | 38 + .../issue-43106-gating-of-inline.rs | 0 .../issue-43106-gating-of-inline.stderr | 43 + .../issue-43106-gating-of-macro_escape.rs | 0 .../issue-43106-gating-of-macro_escape.stderr | 12 + .../issue-43106-gating-of-macro_use.rs | 0 .../issue-43106-gating-of-macro_use.stderr | 20 + ...issue-43106-gating-of-proc_macro_derive.rs | 0 ...e-43106-gating-of-proc_macro_derive.stderr | 40 + .../issue-43106-gating-of-rustc_deprecated.rs | 0 ...ue-43106-gating-of-rustc_deprecated.stderr | 46 + .../issue-43106-gating-of-stable.rs | 0 .../issue-43106-gating-of-stable.stderr | 46 + .../issue-43106-gating-of-test.rs | 0 .../issue-43106-gating-of-test.stderr | 4 + .../issue-43106-gating-of-unstable.rs | 0 .../issue-43106-gating-of-unstable.stderr | 46 + 207 files changed, 3518 insertions(+) rename src/test/{compile-fail => ui}/auxiliary/cfg-target-thread-local.rs (100%) rename src/test/{compile-fail => ui}/feature-gate-abi-msp430-interrupt.rs (100%) create mode 100644 src/test/ui/feature-gate-abi-msp430-interrupt.stderr rename src/test/{compile-fail => ui}/feature-gate-abi.rs (100%) create mode 100644 src/test/ui/feature-gate-abi.stderr rename src/test/{compile-fail => ui}/feature-gate-advanced-slice-features.rs (100%) create mode 100644 src/test/ui/feature-gate-advanced-slice-features.stderr rename src/test/{compile-fail => ui}/feature-gate-allocator_internals.rs (100%) create mode 100644 src/test/ui/feature-gate-allocator_internals.stderr rename src/test/{compile-fail => ui}/feature-gate-allow-internal-unsafe-nested-macro.rs (100%) create mode 100644 src/test/ui/feature-gate-allow-internal-unsafe-nested-macro.stderr rename src/test/{compile-fail => ui}/feature-gate-allow-internal-unstable-nested-macro.rs (100%) create mode 100644 src/test/ui/feature-gate-allow-internal-unstable-nested-macro.stderr rename src/test/{compile-fail => ui}/feature-gate-allow-internal-unstable-struct.rs (100%) create mode 100644 src/test/ui/feature-gate-allow-internal-unstable-struct.stderr rename src/test/{compile-fail => ui}/feature-gate-allow-internal-unstable.rs (100%) create mode 100644 src/test/ui/feature-gate-allow-internal-unstable.stderr rename src/test/{compile-fail => ui}/feature-gate-allow_fail.rs (100%) create mode 100644 src/test/ui/feature-gate-allow_fail.stderr rename src/test/{compile-fail => ui}/feature-gate-arbitrary-self-types.rs (100%) create mode 100644 src/test/ui/feature-gate-arbitrary-self-types.stderr rename src/test/{compile-fail => ui}/feature-gate-assoc-type-defaults.rs (100%) create mode 100644 src/test/ui/feature-gate-assoc-type-defaults.stderr rename src/test/{compile-fail => ui}/feature-gate-box-expr.rs (100%) create mode 100644 src/test/ui/feature-gate-box-expr.stderr rename src/test/{compile-fail => ui}/feature-gate-box-pat.rs (100%) create mode 100644 src/test/ui/feature-gate-box-pat.stderr rename src/test/{compile-fail => ui}/feature-gate-catch_expr.rs (100%) create mode 100644 src/test/ui/feature-gate-catch_expr.stderr rename src/test/{compile-fail => ui}/feature-gate-cfg-target-feature.rs (100%) create mode 100644 src/test/ui/feature-gate-cfg-target-feature.stderr rename src/test/{compile-fail => ui}/feature-gate-cfg-target-has-atomic.rs (100%) create mode 100644 src/test/ui/feature-gate-cfg-target-has-atomic.stderr rename src/test/{compile-fail => ui}/feature-gate-cfg-target-thread-local.rs (100%) create mode 100644 src/test/ui/feature-gate-cfg-target-thread-local.stderr rename src/test/{compile-fail => ui}/feature-gate-cfg-target-vendor.rs (100%) create mode 100644 src/test/ui/feature-gate-cfg-target-vendor.stderr rename src/test/{compile-fail => ui}/feature-gate-clone-closures.rs (100%) create mode 100644 src/test/ui/feature-gate-clone-closures.stderr rename src/test/{compile-fail => ui}/feature-gate-compiler-builtins.rs (100%) create mode 100644 src/test/ui/feature-gate-compiler-builtins.stderr rename src/test/{compile-fail => ui}/feature-gate-const-indexing.rs (100%) create mode 100644 src/test/ui/feature-gate-const-indexing.stderr rename src/test/{compile-fail => ui}/feature-gate-copy-closures.rs (100%) create mode 100644 src/test/ui/feature-gate-copy-closures.stderr rename src/test/{compile-fail/rfc-2126-crate-paths => ui}/feature-gate-crate_in_paths.rs (100%) create mode 100644 src/test/ui/feature-gate-crate_in_paths.stderr rename src/test/{compile-fail => ui}/feature-gate-crate_visibility_modifier.rs (100%) create mode 100644 src/test/ui/feature-gate-crate_visibility_modifier.stderr rename src/test/{compile-fail => ui}/feature-gate-decl_macro.rs (100%) create mode 100644 src/test/ui/feature-gate-decl_macro.stderr rename src/test/{compile-fail => ui}/feature-gate-doc_cfg.rs (100%) create mode 100644 src/test/ui/feature-gate-doc_cfg.stderr rename src/test/{compile-fail => ui}/feature-gate-doc_masked.rs (100%) create mode 100644 src/test/ui/feature-gate-doc_masked.stderr rename src/test/{compile-fail => ui}/feature-gate-doc_spotlight.rs (100%) create mode 100644 src/test/ui/feature-gate-doc_spotlight.stderr rename src/test/{compile-fail => ui}/feature-gate-dotdoteq_in_patterns.rs (100%) create mode 100644 src/test/ui/feature-gate-dotdoteq_in_patterns.stderr rename src/test/{compile-fail => ui}/feature-gate-dropck-ugeh-2.rs (100%) create mode 100644 src/test/ui/feature-gate-dropck-ugeh-2.stderr rename src/test/{compile-fail => ui}/feature-gate-dropck-ugeh.rs (100%) create mode 100644 src/test/ui/feature-gate-dropck-ugeh.stderr rename src/test/{compile-fail => ui}/feature-gate-dyn-trait.rs (100%) create mode 100644 src/test/ui/feature-gate-dyn-trait.stderr rename src/test/{compile-fail => ui}/feature-gate-exclusive-range-pattern.rs (100%) create mode 100644 src/test/ui/feature-gate-exclusive-range-pattern.stderr rename src/test/{compile-fail => ui}/feature-gate-extern_types.rs (100%) create mode 100644 src/test/ui/feature-gate-extern_types.stderr rename src/test/{compile-fail => ui}/feature-gate-external_doc.rs (100%) create mode 100644 src/test/ui/feature-gate-external_doc.stderr rename src/test/{compile-fail => ui}/feature-gate-feature-gate.rs (100%) create mode 100644 src/test/ui/feature-gate-feature-gate.stderr rename src/test/{compile-fail => ui}/feature-gate-fn_must_use-cap-lints-allow.rs (100%) create mode 100644 src/test/ui/feature-gate-fn_must_use-cap-lints-allow.stderr rename src/test/{compile-fail => ui}/feature-gate-fn_must_use.rs (100%) create mode 100644 src/test/ui/feature-gate-fn_must_use.stderr rename src/test/{compile-fail => ui}/feature-gate-fundamental.rs (100%) create mode 100644 src/test/ui/feature-gate-fundamental.stderr rename src/test/{compile-fail => ui}/feature-gate-generators.rs (100%) create mode 100644 src/test/ui/feature-gate-generators.stderr rename src/test/{compile-fail => ui}/feature-gate-generic_associated_types.rs (100%) create mode 100644 src/test/ui/feature-gate-generic_associated_types.stderr rename src/test/{compile-fail => ui}/feature-gate-global_allocator.rs (100%) create mode 100644 src/test/ui/feature-gate-global_allocator.stderr rename src/test/{compile-fail => ui}/feature-gate-global_asm.rs (100%) create mode 100644 src/test/ui/feature-gate-global_asm.stderr rename src/test/{compile-fail => ui}/feature-gate-in_band_lifetimes.rs (100%) create mode 100644 src/test/ui/feature-gate-in_band_lifetimes.stderr rename src/test/{compile-fail => ui}/feature-gate-intrinsics.rs (100%) create mode 100644 src/test/ui/feature-gate-intrinsics.stderr rename src/test/{compile-fail => ui}/feature-gate-lang-items.rs (100%) create mode 100644 src/test/ui/feature-gate-lang-items.stderr rename src/test/{compile-fail => ui}/feature-gate-linker-flavor.rs (100%) create mode 100644 src/test/ui/feature-gate-linker-flavor.stderr rename src/test/{compile-fail => ui}/feature-gate-macro-vis-matcher.rs (100%) create mode 100644 src/test/ui/feature-gate-macro-vis-matcher.stderr rename src/test/{compile-fail => ui}/feature-gate-main.rs (100%) create mode 100644 src/test/ui/feature-gate-main.stderr rename src/test/{compile-fail => ui}/feature-gate-match_beginning_vert.rs (100%) create mode 100644 src/test/ui/feature-gate-match_beginning_vert.stderr rename src/test/{compile-fail => ui}/feature-gate-match_default_bindings.rs (100%) create mode 100644 src/test/ui/feature-gate-match_default_bindings.stderr rename src/test/{compile-fail => ui}/feature-gate-may-dangle.rs (100%) create mode 100644 src/test/ui/feature-gate-may-dangle.stderr rename src/test/{compile-fail => ui}/feature-gate-needs-allocator.rs (100%) create mode 100644 src/test/ui/feature-gate-needs-allocator.stderr rename src/test/{compile-fail => ui}/feature-gate-negate-unsigned.rs (100%) create mode 100644 src/test/ui/feature-gate-negate-unsigned.stderr rename src/test/{compile-fail => ui}/feature-gate-no-debug-2.rs (100%) create mode 100644 src/test/ui/feature-gate-no-debug-2.stderr rename src/test/{compile-fail => ui}/feature-gate-no-debug.rs (100%) create mode 100644 src/test/ui/feature-gate-no-debug.stderr rename src/test/{compile-fail => ui}/feature-gate-non_exhaustive.rs (100%) create mode 100644 src/test/ui/feature-gate-non_exhaustive.stderr rename src/test/{compile-fail => ui}/feature-gate-omit-gdb-pretty-printer-section.rs (100%) create mode 100644 src/test/ui/feature-gate-omit-gdb-pretty-printer-section.stderr rename src/test/{compile-fail => ui}/feature-gate-on-unimplemented.rs (100%) create mode 100644 src/test/ui/feature-gate-on-unimplemented.stderr rename src/test/{compile-fail => ui}/feature-gate-optin-builtin-traits.rs (100%) create mode 100644 src/test/ui/feature-gate-optin-builtin-traits.stderr rename src/test/{compile-fail => ui}/feature-gate-overlapping_marker_traits.rs (100%) create mode 100644 src/test/ui/feature-gate-overlapping_marker_traits.stderr rename src/test/{compile-fail => ui}/feature-gate-placement-expr.rs (100%) create mode 100644 src/test/ui/feature-gate-placement-expr.stderr rename src/test/{compile-fail => ui}/feature-gate-plugin.rs (100%) create mode 100644 src/test/ui/feature-gate-plugin.stderr rename src/test/{compile-fail => ui}/feature-gate-prelude_import.rs (100%) create mode 100644 src/test/ui/feature-gate-prelude_import.stderr rename src/test/{compile-fail => ui}/feature-gate-profiler-runtime.rs (100%) create mode 100644 src/test/ui/feature-gate-profiler-runtime.stderr rename src/test/{compile-fail => ui}/feature-gate-repr-simd.rs (100%) create mode 100644 src/test/ui/feature-gate-repr-simd.stderr rename src/test/{compile-fail => ui}/feature-gate-repr128.rs (100%) create mode 100644 src/test/ui/feature-gate-repr128.stderr rename src/test/{compile-fail => ui}/feature-gate-repr_align.rs (100%) create mode 100644 src/test/ui/feature-gate-repr_align.stderr rename src/test/{compile-fail => ui}/feature-gate-rustc-attrs.rs (100%) create mode 100644 src/test/ui/feature-gate-rustc-attrs.stderr rename src/test/{compile-fail => ui}/feature-gate-rustc-diagnostic-macros.rs (100%) create mode 100644 src/test/ui/feature-gate-rustc-diagnostic-macros.stderr rename src/test/{compile-fail => ui}/feature-gate-rustc_const_unstable.rs (100%) create mode 100644 src/test/ui/feature-gate-rustc_const_unstable.stderr rename src/test/{compile-fail => ui}/feature-gate-sanitizer-runtime.rs (100%) create mode 100644 src/test/ui/feature-gate-sanitizer-runtime.stderr rename src/test/{compile-fail => ui}/feature-gate-simd-ffi.rs (100%) create mode 100644 src/test/ui/feature-gate-simd-ffi.stderr rename src/test/{compile-fail => ui}/feature-gate-simd.rs (100%) create mode 100644 src/test/ui/feature-gate-simd.stderr rename src/test/{compile-fail => ui}/feature-gate-slice-patterns.rs (100%) create mode 100644 src/test/ui/feature-gate-slice-patterns.stderr rename src/test/{compile-fail => ui}/feature-gate-staged_api.rs (100%) create mode 100644 src/test/ui/feature-gate-staged_api.stderr rename src/test/{compile-fail => ui}/feature-gate-start.rs (100%) create mode 100644 src/test/ui/feature-gate-start.stderr rename src/test/{compile-fail => ui}/feature-gate-static-nobundle.rs (100%) create mode 100644 src/test/ui/feature-gate-static-nobundle.stderr rename src/test/{compile-fail => ui}/feature-gate-stmt_expr_attributes.rs (100%) create mode 100644 src/test/ui/feature-gate-stmt_expr_attributes.stderr rename src/test/{compile-fail => ui}/feature-gate-unboxed-closures-manual-impls.rs (100%) create mode 100644 src/test/ui/feature-gate-unboxed-closures-manual-impls.stderr rename src/test/{compile-fail => ui}/feature-gate-unboxed-closures-method-calls.rs (100%) create mode 100644 src/test/ui/feature-gate-unboxed-closures-method-calls.stderr rename src/test/{compile-fail => ui}/feature-gate-unboxed-closures-ufcs-calls.rs (100%) create mode 100644 src/test/ui/feature-gate-unboxed-closures-ufcs-calls.stderr rename src/test/{compile-fail => ui}/feature-gate-unboxed-closures.rs (100%) create mode 100644 src/test/ui/feature-gate-unboxed-closures.stderr rename src/test/{compile-fail => ui}/feature-gate-underscore-lifetimes.rs (100%) create mode 100644 src/test/ui/feature-gate-underscore-lifetimes.stderr rename src/test/{compile-fail/impl-trait => ui}/feature-gate-universal.rs (100%) create mode 100644 src/test/ui/feature-gate-universal.stderr rename src/test/{compile-fail => ui}/feature-gate-unsized_tuple_coercion.rs (100%) create mode 100644 src/test/ui/feature-gate-unsized_tuple_coercion.stderr rename src/test/{compile-fail => ui}/feature-gate-unwind-attributes.rs (100%) create mode 100644 src/test/ui/feature-gate-unwind-attributes.stderr rename src/test/{compile-fail => ui}/feature-gate-use_nested_groups.rs (100%) create mode 100644 src/test/ui/feature-gate-use_nested_groups.stderr rename src/test/{compile-fail => ui}/feature-gate-used.rs (100%) create mode 100644 src/test/ui/feature-gate-used.stderr rename src/test/{compile-fail => ui}/feature-gate-wasm_import_memory.rs (100%) create mode 100644 src/test/ui/feature-gate-wasm_import_memory.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-bench.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-bench.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-builtin-attrs.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-builtin-attrs.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-deprecated.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-deprecated.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-derive-2.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-derive-2.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-derive.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-derive.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-inline.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-inline.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-macro_escape.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-macro_escape.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-macro_use.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-macro_use.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-proc_macro_derive.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-proc_macro_derive.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-rustc_deprecated.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-rustc_deprecated.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-stable.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-stable.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-test.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-test.stderr rename src/test/{compile-fail => ui}/feature-gate/issue-43106-gating-of-unstable.rs (100%) create mode 100644 src/test/ui/feature-gate/issue-43106-gating-of-unstable.stderr 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 0000000000000..b05be6e4391b4 --- /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 0000000000000..7d2ad0be391c1 --- /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 0000000000000..815593d07a5f4 --- /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 0000000000000..f1f4705b3bbc1 --- /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 0000000000000..40bdde37ee8ce --- /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 0000000000000..60d72fbc3b335 --- /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 0000000000000..2fb86ce8f4e5b --- /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 0000000000000..a5740a1a78927 --- /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 0000000000000..65cd137459ae8 --- /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 0000000000000..2ef517cc9e131 --- /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 0000000000000..5e2884691682d --- /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 0000000000000..cef5adbd15a7d --- /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 0000000000000..0587995beb952 --- /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 0000000000000..f486373d225c3 --- /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 0000000000000..60dc6fbb57e96 --- /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 0000000000000..5daf5de7123d5 --- /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 0000000000000..9e2eea6e0a48e --- /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 0000000000000..c5709600dba70 --- /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 0000000000000..3e07aa1744080 --- /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 0000000000000..ebf42b2bdd894 --- /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 0000000000000..bc4b687800d75 --- /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 0000000000000..9b324672f2246 --- /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 0000000000000..b13c82ecfc907 --- /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 0000000000000..0862744b87b32 --- /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 0000000000000..49ce4eb10b615 --- /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 0000000000000..c2d8a934ab8e4 --- /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 0000000000000..11020765304f7 --- /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 0000000000000..b743a1e94bc75 --- /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 0000000000000..5319dcef2d5e6 --- /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 0000000000000..0555b485d4c05 --- /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 0000000000000..b030ebcd88141 --- /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 0000000000000..28ecfdf1131da --- /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 0000000000000..c6785d6f29da4 --- /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 0000000000000..3815862e89912 --- /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 0000000000000..5479ab8bc9128 --- /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 0000000000000..3d5f0d70bb2d7 --- /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 0000000000000..9b16e9be68ab3 --- /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 0000000000000..ed4953d27b85f --- /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 0000000000000..0fc75ee30b96a --- /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 0000000000000..82acb40133802 --- /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 0000000000000..7b2507e1fb141 --- /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 0000000000000..7e6c4288ff39c --- /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 0000000000000..de0ba1a7b3278 --- /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 0000000000000..3b03ef2dd338a --- /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 0000000000000..5382122e30edd --- /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 0000000000000..dab8ce23192a8 --- /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 0000000000000..383e75e3d1737 --- /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 0000000000000..09db5009165d1 --- /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 0000000000000..90cf12822c804 --- /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 0000000000000..88053adfafaa8 --- /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 0000000000000..d86e8248f088d --- /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 0000000000000..e51723d058e4b --- /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 0000000000000..5124c10cb472a --- /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 0000000000000..d4311594517c7 --- /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 0000000000000..231fc40011514 --- /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 0000000000000..83a8189c095b3 --- /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 0000000000000..775e65b90faaf --- /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 0000000000000..e50e1b4c0b5b1 --- /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 0000000000000..06944a14736cf --- /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 0000000000000..c5e9614c29ad7 --- /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 0000000000000..9028b14fcd7ad --- /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 0000000000000..fdb7b50671194 --- /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 0000000000000..b94d3299abcf7 --- /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 0000000000000..df44dfff40b77 --- /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 0000000000000..c3165438cdbc8 --- /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 0000000000000..a2ff06dd59ffe --- /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 0000000000000..2d32eda3b3718 --- /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 0000000000000..16fdc135a5fa8 --- /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 0000000000000..c818b57ef1219 --- /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 0000000000000..843879036ed4a --- /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 0000000000000..c32abb8b85748 --- /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 0000000000000..b9a43f8098d2d --- /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 0000000000000..fa47e1a2903cc --- /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 0000000000000..b3225d580bf05 --- /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 0000000000000..e5ba318b3365f --- /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 0000000000000..30593d45760ef --- /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 0000000000000..b36fae2aacfda --- /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 0000000000000..052516fad7691 --- /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 0000000000000..80910594d1c06 --- /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 0000000000000..280fc12f1a642 --- /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 0000000000000..1167bf0a6966a --- /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 0000000000000..7eb491cebfeb9 --- /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 0000000000000..b79165147e590 --- /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 0000000000000..875b958aa8804 --- /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 0000000000000..7f889f9622487 --- /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 0000000000000..f166b10613a26 --- /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 0000000000000..02d8bf914ebf8 --- /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 0000000000000..79f1d1a168f06 --- /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 0000000000000..228cf12a08b4d --- /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 0000000000000..c0486d0d5f57f --- /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 0000000000000..f7d5473f443fa --- /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 0000000000000..0e72442143b07 --- /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 0000000000000..a413fcc56a015 --- /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 0000000000000..c5b33384b917a --- /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 0000000000000..a0b12585f3c48 --- /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 0000000000000..92bda4d0446d9 --- /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 0000000000000..60a9382bdb8b1 --- /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 0000000000000..2977384f62db6 --- /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 0000000000000..a76f0219f7a81 --- /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 0000000000000..6f6f587cb5352 --- /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 0000000000000..59f0431c708da --- /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 0000000000000..f7d5473f443fa --- /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 0000000000000..00cbc62ab479f --- /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 + From 6dba3e68e670a3b1418b259ca5f3758444dd1a68 Mon Sep 17 00:00:00 2001 From: est31 Date: Wed, 6 Dec 2017 10:18:03 +0100 Subject: [PATCH 3/3] Migrate even more feature gate tests to ui We also rename some of the files to conform to the feature-gate-.rs pattern that is most common. --- src/test/compile-fail/no-core-gated.rs | 15 -- .../feature-gate-abi_unadjusted.rs} | 2 - .../ui/feature-gate-abi_unadjusted.stderr | 12 ++ .../asm-gated.rs => ui/feature-gate-asm.rs} | 2 - src/test/ui/feature-gate-asm.stderr | 10 ++ .../asm-gated2.rs => ui/feature-gate-asm2.rs} | 0 src/test/ui/feature-gate-asm2.stderr | 10 ++ ...ox-pat.rs => feature-gate-box_patterns.rs} | 2 - ...tderr => feature-gate-box_patterns.stderr} | 4 +- .../feature-gate-box_syntax.rs} | 2 - src/test/ui/feature-gate-box_syntax.stderr | 10 ++ .../feature-gate-concat_idents.rs} | 2 - src/test/ui/feature-gate-concat_idents.stderr | 18 +++ .../feature-gate-concat_idents2.rs} | 0 .../ui/feature-gate-concat_idents2.stderr | 10 ++ .../feature-gate-concat_idents3.rs} | 0 .../ui/feature-gate-concat_idents3.stderr | 18 +++ .../feature-gate-conservative_impl_trait.rs} | 2 - ...eature-gate-conservative_impl_trait.stderr | 10 ++ .../feature-gate-const_fn.rs} | 2 - src/test/ui/feature-gate-const_fn.stderr | 60 ++++++++ .../feature-gate-custom_attribute.rs} | 2 - .../ui/feature-gate-custom_attribute.stderr | 106 ++++++++++++++ .../feature-gate-custom_attribute2.rs} | 0 .../ui/feature-gate-custom_attribute2.stderr | 138 ++++++++++++++++++ .../feature-gate-custom_derive.rs} | 2 - src/test/ui/feature-gate-custom_derive.stderr | 10 ++ ...e-gate-default_type_parameter_fallback.rs} | 2 - ...ate-default_type_parameter_fallback.stderr | 21 +++ .../feature-gate-generic_param_attrs.rs} | 2 - .../feature-gate-generic_param_attrs.stderr | 138 ++++++++++++++++++ .../feature-gate-i128_type.rs} | 2 - src/test/ui/feature-gate-i128_type.stderr | 18 +++ .../feature-gate-i128_type2.rs} | 0 src/test/ui/feature-gate-i128_type2.stderr | 46 ++++++ .../feature-gate-link_args.rs} | 2 - src/test/ui/feature-gate-link_args.stderr | 26 ++++ .../feature-gate-link_cfg.rs} | 2 - src/test/ui/feature-gate-link_cfg.stderr | 10 ++ .../feature-gate-link_llvm_intrinsics.rs} | 2 - .../feature-gate-link_llvm_intrinsics.stderr | 10 ++ .../feature-gate-linkage.rs} | 2 - src/test/ui/feature-gate-linkage.stderr | 10 ++ .../feature-gate-log_syntax.rs} | 2 - src/test/ui/feature-gate-log_syntax.stderr | 10 ++ .../feature-gate-log_syntax2.rs} | 0 src/test/ui/feature-gate-log_syntax2.stderr | 10 ++ .../feature-gate-naked_functions.rs} | 2 - .../ui/feature-gate-naked_functions.stderr | 18 +++ .../feature-gate-never_type.rs} | 2 - src/test/ui/feature-gate-never_type.stderr | 42 ++++++ .../feature-gate-no_core.rs} | 2 - src/test/ui/feature-gate-no_core.stderr | 10 ++ .../feature-gate-non_ascii_idents.rs} | 2 - .../ui/feature-gate-non_ascii_idents.stderr | 122 ++++++++++++++++ .../feature-gate-plugin_registrar.rs} | 2 - .../ui/feature-gate-plugin_registrar.stderr | 10 ++ .../feature-gate-target_feature.rs} | 2 - .../ui/feature-gate-target_feature.stderr | 10 ++ .../feature-gate-thread_local.rs} | 2 - src/test/ui/feature-gate-thread_local.stderr | 10 ++ .../feature-gate-trace_macros.rs} | 2 - src/test/ui/feature-gate-trace_macros.stderr | 10 ++ .../feature-gate-type_ascription.rs} | 2 - .../ui/feature-gate-type_ascription.stderr | 10 ++ .../feature-gate-untagged_unions.rs} | 2 - .../ui/feature-gate-untagged_unions.stderr | 32 ++++ .../specialization-feature-gate-default.rs | 0 ...specialization-feature-gate-default.stderr | 10 ++ .../specialization-feature-gate-overlap.rs | 0 ...specialization-feature-gate-overlap.stderr | 15 ++ 71 files changed, 1012 insertions(+), 71 deletions(-) delete mode 100644 src/test/compile-fail/no-core-gated.rs rename src/test/{compile-fail/unadjusted-unstable.rs => ui/feature-gate-abi_unadjusted.rs} (95%) create mode 100644 src/test/ui/feature-gate-abi_unadjusted.stderr rename src/test/{compile-fail/asm-gated.rs => ui/feature-gate-asm.rs} (96%) create mode 100644 src/test/ui/feature-gate-asm.stderr rename src/test/{compile-fail/asm-gated2.rs => ui/feature-gate-asm2.rs} (100%) create mode 100644 src/test/ui/feature-gate-asm2.stderr rename src/test/ui/{feature-gate-box-pat.rs => feature-gate-box_patterns.rs} (95%) rename src/test/ui/{feature-gate-box-pat.stderr => feature-gate-box_patterns.stderr} (67%) rename src/test/{compile-fail/gated-box-syntax.rs => ui/feature-gate-box_syntax.rs} (96%) create mode 100644 src/test/ui/feature-gate-box_syntax.stderr rename src/test/{compile-fail/concat_idents-gate.rs => ui/feature-gate-concat_idents.rs} (96%) create mode 100644 src/test/ui/feature-gate-concat_idents.stderr rename src/test/{compile-fail/gated-concat_idents.rs => ui/feature-gate-concat_idents2.rs} (100%) create mode 100644 src/test/ui/feature-gate-concat_idents2.stderr rename src/test/{compile-fail/concat_idents-gate2.rs => ui/feature-gate-concat_idents3.rs} (100%) create mode 100644 src/test/ui/feature-gate-concat_idents3.stderr rename src/test/{compile-fail/impl-trait/feature-gate.rs => ui/feature-gate-conservative_impl_trait.rs} (93%) create mode 100644 src/test/ui/feature-gate-conservative_impl_trait.stderr rename src/test/{compile-fail/const-fn-stability.rs => ui/feature-gate-const_fn.rs} (98%) create mode 100644 src/test/ui/feature-gate-const_fn.stderr rename src/test/{compile-fail/attr-literals.rs => ui/feature-gate-custom_attribute.rs} (98%) create mode 100644 src/test/ui/feature-gate-custom_attribute.stderr rename src/test/{compile-fail/attr-on-generic-formals-are-visited.rs => ui/feature-gate-custom_attribute2.rs} (100%) create mode 100644 src/test/ui/feature-gate-custom_attribute2.stderr rename src/test/{compile-fail/single-derive-attr.rs => ui/feature-gate-custom_derive.rs} (95%) create mode 100644 src/test/ui/feature-gate-custom_derive.stderr rename src/test/{compile-fail/type-parameter-invalid-lint.rs => ui/feature-gate-default_type_parameter_fallback.rs} (94%) create mode 100644 src/test/ui/feature-gate-default_type_parameter_fallback.stderr rename src/test/{compile-fail/attr-on-generic-formals-wo-feature-gate.rs => ui/feature-gate-generic_param_attrs.rs} (98%) create mode 100644 src/test/ui/feature-gate-generic_param_attrs.stderr rename src/test/{compile-fail/i128-feature.rs => ui/feature-gate-i128_type.rs} (96%) create mode 100644 src/test/ui/feature-gate-i128_type.stderr rename src/test/{compile-fail/i128-feature-2.rs => ui/feature-gate-i128_type2.rs} (100%) create mode 100644 src/test/ui/feature-gate-i128_type2.stderr rename src/test/{compile-fail/gated-link-args.rs => ui/feature-gate-link_args.rs} (97%) create mode 100644 src/test/ui/feature-gate-link_args.stderr rename src/test/{compile-fail/link-cfg-gated.rs => ui/feature-gate-link_cfg.rs} (96%) create mode 100644 src/test/ui/feature-gate-link_cfg.stderr rename src/test/{compile-fail/gated-link-llvm-intrinsics.rs => ui/feature-gate-link_llvm_intrinsics.rs} (94%) create mode 100644 src/test/ui/feature-gate-link_llvm_intrinsics.stderr rename src/test/{compile-fail/linkage1.rs => ui/feature-gate-linkage.rs} (96%) create mode 100644 src/test/ui/feature-gate-linkage.stderr rename src/test/{compile-fail/log-syntax-gate.rs => ui/feature-gate-log_syntax.rs} (95%) create mode 100644 src/test/ui/feature-gate-log_syntax.stderr rename src/test/{compile-fail/log-syntax-gate2.rs => ui/feature-gate-log_syntax2.rs} (100%) create mode 100644 src/test/ui/feature-gate-log_syntax2.stderr rename src/test/{compile-fail/gated-naked_functions.rs => ui/feature-gate-naked_functions.rs} (95%) create mode 100644 src/test/ui/feature-gate-naked_functions.stderr rename src/test/{compile-fail/never-disabled.rs => ui/feature-gate-never_type.rs} (97%) create mode 100644 src/test/ui/feature-gate-never_type.stderr rename src/test/{compile-fail/gated-no-core.rs => ui/feature-gate-no_core.rs} (95%) create mode 100644 src/test/ui/feature-gate-no_core.stderr rename src/test/{compile-fail/gated-non-ascii-idents.rs => ui/feature-gate-non_ascii_idents.rs} (97%) create mode 100644 src/test/ui/feature-gate-non_ascii_idents.stderr rename src/test/{compile-fail/gated-plugin_registrar.rs => ui/feature-gate-plugin_registrar.rs} (95%) create mode 100644 src/test/ui/feature-gate-plugin_registrar.stderr rename src/test/{compile-fail/gated-target_feature.rs => ui/feature-gate-target_feature.rs} (95%) create mode 100644 src/test/ui/feature-gate-target_feature.stderr rename src/test/{compile-fail/gated-thread-local.rs => ui/feature-gate-thread_local.rs} (97%) create mode 100644 src/test/ui/feature-gate-thread_local.stderr rename src/test/{compile-fail/gated-trace_macros.rs => ui/feature-gate-trace_macros.rs} (95%) create mode 100644 src/test/ui/feature-gate-trace_macros.stderr rename src/test/{compile-fail/type-ascription-feature-gate.rs => ui/feature-gate-type_ascription.rs} (95%) create mode 100644 src/test/ui/feature-gate-type_ascription.stderr rename src/test/{compile-fail/union/union-feature-gate.rs => ui/feature-gate-untagged_unions.rs} (96%) create mode 100644 src/test/ui/feature-gate-untagged_unions.stderr rename src/test/{compile-fail/specialization => ui}/specialization-feature-gate-default.rs (100%) create mode 100644 src/test/ui/specialization-feature-gate-default.stderr rename src/test/{compile-fail/specialization => ui}/specialization-feature-gate-overlap.rs (100%) create mode 100644 src/test/ui/specialization-feature-gate-overlap.stderr diff --git a/src/test/compile-fail/no-core-gated.rs b/src/test/compile-fail/no-core-gated.rs deleted file mode 100644 index 27f8fda98ab34..0000000000000 --- a/src/test/compile-fail/no-core-gated.rs +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright 2015 The Rust Project Developers. See the COPYRIGHT -// file at the top-level directory of this distribution and at -// http://rust-lang.org/COPYRIGHT. -// -// Licensed under the Apache License, Version 2.0 or the MIT license -// , at your -// option. This file may not be copied, modified, or distributed -// except according to those terms. - -// gate-test-no_core - -#![no_core] //~ ERROR no_core is experimental - -fn main() {} diff --git a/src/test/compile-fail/unadjusted-unstable.rs b/src/test/ui/feature-gate-abi_unadjusted.rs similarity index 95% rename from src/test/compile-fail/unadjusted-unstable.rs rename to src/test/ui/feature-gate-abi_unadjusted.rs index 2c23050085d88..501f4451ed8d5 100644 --- a/src/test/compile-fail/unadjusted-unstable.rs +++ b/src/test/ui/feature-gate-abi_unadjusted.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-abi_unadjusted - extern "unadjusted" fn foo() { //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable } diff --git a/src/test/ui/feature-gate-abi_unadjusted.stderr b/src/test/ui/feature-gate-abi_unadjusted.stderr new file mode 100644 index 0000000000000..3cc43847156a1 --- /dev/null +++ b/src/test/ui/feature-gate-abi_unadjusted.stderr @@ -0,0 +1,12 @@ +error: unadjusted ABI is an implementation detail and perma-unstable + --> $DIR/feature-gate-abi_unadjusted.rs:11:1 + | +11 | / extern "unadjusted" fn foo() { +12 | | //~^ ERROR: unadjusted ABI is an implementation detail and perma-unstable +13 | | } + | |_^ + | + = help: add #![feature(abi_unadjusted)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/asm-gated.rs b/src/test/ui/feature-gate-asm.rs similarity index 96% rename from src/test/compile-fail/asm-gated.rs rename to src/test/ui/feature-gate-asm.rs index cd9cc22370149..8d053bdae789b 100644 --- a/src/test/compile-fail/asm-gated.rs +++ b/src/test/ui/feature-gate-asm.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-asm - fn main() { unsafe { asm!(""); //~ ERROR inline assembly is not stable enough diff --git a/src/test/ui/feature-gate-asm.stderr b/src/test/ui/feature-gate-asm.stderr new file mode 100644 index 0000000000000..ff68a4fb23ee1 --- /dev/null +++ b/src/test/ui/feature-gate-asm.stderr @@ -0,0 +1,10 @@ +error: inline assembly is not stable enough for use and is subject to change (see issue #29722) + --> $DIR/feature-gate-asm.rs:13:9 + | +13 | asm!(""); //~ ERROR inline assembly is not stable enough + | ^^^^^^^^^ + | + = help: add #![feature(asm)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/asm-gated2.rs b/src/test/ui/feature-gate-asm2.rs similarity index 100% rename from src/test/compile-fail/asm-gated2.rs rename to src/test/ui/feature-gate-asm2.rs diff --git a/src/test/ui/feature-gate-asm2.stderr b/src/test/ui/feature-gate-asm2.stderr new file mode 100644 index 0000000000000..1e02cede61dc7 --- /dev/null +++ b/src/test/ui/feature-gate-asm2.stderr @@ -0,0 +1,10 @@ +error: inline assembly is not stable enough for use and is subject to change (see issue #29722) + --> $DIR/feature-gate-asm2.rs:15:24 + | +15 | println!("{}", asm!("")); //~ ERROR inline assembly is not stable + | ^^^^^^^^ + | + = help: add #![feature(asm)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/ui/feature-gate-box-pat.rs b/src/test/ui/feature-gate-box_patterns.rs similarity index 95% rename from src/test/ui/feature-gate-box-pat.rs rename to src/test/ui/feature-gate-box_patterns.rs index c30f3952dbfbe..e64081823e74c 100644 --- a/src/test/ui/feature-gate-box-pat.rs +++ b/src/test/ui/feature-gate-box_patterns.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-box_patterns - fn main() { let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental println!("x: {}", x); diff --git a/src/test/ui/feature-gate-box-pat.stderr b/src/test/ui/feature-gate-box_patterns.stderr similarity index 67% rename from src/test/ui/feature-gate-box-pat.stderr rename to src/test/ui/feature-gate-box_patterns.stderr index 0587995beb952..0a30de58a1fce 100644 --- a/src/test/ui/feature-gate-box-pat.stderr +++ b/src/test/ui/feature-gate-box_patterns.stderr @@ -1,7 +1,7 @@ error: box pattern syntax is experimental (see issue #29641) - --> $DIR/feature-gate-box-pat.rs:14:9 + --> $DIR/feature-gate-box_patterns.rs:12:9 | -14 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental +12 | let box x = Box::new('c'); //~ ERROR box pattern syntax is experimental | ^^^^^ | = help: add #![feature(box_patterns)] to the crate attributes to enable diff --git a/src/test/compile-fail/gated-box-syntax.rs b/src/test/ui/feature-gate-box_syntax.rs similarity index 96% rename from src/test/compile-fail/gated-box-syntax.rs rename to src/test/ui/feature-gate-box_syntax.rs index 9a68ddb305960..a2643fe02b8f7 100644 --- a/src/test/compile-fail/gated-box-syntax.rs +++ b/src/test/ui/feature-gate-box_syntax.rs @@ -10,8 +10,6 @@ // Test that the use of the box syntax is gated by `box_syntax` feature gate. -// gate-test-box_syntax - fn main() { let x = box 3; //~^ ERROR box expression syntax is experimental; you can call `Box::new` instead. diff --git a/src/test/ui/feature-gate-box_syntax.stderr b/src/test/ui/feature-gate-box_syntax.stderr new file mode 100644 index 0000000000000..9b21dd03051bf --- /dev/null +++ b/src/test/ui/feature-gate-box_syntax.stderr @@ -0,0 +1,10 @@ +error: box expression syntax is experimental; you can call `Box::new` instead. (see issue #27779) + --> $DIR/feature-gate-box_syntax.rs:14:13 + | +14 | let x = box 3; + | ^^^^^ + | + = help: add #![feature(box_syntax)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/concat_idents-gate.rs b/src/test/ui/feature-gate-concat_idents.rs similarity index 96% rename from src/test/compile-fail/concat_idents-gate.rs rename to src/test/ui/feature-gate-concat_idents.rs index 5b125d0e51c08..f4d97445725cd 100644 --- a/src/test/compile-fail/concat_idents-gate.rs +++ b/src/test/ui/feature-gate-concat_idents.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-concat_idents - const XY_1: i32 = 10; fn main() { diff --git a/src/test/ui/feature-gate-concat_idents.stderr b/src/test/ui/feature-gate-concat_idents.stderr new file mode 100644 index 0000000000000..c980668c298b4 --- /dev/null +++ b/src/test/ui/feature-gate-concat_idents.stderr @@ -0,0 +1,18 @@ +error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) + --> $DIR/feature-gate-concat_idents.rs:15:13 + | +15 | let a = concat_idents!(X, Y_1); //~ ERROR `concat_idents` is not stable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(concat_idents)] to the crate attributes to enable + +error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) + --> $DIR/feature-gate-concat_idents.rs:16:13 + | +16 | let b = concat_idents!(X, Y_2); //~ ERROR `concat_idents` is not stable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(concat_idents)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/gated-concat_idents.rs b/src/test/ui/feature-gate-concat_idents2.rs similarity index 100% rename from src/test/compile-fail/gated-concat_idents.rs rename to src/test/ui/feature-gate-concat_idents2.rs diff --git a/src/test/ui/feature-gate-concat_idents2.stderr b/src/test/ui/feature-gate-concat_idents2.stderr new file mode 100644 index 0000000000000..9cfd954eec860 --- /dev/null +++ b/src/test/ui/feature-gate-concat_idents2.stderr @@ -0,0 +1,10 @@ +error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) + --> $DIR/feature-gate-concat_idents2.rs:14:5 + | +14 | concat_idents!(a, b); //~ ERROR `concat_idents` is not stable enough + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(concat_idents)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/concat_idents-gate2.rs b/src/test/ui/feature-gate-concat_idents3.rs similarity index 100% rename from src/test/compile-fail/concat_idents-gate2.rs rename to src/test/ui/feature-gate-concat_idents3.rs diff --git a/src/test/ui/feature-gate-concat_idents3.stderr b/src/test/ui/feature-gate-concat_idents3.stderr new file mode 100644 index 0000000000000..8399ca3c5018c --- /dev/null +++ b/src/test/ui/feature-gate-concat_idents3.stderr @@ -0,0 +1,18 @@ +error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) + --> $DIR/feature-gate-concat_idents3.rs:17:20 + | +17 | assert_eq!(10, concat_idents!(X, Y_1)); //~ ERROR `concat_idents` is not stable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(concat_idents)] to the crate attributes to enable + +error: `concat_idents` is not stable enough for use and is subject to change (see issue #29599) + --> $DIR/feature-gate-concat_idents3.rs:18:20 + | +18 | assert_eq!(20, concat_idents!(X, Y_2)); //~ ERROR `concat_idents` is not stable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(concat_idents)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/impl-trait/feature-gate.rs b/src/test/ui/feature-gate-conservative_impl_trait.rs similarity index 93% rename from src/test/compile-fail/impl-trait/feature-gate.rs rename to src/test/ui/feature-gate-conservative_impl_trait.rs index d46a16450db52..7a3ae639bfc89 100644 --- a/src/test/compile-fail/impl-trait/feature-gate.rs +++ b/src/test/ui/feature-gate-conservative_impl_trait.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-conservative_impl_trait - fn foo() -> impl Fn() { || {} } //~^ ERROR `impl Trait` in return position is experimental diff --git a/src/test/ui/feature-gate-conservative_impl_trait.stderr b/src/test/ui/feature-gate-conservative_impl_trait.stderr new file mode 100644 index 0000000000000..72a4f52926a6c --- /dev/null +++ b/src/test/ui/feature-gate-conservative_impl_trait.stderr @@ -0,0 +1,10 @@ +error: `impl Trait` in return position is experimental (see issue #34511) + --> $DIR/feature-gate-conservative_impl_trait.rs:11:13 + | +11 | fn foo() -> impl Fn() { || {} } + | ^^^^^^^^^ + | + = help: add #![feature(conservative_impl_trait)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/const-fn-stability.rs b/src/test/ui/feature-gate-const_fn.rs similarity index 98% rename from src/test/compile-fail/const-fn-stability.rs rename to src/test/ui/feature-gate-const_fn.rs index d093364497a92..1d1dedddaaa3e 100644 --- a/src/test/compile-fail/const-fn-stability.rs +++ b/src/test/ui/feature-gate-const_fn.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-const_fn - // Test use of const fn without feature gate. const fn foo() -> usize { 0 } //~ ERROR const fn is unstable diff --git a/src/test/ui/feature-gate-const_fn.stderr b/src/test/ui/feature-gate-const_fn.stderr new file mode 100644 index 0000000000000..c62229ac71bad --- /dev/null +++ b/src/test/ui/feature-gate-const_fn.stderr @@ -0,0 +1,60 @@ +error[E0379]: trait fns cannot be declared const + --> $DIR/feature-gate-const_fn.rs:16:5 + | +16 | const fn foo() -> u32; //~ ERROR const fn is unstable + | ^^^^^ trait fns cannot be const + +error[E0379]: trait fns cannot be declared const + --> $DIR/feature-gate-const_fn.rs:18:5 + | +18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable + | ^^^^^ trait fns cannot be const + +error[E0379]: trait fns cannot be declared const + --> $DIR/feature-gate-const_fn.rs:27:5 + | +27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable + | ^^^^^ trait fns cannot be const + +error: const fn is unstable (see issue #24111) + --> $DIR/feature-gate-const_fn.rs:13:1 + | +13 | const fn foo() -> usize { 0 } //~ ERROR const fn is unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: const fn is unstable (see issue #24111) + --> $DIR/feature-gate-const_fn.rs:16:5 + | +16 | const fn foo() -> u32; //~ ERROR const fn is unstable + | ^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: const fn is unstable (see issue #24111) + --> $DIR/feature-gate-const_fn.rs:18:5 + | +18 | const fn bar() -> u32 { 0 } //~ ERROR const fn is unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: const fn is unstable (see issue #24111) + --> $DIR/feature-gate-const_fn.rs:23:5 + | +23 | const fn baz() -> u32 { 0 } //~ ERROR const fn is unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: const fn is unstable (see issue #24111) + --> $DIR/feature-gate-const_fn.rs:27:5 + | +27 | const fn foo() -> u32 { 0 } //~ ERROR const fn is unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(const_fn)] to the crate attributes to enable + +error: aborting due to 8 previous errors + diff --git a/src/test/compile-fail/attr-literals.rs b/src/test/ui/feature-gate-custom_attribute.rs similarity index 98% rename from src/test/compile-fail/attr-literals.rs rename to src/test/ui/feature-gate-custom_attribute.rs index e77fde845ae16..b54288035175d 100644 --- a/src/test/compile-fail/attr-literals.rs +++ b/src/test/ui/feature-gate-custom_attribute.rs @@ -10,8 +10,6 @@ // Check that literals in attributes parse just fine. -// gate-test-custom_attribute - #![feature(rustc_attrs, attr_literals)] #![allow(dead_code)] #![allow(unused_variables)] diff --git a/src/test/ui/feature-gate-custom_attribute.stderr b/src/test/ui/feature-gate-custom_attribute.stderr new file mode 100644 index 0000000000000..866ebfe8f2f3a --- /dev/null +++ b/src/test/ui/feature-gate-custom_attribute.stderr @@ -0,0 +1,106 @@ +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:17:1 + | +17 | #[fake_attr] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:18:1 + | +18 | #[fake_attr(100)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:19:1 + | +19 | #[fake_attr(1, 2, 3)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:20:1 + | +20 | #[fake_attr("hello")] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:21:1 + | +21 | #[fake_attr(name = "hello")] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:22:1 + | +22 | #[fake_attr(1, "hi", key = 12, true, false)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:23:1 + | +23 | #[fake_attr(key = "hello", val = 10)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:24:1 + | +24 | #[fake_attr(key("hello"), val(10))] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:25:1 + | +25 | #[fake_attr(enabled = true, disabled = false)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:26:1 + | +26 | #[fake_attr(true)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:27:1 + | +27 | #[fake_attr(pi = 3.14159)] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_attr` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:28:1 + | +28 | #[fake_attr(b"hi")] //~ ERROR attribute `fake_attr` is currently unknown + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `fake_doc` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute.rs:29:1 + | +29 | #[fake_doc(r"doc")] //~ ERROR attribute `fake_doc` is currently unknown + | ^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: aborting due to 13 previous errors + diff --git a/src/test/compile-fail/attr-on-generic-formals-are-visited.rs b/src/test/ui/feature-gate-custom_attribute2.rs similarity index 100% rename from src/test/compile-fail/attr-on-generic-formals-are-visited.rs rename to src/test/ui/feature-gate-custom_attribute2.rs diff --git a/src/test/ui/feature-gate-custom_attribute2.stderr b/src/test/ui/feature-gate-custom_attribute2.stderr new file mode 100644 index 0000000000000..3e4ea58a7a3fb --- /dev/null +++ b/src/test/ui/feature-gate-custom_attribute2.stderr @@ -0,0 +1,138 @@ +error: The attribute `lt_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:23:13 + | +23 | struct StLt<#[lt_struct] 'a>(&'a u32); + | ^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_struct` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:25:13 + | +25 | struct StTy<#[ty_struct] I>(I); + | ^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:28:11 + | +28 | enum EnLt<#[lt_enum] 'b> { A(&'b u32), B } + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_enum` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:30:11 + | +30 | enum EnTy<#[ty_enum] J> { A(J), B } + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:33:12 + | +33 | trait TrLt<#[lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } + | ^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_trait` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:35:12 + | +35 | trait TrTy<#[ty_trait] K> { fn foo(&self, _: K); } + | ^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:38:11 + | +38 | type TyLt<#[lt_type] 'd> = &'d u32; + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_type` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:40:11 + | +40 | type TyTy<#[ty_type] L> = (L, ); + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:43:6 + | +43 | impl<#[lt_inherent] 'e> StLt<'e> { } + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_inherent` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:45:6 + | +45 | impl<#[ty_inherent] M> StTy { } + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:48:6 + | +48 | impl<#[lt_impl_for] 'f> TrLt<'f> for StLt<'f> { + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_impl_for` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:52:6 + | +52 | impl<#[ty_impl_for] N> TrTy for StTy { + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:57:9 + | +57 | fn f_lt<#[lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } + | ^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_fn` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:59:9 + | +59 | fn f_ty<#[ty_fn] O>(_: O) { } + | ^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:63:13 + | +63 | fn m_lt<#[lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `ty_meth` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:65:13 + | +65 | fn m_ty<#[ty_meth] P>(_: P) { } + | ^^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: The attribute `lt_hof` is currently unknown to the compiler and may have meaning added to it in the future (see issue #29642) + --> $DIR/feature-gate-custom_attribute2.rs:70:19 + | +70 | where Q: for <#[lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 + | ^^^^^^^^^ + | + = help: add #![feature(custom_attribute)] to the crate attributes to enable + +error: aborting due to 17 previous errors + diff --git a/src/test/compile-fail/single-derive-attr.rs b/src/test/ui/feature-gate-custom_derive.rs similarity index 95% rename from src/test/compile-fail/single-derive-attr.rs rename to src/test/ui/feature-gate-custom_derive.rs index cd37611aceda9..0b1b3141f5bf7 100644 --- a/src/test/compile-fail/single-derive-attr.rs +++ b/src/test/ui/feature-gate-custom_derive.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-custom_derive - #[derive_Clone] //~^ ERROR attributes of the form `#[derive_*]` are reserved struct Test; diff --git a/src/test/ui/feature-gate-custom_derive.stderr b/src/test/ui/feature-gate-custom_derive.stderr new file mode 100644 index 0000000000000..e806c80863119 --- /dev/null +++ b/src/test/ui/feature-gate-custom_derive.stderr @@ -0,0 +1,10 @@ +error: attributes of the form `#[derive_*]` are reserved for the compiler (see issue #29644) + --> $DIR/feature-gate-custom_derive.rs:11:1 + | +11 | #[derive_Clone] + | ^^^^^^^^^^^^^^^ + | + = help: add #![feature(custom_derive)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/type-parameter-invalid-lint.rs b/src/test/ui/feature-gate-default_type_parameter_fallback.rs similarity index 94% rename from src/test/compile-fail/type-parameter-invalid-lint.rs rename to src/test/ui/feature-gate-default_type_parameter_fallback.rs index f424cbf0c32a6..ccc5ec49f1302 100644 --- a/src/test/compile-fail/type-parameter-invalid-lint.rs +++ b/src/test/ui/feature-gate-default_type_parameter_fallback.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-default_type_parameter_fallback - #![allow(unused)] fn avg(_: T) {} diff --git a/src/test/ui/feature-gate-default_type_parameter_fallback.stderr b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr new file mode 100644 index 0000000000000..d756a69e8c1ec --- /dev/null +++ b/src/test/ui/feature-gate-default_type_parameter_fallback.stderr @@ -0,0 +1,21 @@ +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. + --> $DIR/feature-gate-default_type_parameter_fallback.rs:13:8 + | +13 | fn avg(_: T) {} + | ^ + | + = note: #[deny(invalid_type_param_default)] on by default + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #36887 + +error: defaults for type parameters are only allowed in `struct`, `enum`, `type`, or `trait` definitions. + --> $DIR/feature-gate-default_type_parameter_fallback.rs:18:6 + | +18 | impl S {} + | ^ + | + = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! + = note: for more information, see issue #36887 + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs b/src/test/ui/feature-gate-generic_param_attrs.rs similarity index 98% rename from src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs rename to src/test/ui/feature-gate-generic_param_attrs.rs index b341f7c78257a..944802f450a6d 100644 --- a/src/test/compile-fail/attr-on-generic-formals-wo-feature-gate.rs +++ b/src/test/ui/feature-gate-generic_param_attrs.rs @@ -16,8 +16,6 @@ // using `rustc_attrs` feature. There is a separate compile-fail/ test // ensuring that the attribute feature-gating works in this context.) -// gate-test-generic_param_attrs - #![feature(rustc_attrs)] #![allow(dead_code)] diff --git a/src/test/ui/feature-gate-generic_param_attrs.stderr b/src/test/ui/feature-gate-generic_param_attrs.stderr new file mode 100644 index 0000000000000..da2e64030292c --- /dev/null +++ b/src/test/ui/feature-gate-generic_param_attrs.stderr @@ -0,0 +1,138 @@ +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:22:13 + | +22 | struct StLt<#[rustc_lt_struct] 'a>(&'a u32); + | ^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:24:13 + | +24 | struct StTy<#[rustc_ty_struct] I>(I); + | ^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:27:11 + | +27 | enum EnLt<#[rustc_lt_enum] 'b> { A(&'b u32), B } + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:29:11 + | +29 | enum EnTy<#[rustc_ty_enum] J> { A(J), B } + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:32:12 + | +32 | trait TrLt<#[rustc_lt_trait] 'c> { fn foo(&self, _: &'c [u32]) -> &'c u32; } + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:34:12 + | +34 | trait TrTy<#[rustc_ty_trait] K> { fn foo(&self, _: K); } + | ^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:37:11 + | +37 | type TyLt<#[rustc_lt_type] 'd> = &'d u32; + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:39:11 + | +39 | type TyTy<#[rustc_ty_type] L> = (L, ); + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:42:6 + | +42 | impl<#[rustc_lt_inherent] 'e> StLt<'e> { } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:44:6 + | +44 | impl<#[rustc_ty_inherent] M> StTy { } + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:47:6 + | +47 | impl<#[rustc_lt_impl_for] 'f> TrLt<'f> for StLt<'f> { + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:51:6 + | +51 | impl<#[rustc_ty_impl_for] N> TrTy for StTy { + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:56:9 + | +56 | fn f_lt<#[rustc_lt_fn] 'g>(_: &'g [u32]) -> &'g u32 { loop { } } + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:58:9 + | +58 | fn f_ty<#[rustc_ty_fn] O>(_: O) { } + | ^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:62:13 + | +62 | fn m_lt<#[rustc_lt_meth] 'h>(_: &'h [u32]) -> &'h u32 { loop { } } + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on type parameter bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:64:13 + | +64 | fn m_ty<#[rustc_ty_meth] P>(_: P) { } + | ^^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: attributes on lifetime bindings are experimental (see issue #34761) + --> $DIR/feature-gate-generic_param_attrs.rs:69:19 + | +69 | where Q: for <#[rustc_lt_hof] 'i> Fn(&'i [u32]) -> &'i u32 + | ^^^^^^^^^^^^^^^ + | + = help: add #![feature(generic_param_attrs)] to the crate attributes to enable + +error: aborting due to 17 previous errors + diff --git a/src/test/compile-fail/i128-feature.rs b/src/test/ui/feature-gate-i128_type.rs similarity index 96% rename from src/test/compile-fail/i128-feature.rs rename to src/test/ui/feature-gate-i128_type.rs index e94fd14a42163..ddb49a3e5d92a 100644 --- a/src/test/compile-fail/i128-feature.rs +++ b/src/test/ui/feature-gate-i128_type.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-i128_type - fn test2() { 0i128; //~ ERROR 128-bit integers are not stable } diff --git a/src/test/ui/feature-gate-i128_type.stderr b/src/test/ui/feature-gate-i128_type.stderr new file mode 100644 index 0000000000000..df623cac49a94 --- /dev/null +++ b/src/test/ui/feature-gate-i128_type.stderr @@ -0,0 +1,18 @@ +error: 128-bit integers are not stable (see issue #35118) + --> $DIR/feature-gate-i128_type.rs:12:5 + | +12 | 0i128; //~ ERROR 128-bit integers are not stable + | ^^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error: 128-bit integers are not stable (see issue #35118) + --> $DIR/feature-gate-i128_type.rs:16:5 + | +16 | 0u128; //~ ERROR 128-bit integers are not stable + | ^^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/i128-feature-2.rs b/src/test/ui/feature-gate-i128_type2.rs similarity index 100% rename from src/test/compile-fail/i128-feature-2.rs rename to src/test/ui/feature-gate-i128_type2.rs diff --git a/src/test/ui/feature-gate-i128_type2.stderr b/src/test/ui/feature-gate-i128_type2.stderr new file mode 100644 index 0000000000000..26653a5739b2c --- /dev/null +++ b/src/test/ui/feature-gate-i128_type2.stderr @@ -0,0 +1,46 @@ +error: 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-i128_type2.rs:13:15 + | +13 | fn test1() -> i128 { //~ ERROR 128-bit type is unstable + | ^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error: 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-i128_type2.rs:17:17 + | +17 | fn test1_2() -> u128 { //~ ERROR 128-bit type is unstable + | ^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error: 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-i128_type2.rs:22:12 + | +22 | let x: i128 = 0; //~ ERROR 128-bit type is unstable + | ^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error: 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-i128_type2.rs:26:12 + | +26 | let x: u128 = 0; //~ ERROR 128-bit type is unstable + | ^^^^ + | + = help: add #![feature(i128_type)] to the crate attributes to enable + +error[E0601]: main function not found + +error: repr with 128-bit type is unstable (see issue #35118) + --> $DIR/feature-gate-i128_type2.rs:30:1 + | +30 | / enum A { //~ ERROR 128-bit type is unstable +31 | | A(u64) +32 | | } + | |_^ + | + = help: add #![feature(repr128)] to the crate attributes to enable + +error: aborting due to 6 previous errors + diff --git a/src/test/compile-fail/gated-link-args.rs b/src/test/ui/feature-gate-link_args.rs similarity index 97% rename from src/test/compile-fail/gated-link-args.rs rename to src/test/ui/feature-gate-link_args.rs index 82f5db3042b77..bd48ac673dd34 100644 --- a/src/test/compile-fail/gated-link-args.rs +++ b/src/test/ui/feature-gate-link_args.rs @@ -12,8 +12,6 @@ // feature gate, both when it occurs where expected (atop // `extern { }` blocks) and where unexpected. -// gate-test-link_args - // sidestep warning (which is correct, but misleading for // purposes of this test) #![allow(unused_attributes)] diff --git a/src/test/ui/feature-gate-link_args.stderr b/src/test/ui/feature-gate-link_args.stderr new file mode 100644 index 0000000000000..d6d059007d1f3 --- /dev/null +++ b/src/test/ui/feature-gate-link_args.stderr @@ -0,0 +1,26 @@ +error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) + --> $DIR/feature-gate-link_args.rs:22:1 + | +22 | #[link_args = "-l expected_use_case"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(link_args)] to the crate attributes to enable + +error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) + --> $DIR/feature-gate-link_args.rs:26:1 + | +26 | #[link_args = "-l unexected_use_on_non_extern_item"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(link_args)] to the crate attributes to enable + +error: the `link_args` attribute is experimental and not portable across platforms, it is recommended to use `#[link(name = "foo")] instead (see issue #29596) + --> $DIR/feature-gate-link_args.rs:19:1 + | +19 | #![link_args = "-l unexpected_use_as_inner_attr_on_mod"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(link_args)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/link-cfg-gated.rs b/src/test/ui/feature-gate-link_cfg.rs similarity index 96% rename from src/test/compile-fail/link-cfg-gated.rs rename to src/test/ui/feature-gate-link_cfg.rs index bb6fb9e356352..27918a27caf50 100644 --- a/src/test/compile-fail/link-cfg-gated.rs +++ b/src/test/ui/feature-gate-link_cfg.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-link_cfg - #[link(name = "foo", cfg(foo))] //~^ ERROR: is feature gated extern {} diff --git a/src/test/ui/feature-gate-link_cfg.stderr b/src/test/ui/feature-gate-link_cfg.stderr new file mode 100644 index 0000000000000..bbc52bd9d20af --- /dev/null +++ b/src/test/ui/feature-gate-link_cfg.stderr @@ -0,0 +1,10 @@ +error: is feature gated (see issue #37406) + --> $DIR/feature-gate-link_cfg.rs:11:1 + | +11 | #[link(name = "foo", cfg(foo))] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(link_cfg)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-link-llvm-intrinsics.rs b/src/test/ui/feature-gate-link_llvm_intrinsics.rs similarity index 94% rename from src/test/compile-fail/gated-link-llvm-intrinsics.rs rename to src/test/ui/feature-gate-link_llvm_intrinsics.rs index 681824ae71dd0..92a1b071437e6 100644 --- a/src/test/compile-fail/gated-link-llvm-intrinsics.rs +++ b/src/test/ui/feature-gate-link_llvm_intrinsics.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-link_llvm_intrinsics - extern { #[link_name = "llvm.sqrt.f32"] fn sqrt(x: f32) -> f32; diff --git a/src/test/ui/feature-gate-link_llvm_intrinsics.stderr b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr new file mode 100644 index 0000000000000..b2e2caaa51af3 --- /dev/null +++ b/src/test/ui/feature-gate-link_llvm_intrinsics.stderr @@ -0,0 +1,10 @@ +error: linking to LLVM intrinsics is experimental (see issue #29602) + --> $DIR/feature-gate-link_llvm_intrinsics.rs:13:5 + | +13 | fn sqrt(x: f32) -> f32; + | ^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(link_llvm_intrinsics)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/linkage1.rs b/src/test/ui/feature-gate-linkage.rs similarity index 96% rename from src/test/compile-fail/linkage1.rs rename to src/test/ui/feature-gate-linkage.rs index 1cf208f021588..555cc2b9a7aad 100644 --- a/src/test/compile-fail/linkage1.rs +++ b/src/test/ui/feature-gate-linkage.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-linkage - extern { #[linkage = "extern_weak"] static foo: isize; //~^ ERROR: the `linkage` attribute is experimental and not portable diff --git a/src/test/ui/feature-gate-linkage.stderr b/src/test/ui/feature-gate-linkage.stderr new file mode 100644 index 0000000000000..62d857ddf2c06 --- /dev/null +++ b/src/test/ui/feature-gate-linkage.stderr @@ -0,0 +1,10 @@ +error: the `linkage` attribute is experimental and not portable across platforms (see issue #29603) + --> $DIR/feature-gate-linkage.rs:12:5 + | +12 | #[linkage = "extern_weak"] static foo: isize; + | ^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(linkage)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/log-syntax-gate.rs b/src/test/ui/feature-gate-log_syntax.rs similarity index 95% rename from src/test/compile-fail/log-syntax-gate.rs rename to src/test/ui/feature-gate-log_syntax.rs index b9688af35dc90..63c66e53c5ee8 100644 --- a/src/test/compile-fail/log-syntax-gate.rs +++ b/src/test/ui/feature-gate-log_syntax.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-log_syntax - fn main() { log_syntax!() //~ ERROR `log_syntax!` is not stable enough } diff --git a/src/test/ui/feature-gate-log_syntax.stderr b/src/test/ui/feature-gate-log_syntax.stderr new file mode 100644 index 0000000000000..f1c0d305f6c31 --- /dev/null +++ b/src/test/ui/feature-gate-log_syntax.stderr @@ -0,0 +1,10 @@ +error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) + --> $DIR/feature-gate-log_syntax.rs:12:5 + | +12 | log_syntax!() //~ ERROR `log_syntax!` is not stable enough + | ^^^^^^^^^^^^^ + | + = help: add #![feature(log_syntax)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/log-syntax-gate2.rs b/src/test/ui/feature-gate-log_syntax2.rs similarity index 100% rename from src/test/compile-fail/log-syntax-gate2.rs rename to src/test/ui/feature-gate-log_syntax2.rs diff --git a/src/test/ui/feature-gate-log_syntax2.stderr b/src/test/ui/feature-gate-log_syntax2.stderr new file mode 100644 index 0000000000000..b1bb5557eed14 --- /dev/null +++ b/src/test/ui/feature-gate-log_syntax2.stderr @@ -0,0 +1,10 @@ +error: `log_syntax!` is not stable enough for use and is subject to change (see issue #29598) + --> $DIR/feature-gate-log_syntax2.rs:14:20 + | +14 | println!("{}", log_syntax!()); //~ ERROR `log_syntax!` is not stable + | ^^^^^^^^^^^^^ + | + = help: add #![feature(log_syntax)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-naked_functions.rs b/src/test/ui/feature-gate-naked_functions.rs similarity index 95% rename from src/test/compile-fail/gated-naked_functions.rs rename to src/test/ui/feature-gate-naked_functions.rs index 5eb4118102768..ceb475e119217 100644 --- a/src/test/compile-fail/gated-naked_functions.rs +++ b/src/test/ui/feature-gate-naked_functions.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-naked_functions - #[naked] //~^ the `#[naked]` attribute is an experimental feature fn naked() {} diff --git a/src/test/ui/feature-gate-naked_functions.stderr b/src/test/ui/feature-gate-naked_functions.stderr new file mode 100644 index 0000000000000..9655982574ca3 --- /dev/null +++ b/src/test/ui/feature-gate-naked_functions.stderr @@ -0,0 +1,18 @@ +error: the `#[naked]` attribute is an experimental feature (see issue #32408) + --> $DIR/feature-gate-naked_functions.rs:11:1 + | +11 | #[naked] + | ^^^^^^^^ + | + = help: add #![feature(naked_functions)] to the crate attributes to enable + +error: the `#[naked]` attribute is an experimental feature (see issue #32408) + --> $DIR/feature-gate-naked_functions.rs:15:1 + | +15 | #[naked] + | ^^^^^^^^ + | + = help: add #![feature(naked_functions)] to the crate attributes to enable + +error: aborting due to 2 previous errors + diff --git a/src/test/compile-fail/never-disabled.rs b/src/test/ui/feature-gate-never_type.rs similarity index 97% rename from src/test/compile-fail/never-disabled.rs rename to src/test/ui/feature-gate-never_type.rs index fb6b34fcbb676..11b9f412957eb 100644 --- a/src/test/compile-fail/never-disabled.rs +++ b/src/test/ui/feature-gate-never_type.rs @@ -10,8 +10,6 @@ // Test that ! errors when used in illegal positions with feature(never_type) disabled -// gate-test-never_type - trait Foo { type Wub; } diff --git a/src/test/ui/feature-gate-never_type.stderr b/src/test/ui/feature-gate-never_type.stderr new file mode 100644 index 0000000000000..c242e613ead75 --- /dev/null +++ b/src/test/ui/feature-gate-never_type.stderr @@ -0,0 +1,42 @@ +error: The `!` type is experimental (see issue #35121) + --> $DIR/feature-gate-never_type.rs:17:17 + | +17 | type Ma = (u32, !, i32); //~ ERROR type is experimental + | ^ + | + = help: add #![feature(never_type)] to the crate attributes to enable + +error: The `!` type is experimental (see issue #35121) + --> $DIR/feature-gate-never_type.rs:18:20 + | +18 | type Meeshka = Vec; //~ ERROR type is experimental + | ^ + | + = help: add #![feature(never_type)] to the crate attributes to enable + +error: The `!` type is experimental (see issue #35121) + --> $DIR/feature-gate-never_type.rs:19:16 + | +19 | type Mow = &fn(!) -> !; //~ ERROR type is experimental + | ^ + | + = help: add #![feature(never_type)] to the crate attributes to enable + +error: The `!` type is experimental (see issue #35121) + --> $DIR/feature-gate-never_type.rs:20:19 + | +20 | type Skwoz = &mut !; //~ ERROR type is experimental + | ^ + | + = help: add #![feature(never_type)] to the crate attributes to enable + +error: The `!` type is experimental (see issue #35121) + --> $DIR/feature-gate-never_type.rs:23:16 + | +23 | type Wub = !; //~ ERROR type is experimental + | ^ + | + = help: add #![feature(never_type)] to the crate attributes to enable + +error: aborting due to 5 previous errors + diff --git a/src/test/compile-fail/gated-no-core.rs b/src/test/ui/feature-gate-no_core.rs similarity index 95% rename from src/test/compile-fail/gated-no-core.rs rename to src/test/ui/feature-gate-no_core.rs index 66b9c2e56705f..0a55a8a78ce5a 100644 --- a/src/test/compile-fail/gated-no-core.rs +++ b/src/test/ui/feature-gate-no_core.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-no_core - #![no_core] //~ ERROR no_core is experimental fn main() {} diff --git a/src/test/ui/feature-gate-no_core.stderr b/src/test/ui/feature-gate-no_core.stderr new file mode 100644 index 0000000000000..02e0b17624968 --- /dev/null +++ b/src/test/ui/feature-gate-no_core.stderr @@ -0,0 +1,10 @@ +error: no_core is experimental (see issue #29639) + --> $DIR/feature-gate-no_core.rs:11:1 + | +11 | #![no_core] //~ ERROR no_core is experimental + | ^^^^^^^^^^^ + | + = help: add #![feature(no_core)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-non-ascii-idents.rs b/src/test/ui/feature-gate-non_ascii_idents.rs similarity index 97% rename from src/test/compile-fail/gated-non-ascii-idents.rs rename to src/test/ui/feature-gate-non_ascii_idents.rs index 1dff22839ad87..9e042c3a7d50e 100644 --- a/src/test/compile-fail/gated-non-ascii-idents.rs +++ b/src/test/ui/feature-gate-non_ascii_idents.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-non_ascii_idents - extern crate core as bäz; //~ ERROR non-ascii idents use föö::bar; //~ ERROR non-ascii idents diff --git a/src/test/ui/feature-gate-non_ascii_idents.stderr b/src/test/ui/feature-gate-non_ascii_idents.stderr new file mode 100644 index 0000000000000..df6ce6b616268 --- /dev/null +++ b/src/test/ui/feature-gate-non_ascii_idents.stderr @@ -0,0 +1,122 @@ +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:11:1 + | +11 | extern crate core as bäz; //~ ERROR non-ascii idents + | ^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:13:5 + | +13 | use föö::bar; //~ ERROR non-ascii idents + | ^^^^^^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:15:1 + | +15 | / mod föö { //~ ERROR non-ascii idents +16 | | pub fn bar() {} +17 | | } + | |_^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:19:1 + | +19 | / fn bär( //~ ERROR non-ascii idents +20 | | bäz: isize //~ ERROR non-ascii idents +21 | | ) { +22 | | let _ö: isize; //~ ERROR non-ascii idents +... | +26 | | } +27 | | } + | |_^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:20:5 + | +20 | bäz: isize //~ ERROR non-ascii idents + | ^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:22:9 + | +22 | let _ö: isize; //~ ERROR non-ascii idents + | ^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:25:10 + | +25 | (_ä, _) => {} //~ ERROR non-ascii idents + | ^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:29:1 + | +29 | / struct Föö { //~ ERROR non-ascii idents +30 | | föö: isize //~ ERROR non-ascii idents +31 | | } + | |_^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:30:5 + | +30 | föö: isize //~ ERROR non-ascii idents + | ^^^^^^^^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:33:1 + | +33 | / enum Bär { //~ ERROR non-ascii idents +34 | | Bäz { //~ ERROR non-ascii idents +35 | | qüx: isize //~ ERROR non-ascii idents +36 | | } +37 | | } + | |_^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:34:5 + | +34 | / Bäz { //~ ERROR non-ascii idents +35 | | qüx: isize //~ ERROR non-ascii idents +36 | | } + | |_____^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:35:9 + | +35 | qüx: isize //~ ERROR non-ascii idents + | ^^^^^^^^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: non-ascii idents are not fully supported. (see issue #28979) + --> $DIR/feature-gate-non_ascii_idents.rs:40:5 + | +40 | fn qüx(); //~ ERROR non-ascii idents + | ^^^^^^^^^ + | + = help: add #![feature(non_ascii_idents)] to the crate attributes to enable + +error: aborting due to 13 previous errors + diff --git a/src/test/compile-fail/gated-plugin_registrar.rs b/src/test/ui/feature-gate-plugin_registrar.rs similarity index 95% rename from src/test/compile-fail/gated-plugin_registrar.rs rename to src/test/ui/feature-gate-plugin_registrar.rs index 8d185d183b419..9cdebde7b7b98 100644 --- a/src/test/compile-fail/gated-plugin_registrar.rs +++ b/src/test/ui/feature-gate-plugin_registrar.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-plugin_registrar - // Test that `#[plugin_registrar]` attribute is gated by `plugin_registrar` // feature gate. diff --git a/src/test/ui/feature-gate-plugin_registrar.stderr b/src/test/ui/feature-gate-plugin_registrar.stderr new file mode 100644 index 0000000000000..3710239142af6 --- /dev/null +++ b/src/test/ui/feature-gate-plugin_registrar.stderr @@ -0,0 +1,10 @@ +error: compiler plugins are experimental and possibly buggy (see issue #29597) + --> $DIR/feature-gate-plugin_registrar.rs:16:1 + | +16 | pub fn registrar() {} + | ^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(plugin_registrar)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-target_feature.rs b/src/test/ui/feature-gate-target_feature.rs similarity index 95% rename from src/test/compile-fail/gated-target_feature.rs rename to src/test/ui/feature-gate-target_feature.rs index 02db8a71d5340..da2e41a0f5e42 100644 --- a/src/test/compile-fail/gated-target_feature.rs +++ b/src/test/ui/feature-gate-target_feature.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-target_feature - #[target_feature = "+sse2"] //~^ the `#[target_feature]` attribute is an experimental feature fn foo() {} diff --git a/src/test/ui/feature-gate-target_feature.stderr b/src/test/ui/feature-gate-target_feature.stderr new file mode 100644 index 0000000000000..8c89eabf75388 --- /dev/null +++ b/src/test/ui/feature-gate-target_feature.stderr @@ -0,0 +1,10 @@ +error: the `#[target_feature]` attribute is an experimental feature + --> $DIR/feature-gate-target_feature.rs:11:1 + | +11 | #[target_feature = "+sse2"] + | ^^^^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(target_feature)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-thread-local.rs b/src/test/ui/feature-gate-thread_local.rs similarity index 97% rename from src/test/compile-fail/gated-thread-local.rs rename to src/test/ui/feature-gate-thread_local.rs index b02ce9b7ecb81..f355c6562c8b0 100644 --- a/src/test/compile-fail/gated-thread-local.rs +++ b/src/test/ui/feature-gate-thread_local.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-thread_local - // Test that `#[thread_local]` attribute is gated by `thread_local` // feature gate. // diff --git a/src/test/ui/feature-gate-thread_local.stderr b/src/test/ui/feature-gate-thread_local.stderr new file mode 100644 index 0000000000000..2608018528ce7 --- /dev/null +++ b/src/test/ui/feature-gate-thread_local.stderr @@ -0,0 +1,10 @@ +error: `#[thread_local]` is an experimental feature, and does not currently handle destructors. There is no corresponding `#[task_local]` mapping to the task model (see issue #29594) + --> $DIR/feature-gate-thread_local.rs:18:1 + | +18 | #[thread_local] //~ ERROR `#[thread_local]` is an experimental feature + | ^^^^^^^^^^^^^^^ + | + = help: add #![feature(thread_local)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/gated-trace_macros.rs b/src/test/ui/feature-gate-trace_macros.rs similarity index 95% rename from src/test/compile-fail/gated-trace_macros.rs rename to src/test/ui/feature-gate-trace_macros.rs index 0b85b19f176d7..367ee6df50dfe 100644 --- a/src/test/compile-fail/gated-trace_macros.rs +++ b/src/test/ui/feature-gate-trace_macros.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-trace_macros - fn main() { trace_macros!(true); //~ ERROR: `trace_macros` is not stable } diff --git a/src/test/ui/feature-gate-trace_macros.stderr b/src/test/ui/feature-gate-trace_macros.stderr new file mode 100644 index 0000000000000..aca74099b7d99 --- /dev/null +++ b/src/test/ui/feature-gate-trace_macros.stderr @@ -0,0 +1,10 @@ +error: `trace_macros` is not stable enough for use and is subject to change (see issue #29598) + --> $DIR/feature-gate-trace_macros.rs:12:5 + | +12 | trace_macros!(true); //~ ERROR: `trace_macros` is not stable + | ^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(trace_macros)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/type-ascription-feature-gate.rs b/src/test/ui/feature-gate-type_ascription.rs similarity index 95% rename from src/test/compile-fail/type-ascription-feature-gate.rs rename to src/test/ui/feature-gate-type_ascription.rs index bf4ca03069c57..d3c07d653f40c 100644 --- a/src/test/compile-fail/type-ascription-feature-gate.rs +++ b/src/test/ui/feature-gate-type_ascription.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-type_ascription - // Type ascription is feature gated fn main() { diff --git a/src/test/ui/feature-gate-type_ascription.stderr b/src/test/ui/feature-gate-type_ascription.stderr new file mode 100644 index 0000000000000..d2a3ee2cf8f9c --- /dev/null +++ b/src/test/ui/feature-gate-type_ascription.stderr @@ -0,0 +1,10 @@ +error: type ascription is experimental (see issue #23416) + --> $DIR/feature-gate-type_ascription.rs:14:13 + | +14 | let a = 10: u8; //~ ERROR type ascription is experimental + | ^^^^^^ + | + = help: add #![feature(type_ascription)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/union/union-feature-gate.rs b/src/test/ui/feature-gate-untagged_unions.rs similarity index 96% rename from src/test/compile-fail/union/union-feature-gate.rs rename to src/test/ui/feature-gate-untagged_unions.rs index 8a0490cdc6b6d..6533fddd94714 100644 --- a/src/test/compile-fail/union/union-feature-gate.rs +++ b/src/test/ui/feature-gate-untagged_unions.rs @@ -8,8 +8,6 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// gate-test-untagged_unions - union U1 { // OK a: u8, } diff --git a/src/test/ui/feature-gate-untagged_unions.stderr b/src/test/ui/feature-gate-untagged_unions.stderr new file mode 100644 index 0000000000000..26b698912bc95 --- /dev/null +++ b/src/test/ui/feature-gate-untagged_unions.stderr @@ -0,0 +1,32 @@ +error: unions with non-`Copy` fields are unstable (see issue #32836) + --> $DIR/feature-gate-untagged_unions.rs:19:1 + | +19 | / union U3 { //~ ERROR unions with non-`Copy` fields are unstable +20 | | a: String, +21 | | } + | |_^ + | + = help: add #![feature(untagged_unions)] to the crate attributes to enable + +error: unions with non-`Copy` fields are unstable (see issue #32836) + --> $DIR/feature-gate-untagged_unions.rs:23:1 + | +23 | / union U4 { //~ ERROR unions with non-`Copy` fields are unstable +24 | | a: T, +25 | | } + | |_^ + | + = help: add #![feature(untagged_unions)] to the crate attributes to enable + +error: unions with `Drop` implementations are unstable (see issue #32836) + --> $DIR/feature-gate-untagged_unions.rs:27:1 + | +27 | / union U5 { //~ ERROR unions with `Drop` implementations are unstable +28 | | a: u8, +29 | | } + | |_^ + | + = help: add #![feature(untagged_unions)] to the crate attributes to enable + +error: aborting due to 3 previous errors + diff --git a/src/test/compile-fail/specialization/specialization-feature-gate-default.rs b/src/test/ui/specialization-feature-gate-default.rs similarity index 100% rename from src/test/compile-fail/specialization/specialization-feature-gate-default.rs rename to src/test/ui/specialization-feature-gate-default.rs diff --git a/src/test/ui/specialization-feature-gate-default.stderr b/src/test/ui/specialization-feature-gate-default.stderr new file mode 100644 index 0000000000000..e17d13083858e --- /dev/null +++ b/src/test/ui/specialization-feature-gate-default.stderr @@ -0,0 +1,10 @@ +error: specialization is unstable (see issue #31844) + --> $DIR/specialization-feature-gate-default.rs:20:5 + | +20 | default fn foo(&self) {} //~ ERROR specialization is unstable + | ^^^^^^^^^^^^^^^^^^^^^^^^ + | + = help: add #![feature(specialization)] to the crate attributes to enable + +error: aborting due to previous error + diff --git a/src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs b/src/test/ui/specialization-feature-gate-overlap.rs similarity index 100% rename from src/test/compile-fail/specialization/specialization-feature-gate-overlap.rs rename to src/test/ui/specialization-feature-gate-overlap.rs diff --git a/src/test/ui/specialization-feature-gate-overlap.stderr b/src/test/ui/specialization-feature-gate-overlap.stderr new file mode 100644 index 0000000000000..7fe2891c9082d --- /dev/null +++ b/src/test/ui/specialization-feature-gate-overlap.stderr @@ -0,0 +1,15 @@ +error[E0119]: conflicting implementations of trait `Foo` for type `u8`: + --> $DIR/specialization-feature-gate-overlap.rs:23:1 + | +19 | / impl Foo for T { +20 | | fn foo(&self) {} +21 | | } + | |_- first implementation here +22 | +23 | / impl Foo for u8 { //~ ERROR E0119 +24 | | fn foo(&self) {} +25 | | } + | |_^ conflicting implementation for `u8` + +error: aborting due to previous error +