]>
Commit | Line | Data |
---|---|---|
7453a54e SL |
1 | // Copyright 2016 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 | pub mod foo { | |
12 | pub mod bar { | |
13 | // note: trait T is not public, but being in the current | |
14 | // crate, it's fine to show it, since the programmer can | |
15 | // decide to make it public based on the suggestion ... | |
54a0048b | 16 | pub trait T {} |
7453a54e SL |
17 | } |
18 | // imports should be ignored: | |
19 | use self::bar::T; | |
20 | } | |
21 | ||
22 | pub mod baz { | |
23 | pub use foo; | |
24 | pub use std::ops::{Mul as T}; | |
25 | } | |
26 | ||
27 | struct Foo; | |
28 | impl T for Foo { } | |
29 | //~^ ERROR trait `T` is not in scope | |
54a0048b SL |
30 | //~| HELP you can import it into scope: `use foo::bar::T;`. |
31 | //~| HELP run `rustc --explain E0405` to see a detailed explanation |