diff options
| author | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-05 09:13:28 +0100 |
|---|---|---|
| committer | Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> | 2023-01-11 09:32:08 +0000 |
| commit | cf2dff2b1e3fa55fa5415d524200070d0d7aacfe (patch) | |
| tree | 40a88d9a46aaf3e8870676eb2538378b75a263eb /tests/ui/variants/variant-namespacing.rs | |
| parent | ca855e6e42787ecd062d81d53336fe6788ef51a9 (diff) | |
| download | rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.tar.gz rust-cf2dff2b1e3fa55fa5415d524200070d0d7aacfe.zip | |
Move /src/test to /tests
Diffstat (limited to 'tests/ui/variants/variant-namespacing.rs')
| -rw-r--r-- | tests/ui/variants/variant-namespacing.rs | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/tests/ui/variants/variant-namespacing.rs b/tests/ui/variants/variant-namespacing.rs new file mode 100644 index 00000000000..975e471fe34 --- /dev/null +++ b/tests/ui/variants/variant-namespacing.rs @@ -0,0 +1,33 @@ +// 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() {} |
