summaryrefslogtreecommitdiffstats
path: root/tests/run-make/use-suggestions-rust-2018
diff options
context:
space:
mode:
Diffstat (limited to 'tests/run-make/use-suggestions-rust-2018')
-rw-r--r--tests/run-make/use-suggestions-rust-2018/Makefile7
-rw-r--r--tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs7
-rw-r--r--tests/run-make/use-suggestions-rust-2018/use-suggestions.rs3
3 files changed, 17 insertions, 0 deletions
diff --git a/tests/run-make/use-suggestions-rust-2018/Makefile b/tests/run-make/use-suggestions-rust-2018/Makefile
new file mode 100644
index 000000000..37cd6283c
--- /dev/null
+++ b/tests/run-make/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/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs b/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs
new file mode 100644
index 000000000..62a0a9d8f
--- /dev/null
+++ b/tests/run-make/use-suggestions-rust-2018/ep-nested-lib.rs
@@ -0,0 +1,7 @@
+#![crate_type = "rlib"]
+
+pub mod foo {
+ pub mod bar {
+ pub struct Baz;
+ }
+}
diff --git a/tests/run-make/use-suggestions-rust-2018/use-suggestions.rs b/tests/run-make/use-suggestions-rust-2018/use-suggestions.rs
new file mode 100644
index 000000000..d262d6f98
--- /dev/null
+++ b/tests/run-make/use-suggestions-rust-2018/use-suggestions.rs
@@ -0,0 +1,3 @@
+fn main() {
+ let x = Baz{};
+}