mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-11 16:15:03 +00:00
16 lines
363 B
Rust
16 lines
363 B
Rust
// Regression test for #86600, where an instance of the
|
|
// `illegal_floating_point_literal_pattern` lint was issued twice.
|
|
|
|
// check-pass
|
|
|
|
fn main() {
|
|
let x = 42.0;
|
|
|
|
match x {
|
|
5.0 => {}
|
|
//~^ WARNING: floating-point types cannot be used in patterns
|
|
//~| WARNING: this was previously accepted by the compiler
|
|
_ => {}
|
|
}
|
|
}
|