]> git.lizzy.rs Git - rust.git/blob - src/test/ui/issues/issue-6936.rs
Auto merge of #54624 - arielb1:evaluate-outlives, r=nikomatsakis
[rust.git] / src / test / ui / issues / issue-6936.rs
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 struct T;
12
13 mod t1 {
14     type Foo = ::T;
15     mod Foo {} //~ ERROR the name `Foo` is defined multiple times
16 }
17
18 mod t2 {
19     type Foo = ::T;
20     struct Foo; //~ ERROR the name `Foo` is defined multiple times
21 }
22
23 mod t3 {
24     type Foo = ::T;
25     enum Foo {} //~ ERROR the name `Foo` is defined multiple times
26 }
27
28 mod t4 {
29     type Foo = ::T;
30     fn Foo() {} // ok
31 }
32
33 mod t5 {
34     type Bar<T> = T;
35     mod Bar {} //~ ERROR the name `Bar` is defined multiple times
36 }
37
38 mod t6 {
39     type Foo = ::T;
40     impl Foo {} // ok
41 }
42
43
44 fn main() {}