mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +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)
|
||||
}
|
||||
|
@ -13,7 +13,9 @@
|
||||
fn main() {
|
||||
let r: f32 = 1.0;
|
||||
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