Skip to content

Commit d5ba4a6

Browse files
Fix clippy
1 parent 9422fe5 commit d5ba4a6

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/tools/clippy/clippy_lints/src/casts/ptr_as_ptr.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ pub(super) fn check(cx: &LateContext<'_>, expr: &Expr<'_>, msrv: &Msrv) {
7777

7878
let (help, final_suggestion) = if let Some(method) = omit_cast.corresponding_item() {
7979
// don't force absolute path
80-
let method = qpath_to_string(method);
80+
let method = qpath_to_string(&cx.tcx, method);
8181
("try call directly", format!("{method}{turbofish}()"))
8282
} else {
8383
let cast_expr_sugg = Sugg::hir_with_applicability(cx, cast_expr, "_", &mut app);

src/tools/clippy/clippy_lints/src/matches/match_wild_err_arm.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ pub(crate) fn check<'tcx>(cx: &LateContext<'tcx>, ex: &Expr<'tcx>, arms: &[Arm<'
1919
if is_type_diagnostic_item(cx, ex_ty, sym::Result) {
2020
for arm in arms {
2121
if let PatKind::TupleStruct(ref path, inner, _) = arm.pat.kind {
22-
let path_str = rustc_hir_pretty::qpath_to_string(path);
22+
let path_str = rustc_hir_pretty::qpath_to_string(&cx.tcx, path);
2323
if path_str == "Err" {
2424
let mut matching_wild = inner.iter().any(is_wild);
2525
let mut ident_bind_name = kw::Underscore;

src/tools/clippy/clippy_lints/src/mut_reference.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ impl<'tcx> LateLintPass<'tcx> for UnnecessaryMutPassed {
4949
cx,
5050
arguments.iter().collect(),
5151
cx.typeck_results().expr_ty(fn_expr),
52-
&rustc_hir_pretty::qpath_to_string(path),
52+
&rustc_hir_pretty::qpath_to_string(&cx.tcx, path),
5353
"function",
5454
);
5555
}

0 commit comments

Comments
 (0)