And also --bless those recovery tests.

This commit is contained in:
Mazdak Farrokhzad 2019-07-09 08:44:56 +02:00
parent 2411134c78
commit f6c8234f9f
5 changed files with 150 additions and 19 deletions

View file

@ -1,8 +1,24 @@
error: unexpected token: `,`
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:17
error: `X..` range patterns are not supported
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
|
LL | [_, 99.., _] => {},
| ^
| ^^^^ help: try using the maximum value for the type: `99..MAX`
error: aborting due to previous error
error: arbitrary expressions aren't allowed in patterns
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
|
LL | [_, 99.., _] => {},
| ^^^^
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/exclusive_range_pattern_syntax_collision.rs:5:13
|
LL | [_, 99.., _] => {},
| ^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error: aborting due to 3 previous errors
For more information about this error, try `rustc --explain E0029`.

View file

@ -1,8 +1,31 @@
error: unexpected token: `]`
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:17
error: `X..` range patterns are not supported
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
|
LL | [_, 99..] => {},
| ^
| ^^^^ help: try using the maximum value for the type: `99..MAX`
error: aborting due to previous error
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
--> $DIR/exclusive_range_pattern_syntax_collision2.rs:5:13
|
LL | [_, 99..] => {},
| ^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: [type error]
error: aborting due to 4 previous errors
Some errors have detailed explanations: E0029, E0527.
For more information about an error, try `rustc --explain E0029`.

View file

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

View file

@ -1,8 +1,40 @@
error: expected one of `)` or `,`, found `pat`
error: `..X` range patterns are not supported
--> $DIR/pat-tuple-4.rs:3: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) => {}
| ^^^ expected one of `)` or `,` here
| ^^^ not found in this scope
error: aborting due to previous error
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-4.rs:3:10
|
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
|
LL | (.. pat) => {}
| ^^^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: [type error]
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0029, E0425, E0658.
For more information about an error, try `rustc --explain E0029`.

View file

@ -1,8 +1,40 @@
error: unexpected token: `)`
--> $DIR/pat-tuple-5.rs:3:16
error: `X..` range patterns are not supported
--> $DIR/pat-tuple-5.rs:3:10
|
LL | (pat ..) => {}
| ^
| ^^^^^^ help: try using the maximum value for the type: `pat..MAX`
error: aborting due to previous error
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
error[E0658]: exclusive range pattern syntax is experimental
--> $DIR/pat-tuple-5.rs:3:10
|
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
|
LL | (pat ..) => {}
| ^^^^^^ ranges require char or numeric types
|
= note: start type: [type error]
= note: end type: [type error]
error: aborting due to 5 previous errors
Some errors have detailed explanations: E0029, E0425, E0658.
For more information about an error, try `rustc --explain E0029`.