Skip to content

Commit bfc8dc8

Browse files
committed
rewrite use-suggestions-rust-2018 to rmake
1 parent 4bdf8d2 commit bfc8dc8

File tree

3 files changed

+18
-8
lines changed

3 files changed

+18
-8
lines changed

src/tools/tidy/src/allowed_run_make_makefiles.txt

-1
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,6 @@ run-make/translation/Makefile
193193
run-make/type-mismatch-same-crate-name/Makefile
194194
run-make/unknown-mod-stdin/Makefile
195195
run-make/unstable-flag-required/Makefile
196-
run-make/use-suggestions-rust-2018/Makefile
197196
run-make/used-cdylib-macos/Makefile
198197
run-make/volatile-intrinsics/Makefile
199198
run-make/wasm-exceptions-nostd/Makefile

tests/run-make/use-suggestions-rust-2018/Makefile

-7
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
// The compilation error caused by calling on an unimported crate
2+
// should have a suggestion to write, say, crate::bar::Foo instead
3+
// of just bar::Foo. However, this suggestion used to only appear for
4+
// extern crate statements, not crate struct. After this was fixed in #51456,
5+
// this test checks that the correct suggestion is printed no matter what.
6+
// See https://github.com/rust-lang/rust/issues/51212
7+
8+
use run_make_support::{rust_lib_name, rustc};
9+
10+
fn main() {
11+
rustc().input("ep-nested-lib.rs").run();
12+
rustc()
13+
.input("use-suggestions.rs")
14+
.edition("2018")
15+
.extern_("ep_nested_lib", rust_lib_name("ep_nested_lib"))
16+
.run_fail()
17+
.assert_stderr_contains("use ep_nested_lib::foo::bar::Baz");
18+
}

0 commit comments

Comments
 (0)