about summary refs log tree commit diff
path: root/src/test/ui/recursion
diff options
context:
space:
mode:
authorEsteban Küber <esteban@kuber.com.ar>2019-04-15 12:54:18 -0700
committerEsteban Küber <esteban@kuber.com.ar>2019-04-22 13:11:53 -0700
commit6e723c24a83cc89d723df6c0eda17a95deb5fb41 (patch)
tree881b68422e22a12f17e6f928ce141a874da85efb /src/test/ui/recursion
parentc21fbfe7e310b9055ed6b7c46b7d37b831a516e3 (diff)
downloadrust-6e723c24a83cc89d723df6c0eda17a95deb5fb41.tar.gz
rust-6e723c24a83cc89d723df6c0eda17a95deb5fb41.zip
Never stop due to errors before borrow checking
Diffstat (limited to 'src/test/ui/recursion')
-rw-r--r--src/test/ui/recursion/recursive-types-are-not-uninhabited.rs3
-rw-r--r--src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr12
2 files changed, 14 insertions, 1 deletions
diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs
index b3e4efb9940..e32f08e999a 100644
--- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs
+++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.rs
@@ -6,6 +6,9 @@ fn foo(res: Result<u32, &R>) -> u32 {
     let Ok(x) = res;
     //~^ ERROR refutable pattern
     x
+    //~^ WARN use of possibly uninitialized variable: `x`
+    //~| WARN this error has been downgraded to a warning for backwards compatibility
+    //~| WARN this represents potential undefined behavior in your code and this warning will
 }
 
 fn main() {
diff --git a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr
index dad98cff452..940ab94a613 100644
--- a/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr
+++ b/src/test/ui/recursion/recursive-types-are-not-uninhabited.stderr
@@ -4,6 +4,16 @@ error[E0005]: refutable pattern in local binding: `Err(_)` not covered
 LL |     let Ok(x) = res;
    |         ^^^^^ pattern `Err(_)` not covered
 
+warning[E0381]: use of possibly uninitialized variable: `x`
+  --> $DIR/recursive-types-are-not-uninhabited.rs:8:5
+   |
+LL |     x
+   |     ^ use of possibly uninitialized `x`
+   |
+   = warning: this error has been downgraded to a warning for backwards compatibility with previous releases
+   = warning: this represents potential undefined behavior in your code and this warning will become a hard error in the future
+
 error: aborting due to previous error
 
-For more information about this error, try `rustc --explain E0005`.
+Some errors have detailed explanations: E0005, E0381.
+For more information about an error, try `rustc --explain E0005`.