Closed
Description
From: src/test/compile-fail/E0029.rs
The E0029 error needs a span_label, taking it from:
error[E0029]: only char and numeric types are allowed in range patterns
start type: &'static str
end type: &'static str
--> src/test/compile-fail/E0029.rs:15:9
|
15 | "hello" ... "world" => {} //~ ERROR E0029
| ^^^^^^^^^^^^^^^^^^^
to:
error[E0029]: only char and numeric types are allowed in range patterns
start type: &'static str
end type: &'static str
--> src/test/compile-fail/E0029.rs:15:9
|
15 | "hello" ... "world" => {} //~ ERROR E0029
| ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
Bonus: The start type and end type should probably be added as notes to the error rather than part of the main message text, something like:
error[E0029]: only char and numeric types are allowed in range patterns
--> src/test/compile-fail/E0029.rs:15:9
|
15 | "hello" ... "world" => {} //~ ERROR E0029
| ^^^^^^^^^^^^^^^^^^^ ranges require char or numeric types
|
= note: starting type is &'static str
= note: ending type is &'static str
Activity