]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/use-mod.rs
New upstream version 1.12.0+dfsg1
[rustc.git] / src / test / compile-fail / use-mod.rs
CommitLineData
1a4d82fc
JJ
1// Copyright 2014 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
11use foo::bar::{
12 self,
13//~^ ERROR `self` import can only appear once in the list
54a0048b 14//~^^ NOTE previous import of `bar` here
1a4d82fc
JJ
15 Bar,
16 self
17//~^ NOTE another `self` import appears here
5bcae85e
SL
18//~| ERROR a module named `bar` has already been imported in this module
19//~| NOTE already imported
1a4d82fc
JJ
20};
21
22use {self};
23//~^ ERROR `self` import can only appear in an import list with a non-empty prefix
24
1a4d82fc
JJ
25mod foo {
26 pub mod bar {
27 pub struct Bar;
28 pub struct Baz;
29 }
30}
31
32fn main() {}