rust/tests/ui/error-codes/E0029-teach.rs

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
213 B
Rust
Raw Normal View History

2018-02-08 11:35:35 +08:00
//@ compile-flags: -Z teach
2016-05-17 21:01:31 +08:00
fn main() {
let s = "hoho";
match s {
"hello" ..= "world" => {}
2020-09-16 03:34:58 +08:00
//~^ ERROR only `char` and numeric types are allowed in range patterns
2016-05-17 21:01:31 +08:00
_ => {}
}
}