Rollup merge of #109613 - lukas-code:match-str-to-char-suggestion, r=compiler-errors
fix type suggestions in match arms fix https://github.com/rust-lang/rust/issues/109586
This commit is contained in:
commit
04b8523c46
4 changed files with 34 additions and 2 deletions
|
@ -1942,7 +1942,8 @@ impl<'tcx> TypeErrCtxt<'_, 'tcx> {
|
|||
escaped
|
||||
}
|
||||
let mut err = struct_span_err!(self.tcx.sess, span, E0308, "{}", failure_str);
|
||||
if let Some((expected, found)) = trace.values.ty() {
|
||||
let values = self.resolve_vars_if_possible(trace.values);
|
||||
if let Some((expected, found)) = values.ty() {
|
||||
match (expected.kind(), found.kind()) {
|
||||
(ty::Tuple(_), ty::Tuple(_)) => {}
|
||||
// If a tuple of length one was expected and the found expression has
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue