diff --git a/compiler/rustc_ast_passes/src/feature_gate.rs b/compiler/rustc_ast_passes/src/feature_gate.rs index 0017a28cf1b18..0b033e9384ce0 100644 --- a/compiler/rustc_ast_passes/src/feature_gate.rs +++ b/compiler/rustc_ast_passes/src/feature_gate.rs @@ -461,7 +461,7 @@ impl<'a> Visitor<'a> for PostExpansionVisitor<'a> { if let PatKind::Range(Some(_), None, Spanned { .. }) = inner_pat.kind { gate_feature_post!( &self, - half_open_range_patterns, + half_open_range_patterns_in_slices, pat.span, "`X..` patterns in slices are experimental" ); @@ -589,7 +589,10 @@ pub fn check_crate(krate: &ast::Crate, sess: &Session) { gate_all!(generators, "yield syntax is experimental"); gate_all!(raw_ref_op, "raw address of syntax is experimental"); gate_all!(const_trait_impl, "const trait impls are experimental"); - gate_all!(half_open_range_patterns, "half-open range patterns are unstable"); + gate_all!( + half_open_range_patterns_in_slices, + "half-open range patterns in slices are unstable" + ); gate_all!(inline_const, "inline-const is experimental"); gate_all!(inline_const_pat, "inline-const in pattern position is experimental"); gate_all!(associated_const_equality, "associated const equality is incomplete"); diff --git a/compiler/rustc_feature/src/accepted.rs b/compiler/rustc_feature/src/accepted.rs index 8efb7ccc1c71c..ca12659695feb 100644 --- a/compiler/rustc_feature/src/accepted.rs +++ b/compiler/rustc_feature/src/accepted.rs @@ -169,6 +169,8 @@ declare_features! ( (accepted, global_allocator, "1.28.0", Some(27389), None), // FIXME: explain `globs`. (accepted, globs, "1.0.0", None, None), + /// Allows using `..=X` as a pattern. + (accepted, half_open_range_patterns, "CURRENT_RUSTC_VERSION", Some(67264), None), /// Allows using the `u128` and `i128` types. (accepted, i128_type, "1.26.0", Some(35118), None), /// Allows the use of `if let` expressions. diff --git a/compiler/rustc_feature/src/active.rs b/compiler/rustc_feature/src/active.rs index 71ad54291b286..48c40eae662ed 100644 --- a/compiler/rustc_feature/src/active.rs +++ b/compiler/rustc_feature/src/active.rs @@ -414,6 +414,8 @@ declare_features! ( (incomplete, generic_const_exprs, "1.56.0", Some(76560), None), /// Allows using `..X`, `..=X`, `...X`, and `X..` as a pattern. (active, half_open_range_patterns, "1.41.0", Some(67264), None), + /// Allows using `..=X` as a patterns in slices. + (active, half_open_range_patterns_in_slices, "CURRENT_RUSTC_VERSION", Some(67264), None), /// Allows `if let` guard in match arms. (active, if_let_guard, "1.47.0", Some(51114), None), /// Allows using imported `main` function diff --git a/compiler/rustc_middle/src/lib.rs b/compiler/rustc_middle/src/lib.rs index a180706e1cf0f..8d9a0388e21fd 100644 --- a/compiler/rustc_middle/src/lib.rs +++ b/compiler/rustc_middle/src/lib.rs @@ -44,7 +44,7 @@ #![feature(type_alias_impl_trait)] #![feature(associated_type_bounds)] #![feature(rustc_attrs)] -#![feature(half_open_range_patterns)] +#![cfg_attr(bootstrap, feature(half_open_range_patterns))] #![feature(control_flow_enum)] #![feature(associated_type_defaults)] #![feature(trusted_step)] diff --git a/compiler/rustc_parse/src/parser/pat.rs b/compiler/rustc_parse/src/parser/pat.rs index 0250b518243c1..56efec422d68d 100644 --- a/compiler/rustc_parse/src/parser/pat.rs +++ b/compiler/rustc_parse/src/parser/pat.rs @@ -777,7 +777,6 @@ impl<'a> Parser<'a> { /// expression syntax `...expr` for splatting in expressions. fn parse_pat_range_to(&mut self, mut re: Spanned) -> PResult<'a, PatKind> { let end = self.parse_pat_range_end()?; - self.sess.gated_spans.gate(sym::half_open_range_patterns, re.span.to(self.prev_token.span)); if let RangeEnd::Included(ref mut syn @ RangeSyntax::DotDotDot) = &mut re.node { *syn = RangeSyntax::DotDotEq; self.struct_span_err(re.span, "range-to patterns with `...` are not allowed") diff --git a/compiler/rustc_span/src/symbol.rs b/compiler/rustc_span/src/symbol.rs index 8cb7d147d0253..fe4fd33bdbacd 100644 --- a/compiler/rustc_span/src/symbol.rs +++ b/compiler/rustc_span/src/symbol.rs @@ -785,6 +785,7 @@ symbols! { globs, gt, half_open_range_patterns, + half_open_range_patterns_in_slices, hash, hexagon_target_feature, hidden, diff --git a/src/doc/unstable-book/src/language-features/half-open-range-patterns-in-slices.md b/src/doc/unstable-book/src/language-features/half-open-range-patterns-in-slices.md new file mode 100644 index 0000000000000..56a1a97df1629 --- /dev/null +++ b/src/doc/unstable-book/src/language-features/half-open-range-patterns-in-slices.md @@ -0,0 +1,30 @@ +# `half_open_range_patterns_in_slices` + +The tracking issue for this feature is: [#67264] +It is part of the `exclusive_range_pattern` feature, +tracked at [#37854]. + +[#67264]: https://github.com/rust-lang/rust/issues/67264 +[#37854]: https://github.com/rust-lang/rust/issues/37854 +----- + +This feature allow using top-level half-open range patterns in slices. + +```rust +#![feature(half_open_range_patterns_in_slices)] +#![feature(exclusive_range_pattern)] + +fn main() { + let xs = [13, 1, 5, 2, 3, 1, 21, 8]; + let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs else { return; }; +} +``` + +Note that this feature is not required if the patterns are wrapped between parenthesis. + +```rust +fn main() { + let xs = [13, 1]; + let [(a @ 3..), c] = xs else { return; }; +} +``` diff --git a/src/doc/unstable-book/src/language-features/half-open-range-patterns.md b/src/doc/unstable-book/src/language-features/half-open-range-patterns.md deleted file mode 100644 index 3b16dd049ce33..0000000000000 --- a/src/doc/unstable-book/src/language-features/half-open-range-patterns.md +++ /dev/null @@ -1,27 +0,0 @@ -# `half_open_range_patterns` - -The tracking issue for this feature is: [#67264] -It is part of the `#![exclusive_range_pattern]` feature, -tracked at [#37854]. - -[#67264]: https://github.com/rust-lang/rust/issues/67264 -[#37854]: https://github.com/rust-lang/rust/issues/37854 ------ - -The `half_open_range_patterns` feature allows RangeTo patterns -(`..10`) to be used in appropriate pattern matching contexts. -This requires also enabling the `exclusive_range_pattern` feature. - -It also enabled RangeFrom patterns but that has since been -stabilized. - -```rust -#![feature(half_open_range_patterns)] -#![feature(exclusive_range_pattern)] - let x = 5; - match x { - ..0 => println!("negative!"), // "RangeTo" pattern. Unstable. - 0 => println!("zero!"), - 1.. => println!("positive!"), // "RangeFrom" pattern. Stable. - } -``` diff --git a/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs b/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs index 64b13ebb76013..bf4f14f4d5a11 100644 --- a/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs +++ b/src/test/ui/consts/miri_unleashed/const_refers_to_static_cross_crate.rs @@ -1,7 +1,7 @@ // compile-flags: -Zunleash-the-miri-inside-of-you // aux-build:static_cross_crate.rs // stderr-per-bitwidth -#![feature(exclusive_range_pattern, half_open_range_patterns)] +#![feature(exclusive_range_pattern, half_open_range_patterns_in_slices)] extern crate static_cross_crate; diff --git a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.rs b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.rs index 3f4c17836c4fc..b2e9ffb57727e 100644 --- a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.rs +++ b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision.rs @@ -1,4 +1,4 @@ -#![feature(half_open_range_patterns)] +#![feature(half_open_range_patterns_in_slices)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs index dedc85491b4a9..20f4d8f882a75 100644 --- a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs +++ b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision2.rs @@ -1,4 +1,4 @@ -#![feature(half_open_range_patterns)] +#![feature(half_open_range_patterns_in_slices)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.rs b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.rs index 6a9b562cc3a3b..14ca07d0a5388 100644 --- a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.rs +++ b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.rs @@ -1,4 +1,3 @@ -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.stderr b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.stderr index 665eef2fcb96c..790a1337228d0 100644 --- a/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.stderr +++ b/src/test/ui/half-open-range-patterns/exclusive_range_pattern_syntax_collision3.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/exclusive_range_pattern_syntax_collision3.rs:6:12 + --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:12 | LL | match [5..4, 99..105, 43..44] { | ----------------------- this expression has type `[std::ops::Range<{integer}>; 3]` @@ -10,7 +10,7 @@ LL | [..9, 99..100, _] => {}, found type `{integer}` error[E0308]: mismatched types - --> $DIR/exclusive_range_pattern_syntax_collision3.rs:6:15 + --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15 | LL | match [5..4, 99..105, 43..44] { | ----------------------- this expression has type `[std::ops::Range<{integer}>; 3]` @@ -23,7 +23,7 @@ LL | [..9, 99..100, _] => {}, found type `{integer}` error[E0308]: mismatched types - --> $DIR/exclusive_range_pattern_syntax_collision3.rs:6:19 + --> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:19 | LL | match [5..4, 99..105, 43..44] { | ----------------------- this expression has type `[std::ops::Range<{integer}>; 3]` diff --git a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs new file mode 100644 index 0000000000000..dac973473490e --- /dev/null +++ b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.rs @@ -0,0 +1,7 @@ +#![feature(exclusive_range_pattern)] + +fn main() { + let xs = [13, 1, 5, 2, 3, 1, 21, 8]; + let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; + //~^ `X..` patterns in slices are experimental +} diff --git a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr new file mode 100644 index 0000000000000..ee5b0e11c66fa --- /dev/null +++ b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns-in-slices.stderr @@ -0,0 +1,12 @@ +error[E0658]: `X..` patterns in slices are experimental + --> $DIR/feature-gate-half-open-range-patterns-in-slices.rs:5:10 + | +LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; + | ^^^^^^^ + | + = note: see issue #67264 for more information + = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable + +error: aborting due to previous error + +For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.rs b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.rs deleted file mode 100644 index 9281dda678ddd..0000000000000 --- a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.rs +++ /dev/null @@ -1,18 +0,0 @@ -#![feature(exclusive_range_pattern)] - -fn main() {} - -#[cfg(FALSE)] -fn foo() { - if let ..=5 = 0 {} - //~^ ERROR half-open range patterns are unstable - if let ...5 = 0 {} - //~^ ERROR half-open range patterns are unstable - //~| ERROR range-to patterns with `...` are not allowed - if let ..5 = 0 {} - //~^ ERROR half-open range patterns are unstable - if let 5..= = 0 {} - //~^ ERROR inclusive range with no end - if let 5... = 0 {} - //~^ ERROR inclusive range with no end -} diff --git a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.stderr b/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.stderr deleted file mode 100644 index a04883ae14764..0000000000000 --- a/src/test/ui/half-open-range-patterns/feature-gate-half-open-range-patterns.stderr +++ /dev/null @@ -1,53 +0,0 @@ -error: range-to patterns with `...` are not allowed - --> $DIR/feature-gate-half-open-range-patterns.rs:9:12 - | -LL | if let ...5 = 0 {} - | ^^^ help: use `..=` instead - -error[E0586]: inclusive range with no end - --> $DIR/feature-gate-half-open-range-patterns.rs:14:13 - | -LL | if let 5..= = 0 {} - | ^^^ help: use `..` instead - | - = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) - -error[E0586]: inclusive range with no end - --> $DIR/feature-gate-half-open-range-patterns.rs:16:13 - | -LL | if let 5... = 0 {} - | ^^^ help: use `..` instead - | - = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) - -error[E0658]: half-open range patterns are unstable - --> $DIR/feature-gate-half-open-range-patterns.rs:7:12 - | -LL | if let ..=5 = 0 {} - | ^^^^ - | - = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable - -error[E0658]: half-open range patterns are unstable - --> $DIR/feature-gate-half-open-range-patterns.rs:9:12 - | -LL | if let ...5 = 0 {} - | ^^^^ - | - = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable - -error[E0658]: half-open range patterns are unstable - --> $DIR/feature-gate-half-open-range-patterns.rs:12:12 - | -LL | if let ..5 = 0 {} - | ^^^ - | - = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable - -error: aborting due to 6 previous errors - -Some errors have detailed explanations: E0586, E0658. -For more information about an error, try `rustc --explain E0586`. diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.rs index b08732219db7d..17ea2b13f690f 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.rs @@ -1,4 +1,3 @@ -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.stderr index df0dae5696de6..f7c59a1961933 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-bad-types.stderr @@ -1,17 +1,17 @@ error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/half-open-range-pats-bad-types.rs:5:9 + --> $DIR/half-open-range-pats-bad-types.rs:4:9 | LL | let "a".. = "a"; | ^^^ this is of type `&'static str` but it should be `char` or numeric error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/half-open-range-pats-bad-types.rs:6:11 + --> $DIR/half-open-range-pats-bad-types.rs:5:11 | LL | let .."a" = "a"; | ^^^ this is of type `&'static str` but it should be `char` or numeric error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/half-open-range-pats-bad-types.rs:7:12 + --> $DIR/half-open-range-pats-bad-types.rs:6:12 | LL | let ..="a" = "a"; | ^^^ this is of type `&'static str` but it should be `char` or numeric diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.rs index be225359bffab..a2a4c62fa0295 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.rs @@ -1,6 +1,5 @@ // Test various non-exhaustive matches for `X..`, `..=X` and `..X` ranges. -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] #![allow(illegal_floating_point_literal_pattern)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.stderr index d429b4e8effbf..6b20a820b7302 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-fail.stderr @@ -1,5 +1,5 @@ error[E0004]: non-exhaustive patterns: `_` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:16:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:15:8 | LL | m!(0f32, f32::NEG_INFINITY..); | ^^^^ pattern `_` not covered @@ -11,7 +11,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() } | ++++++++++++++ error[E0004]: non-exhaustive patterns: `_` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:17:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:16:8 | LL | m!(0f32, ..f32::INFINITY); | ^^^^ pattern `_` not covered @@ -23,7 +23,7 @@ LL | match $s { $($t)+ => {}, _ => todo!() } | ++++++++++++++ error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:26:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:25:8 | LL | m!('a', ..core::char::MAX); | ^^^ pattern `'\u{10ffff}'` not covered @@ -35,7 +35,7 @@ LL | match $s { $($t)+ => {}, '\u{10ffff}' => todo!() } | +++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `'\u{10fffe}'..='\u{10ffff}'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:27:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:26:8 | LL | m!('a', ..ALMOST_MAX); | ^^^ pattern `'\u{10fffe}'..='\u{10ffff}'` not covered @@ -47,7 +47,7 @@ LL | match $s { $($t)+ => {}, '\u{10fffe}'..='\u{10ffff}' => todo!() } | ++++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `'\0'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:28:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:27:8 | LL | m!('a', ALMOST_MIN..); | ^^^ pattern `'\0'` not covered @@ -59,7 +59,7 @@ LL | match $s { $($t)+ => {}, '\0' => todo!() } | +++++++++++++++++ error[E0004]: non-exhaustive patterns: `'\u{10ffff}'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:29:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:28:8 | LL | m!('a', ..=ALMOST_MAX); | ^^^ pattern `'\u{10ffff}'` not covered @@ -71,7 +71,7 @@ LL | match $s { $($t)+ => {}, '\u{10ffff}' => todo!() } | +++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `'b'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:30:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:29:8 | LL | m!('a', ..=VAL | VAL_2..); | ^^^ pattern `'b'` not covered @@ -83,7 +83,7 @@ LL | match $s { $($t)+ => {}, 'b' => todo!() } | ++++++++++++++++ error[E0004]: non-exhaustive patterns: `'b'` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:31:8 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:30:8 | LL | m!('a', ..VAL_1 | VAL_2..); | ^^^ pattern `'b'` not covered @@ -95,7 +95,7 @@ LL | match $s { $($t)+ => {}, 'b' => todo!() } | ++++++++++++++++ error[E0004]: non-exhaustive patterns: `u8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:41:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:40:12 | LL | m!(0, ..u8::MAX); | ^ pattern `u8::MAX` not covered @@ -107,7 +107,7 @@ LL | match $s { $($t)+ => {}, u8::MAX => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `254_u8..=u8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:42:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:41:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `254_u8..=u8::MAX` not covered @@ -119,7 +119,7 @@ LL | match $s { $($t)+ => {}, 254_u8..=u8::MAX => todo!() } | +++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u8` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:43:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:42:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `0_u8` not covered @@ -131,7 +131,7 @@ LL | match $s { $($t)+ => {}, 0_u8 => todo!() } | +++++++++++++++++ error[E0004]: non-exhaustive patterns: `u8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:44:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:43:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `u8::MAX` not covered @@ -143,7 +143,7 @@ LL | match $s { $($t)+ => {}, u8::MAX => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u8` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:45:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:44:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_u8` not covered @@ -155,7 +155,7 @@ LL | match $s { $($t)+ => {}, 43_u8 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u8` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:46:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:45:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_u8` not covered @@ -167,7 +167,7 @@ LL | match $s { $($t)+ => {}, 43_u8 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:54:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:53:12 | LL | m!(0, ..u16::MAX); | ^ pattern `u16::MAX` not covered @@ -179,7 +179,7 @@ LL | match $s { $($t)+ => {}, u16::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `65534_u16..=u16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:55:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:54:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `65534_u16..=u16::MAX` not covered @@ -191,7 +191,7 @@ LL | match $s { $($t)+ => {}, 65534_u16..=u16::MAX => todo!() } | +++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u16` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:56:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:55:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `0_u16` not covered @@ -203,7 +203,7 @@ LL | match $s { $($t)+ => {}, 0_u16 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:57:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:56:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `u16::MAX` not covered @@ -215,7 +215,7 @@ LL | match $s { $($t)+ => {}, u16::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u16` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:58:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:57:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_u16` not covered @@ -227,7 +227,7 @@ LL | match $s { $($t)+ => {}, 43_u16 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u16` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:59:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:58:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_u16` not covered @@ -239,7 +239,7 @@ LL | match $s { $($t)+ => {}, 43_u16 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:67:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:66:12 | LL | m!(0, ..u32::MAX); | ^ pattern `u32::MAX` not covered @@ -251,7 +251,7 @@ LL | match $s { $($t)+ => {}, u32::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `4294967294_u32..=u32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:68:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:67:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `4294967294_u32..=u32::MAX` not covered @@ -263,7 +263,7 @@ LL | match $s { $($t)+ => {}, 4294967294_u32..=u32::MAX => todo!() } | ++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u32` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:69:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:68:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `0_u32` not covered @@ -275,7 +275,7 @@ LL | match $s { $($t)+ => {}, 0_u32 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:70:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:69:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `u32::MAX` not covered @@ -287,7 +287,7 @@ LL | match $s { $($t)+ => {}, u32::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u32` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:71:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:70:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_u32` not covered @@ -299,7 +299,7 @@ LL | match $s { $($t)+ => {}, 43_u32 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u32` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:72:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:71:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_u32` not covered @@ -311,7 +311,7 @@ LL | match $s { $($t)+ => {}, 43_u32 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:80:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:79:12 | LL | m!(0, ..u64::MAX); | ^ pattern `u64::MAX` not covered @@ -323,7 +323,7 @@ LL | match $s { $($t)+ => {}, u64::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `18446744073709551614_u64..=u64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:81:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:80:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `18446744073709551614_u64..=u64::MAX` not covered @@ -335,7 +335,7 @@ LL | match $s { $($t)+ => {}, 18446744073709551614_u64..=u64::MAX => tod | ++++++++++++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u64` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:82:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:81:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `0_u64` not covered @@ -347,7 +347,7 @@ LL | match $s { $($t)+ => {}, 0_u64 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:83:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:82:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `u64::MAX` not covered @@ -359,7 +359,7 @@ LL | match $s { $($t)+ => {}, u64::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u64` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:84:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:83:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_u64` not covered @@ -371,7 +371,7 @@ LL | match $s { $($t)+ => {}, 43_u64 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u64` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:85:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:84:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_u64` not covered @@ -383,7 +383,7 @@ LL | match $s { $($t)+ => {}, 43_u64 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:93:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:92:12 | LL | m!(0, ..u128::MAX); | ^ pattern `u128::MAX` not covered @@ -395,7 +395,7 @@ LL | match $s { $($t)+ => {}, u128::MAX => todo!() } | ++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `340282366920938463463374607431768211454_u128..=u128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:94:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:93:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `340282366920938463463374607431768211454_u128..=u128::MAX` not covered @@ -407,7 +407,7 @@ LL | match $s { $($t)+ => {}, 340282366920938463463374607431768211454_u1 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `0_u128` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:95:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:94:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `0_u128` not covered @@ -419,7 +419,7 @@ LL | match $s { $($t)+ => {}, 0_u128 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `u128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:96:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:95:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `u128::MAX` not covered @@ -431,7 +431,7 @@ LL | match $s { $($t)+ => {}, u128::MAX => todo!() } | ++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u128` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:97:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:96:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_u128` not covered @@ -443,7 +443,7 @@ LL | match $s { $($t)+ => {}, 43_u128 => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_u128` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:98:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:97:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_u128` not covered @@ -455,7 +455,7 @@ LL | match $s { $($t)+ => {}, 43_u128 => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:109:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:108:12 | LL | m!(0, ..i8::MAX); | ^ pattern `i8::MAX` not covered @@ -467,7 +467,7 @@ LL | match $s { $($t)+ => {}, i8::MAX => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `126_i8..=i8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:110:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:109:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `126_i8..=i8::MAX` not covered @@ -479,7 +479,7 @@ LL | match $s { $($t)+ => {}, 126_i8..=i8::MAX => todo!() } | +++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i8::MIN` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:111:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:110:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `i8::MIN` not covered @@ -491,7 +491,7 @@ LL | match $s { $($t)+ => {}, i8::MIN => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i8::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:112:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:111:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `i8::MAX` not covered @@ -503,7 +503,7 @@ LL | match $s { $($t)+ => {}, i8::MAX => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i8` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:113:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:112:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_i8` not covered @@ -515,7 +515,7 @@ LL | match $s { $($t)+ => {}, 43_i8 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i8` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:114:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:113:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_i8` not covered @@ -527,7 +527,7 @@ LL | match $s { $($t)+ => {}, 43_i8 => todo!() } | ++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:122:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:121:12 | LL | m!(0, ..i16::MAX); | ^ pattern `i16::MAX` not covered @@ -539,7 +539,7 @@ LL | match $s { $($t)+ => {}, i16::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `32766_i16..=i16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:123:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:122:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `32766_i16..=i16::MAX` not covered @@ -551,7 +551,7 @@ LL | match $s { $($t)+ => {}, 32766_i16..=i16::MAX => todo!() } | +++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i16::MIN` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:124:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:123:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `i16::MIN` not covered @@ -563,7 +563,7 @@ LL | match $s { $($t)+ => {}, i16::MIN => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i16::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:125:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:124:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `i16::MAX` not covered @@ -575,7 +575,7 @@ LL | match $s { $($t)+ => {}, i16::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i16` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:126:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:125:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_i16` not covered @@ -587,7 +587,7 @@ LL | match $s { $($t)+ => {}, 43_i16 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i16` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:127:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:126:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_i16` not covered @@ -599,7 +599,7 @@ LL | match $s { $($t)+ => {}, 43_i16 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:135:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:134:12 | LL | m!(0, ..i32::MAX); | ^ pattern `i32::MAX` not covered @@ -611,7 +611,7 @@ LL | match $s { $($t)+ => {}, i32::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `2147483646_i32..=i32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:136:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:135:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `2147483646_i32..=i32::MAX` not covered @@ -623,7 +623,7 @@ LL | match $s { $($t)+ => {}, 2147483646_i32..=i32::MAX => todo!() } | ++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i32::MIN` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:137:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:136:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `i32::MIN` not covered @@ -635,7 +635,7 @@ LL | match $s { $($t)+ => {}, i32::MIN => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i32::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:138:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:137:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `i32::MAX` not covered @@ -647,7 +647,7 @@ LL | match $s { $($t)+ => {}, i32::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i32` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:139:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:138:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_i32` not covered @@ -659,7 +659,7 @@ LL | match $s { $($t)+ => {}, 43_i32 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i32` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:140:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:139:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_i32` not covered @@ -671,7 +671,7 @@ LL | match $s { $($t)+ => {}, 43_i32 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:148:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:147:12 | LL | m!(0, ..i64::MAX); | ^ pattern `i64::MAX` not covered @@ -683,7 +683,7 @@ LL | match $s { $($t)+ => {}, i64::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `9223372036854775806_i64..=i64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:149:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:148:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `9223372036854775806_i64..=i64::MAX` not covered @@ -695,7 +695,7 @@ LL | match $s { $($t)+ => {}, 9223372036854775806_i64..=i64::MAX => todo | +++++++++++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i64::MIN` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:150:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:149:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `i64::MIN` not covered @@ -707,7 +707,7 @@ LL | match $s { $($t)+ => {}, i64::MIN => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i64::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:151:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:150:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `i64::MAX` not covered @@ -719,7 +719,7 @@ LL | match $s { $($t)+ => {}, i64::MAX => todo!() } | +++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i64` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:152:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:151:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_i64` not covered @@ -731,7 +731,7 @@ LL | match $s { $($t)+ => {}, 43_i64 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i64` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:153:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:152:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_i64` not covered @@ -743,7 +743,7 @@ LL | match $s { $($t)+ => {}, 43_i64 => todo!() } | +++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:161:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:160:12 | LL | m!(0, ..i128::MAX); | ^ pattern `i128::MAX` not covered @@ -755,7 +755,7 @@ LL | match $s { $($t)+ => {}, i128::MAX => todo!() } | ++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `170141183460469231731687303715884105726_i128..=i128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:162:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:161:12 | LL | m!(0, ..ALMOST_MAX); | ^ pattern `170141183460469231731687303715884105726_i128..=i128::MAX` not covered @@ -767,7 +767,7 @@ LL | match $s { $($t)+ => {}, 170141183460469231731687303715884105726_i1 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i128::MIN` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:163:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:162:12 | LL | m!(0, ALMOST_MIN..); | ^ pattern `i128::MIN` not covered @@ -779,7 +779,7 @@ LL | match $s { $($t)+ => {}, i128::MIN => todo!() } | ++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `i128::MAX` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:164:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:163:12 | LL | m!(0, ..=ALMOST_MAX); | ^ pattern `i128::MAX` not covered @@ -791,7 +791,7 @@ LL | match $s { $($t)+ => {}, i128::MAX => todo!() } | ++++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i128` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:165:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:164:12 | LL | m!(0, ..=VAL | VAL_2..); | ^ pattern `43_i128` not covered @@ -803,7 +803,7 @@ LL | match $s { $($t)+ => {}, 43_i128 => todo!() } | ++++++++++++++++++++ error[E0004]: non-exhaustive patterns: `43_i128` not covered - --> $DIR/half-open-range-pats-exhaustive-fail.rs:166:12 + --> $DIR/half-open-range-pats-exhaustive-fail.rs:165:12 | LL | m!(0, ..VAL_1 | VAL_2..); | ^ pattern `43_i128` not covered diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs index d3a59e4dffcd6..4b7eee134e40c 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-exhaustive-pass.rs @@ -2,7 +2,6 @@ // Test various exhaustive matches for `X..`, `..=X` and `..X` ranges. -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() {} diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs index daed775cf7c01..526a797e9d649 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs @@ -7,8 +7,6 @@ // there's a potential confusion factor here, and we would prefer to keep patterns // and expressions in-sync. As such, we do not allow `...X` in patterns either. -#![feature(half_open_range_patterns)] - fn main() {} #[cfg(FALSE)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr index da37ff3016941..ddffeaf978059 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-dotdotdot-bad-syntax.stderr @@ -1,29 +1,29 @@ error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:17:9 + --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:15:9 | LL | ...X => {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:18:9 + --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:16:9 | LL | ...0 => {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:19:9 + --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:17:9 | LL | ...'a' => {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:20:9 + --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:18:9 | LL | ...0.0f32 => {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:27:17 + --> $DIR/half-open-range-pats-inclusive-dotdotdot-bad-syntax.rs:25:17 | LL | let ...$e; | ^^^ help: use `..=` instead diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.rs index 9ace0c357b2d4..6567c8cc67cb0 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.rs @@ -1,8 +1,6 @@ // Test `X...` and `X..=` range patterns not being allowed syntactically. // FIXME(Centril): perhaps these should be semantic restrictions. -#![feature(half_open_range_patterns)] - fn main() {} #[cfg(FALSE)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr index 5a504a90b5f07..3ad84b0ef26f8 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-inclusive-no-end.stderr @@ -1,5 +1,5 @@ error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:10:13 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:8:13 | LL | if let 0... = 1 {} | ^^^ help: use `..` instead @@ -7,7 +7,7 @@ LL | if let 0... = 1 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:11:13 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:9:13 | LL | if let 0..= = 1 {} | ^^^ help: use `..` instead @@ -15,7 +15,7 @@ LL | if let 0..= = 1 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:13:13 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:11:13 | LL | if let X... = 1 {} | ^^^ help: use `..` instead @@ -23,7 +23,7 @@ LL | if let X... = 1 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:14:13 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:12:13 | LL | if let X..= = 1 {} | ^^^ help: use `..` instead @@ -31,7 +31,7 @@ LL | if let X..= = 1 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:20:19 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:18:19 | LL | let $e...; | ^^^ help: use `..` instead @@ -43,7 +43,7 @@ LL | mac!(0); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-inclusive-no-end.rs:21:19 + --> $DIR/half-open-range-pats-inclusive-no-end.rs:19:19 | LL | let $e..=; | ^^^ help: use `..` instead diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs index f054bbea4e3e7..2d63fe0785616 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.rs @@ -1,5 +1,3 @@ -#![feature(half_open_range_patterns)] - fn main() {} #[cfg(FALSE)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr index 93b73c57e9b4d..111e81799625e 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-ref-ambiguous-interp.stderr @@ -1,11 +1,11 @@ error: the range pattern here has ambiguous interpretation - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:6:10 | LL | &0.. | _ => {} | ^^^ help: add parentheses to clarify the precedence: `(0..)` error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:10:11 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:11 | LL | &0..= | _ => {} | ^^^ help: use `..` instead @@ -13,13 +13,13 @@ LL | &0..= | _ => {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: the range pattern here has ambiguous interpretation - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:10:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:8:10 | LL | &0..= | _ => {} | ^^^^ help: add parentheses to clarify the precedence: `(0..=)` error[E0586]: inclusive range with no end - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:13:11 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:11:11 | LL | &0... | _ => {} | ^^^ help: use `..` instead @@ -27,25 +27,25 @@ LL | &0... | _ => {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: the range pattern here has ambiguous interpretation - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:18:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:16:10 | LL | &..0 | _ => {} | ^^^ help: add parentheses to clarify the precedence: `(..0)` error: the range pattern here has ambiguous interpretation - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:18:10 | LL | &..=0 | _ => {} | ^^^^ help: add parentheses to clarify the precedence: `(..=0)` error: range-to patterns with `...` are not allowed - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:22:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10 | LL | &...0 | _ => {} | ^^^ help: use `..=` instead error: the range pattern here has ambiguous interpretation - --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:22:10 + --> $DIR/half-open-range-pats-ref-ambiguous-interp.rs:20:10 | LL | &...0 | _ => {} | ^^^^ help: add parentheses to clarify the precedence: `(..=0)` diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-semantics.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-semantics.rs index ae532d935df82..6c6ba93196b64 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-semantics.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-semantics.rs @@ -3,7 +3,6 @@ // Test half-open range patterns against their expression equivalents // via `.contains(...)` and make sure the dynamic semantics match. -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] #![allow(illegal_floating_point_literal_pattern)] #![allow(unreachable_patterns)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs index 8bb98d3b5c56f..9a73e89063f3d 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-syntactic-pass.rs @@ -3,7 +3,6 @@ // Test the parsing of half-open ranges. #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] fn main() {} diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.rs b/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.rs index 2c8e554b229c8..f55566602dba3 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.rs +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.rs @@ -1,4 +1,3 @@ -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] #![allow(illegal_floating_point_literal_pattern)] diff --git a/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.stderr b/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.stderr index 4931ddfac71c9..56b224a8542be 100644 --- a/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.stderr +++ b/src/test/ui/half-open-range-patterns/half-open-range-pats-thir-lower-empty.stderr @@ -1,155 +1,155 @@ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:12:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:11:11 | LL | m!(0, ..u8::MIN); | ^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:15:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:14:11 | LL | m!(0, ..u16::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:18:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:17:11 | LL | m!(0, ..u32::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:21:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:20:11 | LL | m!(0, ..u64::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:24:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:23:11 | LL | m!(0, ..u128::MIN); | ^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:28:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:27:11 | LL | m!(0, ..i8::MIN); | ^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:31:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:30:11 | LL | m!(0, ..i16::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:34:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:33:11 | LL | m!(0, ..i32::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:37:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:36:11 | LL | m!(0, ..i64::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:40:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:39:11 | LL | m!(0, ..i128::MIN); | ^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:44:14 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:43:14 | LL | m!(0f32, ..f32::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:47:14 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:46:14 | LL | m!(0f64, ..f64::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:51:13 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:50:13 | LL | m!('a', ..'\u{0}'); | ^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:12:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:11:11 | LL | m!(0, ..u8::MIN); | ^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:15:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:14:11 | LL | m!(0, ..u16::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:18:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:17:11 | LL | m!(0, ..u32::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:21:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:20:11 | LL | m!(0, ..u64::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:24:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:23:11 | LL | m!(0, ..u128::MIN); | ^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:28:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:27:11 | LL | m!(0, ..i8::MIN); | ^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:31:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:30:11 | LL | m!(0, ..i16::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:34:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:33:11 | LL | m!(0, ..i32::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:37:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:36:11 | LL | m!(0, ..i64::MIN); | ^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:40:11 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:39:11 | LL | m!(0, ..i128::MIN); | ^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:44:14 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:43:14 | LL | m!(0f32, ..f32::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:47:14 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:46:14 | LL | m!(0f64, ..f64::NEG_INFINITY); | ^^^^^^^^^^^^^^^^^^^ error[E0579]: lower range bound must be less than upper - --> $DIR/half-open-range-pats-thir-lower-empty.rs:51:13 + --> $DIR/half-open-range-pats-thir-lower-empty.rs:50:13 | LL | m!('a', ..'\u{0}'); | ^^^^^^^^^ diff --git a/src/test/ui/half-open-range-patterns/pat-tuple-4.rs b/src/test/ui/half-open-range-patterns/pat-tuple-4.rs index bd795368205fc..11c4ab9c5fc74 100644 --- a/src/test/ui/half-open-range-patterns/pat-tuple-4.rs +++ b/src/test/ui/half-open-range-patterns/pat-tuple-4.rs @@ -1,6 +1,5 @@ // check-pass -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/pat-tuple-5.rs b/src/test/ui/half-open-range-patterns/pat-tuple-5.rs index 613d907cfe329..995ef03c83ed7 100644 --- a/src/test/ui/half-open-range-patterns/pat-tuple-5.rs +++ b/src/test/ui/half-open-range-patterns/pat-tuple-5.rs @@ -1,4 +1,3 @@ -#![feature(half_open_range_patterns)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/pat-tuple-5.stderr b/src/test/ui/half-open-range-patterns/pat-tuple-5.stderr index 307ad711b74d9..c608426382d9a 100644 --- a/src/test/ui/half-open-range-patterns/pat-tuple-5.stderr +++ b/src/test/ui/half-open-range-patterns/pat-tuple-5.stderr @@ -1,5 +1,5 @@ error[E0308]: mismatched types - --> $DIR/pat-tuple-5.rs:8:10 + --> $DIR/pat-tuple-5.rs:7:10 | LL | match (0, 1) { | ------ this expression has type `({integer}, {integer})` diff --git a/src/test/ui/half-open-range-patterns/range_pat_interactions0.rs b/src/test/ui/half-open-range-patterns/range_pat_interactions0.rs index 8f745e8104f81..acb7feac132f4 100644 --- a/src/test/ui/half-open-range-patterns/range_pat_interactions0.rs +++ b/src/test/ui/half-open-range-patterns/range_pat_interactions0.rs @@ -1,7 +1,6 @@ // run-pass #![allow(incomplete_features)] #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] #![feature(inline_const_pat)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/range_pat_interactions3.rs b/src/test/ui/half-open-range-patterns/range_pat_interactions3.rs index 41c7e46dfc1ed..446ed45f9c6f0 100644 --- a/src/test/ui/half-open-range-patterns/range_pat_interactions3.rs +++ b/src/test/ui/half-open-range-patterns/range_pat_interactions3.rs @@ -16,8 +16,7 @@ fn main() { //~| exclusive range pattern syntax is experimental y @ -5.. => range_from.push(y), y @ ..-7 => assert_eq!(y, -8), - //~^ half-open range patterns are unstable - //~| exclusive range pattern syntax is experimental + //~^ exclusive range pattern syntax is experimental y => bottom.push(y), } } diff --git a/src/test/ui/half-open-range-patterns/range_pat_interactions3.stderr b/src/test/ui/half-open-range-patterns/range_pat_interactions3.stderr index 5e36996a462b2..f7fda67758fed 100644 --- a/src/test/ui/half-open-range-patterns/range_pat_interactions3.stderr +++ b/src/test/ui/half-open-range-patterns/range_pat_interactions3.stderr @@ -1,12 +1,3 @@ -error[E0658]: half-open range patterns are unstable - --> $DIR/range_pat_interactions3.rs:18:17 - | -LL | y @ ..-7 => assert_eq!(y, -8), - | ^^^^ - | - = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable - error[E0658]: inline-const in pattern position is experimental --> $DIR/range_pat_interactions3.rs:14:20 | @@ -52,6 +43,6 @@ LL | y @ ..-7 => assert_eq!(y, -8), = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable -error: aborting due to 6 previous errors +error: aborting due to 5 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem0.rs b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem0.rs index 2884a27349fbb..d54cbfbf4bbf9 100644 --- a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem0.rs +++ b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem0.rs @@ -1,4 +1,4 @@ -#![feature(half_open_range_patterns)] +#![feature(half_open_range_patterns_in_slices)] #![feature(exclusive_range_pattern)] fn main() { diff --git a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.rs b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.rs index 9e289b591d6e9..c37af75b8fb29 100644 --- a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.rs +++ b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.rs @@ -3,7 +3,6 @@ fn main() { let xs = [13, 1, 5, 2, 3, 1, 21, 8]; let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; //~^ `X..` patterns in slices are experimental - //~| half-open range patterns are unstable //~| exclusive range pattern syntax is experimental //~| exclusive range pattern syntax is experimental } diff --git a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr index eadaf87767069..3bca554b1e553 100644 --- a/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr +++ b/src/test/ui/half-open-range-patterns/slice_pattern_syntax_problem1.stderr @@ -1,12 +1,3 @@ -error[E0658]: half-open range patterns are unstable - --> $DIR/slice_pattern_syntax_problem1.rs:4:23 - | -LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; - | ^^^ - | - = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable - error[E0658]: `X..` patterns in slices are experimental --> $DIR/slice_pattern_syntax_problem1.rs:4:10 | @@ -14,7 +5,7 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; | ^^^^^^^ | = note: see issue #67264 for more information - = help: add `#![feature(half_open_range_patterns)]` to the crate attributes to enable + = help: add `#![feature(half_open_range_patterns_in_slices)]` to the crate attributes to enable error[E0658]: exclusive range pattern syntax is experimental --> $DIR/slice_pattern_syntax_problem1.rs:4:23 @@ -34,6 +25,6 @@ LL | let [a @ 3.., b @ ..3, c @ 4..6, ..] = xs; = note: see issue #37854 for more information = help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable -error: aborting due to 4 previous errors +error: aborting due to 3 previous errors For more information about this error, try `rustc --explain E0658`. diff --git a/src/test/ui/inline-const/const-match-pat-range.rs b/src/test/ui/inline-const/const-match-pat-range.rs index 7dc8c11355ab0..73d6334c36f8e 100644 --- a/src/test/ui/inline-const/const-match-pat-range.rs +++ b/src/test/ui/inline-const/const-match-pat-range.rs @@ -1,7 +1,8 @@ // build-pass #![allow(incomplete_features)] -#![feature(inline_const_pat, half_open_range_patterns, exclusive_range_pattern)] +#![feature(inline_const_pat, exclusive_range_pattern)] + fn main() { const N: u32 = 10; let x: u32 = 3; diff --git a/src/test/ui/macros/stringify.rs b/src/test/ui/macros/stringify.rs index dd159cb5b6efc..bc0d4488162b9 100644 --- a/src/test/ui/macros/stringify.rs +++ b/src/test/ui/macros/stringify.rs @@ -8,7 +8,6 @@ #![feature(const_trait_impl)] #![feature(decl_macro)] #![feature(generators)] -#![feature(half_open_range_patterns)] #![feature(more_qualified_paths)] #![feature(raw_ref_op)] #![feature(trait_alias)] diff --git a/src/test/ui/match/expr_before_ident_pat.rs b/src/test/ui/match/expr_before_ident_pat.rs index 47db6c3f4880d..27ef3d05a2954 100644 --- a/src/test/ui/match/expr_before_ident_pat.rs +++ b/src/test/ui/match/expr_before_ident_pat.rs @@ -1,5 +1,3 @@ -#![feature(half_open_range_patterns)] - macro_rules! funny { ($a:expr, $b:ident) => { match [1, 2] { diff --git a/src/test/ui/match/expr_before_ident_pat.stderr b/src/test/ui/match/expr_before_ident_pat.stderr index 2bd1b3b9454a6..57a2d2b26cff0 100644 --- a/src/test/ui/match/expr_before_ident_pat.stderr +++ b/src/test/ui/match/expr_before_ident_pat.stderr @@ -1,11 +1,11 @@ error[E0425]: cannot find value `a` in this scope - --> $DIR/expr_before_ident_pat.rs:12:12 + --> $DIR/expr_before_ident_pat.rs:10:12 | LL | funny!(a, a); | ^ not found in this scope error: arbitrary expressions aren't allowed in patterns - --> $DIR/expr_before_ident_pat.rs:12:12 + --> $DIR/expr_before_ident_pat.rs:10:12 | LL | funny!(a, a); | ^ diff --git a/src/test/ui/match/issue-41255.rs b/src/test/ui/match/issue-41255.rs index 9d7072f1665d1..d163801fd1902 100644 --- a/src/test/ui/match/issue-41255.rs +++ b/src/test/ui/match/issue-41255.rs @@ -1,7 +1,6 @@ // Matching against float literals should result in a linter error #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] #![allow(unused)] #![forbid(illegal_floating_point_literal_pattern)] diff --git a/src/test/ui/match/issue-41255.stderr b/src/test/ui/match/issue-41255.stderr index 596d6fad38b25..9bc49654e6d4b 100644 --- a/src/test/ui/match/issue-41255.stderr +++ b/src/test/ui/match/issue-41255.stderr @@ -1,5 +1,5 @@ error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:11:9 + --> $DIR/issue-41255.rs:10:9 | LL | 5.0 => {}, | ^^^ @@ -7,13 +7,13 @@ LL | 5.0 => {}, = warning: this was previously accepted by the compiler but is being phased out; it will become a hard error in a future release! = note: for more information, see issue #41620 note: the lint level is defined here - --> $DIR/issue-41255.rs:6:11 + --> $DIR/issue-41255.rs:5:11 | LL | #![forbid(illegal_floating_point_literal_pattern)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:13:9 + --> $DIR/issue-41255.rs:12:9 | LL | 5.0f32 => {}, | ^^^^^^ @@ -22,7 +22,7 @@ LL | 5.0f32 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:15:10 + --> $DIR/issue-41255.rs:14:10 | LL | -5.0 => {}, | ^^^ @@ -31,7 +31,7 @@ LL | -5.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:17:9 + --> $DIR/issue-41255.rs:16:9 | LL | 1.0 .. 33.0 => {}, | ^^^ @@ -40,7 +40,7 @@ LL | 1.0 .. 33.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:17:16 + --> $DIR/issue-41255.rs:16:16 | LL | 1.0 .. 33.0 => {}, | ^^^^ @@ -49,7 +49,7 @@ LL | 1.0 .. 33.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:21:9 + --> $DIR/issue-41255.rs:20:9 | LL | 39.0 ..= 70.0 => {}, | ^^^^ @@ -58,7 +58,7 @@ LL | 39.0 ..= 70.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:21:18 + --> $DIR/issue-41255.rs:20:18 | LL | 39.0 ..= 70.0 => {}, | ^^^^ @@ -67,7 +67,7 @@ LL | 39.0 ..= 70.0 => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:26:11 + --> $DIR/issue-41255.rs:25:11 | LL | ..71.0 => {} | ^^^^ @@ -76,7 +76,7 @@ LL | ..71.0 => {} = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:29:12 + --> $DIR/issue-41255.rs:28:12 | LL | ..=72.0 => {} | ^^^^ @@ -85,7 +85,7 @@ LL | ..=72.0 => {} = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:32:9 + --> $DIR/issue-41255.rs:31:9 | LL | 71.0.. => {} | ^^^^ @@ -94,7 +94,7 @@ LL | 71.0.. => {} = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:40:10 + --> $DIR/issue-41255.rs:39:10 | LL | (3.14, 1) => {}, | ^^^^ @@ -103,7 +103,7 @@ LL | (3.14, 1) => {}, = note: for more information, see issue #41620 error: floating-point types cannot be used in patterns - --> $DIR/issue-41255.rs:47:18 + --> $DIR/issue-41255.rs:46:18 | LL | Foo { x: 2.0 } => {}, | ^^^ diff --git a/src/test/ui/match/issue-92100.rs b/src/test/ui/match/issue-92100.rs index 021166b2ba560..baac570dd8a9d 100644 --- a/src/test/ui/match/issue-92100.rs +++ b/src/test/ui/match/issue-92100.rs @@ -1,4 +1,4 @@ -#![feature(half_open_range_patterns)] +#![feature(half_open_range_patterns_in_slices)] fn main() { match [1, 2] { diff --git a/src/test/ui/parser/attr-stmt-expr-attr-bad.rs b/src/test/ui/parser/attr-stmt-expr-attr-bad.rs index 09f494bdc2fed..469c3855c32ad 100644 --- a/src/test/ui/parser/attr-stmt-expr-attr-bad.rs +++ b/src/test/ui/parser/attr-stmt-expr-attr-bad.rs @@ -1,5 +1,3 @@ -#![feature(half_open_range_patterns)] - fn main() {} #[cfg(FALSE)] fn e() { let _ = box #![attr] 0; } diff --git a/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr b/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr index 7bb3db0301b3a..872c560cb510c 100644 --- a/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr +++ b/src/test/ui/parser/attr-stmt-expr-attr-bad.stderr @@ -1,5 +1,5 @@ error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:5:36 + --> $DIR/attr-stmt-expr-attr-bad.rs:3:36 | LL | #[cfg(FALSE)] fn e() { let _ = box #![attr] 0; } | ^^^^^^^^ @@ -8,19 +8,19 @@ LL | #[cfg(FALSE)] fn e() { let _ = box #![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: expected expression, found `]` - --> $DIR/attr-stmt-expr-attr-bad.rs:7:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:5:40 | LL | #[cfg(FALSE)] fn e() { let _ = [#[attr]]; } | ^ expected expression error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:9:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:7:35 | LL | #[cfg(FALSE)] fn e() { let _ = foo#[attr](); } | ^ expected one of 8 possible tokens error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:11:36 + --> $DIR/attr-stmt-expr-attr-bad.rs:9:36 | LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); } | ^^^^^^^^ @@ -29,13 +29,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); } = note: outer attributes, like `#[test]`, annotate the item following them error: expected expression, found `)` - --> $DIR/attr-stmt-expr-attr-bad.rs:11:44 + --> $DIR/attr-stmt-expr-attr-bad.rs:9:44 | LL | #[cfg(FALSE)] fn e() { let _ = foo(#![attr]); } | ^ expected expression error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:14:38 + --> $DIR/attr-stmt-expr-attr-bad.rs:12:38 | LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); } | ^^^^^^^^ @@ -44,13 +44,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); } = note: outer attributes, like `#[test]`, annotate the item following them error: expected expression, found `)` - --> $DIR/attr-stmt-expr-attr-bad.rs:14:46 + --> $DIR/attr-stmt-expr-attr-bad.rs:12:46 | LL | #[cfg(FALSE)] fn e() { let _ = x.foo(#![attr]); } | ^ expected expression error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:17:36 + --> $DIR/attr-stmt-expr-attr-bad.rs:15:36 | LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; } | ^^^^^^^^ @@ -59,7 +59,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = 0 + #![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:19:33 + --> $DIR/attr-stmt-expr-attr-bad.rs:17:33 | LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; } | ^^^^^^^^ @@ -68,7 +68,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = !#![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:21:33 + --> $DIR/attr-stmt-expr-attr-bad.rs:19:33 | LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; } | ^^^^^^^^ @@ -77,13 +77,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = -#![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: expected one of `!`, `.`, `::`, `;`, `?`, `else`, `{`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:23:34 + --> $DIR/attr-stmt-expr-attr-bad.rs:21:34 | LL | #[cfg(FALSE)] fn e() { let _ = x #![attr] as Y; } | ^ expected one of 8 possible tokens error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:25:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:23:35 | LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; } | ^^^^^^^^ @@ -92,7 +92,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] foo; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:27:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:25:40 | LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; } | ^^^^^^^^ @@ -101,7 +101,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] foo; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:29:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:27:35 | LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; } | ^^^^^^^^ @@ -110,7 +110,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = || #![attr] {foo}; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:31:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:29:40 | LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; } | ^^^^^^^^ @@ -119,19 +119,19 @@ LL | #[cfg(FALSE)] fn e() { let _ = move || #![attr] {foo}; } = note: outer attributes, like `#[test]`, annotate the item following them error: expected expression, found `..` - --> $DIR/attr-stmt-expr-attr-bad.rs:33:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:31:40 | LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..#[attr] 0; } | ^^ expected expression error: expected expression, found `..` - --> $DIR/attr-stmt-expr-attr-bad.rs:35:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:33:40 | LL | #[cfg(FALSE)] fn e() { let _ = #[attr] ..; } | ^^ expected expression error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:37:41 + --> $DIR/attr-stmt-expr-attr-bad.rs:35:41 | LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; } | ^^^^^^^^ @@ -140,7 +140,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &#![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:39:45 + --> $DIR/attr-stmt-expr-attr-bad.rs:37:45 | LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; } | ^^^^^^^^ @@ -149,7 +149,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = #[attr] &mut #![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:41:37 + --> $DIR/attr-stmt-expr-attr-bad.rs:39:37 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; } | -- ^^^^^^^ -- the attributes are attached to this branch @@ -158,7 +158,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 #[attr] {}; } | the branch belongs to this `if` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:43:38 + --> $DIR/attr-stmt-expr-attr-bad.rs:41:38 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; } | ^^^^^^^^ @@ -167,13 +167,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {#![attr]}; } = note: outer attributes, like `#[test]`, annotate the item following them error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:45:40 + --> $DIR/attr-stmt-expr-attr-bad.rs:43:40 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} #[attr] else {}; } | ^ expected one of `.`, `;`, `?`, `else`, or an operator error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:47:45 + --> $DIR/attr-stmt-expr-attr-bad.rs:45:45 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; } | ---- ^^^^^^^ -- the attributes are attached to this branch @@ -182,7 +182,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] {}; } | the branch belongs to this `else` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:49:46 + --> $DIR/attr-stmt-expr-attr-bad.rs:47:46 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; } | ^^^^^^^^ @@ -191,7 +191,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else {#![attr]}; } = note: outer attributes, like `#[test]`, annotate the item following them error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:51:45 + --> $DIR/attr-stmt-expr-attr-bad.rs:49:45 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; } | ---- ^^^^^^^ ------- the attributes are attached to this branch @@ -200,7 +200,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else #[attr] if 0 {}; } | the branch belongs to this `else` error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:53:50 + --> $DIR/attr-stmt-expr-attr-bad.rs:51:50 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; } | -- ^^^^^^^ -- the attributes are attached to this branch @@ -209,7 +209,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 #[attr] {}; } | the branch belongs to this `if` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:55:51 + --> $DIR/attr-stmt-expr-attr-bad.rs:53:51 | LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; } | ^^^^^^^^ @@ -218,7 +218,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if 0 {} else if 0 {#![attr]}; } = note: outer attributes, like `#[test]`, annotate the item following them error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:57:45 + --> $DIR/attr-stmt-expr-attr-bad.rs:55:45 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; } | -- ^^^^^^^ -- the attributes are attached to this branch @@ -227,7 +227,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 #[attr] {}; } | the branch belongs to this `if` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:59:46 + --> $DIR/attr-stmt-expr-attr-bad.rs:57:46 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; } | ^^^^^^^^ @@ -236,13 +236,13 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {#![attr]}; } = note: outer attributes, like `#[test]`, annotate the item following them error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:61:48 + --> $DIR/attr-stmt-expr-attr-bad.rs:59:48 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} #[attr] else {}; } | ^ expected one of `.`, `;`, `?`, `else`, or an operator error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:63:53 + --> $DIR/attr-stmt-expr-attr-bad.rs:61:53 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; } | ---- ^^^^^^^ -- the attributes are attached to this branch @@ -251,7 +251,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] {}; } | the branch belongs to this `else` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:65:54 + --> $DIR/attr-stmt-expr-attr-bad.rs:63:54 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; } | ^^^^^^^^ @@ -260,7 +260,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else {#![attr]}; } = note: outer attributes, like `#[test]`, annotate the item following them error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:67:53 + --> $DIR/attr-stmt-expr-attr-bad.rs:65:53 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {}; } | ---- ^^^^^^^ --------------- the attributes are attached to this branch @@ -269,7 +269,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else #[attr] if let _ = 0 {} | the branch belongs to this `else` error: outer attributes are not allowed on `if` and `else` branches - --> $DIR/attr-stmt-expr-attr-bad.rs:69:66 + --> $DIR/attr-stmt-expr-attr-bad.rs:67:66 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {}; } | -- ^^^^^^^ -- the attributes are attached to this branch @@ -278,7 +278,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 #[attr] {} | the branch belongs to this `if` error: an inner attribute is not permitted in this context - --> $DIR/attr-stmt-expr-attr-bad.rs:71:67 + --> $DIR/attr-stmt-expr-attr-bad.rs:69:67 | LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]}; } | ^^^^^^^^ @@ -287,7 +287,7 @@ LL | #[cfg(FALSE)] fn e() { let _ = if let _ = 0 {} else if let _ = 0 {#![attr]} = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted following an outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:74:32 + --> $DIR/attr-stmt-expr-attr-bad.rs:72:32 | LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; } | ------- ^^^^^^^^ not permitted following an outer attribute @@ -298,7 +298,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] let _ = 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted following an outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:76:32 + --> $DIR/attr-stmt-expr-attr-bad.rs:74:32 | LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; } | ------- ^^^^^^^^ not permitted following an outer attribute @@ -309,7 +309,7 @@ LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] 0; } = note: outer attributes, like `#[test]`, annotate the item following them error: an inner attribute is not permitted following an outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:78:32 + --> $DIR/attr-stmt-expr-attr-bad.rs:76:32 | LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!(); } | ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation @@ -325,7 +325,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!(); } | error: an inner attribute is not permitted following an outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:80:32 + --> $DIR/attr-stmt-expr-attr-bad.rs:78:32 | LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo![]; } | ------- ^^^^^^^^ ------- the inner attribute doesn't annotate this item macro invocation @@ -341,7 +341,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo![]; } | error: an inner attribute is not permitted following an outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:82:32 + --> $DIR/attr-stmt-expr-attr-bad.rs:80:32 | LL | #[cfg(FALSE)] fn s() { #[attr] #![attr] foo!{}; } | ------- ^^^^^^^^ ------ the inner attribute doesn't annotate this item macro invocation @@ -357,7 +357,7 @@ LL + #[cfg(FALSE)] fn s() { #[attr] #[attr] foo!{}; } | error[E0586]: inclusive range with no end - --> $DIR/attr-stmt-expr-attr-bad.rs:88:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:86:35 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } | ^^^ help: use `..` instead @@ -365,13 +365,13 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: expected one of `=>`, `if`, or `|`, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:88:38 + --> $DIR/attr-stmt-expr-attr-bad.rs:86:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] 10 => () } } | ^ expected one of `=>`, `if`, or `|` error[E0586]: inclusive range with no end - --> $DIR/attr-stmt-expr-attr-bad.rs:91:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:89:35 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } | ^^^ help: use `..` instead @@ -379,19 +379,19 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: expected one of `=>`, `if`, or `|`, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:91:38 + --> $DIR/attr-stmt-expr-attr-bad.rs:89:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] -10 => () } } | ^ expected one of `=>`, `if`, or `|` error: unexpected token: `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:94:39 + --> $DIR/attr-stmt-expr-attr-bad.rs:92:39 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=-#[attr] 10 => () } } | ^ error[E0586]: inclusive range with no end - --> $DIR/attr-stmt-expr-attr-bad.rs:96:35 + --> $DIR/attr-stmt-expr-attr-bad.rs:94:35 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } | ^^^ help: use `..` instead @@ -399,43 +399,43 @@ LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: expected one of `=>`, `if`, or `|`, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:96:38 + --> $DIR/attr-stmt-expr-attr-bad.rs:94:38 | LL | #[cfg(FALSE)] fn e() { match 0 { 0..=#[attr] FOO => () } } | ^ expected one of `=>`, `if`, or `|` error: unexpected token: `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:100:34 + --> $DIR/attr-stmt-expr-attr-bad.rs:98:34 | LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } | ^ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:100:34 + --> $DIR/attr-stmt-expr-attr-bad.rs:98:34 | LL | #[cfg(FALSE)] fn e() { let _ = x.#![attr]foo(); } | ^ expected one of `.`, `;`, `?`, `else`, or an operator error: unexpected token: `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:103:34 + --> $DIR/attr-stmt-expr-attr-bad.rs:101:34 | LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } | ^ error: expected one of `.`, `;`, `?`, `else`, or an operator, found `#` - --> $DIR/attr-stmt-expr-attr-bad.rs:103:34 + --> $DIR/attr-stmt-expr-attr-bad.rs:101:34 | LL | #[cfg(FALSE)] fn e() { let _ = x.#[attr]foo(); } | ^ expected one of `.`, `;`, `?`, `else`, or an operator error: expected statement after outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:108:37 + --> $DIR/attr-stmt-expr-attr-bad.rs:106:37 | LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr]; } } } | ^^^^^^^ error: expected statement after outer attribute - --> $DIR/attr-stmt-expr-attr-bad.rs:110:37 + --> $DIR/attr-stmt-expr-attr-bad.rs:108:37 | LL | #[cfg(FALSE)] fn e() { { fn foo() { #[attr] } } } | ^^^^^^^ diff --git a/src/test/ui/parser/issues/issue-63115-range-pat-interpolated.rs b/src/test/ui/parser/issues/issue-63115-range-pat-interpolated.rs index 8efb3c73f034f..b6e5091b6217e 100644 --- a/src/test/ui/parser/issues/issue-63115-range-pat-interpolated.rs +++ b/src/test/ui/parser/issues/issue-63115-range-pat-interpolated.rs @@ -1,7 +1,6 @@ // check-pass #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] #![allow(ellipsis_inclusive_range_patterns)] diff --git a/src/test/ui/parser/recover-range-pats.rs b/src/test/ui/parser/recover-range-pats.rs index 2e5a991543ff9..156c7ad94d36a 100644 --- a/src/test/ui/parser/recover-range-pats.rs +++ b/src/test/ui/parser/recover-range-pats.rs @@ -4,7 +4,6 @@ // 2. Or at least we have parser recovery if they don't. #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] #![deny(ellipsis_inclusive_range_patterns)] fn main() {} diff --git a/src/test/ui/parser/recover-range-pats.stderr b/src/test/ui/parser/recover-range-pats.stderr index 6c081052ddf7a..c54f13e018521 100644 --- a/src/test/ui/parser/recover-range-pats.stderr +++ b/src/test/ui/parser/recover-range-pats.stderr @@ -1,47 +1,47 @@ error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:22:12 + --> $DIR/recover-range-pats.rs:21:12 | LL | if let .0..Y = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:24:16 + --> $DIR/recover-range-pats.rs:23:16 | LL | if let X.. .0 = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:35:12 + --> $DIR/recover-range-pats.rs:34:12 | LL | if let .0..=Y = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:37:16 + --> $DIR/recover-range-pats.rs:36:16 | LL | if let X..=.0 = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:60:12 + --> $DIR/recover-range-pats.rs:59:12 | LL | if let .0...Y = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:64:17 + --> $DIR/recover-range-pats.rs:63:17 | LL | if let X... .0 = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:75:12 + --> $DIR/recover-range-pats.rs:74:12 | LL | if let .0.. = 0 {} | ^^ help: must have an integer part: `0.0` error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:81:13 + --> $DIR/recover-range-pats.rs:80:13 | LL | if let 0..= = 0 {} | ^^^ help: use `..` instead @@ -49,7 +49,7 @@ LL | if let 0..= = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:82:13 + --> $DIR/recover-range-pats.rs:81:13 | LL | if let X..= = 0 {} | ^^^ help: use `..` instead @@ -57,7 +57,7 @@ LL | if let X..= = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:83:16 + --> $DIR/recover-range-pats.rs:82:16 | LL | if let true..= = 0 {} | ^^^ help: use `..` instead @@ -65,13 +65,13 @@ LL | if let true..= = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:85:12 + --> $DIR/recover-range-pats.rs:84:12 | LL | if let .0..= = 0 {} | ^^ help: must have an integer part: `0.0` error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:85:14 + --> $DIR/recover-range-pats.rs:84:14 | LL | if let .0..= = 0 {} | ^^^ help: use `..` instead @@ -79,7 +79,7 @@ LL | if let .0..= = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:91:13 + --> $DIR/recover-range-pats.rs:90:13 | LL | if let 0... = 0 {} | ^^^ help: use `..` instead @@ -87,7 +87,7 @@ LL | if let 0... = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:92:13 + --> $DIR/recover-range-pats.rs:91:13 | LL | if let X... = 0 {} | ^^^ help: use `..` instead @@ -95,7 +95,7 @@ LL | if let X... = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:93:16 + --> $DIR/recover-range-pats.rs:92:16 | LL | if let true... = 0 {} | ^^^ help: use `..` instead @@ -103,13 +103,13 @@ LL | if let true... = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:95:12 + --> $DIR/recover-range-pats.rs:94:12 | LL | if let .0... = 0 {} | ^^ help: must have an integer part: `0.0` error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:95:14 + --> $DIR/recover-range-pats.rs:94:14 | LL | if let .0... = 0 {} | ^^^ help: use `..` instead @@ -117,49 +117,49 @@ LL | if let .0... = 0 {} = note: inclusive ranges must be bounded at the end (`..=b` or `a..=b`) error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:105:15 + --> $DIR/recover-range-pats.rs:104:15 | LL | if let .. .0 = 0 {} | ^^ help: must have an integer part: `0.0` error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:115:15 + --> $DIR/recover-range-pats.rs:114:15 | LL | if let ..=.0 = 0 {} | ^^ help: must have an integer part: `0.0` error: range-to patterns with `...` are not allowed - --> $DIR/recover-range-pats.rs:121:12 + --> $DIR/recover-range-pats.rs:120:12 | LL | if let ...3 = 0 {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/recover-range-pats.rs:123:12 + --> $DIR/recover-range-pats.rs:122:12 | LL | if let ...Y = 0 {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/recover-range-pats.rs:125:12 + --> $DIR/recover-range-pats.rs:124:12 | LL | if let ...true = 0 {} | ^^^ help: use `..=` instead error: float literals must have an integer part - --> $DIR/recover-range-pats.rs:128:15 + --> $DIR/recover-range-pats.rs:127:15 | LL | if let ....3 = 0 {} | ^^ help: must have an integer part: `0.3` error: range-to patterns with `...` are not allowed - --> $DIR/recover-range-pats.rs:128:12 + --> $DIR/recover-range-pats.rs:127:12 | LL | if let ....3 = 0 {} | ^^^ help: use `..=` instead error: range-to patterns with `...` are not allowed - --> $DIR/recover-range-pats.rs:150:17 + --> $DIR/recover-range-pats.rs:149:17 | LL | let ...$e; | ^^^ help: use `..=` instead @@ -170,7 +170,7 @@ LL | mac!(0); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:154:19 + --> $DIR/recover-range-pats.rs:153:19 | LL | let $e...; | ^^^ help: use `..` instead @@ -182,7 +182,7 @@ LL | mac!(0); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0586]: inclusive range with no end - --> $DIR/recover-range-pats.rs:155:19 + --> $DIR/recover-range-pats.rs:154:19 | LL | let $e..=; | ^^^ help: use `..` instead @@ -194,7 +194,7 @@ LL | mac!(0); = note: this error originates in the macro `mac` (in Nightly builds, run with -Z macro-backtrace for more info) error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:42:13 + --> $DIR/recover-range-pats.rs:41:13 | LL | if let 0...3 = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -202,13 +202,13 @@ LL | if let 0...3 = 0 {} = warning: this is accepted in the current edition (Rust 2015) but is a hard error in Rust 2021! = note: for more information, see note: the lint level is defined here - --> $DIR/recover-range-pats.rs:8:9 + --> $DIR/recover-range-pats.rs:7:9 | LL | #![deny(ellipsis_inclusive_range_patterns)] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:45:13 + --> $DIR/recover-range-pats.rs:44:13 | LL | if let 0...Y = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -217,7 +217,7 @@ LL | if let 0...Y = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:48:13 + --> $DIR/recover-range-pats.rs:47:13 | LL | if let X...3 = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -226,7 +226,7 @@ LL | if let X...3 = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:51:13 + --> $DIR/recover-range-pats.rs:50:13 | LL | if let X...Y = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -235,7 +235,7 @@ LL | if let X...Y = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:54:16 + --> $DIR/recover-range-pats.rs:53:16 | LL | if let true...Y = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -244,7 +244,7 @@ LL | if let true...Y = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:57:13 + --> $DIR/recover-range-pats.rs:56:13 | LL | if let X...true = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -253,7 +253,7 @@ LL | if let X...true = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:60:14 + --> $DIR/recover-range-pats.rs:59:14 | LL | if let .0...Y = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -262,7 +262,7 @@ LL | if let .0...Y = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:64:13 + --> $DIR/recover-range-pats.rs:63:13 | LL | if let X... .0 = 0 {} | ^^^ help: use `..=` for an inclusive range @@ -271,7 +271,7 @@ LL | if let X... .0 = 0 {} = note: for more information, see error: `...` range patterns are deprecated - --> $DIR/recover-range-pats.rs:138:20 + --> $DIR/recover-range-pats.rs:137:20 | LL | let $e1...$e2; | ^^^ help: use `..=` for an inclusive range @@ -284,7 +284,7 @@ LL | mac2!(0, 1); = note: this error originates in the macro `mac2` (in Nightly builds, run with -Z macro-backtrace for more info) error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:20:12 + --> $DIR/recover-range-pats.rs:19:12 | LL | if let true..Y = 0 {} | ^^^^ - this is of type `u8` @@ -292,7 +292,7 @@ LL | if let true..Y = 0 {} | this is of type `bool` but it should be `char` or numeric error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:21:15 + --> $DIR/recover-range-pats.rs:20:15 | LL | if let X..true = 0 {} | - ^^^^ this is of type `bool` but it should be `char` or numeric @@ -300,7 +300,7 @@ LL | if let X..true = 0 {} | this is of type `u8` error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:22:12 + --> $DIR/recover-range-pats.rs:21:12 | LL | if let .0..Y = 0 {} | ^^ - - this expression has type `{integer}` @@ -309,7 +309,7 @@ LL | if let .0..Y = 0 {} | expected integer, found floating-point number error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:24:16 + --> $DIR/recover-range-pats.rs:23:16 | LL | if let X.. .0 = 0 {} | - ^^ - this expression has type `u8` @@ -321,7 +321,7 @@ LL | if let X.. .0 = 0 {} found type `{float}` error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:33:12 + --> $DIR/recover-range-pats.rs:32:12 | LL | if let true..=Y = 0 {} | ^^^^ - this is of type `u8` @@ -329,7 +329,7 @@ LL | if let true..=Y = 0 {} | this is of type `bool` but it should be `char` or numeric error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:34:16 + --> $DIR/recover-range-pats.rs:33:16 | LL | if let X..=true = 0 {} | - ^^^^ this is of type `bool` but it should be `char` or numeric @@ -337,7 +337,7 @@ LL | if let X..=true = 0 {} | this is of type `u8` error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:35:12 + --> $DIR/recover-range-pats.rs:34:12 | LL | if let .0..=Y = 0 {} | ^^ - - this expression has type `{integer}` @@ -346,7 +346,7 @@ LL | if let .0..=Y = 0 {} | expected integer, found floating-point number error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:37:16 + --> $DIR/recover-range-pats.rs:36:16 | LL | if let X..=.0 = 0 {} | - ^^ - this expression has type `u8` @@ -358,7 +358,7 @@ LL | if let X..=.0 = 0 {} found type `{float}` error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:54:12 + --> $DIR/recover-range-pats.rs:53:12 | LL | if let true...Y = 0 {} | ^^^^ - this is of type `u8` @@ -366,7 +366,7 @@ LL | if let true...Y = 0 {} | this is of type `bool` but it should be `char` or numeric error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:57:16 + --> $DIR/recover-range-pats.rs:56:16 | LL | if let X...true = 0 {} | - ^^^^ this is of type `bool` but it should be `char` or numeric @@ -374,7 +374,7 @@ LL | if let X...true = 0 {} | this is of type `u8` error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:60:12 + --> $DIR/recover-range-pats.rs:59:12 | LL | if let .0...Y = 0 {} | ^^ - - this expression has type `{integer}` @@ -383,7 +383,7 @@ LL | if let .0...Y = 0 {} | expected integer, found floating-point number error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:64:17 + --> $DIR/recover-range-pats.rs:63:17 | LL | if let X... .0 = 0 {} | - ^^ - this expression has type `u8` @@ -395,13 +395,13 @@ LL | if let X... .0 = 0 {} found type `{float}` error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:73:12 + --> $DIR/recover-range-pats.rs:72:12 | LL | if let true.. = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:75:12 + --> $DIR/recover-range-pats.rs:74:12 | LL | if let .0.. = 0 {} | ^^ - this expression has type `{integer}` @@ -409,13 +409,13 @@ LL | if let .0.. = 0 {} | expected integer, found floating-point number error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:83:12 + --> $DIR/recover-range-pats.rs:82:12 | LL | if let true..= = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:85:12 + --> $DIR/recover-range-pats.rs:84:12 | LL | if let .0..= = 0 {} | ^^ - this expression has type `{integer}` @@ -423,13 +423,13 @@ LL | if let .0..= = 0 {} | expected integer, found floating-point number error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:93:12 + --> $DIR/recover-range-pats.rs:92:12 | LL | if let true... = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:95:12 + --> $DIR/recover-range-pats.rs:94:12 | LL | if let .0... = 0 {} | ^^ - this expression has type `{integer}` @@ -437,13 +437,13 @@ LL | if let .0... = 0 {} | expected integer, found floating-point number error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:103:14 + --> $DIR/recover-range-pats.rs:102:14 | LL | if let ..true = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:105:15 + --> $DIR/recover-range-pats.rs:104:15 | LL | if let .. .0 = 0 {} | ^^ - this expression has type `{integer}` @@ -451,13 +451,13 @@ LL | if let .. .0 = 0 {} | expected integer, found floating-point number error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:113:15 + --> $DIR/recover-range-pats.rs:112:15 | LL | if let ..=true = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:115:15 + --> $DIR/recover-range-pats.rs:114:15 | LL | if let ..=.0 = 0 {} | ^^ - this expression has type `{integer}` @@ -465,13 +465,13 @@ LL | if let ..=.0 = 0 {} | expected integer, found floating-point number error[E0029]: only `char` and numeric types are allowed in range patterns - --> $DIR/recover-range-pats.rs:125:15 + --> $DIR/recover-range-pats.rs:124:15 | LL | if let ...true = 0 {} | ^^^^ this is of type `bool` but it should be `char` or numeric error[E0308]: mismatched types - --> $DIR/recover-range-pats.rs:128:15 + --> $DIR/recover-range-pats.rs:127:15 | LL | if let ....3 = 0 {} | ^^ - this expression has type `{integer}` diff --git a/src/tools/clippy/tests/ui/match_overlapping_arm.rs b/src/tools/clippy/tests/ui/match_overlapping_arm.rs index 2f85e63571351..22b04b208f87b 100644 --- a/src/tools/clippy/tests/ui/match_overlapping_arm.rs +++ b/src/tools/clippy/tests/ui/match_overlapping_arm.rs @@ -1,5 +1,5 @@ #![feature(exclusive_range_pattern)] -#![feature(half_open_range_patterns)] + #![warn(clippy::match_overlapping_arm)] #![allow(clippy::redundant_pattern_matching)] #![allow(clippy::if_same_then_else, clippy::equatable_if_let)]