From 0592976f7ee4b31046e3d23457699ef038c3e6e7 Mon Sep 17 00:00:00 2001 From: Dylan MacKenzie Date: Wed, 29 Apr 2020 10:46:24 -0700 Subject: [PATCH] Bless tests --- src/test/compile-fail/consts/const-fn-error.rs | 1 - src/test/compile-fail/issue-52443.rs | 1 - .../control-flow/feature-gate-const-if-match.rs | 1 - .../feature-gate-const-if-match.stock.stderr | 11 ++--------- .../ui/or-patterns/feature-gate-const-fn.rs | 2 -- .../ui/or-patterns/feature-gate-const-fn.stderr | 17 ++--------------- 6 files changed, 4 insertions(+), 29 deletions(-) diff --git a/src/test/compile-fail/consts/const-fn-error.rs b/src/test/compile-fail/consts/const-fn-error.rs index 9db595af63e..7dbf7d1a386 100644 --- a/src/test/compile-fail/consts/const-fn-error.rs +++ b/src/test/compile-fail/consts/const-fn-error.rs @@ -10,7 +10,6 @@ const fn f(x: usize) -> usize { //~| ERROR E0658 //~| ERROR E0080 //~| ERROR E0744 - //~| ERROR E0019 sum += i; } sum diff --git a/src/test/compile-fail/issue-52443.rs b/src/test/compile-fail/issue-52443.rs index ad6f4970367..97619593352 100644 --- a/src/test/compile-fail/issue-52443.rs +++ b/src/test/compile-fail/issue-52443.rs @@ -11,6 +11,5 @@ fn main() { //~| ERROR calls in constants are limited to constant functions //~| ERROR references in constants may only refer to immutable values //~| ERROR calls in constants are limited to constant functions - //~| ERROR constant contains unimplemented expression type //~| ERROR evaluation of constant value failed } diff --git a/src/test/ui/consts/control-flow/feature-gate-const-if-match.rs b/src/test/ui/consts/control-flow/feature-gate-const-if-match.rs index 00576d50ac6..c49dd830a12 100644 --- a/src/test/ui/consts/control-flow/feature-gate-const-if-match.rs +++ b/src/test/ui/consts/control-flow/feature-gate-const-if-match.rs @@ -113,6 +113,5 @@ fn main() { //[if_match]~ ERROR fatal error triggered by #[rustc_error] //[stock]~^ ERROR `match` is not allowed in a `const` if let Some(x) = Some(x) { x } else { 1 } //[stock]~^ ERROR `if` is not allowed in a `const` - //[stock]~| ERROR constant contains unimplemented expression type }]; } diff --git a/src/test/ui/consts/control-flow/feature-gate-const-if-match.stock.stderr b/src/test/ui/consts/control-flow/feature-gate-const-if-match.stock.stderr index ca087b85886..b27971dccac 100644 --- a/src/test/ui/consts/control-flow/feature-gate-const-if-match.stock.stderr +++ b/src/test/ui/consts/control-flow/feature-gate-const-if-match.stock.stderr @@ -237,13 +237,6 @@ LL | const MATCH: i32 = match 0 { 1 => 2, _ => 0 }; = note: see issue #49146 for more information = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0019]: constant contains unimplemented expression type - --> $DIR/feature-gate-const-if-match.rs:114:21 - | -LL | if let Some(x) = Some(x) { x } else { 1 } - | ^ +error: aborting due to 24 previous errors -error: aborting due to 25 previous errors - -Some errors have detailed explanations: E0019, E0658. -For more information about an error, try `rustc --explain E0019`. +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/or-patterns/feature-gate-const-fn.rs b/src/test/ui/or-patterns/feature-gate-const-fn.rs index 2ef5537db60..d21cf3dc72c 100644 --- a/src/test/ui/or-patterns/feature-gate-const-fn.rs +++ b/src/test/ui/or-patterns/feature-gate-const-fn.rs @@ -30,8 +30,6 @@ fn main() { let x = Ok(3); let Ok(y) | Err(y) = x; //~^ ERROR or-pattern is not allowed in a `const` - //~| ERROR constant contains unimplemented expression type - //~| ERROR constant contains unimplemented expression type 2 }]; } diff --git a/src/test/ui/or-patterns/feature-gate-const-fn.stderr b/src/test/ui/or-patterns/feature-gate-const-fn.stderr index 38233a944cf..345d6c70981 100644 --- a/src/test/ui/or-patterns/feature-gate-const-fn.stderr +++ b/src/test/ui/or-patterns/feature-gate-const-fn.stderr @@ -52,19 +52,6 @@ LL | let Ok(y) | Err(y) = x; = note: see issue #49146 for more information = help: add `#![feature(const_if_match)]` to the crate attributes to enable -error[E0019]: constant contains unimplemented expression type - --> $DIR/feature-gate-const-fn.rs:31:25 - | -LL | let Ok(y) | Err(y) = x; - | ^ +error: aborting due to 6 previous errors -error[E0019]: constant contains unimplemented expression type - --> $DIR/feature-gate-const-fn.rs:31:16 - | -LL | let Ok(y) | Err(y) = x; - | ^ - -error: aborting due to 8 previous errors - -Some errors have detailed explanations: E0019, E0658. -For more information about an error, try `rustc --explain E0019`. +For more information about this error, try `rustc --explain E0658`.