don't match on floating-point literal

This commit is contained in:
David Renshaw 2017-05-10 16:38:29 -04:00
parent 9e44509e51
commit ecf452ce3a

View file

@ -62,7 +62,7 @@ fn c() {
unsafe {
match v {
Value { tag: Tag::I, u: U { i: 0 } } => true,
Value { tag: Tag::F, u: U { f: 0.0 } } => true,
Value { tag: Tag::F, u: U { f } } if f == 0.0 => true,
_ => false,
}
}