]> git.lizzy.rs Git - rust.git/commitdiff
Renamed ui/dead-code-ret to ui/unreachable-code-ret
authorPi Lanningham <pi.lanningham@gmail.com>
Fri, 25 Oct 2019 04:35:17 +0000 (00:35 -0400)
committerPi Lanningham <pi.lanningham@gmail.com>
Sun, 27 Oct 2019 01:42:52 +0000 (21:42 -0400)
This test was actually about the unreachable_code flag, not dead_code,
so I renamed it for clarity (to prepare for the next commit, where I
plan to move a bunch of the dead_code tests to a single folder)

src/test/ui/dead-code-ret.rs [deleted file]
src/test/ui/dead-code-ret.stderr [deleted file]
src/test/ui/unreachable-code-ret.rs [new file with mode: 0644]
src/test/ui/unreachable-code-ret.stderr [new file with mode: 0644]

diff --git a/src/test/ui/dead-code-ret.rs b/src/test/ui/dead-code-ret.rs
deleted file mode 100644 (file)
index fad3579..0000000
+++ /dev/null
@@ -1,8 +0,0 @@
-// error-pattern: unreachable statement
-
-#![deny(unreachable_code)]
-
-fn main() {
-    return;
-    println!("Paul is dead");
-}
diff --git a/src/test/ui/dead-code-ret.stderr b/src/test/ui/dead-code-ret.stderr
deleted file mode 100644 (file)
index 8384113..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
-error: unreachable statement
-  --> $DIR/dead-code-ret.rs:7:5
-   |
-LL |     return;
-   |     ------ any code following this expression is unreachable
-LL |     println!("Paul is dead");
-   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
-   |
-note: lint level defined here
-  --> $DIR/dead-code-ret.rs:3:9
-   |
-LL | #![deny(unreachable_code)]
-   |         ^^^^^^^^^^^^^^^^
-   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
-
-error: aborting due to previous error
-
diff --git a/src/test/ui/unreachable-code-ret.rs b/src/test/ui/unreachable-code-ret.rs
new file mode 100644 (file)
index 0000000..fad3579
--- /dev/null
@@ -0,0 +1,8 @@
+// error-pattern: unreachable statement
+
+#![deny(unreachable_code)]
+
+fn main() {
+    return;
+    println!("Paul is dead");
+}
diff --git a/src/test/ui/unreachable-code-ret.stderr b/src/test/ui/unreachable-code-ret.stderr
new file mode 100644 (file)
index 0000000..c22342c
--- /dev/null
@@ -0,0 +1,17 @@
+error: unreachable statement
+  --> $DIR/unreachable-code-ret.rs:7:5
+   |
+LL |     return;
+   |     ------ any code following this expression is unreachable
+LL |     println!("Paul is dead");
+   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ unreachable statement
+   |
+note: lint level defined here
+  --> $DIR/unreachable-code-ret.rs:3:9
+   |
+LL | #![deny(unreachable_code)]
+   |         ^^^^^^^^^^^^^^^^
+   = note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
+
+error: aborting due to previous error
+