Skip to content

Commit 86433e6

Browse files
committed
Add regression test for echo 'mod unknown;' | rustc -
1 parent a6236fa commit 86433e6

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed
+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
include ../tools.mk
2+
3+
all:
4+
echo 'mod unknown;' | $(RUSTC) --crate-type rlib - >$(TMPDIR)/unknown-mod.stdout 2>$(TMPDIR)/unknown-mod.stderr || echo "failed successfully"
5+
6+
# Bless like this: RUSTC_BLESS_TEST=1 ./x.py test tests/run-make/unknown-mod-stdin
7+
ifdef RUSTC_BLESS_TEST
8+
cp "$(TMPDIR)"/unknown-mod.stdout unknown-mod.stdout
9+
cp "$(TMPDIR)"/unknown-mod.stderr unknown-mod.stderr
10+
else
11+
$(DIFF) unknown-mod.stdout "$(TMPDIR)"/unknown-mod.stdout
12+
$(DIFF) unknown-mod.stderr "$(TMPDIR)"/unknown-mod.stderr
13+
endif
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
error[E0583]: file not found for module `unknown`
2+
--> <anon>:1:1
3+
|
4+
1 | mod unknown;
5+
| ^^^^^^^^^^^^
6+
|
7+
= help: to create the module `unknown`, create file "unknown.rs" or "unknown/mod.rs"
8+
9+
error: aborting due to previous error
10+
11+
For more information about this error, try `rustc --explain E0583`.

tests/run-make/unknown-mod-stdin/unknown-mod.stdout

Whitespace-only changes.

0 commit comments

Comments
 (0)