From 218caa410aa38c29984be31a5229b9fa717560ee Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:13 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- src/test/ui/invalid/invalid-crate-type-macro.rs | 7 -- .../ui/invalid/invalid-crate-type-macro.stderr | 8 -- src/test/ui/invalid/invalid-crate-type.rs | 48 ----------- src/test/ui/invalid/invalid-crate-type.stderr | 58 ------------- .../invalid/invalid-debugger-visualizer-option.rs | 7 -- .../invalid-debugger-visualizer-option.stderr | 18 ---- .../invalid/invalid-debugger-visualizer-target.rs | 4 - .../invalid-debugger-visualizer-target.stderr | 8 -- src/test/ui/invalid/invalid-inline.rs | 14 ---- src/test/ui/invalid/invalid-inline.stderr | 15 ---- src/test/ui/invalid/invalid-llvm-passes.rs | 4 - src/test/ui/invalid/invalid-llvm-passes.stderr | 4 - src/test/ui/invalid/invalid-macro-matcher.rs | 8 -- src/test/ui/invalid/invalid-macro-matcher.stderr | 8 -- src/test/ui/invalid/invalid-no-sanitize.rs | 5 -- src/test/ui/invalid/invalid-no-sanitize.stderr | 10 --- src/test/ui/invalid/invalid-path-in-const.rs | 4 - src/test/ui/invalid/invalid-path-in-const.stderr | 9 -- src/test/ui/invalid/invalid-plugin-attr.rs | 7 -- src/test/ui/invalid/invalid-plugin-attr.stderr | 22 ----- ...nvalid-rustc_legacy_const_generics-arguments.rs | 43 ---------- ...id-rustc_legacy_const_generics-arguments.stderr | 95 ---------------------- .../invalid_rustc_layout_scalar_valid_range.rs | 30 ------- .../invalid_rustc_layout_scalar_valid_range.stderr | 37 --------- 24 files changed, 473 deletions(-) delete mode 100644 src/test/ui/invalid/invalid-crate-type-macro.rs delete mode 100644 src/test/ui/invalid/invalid-crate-type-macro.stderr delete mode 100644 src/test/ui/invalid/invalid-crate-type.rs delete mode 100644 src/test/ui/invalid/invalid-crate-type.stderr delete mode 100644 src/test/ui/invalid/invalid-debugger-visualizer-option.rs delete mode 100644 src/test/ui/invalid/invalid-debugger-visualizer-option.stderr delete mode 100644 src/test/ui/invalid/invalid-debugger-visualizer-target.rs delete mode 100644 src/test/ui/invalid/invalid-debugger-visualizer-target.stderr delete mode 100644 src/test/ui/invalid/invalid-inline.rs delete mode 100644 src/test/ui/invalid/invalid-inline.stderr delete mode 100644 src/test/ui/invalid/invalid-llvm-passes.rs delete mode 100644 src/test/ui/invalid/invalid-llvm-passes.stderr delete mode 100644 src/test/ui/invalid/invalid-macro-matcher.rs delete mode 100644 src/test/ui/invalid/invalid-macro-matcher.stderr delete mode 100644 src/test/ui/invalid/invalid-no-sanitize.rs delete mode 100644 src/test/ui/invalid/invalid-no-sanitize.stderr delete mode 100644 src/test/ui/invalid/invalid-path-in-const.rs delete mode 100644 src/test/ui/invalid/invalid-path-in-const.stderr delete mode 100644 src/test/ui/invalid/invalid-plugin-attr.rs delete mode 100644 src/test/ui/invalid/invalid-plugin-attr.stderr delete mode 100644 src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.rs delete mode 100644 src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr delete mode 100644 src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.rs delete mode 100644 src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.stderr (limited to 'src/test/ui/invalid') diff --git a/src/test/ui/invalid/invalid-crate-type-macro.rs b/src/test/ui/invalid/invalid-crate-type-macro.rs deleted file mode 100644 index 9ba5e79ba..000000000 --- a/src/test/ui/invalid/invalid-crate-type-macro.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![crate_type = foo!()] //~ ERROR malformed `crate_type` attribute - -macro_rules! foo { - () => {"rlib"}; -} - -fn main() {} diff --git a/src/test/ui/invalid/invalid-crate-type-macro.stderr b/src/test/ui/invalid/invalid-crate-type-macro.stderr deleted file mode 100644 index c196d4278..000000000 --- a/src/test/ui/invalid/invalid-crate-type-macro.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: malformed `crate_type` attribute input - --> $DIR/invalid-crate-type-macro.rs:1:1 - | -LL | #![crate_type = foo!()] - | ^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#![crate_type = "bin|lib|..."]` - -error: aborting due to previous error - diff --git a/src/test/ui/invalid/invalid-crate-type.rs b/src/test/ui/invalid/invalid-crate-type.rs deleted file mode 100644 index 6c44c3b4f..000000000 --- a/src/test/ui/invalid/invalid-crate-type.rs +++ /dev/null @@ -1,48 +0,0 @@ -// regression test for issue 11256 -#![crate_type="foo"] //~ ERROR invalid `crate_type` value - -// Tests for suggestions (#53958) - -#![crate_type="statoclib"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION staticlib - -#![crate_type="procmacro"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION proc-macro - -#![crate_type="static-lib"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION staticlib - -#![crate_type="drylib"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION dylib - -#![crate_type="dlib"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION rlib - -#![crate_type="lob"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION lib - -#![crate_type="bon"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION bin - -#![crate_type="cdalib"] -//~^ ERROR invalid `crate_type` value -//~| HELP did you mean -//~| SUGGESTION cdylib - -fn main() { - return -} diff --git a/src/test/ui/invalid/invalid-crate-type.stderr b/src/test/ui/invalid/invalid-crate-type.stderr deleted file mode 100644 index 59d5d7bc9..000000000 --- a/src/test/ui/invalid/invalid-crate-type.stderr +++ /dev/null @@ -1,58 +0,0 @@ -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:2:15 - | -LL | #![crate_type="foo"] - | ^^^^^ - | - = note: `#[deny(unknown_crate_types)]` on by default - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:6:15 - | -LL | #![crate_type="statoclib"] - | ^^^^^^^^^^^ help: did you mean: `"staticlib"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:11:15 - | -LL | #![crate_type="procmacro"] - | ^^^^^^^^^^^ help: did you mean: `"proc-macro"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:16:15 - | -LL | #![crate_type="static-lib"] - | ^^^^^^^^^^^^ help: did you mean: `"staticlib"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:21:15 - | -LL | #![crate_type="drylib"] - | ^^^^^^^^ help: did you mean: `"dylib"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:26:15 - | -LL | #![crate_type="dlib"] - | ^^^^^^ help: did you mean: `"rlib"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:31:15 - | -LL | #![crate_type="lob"] - | ^^^^^ help: did you mean: `"lib"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:36:15 - | -LL | #![crate_type="bon"] - | ^^^^^ help: did you mean: `"bin"` - -error: invalid `crate_type` value - --> $DIR/invalid-crate-type.rs:41:15 - | -LL | #![crate_type="cdalib"] - | ^^^^^^^^ help: did you mean: `"cdylib"` - -error: aborting due to 9 previous errors - diff --git a/src/test/ui/invalid/invalid-debugger-visualizer-option.rs b/src/test/ui/invalid/invalid-debugger-visualizer-option.rs deleted file mode 100644 index 5645a30cc..000000000 --- a/src/test/ui/invalid/invalid-debugger-visualizer-option.rs +++ /dev/null @@ -1,7 +0,0 @@ -// normalize-stderr-test: "foo.random:.*\(" -> "foo.random: $$FILE_NOT_FOUND_MSG (" -// normalize-stderr-test: "os error \d+" -> "os error $$FILE_NOT_FOUND_CODE" - -#![feature(debugger_visualizer)] -#![debugger_visualizer(random_file = "../foo.random")] //~ ERROR invalid argument -#![debugger_visualizer(natvis_file = "../foo.random")] //~ ERROR -fn main() {} diff --git a/src/test/ui/invalid/invalid-debugger-visualizer-option.stderr b/src/test/ui/invalid/invalid-debugger-visualizer-option.stderr deleted file mode 100644 index afb8d16ee..000000000 --- a/src/test/ui/invalid/invalid-debugger-visualizer-option.stderr +++ /dev/null @@ -1,18 +0,0 @@ -error: invalid argument - --> $DIR/invalid-debugger-visualizer-option.rs:5:24 - | -LL | #![debugger_visualizer(random_file = "../foo.random")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - | - = note: expected: `natvis_file = "..."` - = note: OR - = note: expected: `gdb_script_file = "..."` - -error: couldn't read $DIR/../foo.random: $FILE_NOT_FOUND_MSG (os error $FILE_NOT_FOUND_CODE) - --> $DIR/invalid-debugger-visualizer-option.rs:6:24 - | -LL | #![debugger_visualizer(natvis_file = "../foo.random")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 2 previous errors - diff --git a/src/test/ui/invalid/invalid-debugger-visualizer-target.rs b/src/test/ui/invalid/invalid-debugger-visualizer-target.rs deleted file mode 100644 index f0aba6a75..000000000 --- a/src/test/ui/invalid/invalid-debugger-visualizer-target.rs +++ /dev/null @@ -1,4 +0,0 @@ -#![feature(debugger_visualizer)] - -#[debugger_visualizer(natvis_file = "../foo.natvis")] //~ ERROR attribute should be applied to a module -fn main() {} diff --git a/src/test/ui/invalid/invalid-debugger-visualizer-target.stderr b/src/test/ui/invalid/invalid-debugger-visualizer-target.stderr deleted file mode 100644 index 3555bbb16..000000000 --- a/src/test/ui/invalid/invalid-debugger-visualizer-target.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: attribute should be applied to a module - --> $DIR/invalid-debugger-visualizer-target.rs:3:1 - | -LL | #[debugger_visualizer(natvis_file = "../foo.natvis")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error - diff --git a/src/test/ui/invalid/invalid-inline.rs b/src/test/ui/invalid/invalid-inline.rs deleted file mode 100644 index 2501b1e23..000000000 --- a/src/test/ui/invalid/invalid-inline.rs +++ /dev/null @@ -1,14 +0,0 @@ -#![allow(dead_code)] - -#[inline(please,no)] //~ ERROR expected one argument -fn a() { -} - -#[inline()] //~ ERROR expected one argument -fn b() { -} - -fn main() { - a(); - b(); -} diff --git a/src/test/ui/invalid/invalid-inline.stderr b/src/test/ui/invalid/invalid-inline.stderr deleted file mode 100644 index 7edbf936b..000000000 --- a/src/test/ui/invalid/invalid-inline.stderr +++ /dev/null @@ -1,15 +0,0 @@ -error[E0534]: expected one argument - --> $DIR/invalid-inline.rs:3:1 - | -LL | #[inline(please,no)] - | ^^^^^^^^^^^^^^^^^^^^ - -error[E0534]: expected one argument - --> $DIR/invalid-inline.rs:7:1 - | -LL | #[inline()] - | ^^^^^^^^^^^ - -error: aborting due to 2 previous errors - -For more information about this error, try `rustc --explain E0534`. diff --git a/src/test/ui/invalid/invalid-llvm-passes.rs b/src/test/ui/invalid/invalid-llvm-passes.rs deleted file mode 100644 index ee28f5eb6..000000000 --- a/src/test/ui/invalid/invalid-llvm-passes.rs +++ /dev/null @@ -1,4 +0,0 @@ -// build-fail -// compile-flags: -Cpasses=unknown-pass - -fn main() {} diff --git a/src/test/ui/invalid/invalid-llvm-passes.stderr b/src/test/ui/invalid/invalid-llvm-passes.stderr deleted file mode 100644 index ae1f85e41..000000000 --- a/src/test/ui/invalid/invalid-llvm-passes.stderr +++ /dev/null @@ -1,4 +0,0 @@ -error: failed to run LLVM passes: unknown pass name 'unknown-pass' - -error: aborting due to previous error - diff --git a/src/test/ui/invalid/invalid-macro-matcher.rs b/src/test/ui/invalid/invalid-macro-matcher.rs deleted file mode 100644 index ff79d4e1a..000000000 --- a/src/test/ui/invalid/invalid-macro-matcher.rs +++ /dev/null @@ -1,8 +0,0 @@ -#![allow(unused_macros)] - -macro_rules! invalid { - _ => (); //~ ERROR invalid macro matcher -} - -fn main() { -} diff --git a/src/test/ui/invalid/invalid-macro-matcher.stderr b/src/test/ui/invalid/invalid-macro-matcher.stderr deleted file mode 100644 index dbe025b73..000000000 --- a/src/test/ui/invalid/invalid-macro-matcher.stderr +++ /dev/null @@ -1,8 +0,0 @@ -error: invalid macro matcher; matchers must be contained in balanced delimiters - --> $DIR/invalid-macro-matcher.rs:4:5 - | -LL | _ => (); - | ^ - -error: aborting due to previous error - diff --git a/src/test/ui/invalid/invalid-no-sanitize.rs b/src/test/ui/invalid/invalid-no-sanitize.rs deleted file mode 100644 index b52e3cc83..000000000 --- a/src/test/ui/invalid/invalid-no-sanitize.rs +++ /dev/null @@ -1,5 +0,0 @@ -#![feature(no_sanitize)] - -#[no_sanitize(brontosaurus)] //~ ERROR invalid argument -fn main() { -} diff --git a/src/test/ui/invalid/invalid-no-sanitize.stderr b/src/test/ui/invalid/invalid-no-sanitize.stderr deleted file mode 100644 index d328cafa0..000000000 --- a/src/test/ui/invalid/invalid-no-sanitize.stderr +++ /dev/null @@ -1,10 +0,0 @@ -error: invalid argument for `no_sanitize` - --> $DIR/invalid-no-sanitize.rs:3:15 - | -LL | #[no_sanitize(brontosaurus)] - | ^^^^^^^^^^^^ - | - = note: expected one of: `address`, `cfi`, `hwaddress`, `memory`, `memtag`, `shadow-call-stack`, or `thread` - -error: aborting due to previous error - diff --git a/src/test/ui/invalid/invalid-path-in-const.rs b/src/test/ui/invalid/invalid-path-in-const.rs deleted file mode 100644 index 51eb86072..000000000 --- a/src/test/ui/invalid/invalid-path-in-const.rs +++ /dev/null @@ -1,4 +0,0 @@ -fn main() { - fn f(a: [u8; u32::DOESNOTEXIST]) {} - //~^ ERROR no associated item named `DOESNOTEXIST` found for type `u32` -} diff --git a/src/test/ui/invalid/invalid-path-in-const.stderr b/src/test/ui/invalid/invalid-path-in-const.stderr deleted file mode 100644 index a14ab7d85..000000000 --- a/src/test/ui/invalid/invalid-path-in-const.stderr +++ /dev/null @@ -1,9 +0,0 @@ -error[E0599]: no associated item named `DOESNOTEXIST` found for type `u32` in the current scope - --> $DIR/invalid-path-in-const.rs:2:23 - | -LL | fn f(a: [u8; u32::DOESNOTEXIST]) {} - | ^^^^^^^^^^^^ associated item not found in `u32` - -error: aborting due to previous error - -For more information about this error, try `rustc --explain E0599`. diff --git a/src/test/ui/invalid/invalid-plugin-attr.rs b/src/test/ui/invalid/invalid-plugin-attr.rs deleted file mode 100644 index 3080af245..000000000 --- a/src/test/ui/invalid/invalid-plugin-attr.rs +++ /dev/null @@ -1,7 +0,0 @@ -#![deny(unused_attributes)] -#![feature(plugin)] - -#[plugin(bla)] //~ ERROR should be an inner attribute -//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated - -fn main() {} diff --git a/src/test/ui/invalid/invalid-plugin-attr.stderr b/src/test/ui/invalid/invalid-plugin-attr.stderr deleted file mode 100644 index d3882d33f..000000000 --- a/src/test/ui/invalid/invalid-plugin-attr.stderr +++ /dev/null @@ -1,22 +0,0 @@ -warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675 - --> $DIR/invalid-plugin-attr.rs:4:1 - | -LL | #[plugin(bla)] - | ^^^^^^^^^^^^^^ help: may be removed in a future compiler version - | - = note: `#[warn(deprecated)]` on by default - -error: crate-level attribute should be an inner attribute: add an exclamation mark: `#![foo]` - --> $DIR/invalid-plugin-attr.rs:4:1 - | -LL | #[plugin(bla)] - | ^^^^^^^^^^^^^^ - | -note: the lint level is defined here - --> $DIR/invalid-plugin-attr.rs:1:9 - | -LL | #![deny(unused_attributes)] - | ^^^^^^^^^^^^^^^^^ - -error: aborting due to previous error; 1 warning emitted - diff --git a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.rs b/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.rs deleted file mode 100644 index 6eabd9b10..000000000 --- a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.rs +++ /dev/null @@ -1,43 +0,0 @@ -#![feature(rustc_attrs)] - -#[rustc_legacy_const_generics(0)] //~ ERROR #[rustc_legacy_const_generics] must have one index for -fn foo1() {} - -#[rustc_legacy_const_generics(1)] //~ ERROR index exceeds number of arguments -fn foo2() {} - -#[rustc_legacy_const_generics(2)] //~ ERROR index exceeds number of arguments -fn foo3(_: u8) {} - -#[rustc_legacy_const_generics(a)] //~ ERROR arguments should be non-negative integers -fn foo4() {} - -#[rustc_legacy_const_generics(1, a, 2, b)] //~ ERROR arguments should be non-negative integers -fn foo5() {} - -#[rustc_legacy_const_generics(0)] //~ ERROR attribute should be applied to a function -struct S; - -#[rustc_legacy_const_generics(0usize)] //~ ERROR suffixed literals are not allowed in attributes -fn foo6() {} - -extern { - #[rustc_legacy_const_generics(1)] //~ ERROR attribute should be applied to a function - fn foo7(); //~ ERROR foreign items may not have const parameters -} - -#[rustc_legacy_const_generics(0)] //~ ERROR #[rustc_legacy_const_generics] functions must only have -fn foo8() {} - -impl S { - #[rustc_legacy_const_generics(0)] //~ ERROR attribute should be applied to a function - fn foo9() {} -} - -#[rustc_legacy_const_generics] //~ ERROR malformed `rustc_legacy_const_generics` attribute -fn bar1() {} - -#[rustc_legacy_const_generics = 1] //~ ERROR malformed `rustc_legacy_const_generics` attribute -fn bar2() {} - -fn main() {} diff --git a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr b/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr deleted file mode 100644 index 1ced1433f..000000000 --- a/src/test/ui/invalid/invalid-rustc_legacy_const_generics-arguments.stderr +++ /dev/null @@ -1,95 +0,0 @@ -error: suffixed literals are not allowed in attributes - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:21:31 - | -LL | #[rustc_legacy_const_generics(0usize)] - | ^^^^^^ - | - = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.) - -error: malformed `rustc_legacy_const_generics` attribute input - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:37:1 - | -LL | #[rustc_legacy_const_generics] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]` - -error: malformed `rustc_legacy_const_generics` attribute input - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:40:1 - | -LL | #[rustc_legacy_const_generics = 1] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: must be of the form: `#[rustc_legacy_const_generics(N)]` - -error: #[rustc_legacy_const_generics] must have one index for each generic parameter - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:3:1 - | -LL | #[rustc_legacy_const_generics(0)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | fn foo1() {} - | - generic parameters - -error: index exceeds number of arguments - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:6:31 - | -LL | #[rustc_legacy_const_generics(1)] - | ^ there is only 1 argument - -error: index exceeds number of arguments - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:9:31 - | -LL | #[rustc_legacy_const_generics(2)] - | ^ there are only 2 arguments - -error: arguments should be non-negative integers - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:12:31 - | -LL | #[rustc_legacy_const_generics(a)] - | ^ - -error: arguments should be non-negative integers - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:15:34 - | -LL | #[rustc_legacy_const_generics(1, a, 2, b)] - | ^ ^ - -error: attribute should be applied to a function definition - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:18:1 - | -LL | #[rustc_legacy_const_generics(0)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | struct S; - | --------- not a function definition - -error: #[rustc_legacy_const_generics] functions must only have const generics - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:29:1 - | -LL | #[rustc_legacy_const_generics(0)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | fn foo8() {} - | - non-const generic parameter - -error: attribute should be applied to a function definition - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:33:5 - | -LL | #[rustc_legacy_const_generics(0)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | fn foo9() {} - | ---------------------------- not a function definition - -error: attribute should be applied to a function definition - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:25:5 - | -LL | #[rustc_legacy_const_generics(1)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | fn foo7(); - | -------------------------- not a function definition - -error[E0044]: foreign items may not have const parameters - --> $DIR/invalid-rustc_legacy_const_generics-arguments.rs:26:5 - | -LL | fn foo7(); - | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't have const parameters - | - = help: replace the const parameters with concrete consts - -error: aborting due to 13 previous errors - -For more information about this error, try `rustc --explain E0044`. diff --git a/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.rs b/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.rs deleted file mode 100644 index 06cf8c0f0..000000000 --- a/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.rs +++ /dev/null @@ -1,30 +0,0 @@ -#![feature(rustc_attrs)] - -#[rustc_layout_scalar_valid_range_start(u32::MAX)] //~ ERROR -pub struct A(u32); - -#[rustc_layout_scalar_valid_range_end(1, 2)] //~ ERROR -pub struct B(u8); - -#[rustc_layout_scalar_valid_range_end(a = "a")] //~ ERROR -pub struct C(i32); - -#[rustc_layout_scalar_valid_range_end(1)] //~ ERROR -enum E { - X = 1, - Y = 14, -} - -#[rustc_layout_scalar_valid_range_start(rustc_layout_scalar_valid_range_start)] //~ ERROR -struct NonZero(T); - -fn not_field() -> impl Send { - NonZero(false) -} - -fn main() { - let _ = A(0); - let _ = B(0); - let _ = C(0); - let _ = E::X; -} diff --git a/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.stderr b/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.stderr deleted file mode 100644 index 7879e7358..000000000 --- a/src/test/ui/invalid/invalid_rustc_layout_scalar_valid_range.stderr +++ /dev/null @@ -1,37 +0,0 @@ -error: expected exactly one integer literal argument - --> $DIR/invalid_rustc_layout_scalar_valid_range.rs:3:1 - | -LL | #[rustc_layout_scalar_valid_range_start(u32::MAX)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: expected exactly one integer literal argument - --> $DIR/invalid_rustc_layout_scalar_valid_range.rs:6:1 - | -LL | #[rustc_layout_scalar_valid_range_end(1, 2)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: expected exactly one integer literal argument - --> $DIR/invalid_rustc_layout_scalar_valid_range.rs:9:1 - | -LL | #[rustc_layout_scalar_valid_range_end(a = "a")] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: attribute should be applied to a struct - --> $DIR/invalid_rustc_layout_scalar_valid_range.rs:12:1 - | -LL | #[rustc_layout_scalar_valid_range_end(1)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ -LL | / enum E { -LL | | X = 1, -LL | | Y = 14, -LL | | } - | |_- not a struct - -error: expected exactly one integer literal argument - --> $DIR/invalid_rustc_layout_scalar_valid_range.rs:18:1 - | -LL | #[rustc_layout_scalar_valid_range_start(rustc_layout_scalar_valid_range_start)] - | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - -error: aborting due to 5 previous errors - -- cgit v1.2.3