diagnostics: do not suggest type name tweaks on type-inferred closure args
Fixes #111932
This commit is contained in:
parent
408bbd0406
commit
467bc9ffd5
6 changed files with 62 additions and 8 deletions
|
@ -2807,8 +2807,8 @@ impl<'tcx> TypeErrCtxtExt<'tcx> for TypeErrCtxt<'_, 'tcx> {
|
|||
err.help("unsized locals are gated as an unstable feature");
|
||||
}
|
||||
}
|
||||
ObligationCauseCode::SizedArgumentType(sp) => {
|
||||
if let Some(span) = sp {
|
||||
ObligationCauseCode::SizedArgumentType(ty_span) => {
|
||||
if let Some(span) = ty_span {
|
||||
if let ty::PredicateKind::Clause(clause) = predicate.kind().skip_binder()
|
||||
&& let ty::Clause::Trait(trait_pred) = clause
|
||||
&& let ty::Dynamic(..) = trait_pred.self_ty().kind()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue