Skip to content

Commit ecf452c

Browse files
author
David Renshaw
committed
don't match on floating-point literal
1 parent 9e44509 commit ecf452c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/run-pass/union.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ fn c() {
6262
unsafe {
6363
match v {
6464
Value { tag: Tag::I, u: U { i: 0 } } => true,
65-
Value { tag: Tag::F, u: U { f: 0.0 } } => true,
65+
Value { tag: Tag::F, u: U { f } } if f == 0.0 => true,
6666
_ => false,
6767
}
6868
}

0 commit comments

Comments
 (0)