]> git.lizzy.rs Git - rust.git/commitdiff
Add ui test for early exiting if no main
authorJustus K <justus.k@protonmail.com>
Thu, 9 Jul 2020 12:08:45 +0000 (14:08 +0200)
committerJustus K <justus.k@protonmail.com>
Thu, 9 Jul 2020 12:08:45 +0000 (14:08 +0200)
tests/run-pass/no_main.rs [new file with mode: 0644]
tests/run-pass/no_main.stderr [new file with mode: 0644]

diff --git a/tests/run-pass/no_main.rs b/tests/run-pass/no_main.rs
new file mode 100644 (file)
index 0000000..1ae9a6a
--- /dev/null
@@ -0,0 +1 @@
+#![no_main]
diff --git a/tests/run-pass/no_main.stderr b/tests/run-pass/no_main.stderr
new file mode 100644 (file)
index 0000000..52591a8
--- /dev/null
@@ -0,0 +1,2 @@
+error: miri can only run programs that have a main function
+