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(
|
let result = cx.tcx.const_eval_resolve(
|
||||||
cx.param_env,
|
cx.param_env,
|
||||||
ty::Unevaluated::new(
|
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||||
ty::WithOptConstParam::unknown(def_id),
|
|
||||||
substs,
|
|
||||||
),
|
|
||||||
None,
|
None,
|
||||||
);
|
);
|
||||||
is_value_unfrozen_raw(cx, result, ty)
|
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)
|
.flat_map(HybridBitSet::iter)
|
||||||
.collect();
|
.collect();
|
||||||
|
|
||||||
if ContainsRegion
|
if ContainsRegion.visit_ty(self.body.local_decls[*dest].ty).is_break() {
|
||||||
.visit_ty(self.body.local_decls[*dest].ty)
|
|
||||||
.is_break()
|
|
||||||
{
|
|
||||||
mutable_variables.push(*dest);
|
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 {
|
fn expr_borrows(cx: &LateContext<'_>, expr: &Expr<'_>) -> bool {
|
||||||
let ty = cx.typeck_results().expr_ty(expr);
|
let ty = cx.typeck_results().expr_ty(expr);
|
||||||
matches!(ty.kind(), ty::Ref(..))
|
matches!(ty.kind(), ty::Ref(..)) || ty.walk().any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
|
||||||
|| ty
|
|
||||||
.walk()
|
|
||||||
.any(|arg| matches!(arg.unpack(), GenericArgKind::Lifetime(_)))
|
|
||||||
}
|
}
|
||||||
|
|
||||||
impl LateLintPass<'_> for UnnecessarySortBy {
|
impl LateLintPass<'_> for UnnecessarySortBy {
|
||||||
|
@ -413,10 +413,7 @@ fn fetch_path(&mut self, qpath: &QPath<'_>, id: HirId, ty: Ty<'tcx>) -> Option<C
|
|||||||
.tcx
|
.tcx
|
||||||
.const_eval_resolve(
|
.const_eval_resolve(
|
||||||
self.param_env,
|
self.param_env,
|
||||||
ty::Unevaluated::new(
|
ty::Unevaluated::new(ty::WithOptConstParam::unknown(def_id), substs),
|
||||||
ty::WithOptConstParam::unknown(def_id),
|
|
||||||
substs,
|
|
||||||
),
|
|
||||||
None,
|
None,
|
||||||
)
|
)
|
||||||
.ok()
|
.ok()
|
||||||
|
Loading…
Reference in New Issue
Block a user