1
Fork 0

Rollup merge of #105476 - estebank:moves-n-borrows, r=compiler-errors

Change pattern borrowing suggestions to be verbose and remove invalid suggestion

Synthesize a more accurate span and use verbose suggestion output to
make the message clearer.

Do not suggest borrowing binding in pattern in let else. Fix #104838.
This commit is contained in:
Matthias Krüger 2022-12-13 19:57:11 +01:00 committed by GitHub
commit dcdbbd0471
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
73 changed files with 1842 additions and 816 deletions

View file

@ -231,7 +231,7 @@ impl<'a, 'tcx> Builder<'a, 'tcx> {
remainder_span,
pattern,
None,
Some((None, initializer_span)),
Some((Some(&destination), initializer_span)),
);
this.visit_primary_bindings(
pattern,