diff options
| author | Zack M. Davis <code@zackmdavis.net> | 2018-05-28 19:42:11 -0700 |
|---|---|---|
| committer | Zack M. Davis <code@zackmdavis.net> | 2018-06-26 07:53:30 -0700 |
| commit | 057715557b51af125847da6d19b2e016283c5ae7 (patch) | |
| tree | dfe0cc5a807ac7ed47bb77893f1c69198be825f6 /src/test/ui/const-eval | |
| parent | 764232cb2a8407c72b9fea68835e686240e30ef3 (diff) | |
migrate codebase to `..=` inclusive range patterns
These were stabilized in March 2018's #47813, and are the Preferred Way to Do It going forward (q.v. #51043).
Diffstat (limited to 'src/test/ui/const-eval')
| -rw-r--r-- | src/test/ui/const-eval/const_signed_pat.rs | 2 | ||||
| -rw-r--r-- | src/test/ui/const-eval/ref_to_int_match.rs | 4 | ||||
| -rw-r--r-- | src/test/ui/const-eval/ref_to_int_match.stderr | 2 |
3 files changed, 4 insertions, 4 deletions
diff --git a/src/test/ui/const-eval/const_signed_pat.rs b/src/test/ui/const-eval/const_signed_pat.rs index f53d6f3fa0a..008ebf13c63 100644 --- a/src/test/ui/const-eval/const_signed_pat.rs +++ b/src/test/ui/const-eval/const_signed_pat.rs @@ -13,7 +13,7 @@ fn main() { const MIN: i8 = -5; match 5i8 { - MIN...-1 => {}, + MIN..=-1 => {}, _ => {}, } } diff --git a/src/test/ui/const-eval/ref_to_int_match.rs b/src/test/ui/const-eval/ref_to_int_match.rs index 4c5fc6c3797..8ad7f11f0ce 100644 --- a/src/test/ui/const-eval/ref_to_int_match.rs +++ b/src/test/ui/const-eval/ref_to_int_match.rs @@ -11,8 +11,8 @@ fn main() { let n: Int = 40; match n { - 0...10 => {}, - 10...BAR => {}, //~ ERROR lower range bound must be less than or equal to upper + 0..=10 => {}, + 10..=BAR => {}, //~ ERROR lower range bound must be less than or equal to upper _ => {}, } } diff --git a/src/test/ui/const-eval/ref_to_int_match.stderr b/src/test/ui/const-eval/ref_to_int_match.stderr index eef7b6df252..64ea57702d7 100644 --- a/src/test/ui/const-eval/ref_to_int_match.stderr +++ b/src/test/ui/const-eval/ref_to_int_match.stderr @@ -1,7 +1,7 @@ error[E0030]: lower range bound must be less than or equal to upper --> $DIR/ref_to_int_match.rs:15:9 | -LL | 10...BAR => {}, //~ ERROR lower range bound must be less than or equal to upper +LL | 10..=BAR => {}, //~ ERROR lower range bound must be less than or equal to upper | ^^ lower bound larger than upper bound error: aborting due to previous error |
