]>
Commit | Line | Data |
---|---|---|
e9174d1e | 1 | // Copyright 2013-2015 The Rust Project Developers. See the COPYRIGHT |
223e47cc LB |
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 | ||
9cc50fc6 SL |
11 | // ignore-tidy-linelength |
12 | ||
9e0c209e | 13 | use foo::bar; //~ ERROR unresolved import `foo::bar` [E0432] |
c30ab7b3 | 14 | //~^ Maybe a missing `extern crate foo;`? |
1a4d82fc | 15 | |
9e0c209e SL |
16 | use bar::Baz as x; //~ ERROR unresolved import `bar::Baz` [E0432] |
17 | //~^ no `Baz` in `bar`. Did you mean to use `Bar`? | |
223e47cc | 18 | |
9e0c209e SL |
19 | use food::baz; //~ ERROR unresolved import `food::baz` |
20 | //~^ no `baz` in `food`. Did you mean to use `bag`? | |
e9174d1e | 21 | |
9e0c209e SL |
22 | use food::{beens as Foo}; //~ ERROR unresolved import `food::beens` [E0432] |
23 | //~^ no `beens` in `food`. Did you mean to use `beans`? | |
e9174d1e | 24 | |
970d7e83 | 25 | mod bar { |
9cc50fc6 | 26 | pub struct Bar; |
223e47cc | 27 | } |
e9174d1e SL |
28 | |
29 | mod food { | |
9cc50fc6 | 30 | pub use self::zug::baz::{self as bag, foobar as beans}; |
e9174d1e SL |
31 | |
32 | mod zug { | |
33 | pub mod baz { | |
9cc50fc6 | 34 | pub struct foobar; |
e9174d1e SL |
35 | } |
36 | } | |
37 | } | |
9e0c209e SL |
38 | |
39 | mod m { | |
40 | enum MyEnum { | |
41 | MyVariant | |
42 | } | |
43 | ||
44 | use MyEnum::*; //~ ERROR unresolved import `MyEnum::*` [E0432] | |
45 | //~^ Did you mean `self::MyEnum`? | |
46 | } | |
47 | ||
48 | mod items { | |
49 | enum Enum { | |
50 | Variant | |
51 | } | |
52 | ||
53 | use Enum::*; //~ ERROR unresolved import `Enum::*` [E0432] | |
54 | //~^ Did you mean `self::Enum`? | |
55 | ||
56 | fn item() {} | |
57 | } |