]> git.proxmox.com Git - rustc.git/blame - src/test/compile-fail/unresolved-import.rs
Imported Upstream version 1.4.0+dfsg1
[rustc.git] / src / test / compile-fail / unresolved-import.rs
CommitLineData
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
1a4d82fc
JJ
11use foo::bar; //~ ERROR unresolved import `foo::bar`. Maybe a missing `extern crate foo`?
12
13use bar::baz as x; //~ ERROR unresolved import `bar::baz`. There is no `baz` in `bar`
223e47cc 14
e9174d1e
SL
15use food::baz; //~ ERROR unresolved import `food::baz`. There is no `baz` in `food`
16
17use food::{quux as beans}; //~ ERROR unresolved import `food::quux`. There is no `quux` in `food`
18
970d7e83
LB
19mod bar {
20 struct bar;
223e47cc 21}
e9174d1e
SL
22
23mod food {
24 pub use self::zug::baz::{self as bag, quux as beans};
25
26 mod zug {
27 pub mod baz {
28 pub struct quux;
29 }
30 }
31}