rust/src/test/ui/match/match-range-fail.stderr
Yuning Zhang 710dcbd381 Improve type mismatch error messages
Replace "integral variable" with "integer" and replace
"floating-point variable" with "floating-point number" to make the
message less confusing.
2018-12-31 20:43:08 -05:00

32 lines
951 B
Plaintext

error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/match-range-fail.rs:3:9
|
LL | "bar" ..= "foo" => { }
| ^^^^^^^^^^^^^^^ ranges require char or numeric types
|
= note: start type: &'static str
= note: end type: &'static str
error[E0029]: only char and numeric types are allowed in range patterns
--> $DIR/match-range-fail.rs:10:16
|
LL | 10 ..= "what" => ()
| ^^^^^^ ranges require char or numeric types
|
= note: start type: {integer}
= note: end type: &'static str
error[E0308]: mismatched types
--> $DIR/match-range-fail.rs:17:9
|
LL | 'c' ..= 100 => { }
| ^^^^^^^^^^^ expected integer, found char
|
= note: expected type `{integer}`
found type `char`
error: aborting due to 3 previous errors
Some errors occurred: E0029, E0308.
For more information about an error, try `rustc --explain E0029`.