summaryrefslogtreecommitdiffstats
path: root/src/test/ui/malformed
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/malformed')
-rw-r--r--src/test/ui/malformed/issue-69341-malformed-derive-inert.rs6
-rw-r--r--src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr8
-rw-r--r--src/test/ui/malformed/malformed-derive-entry.rs14
-rw-r--r--src/test/ui/malformed/malformed-derive-entry.stderr55
-rw-r--r--src/test/ui/malformed/malformed-interpolated.rs16
-rw-r--r--src/test/ui/malformed/malformed-interpolated.stderr22
-rw-r--r--src/test/ui/malformed/malformed-meta-delim.rs11
-rw-r--r--src/test/ui/malformed/malformed-meta-delim.stderr24
-rw-r--r--src/test/ui/malformed/malformed-plugin-1.rs5
-rw-r--r--src/test/ui/malformed/malformed-plugin-1.stderr16
-rw-r--r--src/test/ui/malformed/malformed-plugin-2.rs5
-rw-r--r--src/test/ui/malformed/malformed-plugin-2.stderr16
-rw-r--r--src/test/ui/malformed/malformed-plugin-3.rs5
-rw-r--r--src/test/ui/malformed/malformed-plugin-3.stderr17
-rw-r--r--src/test/ui/malformed/malformed-regressions.rs12
-rw-r--r--src/test/ui/malformed/malformed-regressions.stderr48
-rw-r--r--src/test/ui/malformed/malformed-special-attrs.rs13
-rw-r--r--src/test/ui/malformed/malformed-special-attrs.stderr30
18 files changed, 0 insertions, 323 deletions
diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs b/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs
deleted file mode 100644
index fc4c3f4e6..000000000
--- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.rs
+++ /dev/null
@@ -1,6 +0,0 @@
-fn main() {}
-
-struct CLI {
- #[derive(parse())] //~ ERROR expected non-macro attribute, found attribute macro
- path: (),
-}
diff --git a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr b/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr
deleted file mode 100644
index 04f7ebe01..000000000
--- a/src/test/ui/malformed/issue-69341-malformed-derive-inert.stderr
+++ /dev/null
@@ -1,8 +0,0 @@
-error: expected non-macro attribute, found attribute macro `derive`
- --> $DIR/issue-69341-malformed-derive-inert.rs:4:7
- |
-LL | #[derive(parse())]
- | ^^^^^^ not a non-macro attribute
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/malformed/malformed-derive-entry.rs b/src/test/ui/malformed/malformed-derive-entry.rs
deleted file mode 100644
index 77fa2f566..000000000
--- a/src/test/ui/malformed/malformed-derive-entry.rs
+++ /dev/null
@@ -1,14 +0,0 @@
-#[derive(Copy(Bad))]
-//~^ ERROR traits in `#[derive(...)]` don't accept arguments
-//~| ERROR the trait bound
-struct Test1;
-
-#[derive(Copy="bad")]
-//~^ ERROR traits in `#[derive(...)]` don't accept values
-//~| ERROR the trait bound
-struct Test2;
-
-#[derive] //~ ERROR malformed `derive` attribute input
-struct Test4;
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-derive-entry.stderr b/src/test/ui/malformed/malformed-derive-entry.stderr
deleted file mode 100644
index 803883460..000000000
--- a/src/test/ui/malformed/malformed-derive-entry.stderr
+++ /dev/null
@@ -1,55 +0,0 @@
-error: traits in `#[derive(...)]` don't accept arguments
- --> $DIR/malformed-derive-entry.rs:1:14
- |
-LL | #[derive(Copy(Bad))]
- | ^^^^^ help: remove the arguments
-
-error: traits in `#[derive(...)]` don't accept values
- --> $DIR/malformed-derive-entry.rs:6:14
- |
-LL | #[derive(Copy="bad")]
- | ^^^^^^ help: remove the value
-
-error: malformed `derive` attribute input
- --> $DIR/malformed-derive-entry.rs:11:1
- |
-LL | #[derive]
- | ^^^^^^^^^ help: must be of the form: `#[derive(Trait1, Trait2, ...)]`
-
-error[E0277]: the trait bound `Test1: Clone` is not satisfied
- --> $DIR/malformed-derive-entry.rs:1:10
- |
-LL | #[derive(Copy(Bad))]
- | ^^^^ the trait `Clone` is not implemented for `Test1`
- |
-note: required by a bound in `Copy`
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^^ required by this bound in `Copy`
- = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider annotating `Test1` with `#[derive(Clone)]`
- |
-LL | #[derive(Clone)]
- |
-
-error[E0277]: the trait bound `Test2: Clone` is not satisfied
- --> $DIR/malformed-derive-entry.rs:6:10
- |
-LL | #[derive(Copy="bad")]
- | ^^^^ the trait `Clone` is not implemented for `Test2`
- |
-note: required by a bound in `Copy`
- --> $SRC_DIR/core/src/marker.rs:LL:COL
- |
-LL | pub trait Copy: Clone {
- | ^^^^^ required by this bound in `Copy`
- = note: this error originates in the derive macro `Copy` (in Nightly builds, run with -Z macro-backtrace for more info)
-help: consider annotating `Test2` with `#[derive(Clone)]`
- |
-LL | #[derive(Clone)]
- |
-
-error: aborting due to 5 previous errors
-
-For more information about this error, try `rustc --explain E0277`.
diff --git a/src/test/ui/malformed/malformed-interpolated.rs b/src/test/ui/malformed/malformed-interpolated.rs
deleted file mode 100644
index 0d84e723f..000000000
--- a/src/test/ui/malformed/malformed-interpolated.rs
+++ /dev/null
@@ -1,16 +0,0 @@
-#![feature(rustc_attrs)]
-
-macro_rules! check {
- ($expr: expr) => (
- #[rustc_dummy = $expr]
- use main as _;
- );
-}
-
-check!("0"); // OK
-check!(0); // OK
-check!(0u8); //~ ERROR suffixed literals are not allowed in attributes
-check!(-0); //~ ERROR unexpected expression: `-0`
-check!(0 + 0); //~ ERROR unexpected expression: `0 + 0`
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-interpolated.stderr b/src/test/ui/malformed/malformed-interpolated.stderr
deleted file mode 100644
index c24d9f153..000000000
--- a/src/test/ui/malformed/malformed-interpolated.stderr
+++ /dev/null
@@ -1,22 +0,0 @@
-error: suffixed literals are not allowed in attributes
- --> $DIR/malformed-interpolated.rs:12:8
- |
-LL | check!(0u8);
- | ^^^
- |
- = help: instead of using a suffixed literal (`1u8`, `1.0f32`, etc.), use an unsuffixed version (`1`, `1.0`, etc.)
-
-error: unexpected expression: `-0`
- --> $DIR/malformed-interpolated.rs:13:8
- |
-LL | check!(-0);
- | ^^
-
-error: unexpected expression: `0 + 0`
- --> $DIR/malformed-interpolated.rs:14:8
- |
-LL | check!(0 + 0);
- | ^^^^^
-
-error: aborting due to 3 previous errors
-
diff --git a/src/test/ui/malformed/malformed-meta-delim.rs b/src/test/ui/malformed/malformed-meta-delim.rs
deleted file mode 100644
index 5b1614b69..000000000
--- a/src/test/ui/malformed/malformed-meta-delim.rs
+++ /dev/null
@@ -1,11 +0,0 @@
-fn main() {}
-
-#[allow { foo_lint } ]
-//~^ ERROR wrong meta list delimiters
-//~| HELP the delimiters should be `(` and `)`
-fn delim_brace() {}
-
-#[allow [ foo_lint ] ]
-//~^ ERROR wrong meta list delimiters
-//~| HELP the delimiters should be `(` and `)`
-fn delim_bracket() {}
diff --git a/src/test/ui/malformed/malformed-meta-delim.stderr b/src/test/ui/malformed/malformed-meta-delim.stderr
deleted file mode 100644
index 27636c3d5..000000000
--- a/src/test/ui/malformed/malformed-meta-delim.stderr
+++ /dev/null
@@ -1,24 +0,0 @@
-error: wrong meta list delimiters
- --> $DIR/malformed-meta-delim.rs:3:9
- |
-LL | #[allow { foo_lint } ]
- | ^^^^^^^^^^^^
- |
-help: the delimiters should be `(` and `)`
- |
-LL | #[allow ( foo_lint ) ]
- | ~ ~
-
-error: wrong meta list delimiters
- --> $DIR/malformed-meta-delim.rs:8:9
- |
-LL | #[allow [ foo_lint ] ]
- | ^^^^^^^^^^^^
- |
-help: the delimiters should be `(` and `)`
- |
-LL | #[allow ( foo_lint ) ]
- | ~ ~
-
-error: aborting due to 2 previous errors
-
diff --git a/src/test/ui/malformed/malformed-plugin-1.rs b/src/test/ui/malformed/malformed-plugin-1.rs
deleted file mode 100644
index d4c1a2a16..000000000
--- a/src/test/ui/malformed/malformed-plugin-1.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-plugin-1.stderr b/src/test/ui/malformed/malformed-plugin-1.stderr
deleted file mode 100644
index 505f6b6f1..000000000
--- a/src/test/ui/malformed/malformed-plugin-1.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: malformed `plugin` attribute input
- --> $DIR/malformed-plugin-1.rs:2:1
- |
-LL | #![plugin]
- | ^^^^^^^^^^ help: must be of the form: `#![plugin(name)]`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
- --> $DIR/malformed-plugin-1.rs:2:1
- |
-LL | #![plugin]
- | ^^^^^^^^^^ help: may be removed in a future compiler version
- |
- = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/src/test/ui/malformed/malformed-plugin-2.rs b/src/test/ui/malformed/malformed-plugin-2.rs
deleted file mode 100644
index ba80d97a3..000000000
--- a/src/test/ui/malformed/malformed-plugin-2.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin="bleh"] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-plugin-2.stderr b/src/test/ui/malformed/malformed-plugin-2.stderr
deleted file mode 100644
index 52bbd82a3..000000000
--- a/src/test/ui/malformed/malformed-plugin-2.stderr
+++ /dev/null
@@ -1,16 +0,0 @@
-error: malformed `plugin` attribute input
- --> $DIR/malformed-plugin-2.rs:2:1
- |
-LL | #![plugin="bleh"]
- | ^^^^^^^^^^^^^^^^^ help: must be of the form: `#![plugin(name)]`
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
- --> $DIR/malformed-plugin-2.rs:2:1
- |
-LL | #![plugin="bleh"]
- | ^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
- |
- = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
diff --git a/src/test/ui/malformed/malformed-plugin-3.rs b/src/test/ui/malformed/malformed-plugin-3.rs
deleted file mode 100644
index d2bd8f9f8..000000000
--- a/src/test/ui/malformed/malformed-plugin-3.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-#![feature(plugin)]
-#![plugin(foo="bleh")] //~ ERROR malformed `plugin` attribute
-//~| WARN use of deprecated attribute `plugin`: compiler plugins are deprecated
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-plugin-3.stderr b/src/test/ui/malformed/malformed-plugin-3.stderr
deleted file mode 100644
index 64cb429ea..000000000
--- a/src/test/ui/malformed/malformed-plugin-3.stderr
+++ /dev/null
@@ -1,17 +0,0 @@
-error[E0498]: malformed `plugin` attribute
- --> $DIR/malformed-plugin-3.rs:2:11
- |
-LL | #![plugin(foo="bleh")]
- | ^^^^^^^^^^ malformed attribute
-
-warning: use of deprecated attribute `plugin`: compiler plugins are deprecated. See https://github.com/rust-lang/rust/pull/64675
- --> $DIR/malformed-plugin-3.rs:2:1
- |
-LL | #![plugin(foo="bleh")]
- | ^^^^^^^^^^^^^^^^^^^^^^ help: may be removed in a future compiler version
- |
- = note: `#[warn(deprecated)]` on by default
-
-error: aborting due to previous error; 1 warning emitted
-
-For more information about this error, try `rustc --explain E0498`.
diff --git a/src/test/ui/malformed/malformed-regressions.rs b/src/test/ui/malformed/malformed-regressions.rs
deleted file mode 100644
index ac1444bba..000000000
--- a/src/test/ui/malformed/malformed-regressions.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-#[doc] //~ ERROR attribute must be of the form
-//~^ WARN this was previously accepted
-#[ignore()] //~ ERROR attribute must be of the form
-//~^ WARN this was previously accepted
-#[inline = ""] //~ ERROR attribute must be of the form
-//~^ WARN this was previously accepted
-#[link] //~ ERROR attribute must be of the form
-//~^ WARN this was previously accepted
-#[link = ""] //~ ERROR attribute must be of the form
-//~^ WARN this was previously accepted
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-regressions.stderr b/src/test/ui/malformed/malformed-regressions.stderr
deleted file mode 100644
index 9bfbe7eba..000000000
--- a/src/test/ui/malformed/malformed-regressions.stderr
+++ /dev/null
@@ -1,48 +0,0 @@
-error: attribute must be of the form `#[doc(hidden|inline|...)]` or `#[doc = "string"]`
- --> $DIR/malformed-regressions.rs:1:1
- |
-LL | #[doc]
- | ^^^^^^
- |
- = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
- = note: `#[deny(ill_formed_attribute_input)]` on by default
-
-error: attribute must be of the form `#[ignore]` or `#[ignore = "reason"]`
- --> $DIR/malformed-regressions.rs:3:1
- |
-LL | #[ignore()]
- | ^^^^^^^^^^^
- |
- = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
-error: attribute must be of the form `#[inline]` or `#[inline(always|never)]`
- --> $DIR/malformed-regressions.rs:5:1
- |
-LL | #[inline = ""]
- | ^^^^^^^^^^^^^^
- |
- = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
- --> $DIR/malformed-regressions.rs:7:1
- |
-LL | #[link]
- | ^^^^^^^
- |
- = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
-error: attribute must be of the form `#[link(name = "...", /*opt*/ kind = "dylib|static|...", /*opt*/ wasm_import_module = "...", /*opt*/ import_name_type = "decorated|noprefix|undecorated")]`
- --> $DIR/malformed-regressions.rs:9:1
- |
-LL | #[link = ""]
- | ^^^^^^^^^^^^
- |
- = 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 #57571 <https://github.com/rust-lang/rust/issues/57571>
-
-error: aborting due to 5 previous errors
-
diff --git a/src/test/ui/malformed/malformed-special-attrs.rs b/src/test/ui/malformed/malformed-special-attrs.rs
deleted file mode 100644
index 05b7ebe46..000000000
--- a/src/test/ui/malformed/malformed-special-attrs.rs
+++ /dev/null
@@ -1,13 +0,0 @@
-#[cfg_attr] //~ ERROR malformed `cfg_attr` attribute
-struct S1;
-
-#[cfg_attr = ""] //~ ERROR malformed `cfg_attr` attribute
-struct S2;
-
-#[derive] //~ ERROR malformed `derive` attribute
-struct S3;
-
-#[derive = ""] //~ ERROR malformed `derive` attribute
-struct S4;
-
-fn main() {}
diff --git a/src/test/ui/malformed/malformed-special-attrs.stderr b/src/test/ui/malformed/malformed-special-attrs.stderr
deleted file mode 100644
index 1764c3969..000000000
--- a/src/test/ui/malformed/malformed-special-attrs.stderr
+++ /dev/null
@@ -1,30 +0,0 @@
-error: malformed `cfg_attr` attribute input
- --> $DIR/malformed-special-attrs.rs:1:1
- |
-LL | #[cfg_attr]
- | ^^^^^^^^^^^ help: missing condition and attribute: `#[cfg_attr(condition, attribute, other_attribute, ...)]`
- |
- = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
-
-error: malformed `cfg_attr` attribute input
- --> $DIR/malformed-special-attrs.rs:4:1
- |
-LL | #[cfg_attr = ""]
- | ^^^^^^^^^^^^^^^^ help: missing condition and attribute: `#[cfg_attr(condition, attribute, other_attribute, ...)]`
- |
- = note: for more information, visit <https://doc.rust-lang.org/reference/conditional-compilation.html#the-cfg_attr-attribute>
-
-error: malformed `derive` attribute input
- --> $DIR/malformed-special-attrs.rs:7:1
- |
-LL | #[derive]
- | ^^^^^^^^^ help: must be of the form: `#[derive(Trait1, Trait2, ...)]`
-
-error: malformed `derive` attribute input
- --> $DIR/malformed-special-attrs.rs:10:1
- |
-LL | #[derive = ""]
- | ^^^^^^^^^^^^^^ help: must be of the form: `#[derive(Trait1, Trait2, ...)]`
-
-error: aborting due to 4 previous errors
-