summaryrefslogtreecommitdiffstats
path: root/src/test/ui/rust-2018/uniform-paths/block-scoped-shadow.rs
blob: 828ee4fe474b7e3d3d3733cb53e58e43035dbc49 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
// edition:2018

#![allow(non_camel_case_types)]

enum Foo {}

struct std;

fn main() {
    enum Foo { A, B }
    use Foo::*;
    //~^ ERROR `Foo` is ambiguous

    let _ = (A, B);

    fn std() {}
    enum std {}
    use std as foo;
    //~^ ERROR `std` is ambiguous
    //~| ERROR `std` is ambiguous
}