2016-01-21 14:22:01 -06:00
|
|
|
// aux-build:variant-namespacing.rs
|
|
|
|
|
2021-01-06 09:07:47 -06:00
|
|
|
pub enum E {
|
2016-01-21 14:22:01 -06:00
|
|
|
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;
|
|
|
|
|
2016-03-16 01:06:25 -05:00
|
|
|
extern crate variant_namespacing;
|
2016-10-13 03:05:03 -05:00
|
|
|
pub use variant_namespacing::XE::{XStruct, XTuple, XUnit};
|
2017-05-17 22:29:58 -05:00
|
|
|
//~^ ERROR the name `XStruct` is defined multiple times
|
|
|
|
//~| ERROR the name `XTuple` is defined multiple times
|
|
|
|
//~| ERROR the name `XUnit` is defined multiple times
|
2016-10-13 03:05:03 -05:00
|
|
|
pub use E::{Struct, Tuple, Unit};
|
2017-05-17 22:29:58 -05:00
|
|
|
//~^ ERROR the name `Struct` is defined multiple times
|
|
|
|
//~| ERROR the name `Tuple` is defined multiple times
|
|
|
|
//~| ERROR the name `Unit` is defined multiple times
|
2016-03-16 01:06:25 -05:00
|
|
|
|
2016-01-21 14:22:01 -06:00
|
|
|
fn main() {}
|