mirror of
https://github.com/rust-lang/rust.git
synced 2025-02-18 09:53:26 +00:00
Rollup merge of #36210 - EugeneGonzalez:E0529, r=jonathandturner
Fixed E0529's label and unit test Fixes #36195 part of #35233. This is ready for review, but will likely fail Travis due to #36138. I changed the wording of the label, so feedback on that would be appreciated. r? @jonathandturner
This commit is contained in:
commit
5284bee03a
@ -273,7 +273,10 @@ impl<'a, 'gcx, 'tcx> FnCtxt<'a, 'gcx, 'tcx> {
|
|||||||
_ => {}
|
_ => {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
err.emit();
|
|
||||||
|
err.span_label( pat.span,
|
||||||
|
&format!("pattern cannot match with input type `{}`", expected_ty)
|
||||||
|
).emit();
|
||||||
}
|
}
|
||||||
(tcx.types.err, tcx.types.err)
|
(tcx.types.err, tcx.types.err)
|
||||||
}
|
}
|
||||||
|
@ -13,7 +13,9 @@
|
|||||||
fn main() {
|
fn main() {
|
||||||
let r: f32 = 1.0;
|
let r: f32 = 1.0;
|
||||||
match r {
|
match r {
|
||||||
[a, b] => { //~ ERROR E0529
|
[a, b] => {
|
||||||
|
//~^ ERROR E0529
|
||||||
|
//~| NOTE pattern cannot match with input type `f32`
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user