]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/variant-namespacing.rs
Imported Upstream version 1.9.0+dfsg1
[rustc.git] / src / test / compile-fail / variant-namespacing.rs
CommitLineData
7453a54e
SL
1// Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2// file at the top-level directory of this distribution and at
3// http://rust-lang.org/COPYRIGHT.
4//
5// Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6// http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8// option. This file may not be copied, modified, or distributed
9// except according to those terms.
10
11// aux-build:variant-namespacing.rs
12
7453a54e
SL
13enum E {
14 Struct { a: u8 },
15 Tuple(u8),
16 Unit,
17}
18
19type Struct = u8;
20type Tuple = u8;
21type Unit = u8;
22type XStruct = u8;
23type XTuple = u8;
24type XUnit = u8;
25
26const Struct: u8 = 0;
27const Tuple: u8 = 0;
28const Unit: u8 = 0;
29const XStruct: u8 = 0;
30const XTuple: u8 = 0;
31const XUnit: u8 = 0;
32
54a0048b
SL
33extern crate variant_namespacing;
34pub use variant_namespacing::XE::*;
35//~^ ERROR `XStruct` has already been defined
36//~| ERROR `XStruct` has already been defined
37//~| ERROR `XTuple` has already been defined
38//~| ERROR `XTuple` has already been defined
39//~| ERROR `XUnit` has already been defined
40//~| ERROR `XUnit` has already been defined
41pub use E::*;
42//~^ ERROR `Struct` has already been defined
43//~| ERROR `Struct` has already been defined
44//~| ERROR `Tuple` has already been defined
45//~| ERROR `Tuple` has already been defined
46//~| ERROR `Unit` has already been defined
47//~| ERROR `Unit` has already been defined
48
7453a54e 49fn main() {}