]> git.lizzy.rs Git - rust.git/blob - src/test/ui/rust-2018/local-path-suggestions-2015.rs
Rollup merge of #56553 - wesleywiser:silence_profiler_output, r=Mark-Simulacrum
[rust.git] / src / test / ui / rust-2018 / local-path-suggestions-2015.rs
1 // Copyright 2018 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 // aux-build:baz.rs
12 // compile-flags:--extern baz
13 // edition:2015
14
15 // This test exists to demonstrate the behaviour of the import suggestions
16 // from the `local-path-suggestions-2018.rs` test when not using the 2018 edition.
17
18 extern crate baz as aux_baz;
19
20 mod foo {
21     pub type Bar = u32;
22 }
23
24 mod baz {
25     use foo::Bar;
26
27     fn baz() {
28         let x: Bar = 22;
29     }
30 }
31
32 use foo::Bar;
33
34 use foobar::Baz; //~ ERROR unresolved import `foobar`
35
36 fn main() { }