Auto merge of #80843 - Mark-Simulacrum:fmt-bump, r=petrochenkov
Bump rustfmt version
This commit is contained in:
@@ -569,9 +569,9 @@ impl<'hir> Map<'hir> {
|
||||
self.find(self.get_parent_node(id)),
|
||||
Some(
|
||||
Node::Item(_)
|
||||
| Node::TraitItem(_)
|
||||
| Node::ImplItem(_)
|
||||
| Node::Expr(Expr { kind: ExprKind::Closure(..), .. }),
|
||||
| Node::TraitItem(_)
|
||||
| Node::ImplItem(_)
|
||||
| Node::Expr(Expr { kind: ExprKind::Closure(..), .. }),
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
@@ -962,8 +962,7 @@ impl<'tcx> LocalDecl<'tcx> {
|
||||
opt_ty_info: _,
|
||||
opt_match_place: _,
|
||||
pat_span: _,
|
||||
})
|
||||
| BindingForm::ImplicitSelf(ImplicitSelfKind::Imm),
|
||||
}) | BindingForm::ImplicitSelf(ImplicitSelfKind::Imm),
|
||||
)))
|
||||
)
|
||||
}
|
||||
@@ -980,8 +979,7 @@ impl<'tcx> LocalDecl<'tcx> {
|
||||
opt_ty_info: _,
|
||||
opt_match_place: _,
|
||||
pat_span: _,
|
||||
})
|
||||
| BindingForm::ImplicitSelf(_),
|
||||
}) | BindingForm::ImplicitSelf(_),
|
||||
)))
|
||||
)
|
||||
}
|
||||
|
||||
@@ -12,13 +12,17 @@ impl<'tcx> TyS<'tcx> {
|
||||
pub fn is_primitive_ty(&self) -> bool {
|
||||
matches!(
|
||||
self.kind(),
|
||||
Bool | Char | Str | Int(_) | Uint(_) | Float(_)
|
||||
| Infer(
|
||||
InferTy::IntVar(_)
|
||||
| InferTy::FloatVar(_)
|
||||
| InferTy::FreshIntTy(_)
|
||||
| InferTy::FreshFloatTy(_)
|
||||
)
|
||||
Bool | Char
|
||||
| Str
|
||||
| Int(_)
|
||||
| Uint(_)
|
||||
| Float(_)
|
||||
| Infer(
|
||||
InferTy::IntVar(_)
|
||||
| InferTy::FloatVar(_)
|
||||
| InferTy::FreshIntTy(_)
|
||||
| InferTy::FreshFloatTy(_)
|
||||
)
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
@@ -646,11 +646,14 @@ impl<T> Trait<T> for X {
|
||||
let current_method_ident = body_owner.and_then(|n| n.ident()).map(|i| i.name);
|
||||
|
||||
// We don't want to suggest calling an assoc fn in a scope where that isn't feasible.
|
||||
let callable_scope = matches!(body_owner, Some(
|
||||
let callable_scope = matches!(
|
||||
body_owner,
|
||||
Some(
|
||||
hir::Node::Item(hir::Item { kind: hir::ItemKind::Fn(..), .. })
|
||||
| hir::Node::TraitItem(hir::TraitItem { kind: hir::TraitItemKind::Fn(..), .. })
|
||||
| hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Fn(..), .. }),
|
||||
));
|
||||
| hir::Node::TraitItem(hir::TraitItem { kind: hir::TraitItemKind::Fn(..), .. })
|
||||
| hir::Node::ImplItem(hir::ImplItem { kind: hir::ImplItemKind::Fn(..), .. }),
|
||||
)
|
||||
);
|
||||
let impl_comparison = matches!(
|
||||
cause_code,
|
||||
ObligationCauseCode::CompareImplMethodObligation { .. }
|
||||
|
||||
@@ -1871,8 +1871,14 @@ impl<'tcx> TyS<'tcx> {
|
||||
pub fn is_scalar(&self) -> bool {
|
||||
matches!(
|
||||
self.kind(),
|
||||
Bool | Char | Int(_) | Float(_) | Uint(_) | FnDef(..) | FnPtr(_) | RawPtr(_)
|
||||
| Infer(IntVar(_) | FloatVar(_))
|
||||
Bool | Char
|
||||
| Int(_)
|
||||
| Float(_)
|
||||
| Uint(_)
|
||||
| FnDef(..)
|
||||
| FnPtr(_)
|
||||
| RawPtr(_)
|
||||
| Infer(IntVar(_) | FloatVar(_))
|
||||
)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user