mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-21 17:52:12 +03: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:
@@ -273,7 +273,10 @@ pub fn check_pat(&self, pat: &'gcx hir::Pat, expected: Ty<'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`
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user