summaryrefslogtreecommitdiffstats
path: root/src/test/ui/variants
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/ui/variants')
-rw-r--r--src/test/ui/variants/auxiliary/variant-namespacing.rs5
-rw-r--r--src/test/ui/variants/variant-namespacing.rs33
-rw-r--r--src/test/ui/variants/variant-namespacing.stderr93
-rw-r--r--src/test/ui/variants/variant-size-differences.rs8
-rw-r--r--src/test/ui/variants/variant-size-differences.stderr14
-rw-r--r--src/test/ui/variants/variant-used-as-type.rs20
-rw-r--r--src/test/ui/variants/variant-used-as-type.stderr29
7 files changed, 0 insertions, 202 deletions
diff --git a/src/test/ui/variants/auxiliary/variant-namespacing.rs b/src/test/ui/variants/auxiliary/variant-namespacing.rs
deleted file mode 100644
index 7ba601a88..000000000
--- a/src/test/ui/variants/auxiliary/variant-namespacing.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-pub enum XE {
- XStruct { a: u8 },
- XTuple(u8),
- XUnit,
-}
diff --git a/src/test/ui/variants/variant-namespacing.rs b/src/test/ui/variants/variant-namespacing.rs
deleted file mode 100644
index 975e471fe..000000000
--- a/src/test/ui/variants/variant-namespacing.rs
+++ /dev/null
@@ -1,33 +0,0 @@
-// aux-build:variant-namespacing.rs
-
-pub enum E {
- Struct { a: u8 },
- Tuple(u8),
- Unit,
-}
-
-type Struct = u8;
-type Tuple = u8;
-type Unit = u8;
-type XStruct = u8;
-type XTuple = u8;
-type XUnit = u8;
-
-const Struct: u8 = 0;
-const Tuple: u8 = 0;
-const Unit: u8 = 0;
-const XStruct: u8 = 0;
-const XTuple: u8 = 0;
-const XUnit: u8 = 0;
-
-extern crate variant_namespacing;
-pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
-//~^ ERROR the name `XStruct` is defined multiple times
-//~| ERROR the name `XTuple` is defined multiple times
-//~| ERROR the name `XUnit` is defined multiple times
-pub use E::{Struct, Tuple, Unit};
-//~^ ERROR the name `Struct` is defined multiple times
-//~| ERROR the name `Tuple` is defined multiple times
-//~| ERROR the name `Unit` is defined multiple times
-
-fn main() {}
diff --git a/src/test/ui/variants/variant-namespacing.stderr b/src/test/ui/variants/variant-namespacing.stderr
deleted file mode 100644
index 9e91ff717..000000000
--- a/src/test/ui/variants/variant-namespacing.stderr
+++ /dev/null
@@ -1,93 +0,0 @@
-error[E0255]: the name `XStruct` is defined multiple times
- --> $DIR/variant-namespacing.rs:24:35
- |
-LL | type XStruct = u8;
- | ------------------ previous definition of the type `XStruct` here
-...
-LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
- | ^^^^^^^ `XStruct` reimported here
- |
- = note: `XStruct` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use variant_namespacing::XE::{XStruct as OtherXStruct, XTuple, XUnit};
- | ~~~~~~~~~~~~~~~~~~~~~~~
-
-error[E0255]: the name `XTuple` is defined multiple times
- --> $DIR/variant-namespacing.rs:24:44
- |
-LL | type XTuple = u8;
- | ----------------- previous definition of the type `XTuple` here
-...
-LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
- | ^^^^^^ `XTuple` reimported here
- |
- = note: `XTuple` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use variant_namespacing::XE::{XStruct, XTuple as OtherXTuple, XUnit};
- | ~~~~~~~~~~~~~~~~~~~~~
-
-error[E0255]: the name `XUnit` is defined multiple times
- --> $DIR/variant-namespacing.rs:24:52
- |
-LL | type XUnit = u8;
- | ---------------- previous definition of the type `XUnit` here
-...
-LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
- | ^^^^^ `XUnit` reimported here
- |
- = note: `XUnit` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use variant_namespacing::XE::{XStruct, XTuple, XUnit as OtherXUnit};
- | ~~~~~~~~~~~~~~~~~~~
-
-error[E0255]: the name `Struct` is defined multiple times
- --> $DIR/variant-namespacing.rs:28:13
- |
-LL | type Struct = u8;
- | ----------------- previous definition of the type `Struct` here
-...
-LL | pub use E::{Struct, Tuple, Unit};
- | ^^^^^^ `Struct` reimported here
- |
- = note: `Struct` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use E::{Struct as OtherStruct, Tuple, Unit};
- | ~~~~~~~~~~~~~~~~~~~~~
-
-error[E0255]: the name `Tuple` is defined multiple times
- --> $DIR/variant-namespacing.rs:28:21
- |
-LL | type Tuple = u8;
- | ---------------- previous definition of the type `Tuple` here
-...
-LL | pub use E::{Struct, Tuple, Unit};
- | ^^^^^ `Tuple` reimported here
- |
- = note: `Tuple` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use E::{Struct, Tuple as OtherTuple, Unit};
- | ~~~~~~~~~~~~~~~~~~~
-
-error[E0255]: the name `Unit` is defined multiple times
- --> $DIR/variant-namespacing.rs:28:28
- |
-LL | type Unit = u8;
- | --------------- previous definition of the type `Unit` here
-...
-LL | pub use E::{Struct, Tuple, Unit};
- | ^^^^ `Unit` reimported here
- |
- = note: `Unit` must be defined only once in the type namespace of this module
-help: you can use `as` to change the binding name of the import
- |
-LL | pub use E::{Struct, Tuple, Unit as OtherUnit};
- | ~~~~~~~~~~~~~~~~~
-
-error: aborting due to 6 previous errors
-
-For more information about this error, try `rustc --explain E0255`.
diff --git a/src/test/ui/variants/variant-size-differences.rs b/src/test/ui/variants/variant-size-differences.rs
deleted file mode 100644
index 219819951..000000000
--- a/src/test/ui/variants/variant-size-differences.rs
+++ /dev/null
@@ -1,8 +0,0 @@
-#![deny(variant_size_differences)]
-
-enum _En {
- V0(u8),
- VBig([u8; 1024]), //~ ERROR variant is more than three times larger
-}
-
-fn main() {}
diff --git a/src/test/ui/variants/variant-size-differences.stderr b/src/test/ui/variants/variant-size-differences.stderr
deleted file mode 100644
index 241a757d4..000000000
--- a/src/test/ui/variants/variant-size-differences.stderr
+++ /dev/null
@@ -1,14 +0,0 @@
-error: enum variant is more than three times larger (1024 bytes) than the next largest
- --> $DIR/variant-size-differences.rs:5:5
- |
-LL | VBig([u8; 1024]),
- | ^^^^^^^^^^^^^^^^
- |
-note: the lint level is defined here
- --> $DIR/variant-size-differences.rs:1:9
- |
-LL | #![deny(variant_size_differences)]
- | ^^^^^^^^^^^^^^^^^^^^^^^^
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/variants/variant-used-as-type.rs b/src/test/ui/variants/variant-used-as-type.rs
deleted file mode 100644
index f27db1024..000000000
--- a/src/test/ui/variants/variant-used-as-type.rs
+++ /dev/null
@@ -1,20 +0,0 @@
-// Test error message when enum variants are used as types
-
-
-// issue 21225
-enum Ty {
- A,
- B(Ty::A),
- //~^ ERROR expected type, found variant `Ty::A`
-}
-
-
-// issue 19197
-enum E {
- A
-}
-
-impl E::A {}
-//~^ ERROR expected type, found variant `E::A`
-
-fn main() {}
diff --git a/src/test/ui/variants/variant-used-as-type.stderr b/src/test/ui/variants/variant-used-as-type.stderr
deleted file mode 100644
index 64424abbc..000000000
--- a/src/test/ui/variants/variant-used-as-type.stderr
+++ /dev/null
@@ -1,29 +0,0 @@
-error[E0573]: expected type, found variant `Ty::A`
- --> $DIR/variant-used-as-type.rs:7:7
- |
-LL | B(Ty::A),
- | ^^^^^ not a type
- |
-help: try using the variant's enum
- |
-LL | B(E),
- | ~
-LL | B(Ty),
- | ~~
-
-error[E0573]: expected type, found variant `E::A`
- --> $DIR/variant-used-as-type.rs:17:6
- |
-LL | impl E::A {}
- | ^^^^ not a type
- |
-help: try using the variant's enum
- |
-LL | impl E {}
- | ~
-LL | impl Ty {}
- | ~~
-
-error: aborting due to 2 previous errors
-
-For more information about this error, try `rustc --explain E0573`.