Format clippy
This commit is contained in:
parent
45db716902
commit
1a6312ee0f
@ -188,10 +188,7 @@ fn is_value_unfrozen_expr<'tcx>(cx: &LateContext<'tcx>, hir_id: HirId, def_id: D
|
||||
|
||||
let result = cx.tcx.const_eval_resolve(
|
||||
cx.param_env,
|
||||
ty::Unevaluated::new(
|
||||
ty::WithOptConstParam::unknown(def_id),
|
||||
substs,
|
||||
),
|
||||
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||
None,
|
||||
);
|
||||
is_value_unfrozen_raw(cx, result, ty)
|
||||
|
@ -624,10 +624,7 @@ fn visit_terminator(&mut self, terminator: &mir::Terminator<'_>, _loc: mir::Loca
|
||||
.flat_map(HybridBitSet::iter)
|
||||
.collect();
|
||||
|
||||
if ContainsRegion
|
||||
.visit_ty(self.body.local_decls[*dest].ty)
|
||||
.is_break()
|
||||
{
|
||||
if ContainsRegion.visit_ty(self.body.local_decls[*dest].ty).is_break() {
|
||||
mutable_variables.push(*dest);
|
||||
}
|
||||
|
||||
|
@ -224,10 +224,7 @@ fn detect_lint(cx: &LateContext<'_>, expr: &Expr<'_>) -> Option<LintTrigger> {
|
||||
|
||||
fn expr_borrows(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
|
||||
let ty = cx.typeck_results().expr_ty(expr);
|
||||
matches!(ty.kind(), ty::Ref(..))
|
||||
|| ty
|
||||
.walk()
|
||||
.any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
|
||||
matches!(ty.kind(), ty::Ref(..)) || ty.walk().any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
|
||||
}
|
||||
|
||||
impl LateLintPass<'_> for UnnecessarySortBy {
|
||||
|
@ -413,10 +413,7 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
|
||||
.tcx
|
||||
.const_eval_resolve(
|
||||
self.param_env,
|
||||
ty::Unevaluated::new(
|
||||
ty::WithOptConstParam::unknown(def_id),
|
||||
substs,
|
||||
),
|
||||
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||
None,
|
||||
)
|
||||
.ok()
|
||||
|
Loading…
Reference in New Issue
Block a user