From 64d98f8ee037282c35007b64c2649055c56af1db Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:19:03 +0200 Subject: Merging upstream version 1.68.2+dfsg1. Signed-off-by: Daniel Baumann --- .../range/range-inclusive-pattern-precedence.fixed | 21 --------------------- 1 file changed, 21 deletions(-) delete mode 100644 src/test/ui/range/range-inclusive-pattern-precedence.fixed (limited to 'src/test/ui/range/range-inclusive-pattern-precedence.fixed') diff --git a/src/test/ui/range/range-inclusive-pattern-precedence.fixed b/src/test/ui/range/range-inclusive-pattern-precedence.fixed deleted file mode 100644 index 38104bab7..000000000 --- a/src/test/ui/range/range-inclusive-pattern-precedence.fixed +++ /dev/null @@ -1,21 +0,0 @@ -// In expression, `&a..=b` is treated as `(&a)..=(b)` and `box a..=b` is -// `(box a)..=(b)`. In a pattern, however, `&a..=b` means `&(a..=b)`. This may -// lead to confusion. - -// run-rustfix - -#![warn(ellipsis_inclusive_range_patterns)] - -pub fn main() { - match &12 { - &(0..=9) => {} - //~^ WARN `...` range patterns are deprecated - //~| WARN this is accepted in the current edition - //~| HELP use `..=` for an inclusive range - &(10..=15) => {} - //~^ ERROR the range pattern here has ambiguous interpretation - //~| HELP add parentheses to clarify the precedence - &(16..=20) => {} - _ => {} - } -} -- cgit v1.2.3