diff options
| author | Oliver Schneider <git-no-reply-9879165716479413131@oli-obk.de> | 2018-01-27 17:15:40 +0100 |
|---|---|---|
| committer | Oliver Schneider <git-spam-no-reply9815368754983@oli-obk.de> | 2018-03-08 08:34:12 +0100 |
| commit | 5b247b9bbe7252db2d22d3ec4be172c73f1f94e9 (patch) | |
| tree | c0d1a8f54cf9294314e8e410d4b477aa0ca33736 /src/test | |
| parent | df6b40e342879169962295e27f1f878998f22bc3 (diff) | |
| download | rust-5b247b9bbe7252db2d22d3ec4be172c73f1f94e9.tar.gz rust-5b247b9bbe7252db2d22d3ec4be172c73f1f94e9.zip | |
Report errors in statics during collecting instead of translating
Diffstat (limited to 'src/test')
| -rw-r--r-- | src/test/compile-fail/huge-array.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-eval/index_out_of_bound.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/const-fn-error.stderr | 12 |
3 files changed, 14 insertions, 4 deletions
diff --git a/src/test/compile-fail/huge-array.rs b/src/test/compile-fail/huge-array.rs index 029e9651cb3..7de84802e1d 100644 --- a/src/test/compile-fail/huge-array.rs +++ b/src/test/compile-fail/huge-array.rs @@ -8,7 +8,7 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -// error-pattern:; 1518599999 +// error-pattern:; 1518600000 fn generic<T: Copy>(t: T) { let s: [T; 1518600000] = [t; 1518600000]; diff --git a/src/test/ui/const-eval/index_out_of_bound.rs b/src/test/ui/const-eval/index_out_of_bound.rs index 0109f72aa1d..632804f2fd3 100644 --- a/src/test/ui/const-eval/index_out_of_bound.rs +++ b/src/test/ui/const-eval/index_out_of_bound.rs @@ -8,6 +8,8 @@ // option. This file may not be copied, modified, or distributed // except according to those terms. -static FOO: i32 = [][0]; //~ ERROR E0080 +static FOO: i32 = [][0]; +//~^ ERROR E0080 +//~| ERROR E0080 fn main() {} diff --git a/src/test/ui/const-fn-error.stderr b/src/test/ui/const-fn-error.stderr index 26c238992ab..f7ce0565c85 100644 --- a/src/test/ui/const-fn-error.stderr +++ b/src/test/ui/const-fn-error.stderr @@ -20,15 +20,23 @@ error[E0016]: blocks in constant functions are limited to items and tail express | ^ error[E0015]: calls in constant functions are limited to constant functions, struct and enum constructors - --> $DIR/const-fn-error.rs:17:14 + --> $DIR/const-fn-error.rs:18:14 | +<<<<<<< HEAD LL | for i in 0..x { //~ ERROR calls in constant functions +======= +18 | for i in 0..x { +>>>>>>> Report errors in statics during collecting instead of translating | ^^^^ error[E0019]: constant function contains unimplemented expression type - --> $DIR/const-fn-error.rs:17:14 + --> $DIR/const-fn-error.rs:18:14 | +<<<<<<< HEAD LL | for i in 0..x { //~ ERROR calls in constant functions +======= +18 | for i in 0..x { +>>>>>>> Report errors in statics during collecting instead of translating | ^^^^ error[E0080]: constant evaluation error |
