diff --git a/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile b/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile new file mode 100644 index 0000000000000..fc39691c507e0 --- /dev/null +++ b/src/test/run-make-fulldeps/use-suggestions-rust-2018/Makefile @@ -0,0 +1,7 @@ +-include ../tools.mk + +all: + $(RUSTC) ep-nested-lib.rs + + $(RUSTC) use-suggestions.rs --edition=2018 --extern ep_nested_lib=$(TMPDIR)/libep_nested_lib.rlib 2>&1 | $(CGREP) "use ep_nested_lib::foo::bar::Baz" + diff --git a/src/test/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs b/src/test/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs new file mode 100644 index 0000000000000..c0bce6e3371d0 --- /dev/null +++ b/src/test/run-make-fulldeps/use-suggestions-rust-2018/ep-nested-lib.rs @@ -0,0 +1,17 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +#![crate_type = "rlib"] + +pub mod foo { + pub mod bar { + pub struct Baz; + } +} diff --git a/src/test/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs b/src/test/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs new file mode 100644 index 0000000000000..62730a5653f32 --- /dev/null +++ b/src/test/run-make-fulldeps/use-suggestions-rust-2018/use-suggestions.rs @@ -0,0 +1,13 @@ +// Copyright 2018 The Rust Project Developers. See the COPYRIGHT +// file at the top-level directory of this distribution and at +// http://rust-lang.org/COPYRIGHT. +// +// Licensed under the Apache License, Version 2.0 or the MIT license +// , at your +// option. This file may not be copied, modified, or distributed +// except according to those terms. + +fn main() { + let x = Baz{}; +}