diff options
| author | Oliver Schneider <github35764891676564198441@oli-obk.de> | 2018-08-26 15:19:34 +0200 |
|---|---|---|
| committer | Oliver Scherer <github35764891676564198441@oli-obk.de> | 2018-10-25 16:46:19 +0200 |
| commit | 7fdf06cdde49c8cd87e34e85a95c1fe90ebdb0c3 (patch) | |
| tree | 659449f68fb00da4052dd67ba6725b17d6aaf26d /src/test/compile-fail | |
| parent | 3476ac0bee4042653ecb00207ceb9e02d2b647d0 (diff) | |
Report const eval error inside the query
Diffstat (limited to 'src/test/compile-fail')
| -rw-r--r-- | src/test/compile-fail/const-fn-error.rs | 4 | ||||
| -rw-r--r-- | src/test/compile-fail/issue-52443.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/test/compile-fail/const-fn-error.rs b/src/test/compile-fail/const-fn-error.rs index 6eda41730b3..0eee0b4c7b8 100644 --- a/src/test/compile-fail/const-fn-error.rs +++ b/src/test/compile-fail/const-fn-error.rs @@ -16,7 +16,7 @@ const fn f(x: usize) -> usize { let mut sum = 0; //~^ let bindings in constant functions are unstable //~| statements in constant functions are unstable - for i in 0..x { + for i in 0..x { //~ ERROR E0080 //~^ ERROR E0015 //~| ERROR E0019 sum += i; @@ -26,5 +26,5 @@ const fn f(x: usize) -> usize { #[allow(unused_variables)] fn main() { - let a : [i32; f(X)]; //~ ERROR E0080 + let a : [i32; f(X)]; } diff --git a/src/test/compile-fail/issue-52443.rs b/src/test/compile-fail/issue-52443.rs index 2ae94f6d642..1ed513033fd 100644 --- a/src/test/compile-fail/issue-52443.rs +++ b/src/test/compile-fail/issue-52443.rs @@ -14,5 +14,5 @@ fn main() { [(); {while true {break}; 0}]; //~ ERROR constant contains unimplemented expression type [(); { for _ in 0usize.. {}; 0}]; //~ ERROR calls in constants are limited to constant functions //~^ ERROR constant contains unimplemented expression type - //~| ERROR could not evaluate repeat length + //~| ERROR evaluation of constant value failed } |
