From cf2dff2b1e3fa55fa5415d524200070d0d7aacfe Mon Sep 17 00:00:00 2001 From: Albert Larsan <74931857+albertlarsan68@users.noreply.github.com> Date: Thu, 5 Jan 2023 09:13:28 +0100 Subject: Move /src/test to /tests --- tests/ui/lint/inclusive-range-pattern-syntax.fixed | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 tests/ui/lint/inclusive-range-pattern-syntax.fixed (limited to 'tests/ui/lint/inclusive-range-pattern-syntax.fixed') diff --git a/tests/ui/lint/inclusive-range-pattern-syntax.fixed b/tests/ui/lint/inclusive-range-pattern-syntax.fixed new file mode 100644 index 00000000000..bee5d4ae4b1 --- /dev/null +++ b/tests/ui/lint/inclusive-range-pattern-syntax.fixed @@ -0,0 +1,21 @@ +// check-pass +// run-rustfix + +#![warn(ellipsis_inclusive_range_patterns)] + +fn main() { + let despondency = 2; + match despondency { + 1..=2 => {} + //~^ WARN `...` range patterns are deprecated + //~| WARN this is accepted in the current edition + _ => {} + } + + match &despondency { + &(1..=2) => {} + //~^ WARN `...` range patterns are deprecated + //~| WARN this is accepted in the current edition + _ => {} + } +} -- cgit 1.4.1-3-g733a5