]> git.proxmox.com Git - rustc.git/blame - src/test/ui/rust-2018/edition-lint-nested-empty-paths.rs
New upstream version 1.30.0~beta.7+dfsg1
[rustc.git] / src / test / ui / rust-2018 / edition-lint-nested-empty-paths.rs
CommitLineData
83c7162d
XL
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
94b46f34
XL
11// run-rustfix
12
b7449926 13#![feature(rust_2018_preview, crate_visibility_modifier)]
83c7162d 14#![deny(absolute_paths_not_starting_with_crate)]
94b46f34
XL
15#![allow(unused_imports)]
16#![allow(dead_code)]
17
18crate mod foo {
19 crate mod bar {
20 crate mod baz { }
21 crate mod baz1 { }
22
23 crate struct XX;
24 }
83c7162d
XL
25}
26
94b46f34
XL
27use foo::{bar::{baz::{}}};
28//~^ ERROR absolute paths must start with
29//~| WARN this was previously accepted
83c7162d 30
94b46f34
XL
31use foo::{bar::{XX, baz::{}}};
32//~^ ERROR absolute paths must start with
83c7162d
XL
33//~| WARN this was previously accepted
34
94b46f34
XL
35use foo::{bar::{baz::{}, baz1::{}}};
36//~^ ERROR absolute paths must start with
37//~| WARN this was previously accepted
83c7162d
XL
38
39fn main() {
83c7162d 40}