And --bless tests accordingly for those exceptions.

This commit is contained in:
Mazdak Farrokhzad 2019-07-24 04:01:38 +02:00
parent 18ccd6a33c
commit 87742073a0
14 changed files with 198 additions and 534 deletions

View file

@ -5,6 +5,5 @@ fn main() {
let _ = <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
let <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
let 0 ..= <<A>::B>::C; //~ ERROR cannot find type `A` in this scope
//~^ ERROR only char and numeric types are allowed in range patterns
<<A>::B>::C; //~ ERROR cannot find type `A` in this scope
}

View file

@ -23,21 +23,11 @@ LL | let 0 ..= <<A>::B>::C;
| ^ not found in this scope
error[E0412]: cannot find type `A` in this scope
--> $DIR/associated-path-shl.rs:9:7
--> $DIR/associated-path-shl.rs:8:7
|
LL | <<A>::B>::C;
| ^ not found in this scope
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/associated-path-shl.rs:7:15
|
LL | let 0 ..= <<A>::B>::C;
| ^^^^^^^^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error: aborting due to 5 previous errors
error: aborting due to 6 previous errors
Some errors have detailed explanations: E0029, E0412.
For more information about an error, try `rustc --explain E0029`.
For more information about this error, try `rustc --explain E0412`.

View file

@ -4,8 +4,7 @@ fn main() {
match [5..4, 99..105, 43..44] {
[_, 99.., _] => {},
//~^ ERROR `X..` range patterns are not supported
//~| ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR only char and numeric types are allowed in range patterns
//~| ERROR mismatched types
_ => {},
}
}

View file

@ -4,21 +4,17 @@ error: `X..` range patterns are not supported
LL | [_, 99.., _] => {},
| ^^^^ help: try using the maximum value for the type: `99..MAX`
error: arbitrary expressions aren't allowed in patterns
error[E0308]: mismatched types
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
|
LL | match [5..4, 99..105, 43..44] {
| ----------------------- this match expression has type `std::ops::Range<{integer}>`
LL | [_, 99.., _] => {},
| ^^^^
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
| ^^^^ expected struct `std::ops::Range`, found integer
|
LL | [_, 99.., _] => {},
| ^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
= note: expected type `std::ops::Range<{integer}>`
found type `{integer}`
error: aborting due to 3 previous errors
error: aborting due to 2 previous errors
For more information about this error, try `rustc --explain E0029`.
For more information about this error, try `rustc --explain E0308`.

View file

@ -4,9 +4,8 @@ fn main() {
match [5..4, 99..105, 43..44] {
[_, 99..] => {},
//~^ ERROR `X..` range patterns are not supported
//~| ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR pattern requires 2 elements but array has 3
//~| ERROR only char and numeric types are allowed in range patterns
//~| ERROR mismatched types
_ => {},
}
}

View file

@ -4,28 +4,24 @@ error: `X..` range patterns are not supported
LL | [_, 99..] => {},
| ^^^^ help: try using the maximum value for the type: `99..MAX`
error: arbitrary expressions aren't allowed in patterns
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
|
LL | [_, 99..] => {},
| ^^^^
error[E0527]: pattern requires 2 elements but array has 3
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:9
|
LL | [_, 99..] => {},
| ^^^^^^^^^ expected 3 elements
error[E0029]: only char and numeric types are allowed in range patterns
error[E0308]: mismatched types
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
|
LL | match [5..4, 99..105, 43..44] {
| ----------------------- this match expression has type `std::ops::Range<{integer}>`
LL | [_, 99..] => {},
| ^^^^ ranges require char or numeric types
| ^^^^ expected struct `std::ops::Range`, found integer
|
= note: start type: {integer}
= note: end type: [type error]
= note: expected type `std::ops::Range<{integer}>`
found type `{integer}`
error: aborting due to 4 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0029, E0527.
For more information about an error, try `rustc --explain E0029`.
Some errors have detailed explanations: E0308, E0527.
For more information about an error, try `rustc --explain E0308`.

View file

@ -4,8 +4,7 @@ fn main() {
match [5..4, 99..105, 43..44] {
[..9, 99..100, _] => {},
//~^ ERROR `..X` range patterns are not supported
//~| ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR only char and numeric types are allowed in range patterns
//~| ERROR mismatched types
//~| ERROR mismatched types
_ => {},
}

View file

@ -4,20 +4,16 @@ error: `..X` range patterns are not supported
LL | [..9, 99..100, _] => {},
| ^^^ help: try using the minimum value for the type: `MIN..9`
error: arbitrary expressions aren't allowed in patterns
error[E0308]: mismatched types
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
|
LL | match [5..4, 99..105, 43..44] {
| ----------------------- this match expression has type `std::ops::Range<{integer}>`
LL | [..9, 99..100, _] => {},
| ^^^
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:10
| ^^^ expected struct `std::ops::Range`, found integer
|
LL | [..9, 99..100, _] => {},
| ^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: {integer}
= note: expected type `std::ops::Range<{integer}>`
found type `{integer}`
error[E0308]: mismatched types
--> $DIR/exclusive_range_pattern_syntax_collision3.rs:5:15
@ -30,7 +26,6 @@ LL | [..9, 99..100, _] => {},
= note: expected type `std::ops::Range<{integer}>`
found type `{integer}`
error: aborting due to 4 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0029, E0308.
For more information about an error, try `rustc --explain E0029`.
For more information about this error, try `rustc --explain E0308`.

View file

@ -1,10 +1,11 @@
fn main() {
const PAT: u8 = 0;
match 0 {
(.. pat) => {}
(.. PAT) => {}
//~^ ERROR `..X` range patterns are not supported
//~| ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR cannot find value `pat` in this scope
//~| ERROR exclusive range pattern syntax is experimental
//~| ERROR only char and numeric types are allowed in range patterns
}
}
const RECOVERY_WITNESS: () = 0; //~ ERROR mismatched types

View file

@ -1,40 +1,28 @@
error: `..X` range patterns are not supported
--> $DIR/pat-tuple-4.rs:3:10
--> $DIR/pat-tuple-4.rs:5:10
|
LL | (.. pat) => {}
| ^^^^^^ help: try using the minimum value for the type: `MIN..pat`
error: arbitrary expressions aren't allowed in patterns
--> $DIR/pat-tuple-4.rs:3:10
|
LL | (.. pat) => {}
| ^^^^^^
error[E0425]: cannot find value `pat` in this scope
--> $DIR/pat-tuple-4.rs:3:13
|
LL | (.. pat) => {}
| ^^^ not found in this scope
LL | (.. PAT) => {}
| ^^^^^^ help: try using the minimum value for the type: `MIN..PAT`
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-4.rs:3:10
--> $DIR/pat-tuple-4.rs:5:10
|
LL | (.. pat) => {}
LL | (.. PAT) => {}
| ^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/37854
= help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/pat-tuple-4.rs:3:10
error[E0308]: mismatched types
--> $DIR/pat-tuple-4.rs:11:30
|
LL | (.. pat) => {}
| ^^^^^^ ranges require char or numeric types
LL | const RECOVERY_WITNESS: () = 0;
| ^ expected (), found integer
|
= note: start type: [type error]
= note: end type: [type error]
= note: expected type `()`
found type `{integer}`
error: aborting due to 5 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0029, E0425, E0658.
For more information about an error, try `rustc --explain E0029`.
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.

View file

@ -1,10 +1,10 @@
fn main() {
const PAT: u8 = 0;
match (0, 1) {
(pat ..) => {}
(PAT ..) => {}
//~^ ERROR `X..` range patterns are not supported
//~| ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR cannot find value `pat` in this scope
//~| ERROR exclusive range pattern syntax is experimental
//~| ERROR only char and numeric types are allowed in range patterns
//~| ERROR mismatched types
}
}

View file

@ -1,40 +1,30 @@
error: `X..` range patterns are not supported
--> $DIR/pat-tuple-5.rs:3:10
--> $DIR/pat-tuple-5.rs:5:10
|
LL | (pat ..) => {}
| ^^^^^^ help: try using the maximum value for the type: `pat..MAX`
error: arbitrary expressions aren't allowed in patterns
--> $DIR/pat-tuple-5.rs:3:10
|
LL | (pat ..) => {}
| ^^^^^^
error[E0425]: cannot find value `pat` in this scope
--> $DIR/pat-tuple-5.rs:3:10
|
LL | (pat ..) => {}
| ^^^ not found in this scope
LL | (PAT ..) => {}
| ^^^^^^ help: try using the maximum value for the type: `PAT..MAX`
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-5.rs:3:10
--> $DIR/pat-tuple-5.rs:5:10
|
LL | (pat ..) => {}
LL | (PAT ..) => {}
| ^^^^^^
|
= note: for more information, see https://github.com/rust-lang/rust/issues/37854
= help: add `#![feature(exclusive_range_pattern)]` to the crate attributes to enable
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/pat-tuple-5.rs:3:10
error[E0308]: mismatched types
--> $DIR/pat-tuple-5.rs:5:10
|
LL | (pat ..) => {}
| ^^^^^^ ranges require char or numeric types
LL | match (0, 1) {
| ------ this match expression has type `({integer}, {integer})`
LL | (PAT ..) => {}
| ^^^^^^ expected tuple, found u8
|
= note: start type: [type error]
= note: end type: [type error]
= note: expected type `({integer}, {integer})`
found type `u8`
error: aborting due to 5 previous errors
error: aborting due to 3 previous errors
Some errors have detailed explanations: E0029, E0425, E0658.
For more information about an error, try `rustc --explain E0029`.
Some errors have detailed explanations: E0308, E0658.
For more information about an error, try `rustc --explain E0308`.

View file

@ -55,105 +55,69 @@ fn inclusive2_from_to() {
}
fn exclusive_from() {
if let 0.. = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..` range patterns are not supported
if let X.. = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..` range patterns are not supported
if let true.. = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..` range patterns are not supported
if let .0.. = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..` range patterns are not supported
//~| ERROR float literals must have an integer part
if let 0.. = 0 {} //~ ERROR `X..` range patterns are not supported
if let X.. = 0 {} //~ ERROR `X..` range patterns are not supported
if let true.. = 0 {} //~ ERROR `X..` range patterns are not supported
//~^ ERROR only char and numeric types
if let .0.. = 0 {} //~ ERROR `X..` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR mismatched types
}
fn inclusive_from() {
if let 0..= = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..=` range patterns are not supported
if let X..= = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..=` range patterns are not supported
if let true..= = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..=` range patterns are not supported
if let .0..= = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X..=` range patterns are not supported
//~| ERROR float literals must have an integer part
if let 0..= = 0 {} //~ ERROR `X..=` range patterns are not supported
if let X..= = 0 {} //~ ERROR `X..=` range patterns are not supported
if let true..= = 0 {} //~ ERROR `X..=` range patterns are not supported
//~| ERROR only char and numeric types
if let .0..= = 0 {} //~ ERROR `X..=` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR mismatched types
}
fn inclusive2_from() {
if let 0... = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X...` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let X... = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X...` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let true... = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X...` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let .0... = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `X...` range patterns are not supported
//~| ERROR float literals must have an integer part
if let 0... = 0 {} //~ ERROR `X...` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
if let X... = 0 {} //~ ERROR `X...` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
if let true... = 0 {} //~ ERROR `X...` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
//~| ERROR only char and numeric types
if let .0... = 0 {} //~ ERROR `X...` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR `...` range patterns are deprecated
//~| ERROR mismatched types
}
fn exclusive_to() {
if let ..0 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..X` range patterns are not supported
if let ..Y = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..X` range patterns are not supported
if let ..true = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..X` range patterns are not supported
if let .. .0 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..X` range patterns are not supported
//~| ERROR float literals must have an integer part
if let ..0 = 0 {} //~ ERROR `..X` range patterns are not supported
if let ..Y = 0 {} //~ ERROR `..X` range patterns are not supported
if let ..true = 0 {} //~ ERROR `..X` range patterns are not supported
//~| ERROR only char and numeric types
if let .. .0 = 0 {} //~ ERROR `..X` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR mismatched types
}
fn inclusive_to() {
if let ..=3 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..=X` range patterns are not supported
if let ..=Y = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..=X` range patterns are not supported
if let ..=true = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..=X` range patterns are not supported
if let ..=.0 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `..=X` range patterns are not supported
//~| ERROR float literals must have an integer part
if let ..=3 = 0 {} //~ ERROR `..=X` range patterns are not supported
if let ..=Y = 0 {} //~ ERROR `..=X` range patterns are not supported
if let ..=true = 0 {} //~ ERROR `..=X` range patterns are not supported
//~| ERROR only char and numeric types
if let ..=.0 = 0 {} //~ ERROR `..=X` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR mismatched types
}
fn inclusive2_to() {
if let ...3 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `...X` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let ...Y = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `...X` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let ...true = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `...X` range patterns are not supported
//~| ERROR `...` range patterns are deprecated
if let ....3 = 0 {} //~ ERROR only char and numeric types
//~^ ERROR arbitrary expressions aren't allowed in patterns
//~| ERROR `...X` range patterns are not supported
//~| ERROR float literals must have an integer part
if let ...3 = 0 {} //~ ERROR `...X` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
if let ...Y = 0 {} //~ ERROR `...X` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
if let ...true = 0 {} //~ ERROR `...X` range patterns are not supported
//~^ ERROR `...` range patterns are deprecated
//~| ERROR only char and numeric types
if let ....3 = 0 {} //~ ERROR `...X` range patterns are not supported
//~^ ERROR float literals must have an integer part
//~| ERROR `...` range patterns are deprecated
//~| ERROR mismatched types
}

View file

@ -41,323 +41,179 @@ LL | if let 0.. = 0 {}
| ^^^ help: try using the maximum value for the type: `0..MAX`
error: `X..` range patterns are not supported
--> $DIR/recover-range-pats.rs:61:12
--> $DIR/recover-range-pats.rs:59:12
|
LL | if let X.. = 0 {}
| ^^^ help: try using the maximum value for the type: `X..MAX`
error: `X..` range patterns are not supported
--> $DIR/recover-range-pats.rs:64:12
--> $DIR/recover-range-pats.rs:60:12
|
LL | if let true.. = 0 {}
| ^^^^^^ help: try using the maximum value for the type: `true..MAX`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:67:12
--> $DIR/recover-range-pats.rs:62:12
|
LL | if let .0.. = 0 {}
| ^^ help: must have an integer part: `0.0`
error: `X..` range patterns are not supported
--> $DIR/recover-range-pats.rs:67:12
--> $DIR/recover-range-pats.rs:62:12
|
LL | if let .0.. = 0 {}
| ^^^^ help: try using the maximum value for the type: `0.0..MAX`
error: `X..=` range patterns are not supported
--> $DIR/recover-range-pats.rs:74:12
--> $DIR/recover-range-pats.rs:68:12
|
LL | if let 0..= = 0 {}
| ^^^^ help: try using the maximum value for the type: `0..=MAX`
error: `X..=` range patterns are not supported
--> $DIR/recover-range-pats.rs:77:12
--> $DIR/recover-range-pats.rs:69:12
|
LL | if let X..= = 0 {}
| ^^^^ help: try using the maximum value for the type: `X..=MAX`
error: `X..=` range patterns are not supported
--> $DIR/recover-range-pats.rs:80:12
--> $DIR/recover-range-pats.rs:70:12
|
LL | if let true..= = 0 {}
| ^^^^^^^ help: try using the maximum value for the type: `true..=MAX`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:83:12
--> $DIR/recover-range-pats.rs:72:12
|
LL | if let .0..= = 0 {}
| ^^ help: must have an integer part: `0.0`
error: `X..=` range patterns are not supported
--> $DIR/recover-range-pats.rs:83:12
--> $DIR/recover-range-pats.rs:72:12
|
LL | if let .0..= = 0 {}
| ^^^^^ help: try using the maximum value for the type: `0.0..=MAX`
error: `X...` range patterns are not supported
--> $DIR/recover-range-pats.rs:90:12
--> $DIR/recover-range-pats.rs:78:12
|
LL | if let 0... = 0 {}
| ^^^^ help: try using the maximum value for the type: `0...MAX`
error: `X...` range patterns are not supported
--> $DIR/recover-range-pats.rs:94:12
--> $DIR/recover-range-pats.rs:80:12
|
LL | if let X... = 0 {}
| ^^^^ help: try using the maximum value for the type: `X...MAX`
error: `X...` range patterns are not supported
--> $DIR/recover-range-pats.rs:98:12
--> $DIR/recover-range-pats.rs:82:12
|
LL | if let true... = 0 {}
| ^^^^^^^ help: try using the maximum value for the type: `true...MAX`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:102:12
--> $DIR/recover-range-pats.rs:85:12
|
LL | if let .0... = 0 {}
| ^^ help: must have an integer part: `0.0`
error: `X...` range patterns are not supported
--> $DIR/recover-range-pats.rs:102:12
--> $DIR/recover-range-pats.rs:85:12
|
LL | if let .0... = 0 {}
| ^^^^^ help: try using the maximum value for the type: `0.0...MAX`
error: `..X` range patterns are not supported
--> $DIR/recover-range-pats.rs:110:12
--> $DIR/recover-range-pats.rs:92:12
|
LL | if let ..0 = 0 {}
| ^^^ help: try using the minimum value for the type: `MIN..0`
error: `..X` range patterns are not supported
--> $DIR/recover-range-pats.rs:113:12
--> $DIR/recover-range-pats.rs:93:12
|
LL | if let ..Y = 0 {}
| ^^^ help: try using the minimum value for the type: `MIN..Y`
error: `..X` range patterns are not supported
--> $DIR/recover-range-pats.rs:116:12
--> $DIR/recover-range-pats.rs:94:12
|
LL | if let ..true = 0 {}
| ^^^^^^ help: try using the minimum value for the type: `MIN..true`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:119:15
--> $DIR/recover-range-pats.rs:96:15
|
LL | if let .. .0 = 0 {}
| ^^ help: must have an integer part: `0.0`
error: `..X` range patterns are not supported
--> $DIR/recover-range-pats.rs:119:12
--> $DIR/recover-range-pats.rs:96:12
|
LL | if let .. .0 = 0 {}
| ^^^^^ help: try using the minimum value for the type: `MIN..0.0`
error: `..=X` range patterns are not supported
--> $DIR/recover-range-pats.rs:126:12
--> $DIR/recover-range-pats.rs:102:12
|
LL | if let ..=3 = 0 {}
| ^^^^ help: try using the minimum value for the type: `MIN..=3`
error: `..=X` range patterns are not supported
--> $DIR/recover-range-pats.rs:129:12
--> $DIR/recover-range-pats.rs:103:12
|
LL | if let ..=Y = 0 {}
| ^^^^ help: try using the minimum value for the type: `MIN..=Y`
error: `..=X` range patterns are not supported
--> $DIR/recover-range-pats.rs:132:12
--> $DIR/recover-range-pats.rs:104:12
|
LL | if let ..=true = 0 {}
| ^^^^^^^ help: try using the minimum value for the type: `MIN..=true`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:135:15
--> $DIR/recover-range-pats.rs:106:15
|
LL | if let ..=.0 = 0 {}
| ^^ help: must have an integer part: `0.0`
error: `..=X` range patterns are not supported
--> $DIR/recover-range-pats.rs:135:12
--> $DIR/recover-range-pats.rs:106:12
|
LL | if let ..=.0 = 0 {}
| ^^^^^ help: try using the minimum value for the type: `MIN..=0.0`
error: `...X` range patterns are not supported
--> $DIR/recover-range-pats.rs:142:12
--> $DIR/recover-range-pats.rs:112:12
|
LL | if let ...3 = 0 {}
| ^^^^ help: try using the minimum value for the type: `MIN...3`
error: `...X` range patterns are not supported
--> $DIR/recover-range-pats.rs:146:12
--> $DIR/recover-range-pats.rs:114:12
|
LL | if let ...Y = 0 {}
| ^^^^ help: try using the minimum value for the type: `MIN...Y`
error: `...X` range patterns are not supported
--> $DIR/recover-range-pats.rs:150:12
--> $DIR/recover-range-pats.rs:116:12
|
LL | if let ...true = 0 {}
| ^^^^^^^ help: try using the minimum value for the type: `MIN...true`
error: float literals must have an integer part
--> $DIR/recover-range-pats.rs:154:15
--> $DIR/recover-range-pats.rs:119:15
|
LL | if let ....3 = 0 {}
| ^^ help: must have an integer part: `0.3`
error: `...X` range patterns are not supported
--> $DIR/recover-range-pats.rs:154:12
--> $DIR/recover-range-pats.rs:119:12
|
LL | if let ....3 = 0 {}
| ^^^^^ help: try using the minimum value for the type: `MIN...0.3`
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:58:12
|
LL | if let 0.. = 0 {}
| ^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:61:12
|
LL | if let X.. = 0 {}
| ^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:64:12
|
LL | if let true.. = 0 {}
| ^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:67:12
|
LL | if let .0.. = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:74:12
|
LL | if let 0..= = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:77:12
|
LL | if let X..= = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:80:12
|
LL | if let true..= = 0 {}
| ^^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:83:12
|
LL | if let .0..= = 0 {}
| ^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:90:12
|
LL | if let 0... = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:94:12
|
LL | if let X... = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:98:12
|
LL | if let true... = 0 {}
| ^^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:102:12
|
LL | if let .0... = 0 {}
| ^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:110:12
|
LL | if let ..0 = 0 {}
| ^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:113:12
|
LL | if let ..Y = 0 {}
| ^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:116:12
|
LL | if let ..true = 0 {}
| ^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:119:12
|
LL | if let .. .0 = 0 {}
| ^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:126:12
|
LL | if let ..=3 = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:129:12
|
LL | if let ..=Y = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:132:12
|
LL | if let ..=true = 0 {}
| ^^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:135:12
|
LL | if let ..=.0 = 0 {}
| ^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:142:12
|
LL | if let ...3 = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:146:12
|
LL | if let ...Y = 0 {}
| ^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:150:12
|
LL | if let ...true = 0 {}
| ^^^^^^^
error: arbitrary expressions aren't allowed in patterns
--> $DIR/recover-range-pats.rs:154:12
|
LL | if let ....3 = 0 {}
| ^^^^^
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:41:13
|
@ -413,49 +269,49 @@ LL | if let X... .0 = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:90:13
--> $DIR/recover-range-pats.rs:78:13
|
LL | if let 0... = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:94:13
--> $DIR/recover-range-pats.rs:80:13
|
LL | if let X... = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:98:16
--> $DIR/recover-range-pats.rs:82:16
|
LL | if let true... = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:102:14
--> $DIR/recover-range-pats.rs:85:14
|
LL | if let .0... = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:142:12
--> $DIR/recover-range-pats.rs:112:12
|
LL | if let ...3 = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:146:12
--> $DIR/recover-range-pats.rs:114:12
|
LL | if let ...Y = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:150:12
--> $DIR/recover-range-pats.rs:116:12
|
LL | if let ...true = 0 {}
| ^^^ help: use `..=` for an inclusive range
error: `...` range patterns are deprecated
--> $DIR/recover-range-pats.rs:154:12
--> $DIR/recover-range-pats.rs:119:12
|
LL | if let ....3 = 0 {}
| ^^^ help: use `..=` for an inclusive range
@ -569,222 +425,114 @@ 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:58:12
|
LL | if let 0.. = 0 {}
| ^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:61:12
|
LL | if let X.. = 0 {}
| ^^^ ranges require char or numeric types
|
= note: start type: u8
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:64:12
--> $DIR/recover-range-pats.rs:60:12
|
LL | if let true.. = 0 {}
| ^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: bool
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:67:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:62:12
|
LL | if let .0.. = 0 {}
| ^^^^ ranges require char or numeric types
| ^^^^ expected integer, found floating-point number
|
= note: start type: {float}
= note: end type: [type error]
= note: expected type `{integer}`
found type `{float}`
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:74:12
|
LL | if let 0..= = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:77:12
|
LL | if let X..= = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: u8
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:80:12
--> $DIR/recover-range-pats.rs:70:12
|
LL | if let true..= = 0 {}
| ^^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: bool
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:83:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:72:12
|
LL | if let .0..= = 0 {}
| ^^^^^ ranges require char or numeric types
| ^^^^^ expected integer, found floating-point number
|
= note: start type: {float}
= note: end type: [type error]
= note: expected type `{integer}`
found type `{float}`
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:90:12
|
LL | if let 0... = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:94:12
|
LL | if let X... = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: u8
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:98:12
--> $DIR/recover-range-pats.rs:82:12
|
LL | if let true... = 0 {}
| ^^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: bool
= note: end type: [type error]
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:102:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:85:12
|
LL | if let .0... = 0 {}
| ^^^^^ ranges require char or numeric types
| ^^^^^ expected integer, found floating-point number
|
= note: start type: {float}
= note: end type: [type error]
= note: expected type `{integer}`
found type `{float}`
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:110:12
|
LL | if let ..0 = 0 {}
| ^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: {integer}
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:113:12
|
LL | if let ..Y = 0 {}
| ^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: u8
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:116:12
--> $DIR/recover-range-pats.rs:94:14
|
LL | if let ..true = 0 {}
| ^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: bool
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:119:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:96:12
|
LL | if let .. .0 = 0 {}
| ^^^^^ ranges require char or numeric types
| ^^^^^ expected integer, found floating-point number
|
= note: start type: [type error]
= note: end type: {float}
= note: expected type `{integer}`
found type `{float}`
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:126:12
|
LL | if let ..=3 = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: {integer}
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:129:12
|
LL | if let ..=Y = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: u8
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:132:12
--> $DIR/recover-range-pats.rs:104:15
|
LL | if let ..=true = 0 {}
| ^^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: bool
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:135:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:106:12
|
LL | if let ..=.0 = 0 {}
| ^^^^^ ranges require char or numeric types
| ^^^^^ expected integer, found floating-point number
|
= note: start type: [type error]
= note: end type: {float}
= note: expected type `{integer}`
found type `{float}`
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:142:12
|
LL | if let ...3 = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: {integer}
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:146:12
|
LL | if let ...Y = 0 {}
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: u8
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:150:12
--> $DIR/recover-range-pats.rs:116:15
|
LL | if let ...true = 0 {}
| ^^^^^^^ ranges require char or numeric types
| ^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: bool
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/recover-range-pats.rs:154:12
error[E0308]: mismatched types
--> $DIR/recover-range-pats.rs:119:12
|
LL | if let ....3 = 0 {}
| ^^^^^ ranges require char or numeric types
| ^^^^^ expected integer, found floating-point number
|
= note: start type: [type error]
= note: end type: {float}
= note: expected type `{integer}`
found type `{float}`
error: aborting due to 112 previous errors
error: aborting due to 76 previous errors
Some errors have detailed explanations: E0029, E0308.
For more information about an error, try `rustc --explain E0029`.