diff options
Diffstat (limited to 'tests/ui/lint/issue-86600-lint-twice.rs')
-rw-r--r-- | tests/ui/lint/issue-86600-lint-twice.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/ui/lint/issue-86600-lint-twice.rs b/tests/ui/lint/issue-86600-lint-twice.rs new file mode 100644 index 000000000..0e8a837d9 --- /dev/null +++ b/tests/ui/lint/issue-86600-lint-twice.rs @@ -0,0 +1,15 @@ +// 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 + _ => {} + } +} |