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.
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.
11 // aux-build:edition-lint-paths.rs
14 #![feature(rust_2018_preview)]
15 #![deny(absolute_paths_not_starting_with_crate)]
18 extern crate edition_lint_paths;
21 use edition_lint_paths;
24 //~| WARN this was previously accepted
30 //~| WARN this was previously accepted
31 use crate::{bar as something_else};
33 use {Bar as SomethingElse, main};
35 //~| WARN this was previously accepted
37 use crate::{Bar as SomethingElse2, main as another_main};
42 pub trait SomeTrait { }
47 //~| WARN this was previously accepted
50 use edition_lint_paths as foo;
59 //~| WARN this was previously accepted
62 impl ::foo::SomeTrait for u32 { }
64 //~| WARN this was previously accepted
69 //~| WARN this was previously accepted
71 let x = crate::bar::Bar;
72 let x = self::bar::Bar;
76 use edition_lint_paths as bar;
77 edition_lint_paths::foo();
79 ::edition_lint_paths::foo();