X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=compiler%2Frustc_lint%2Fsrc%2Finternal.rs;h=6cefaea2bc7da8af59508ff2cad32366ccce9d54;hb=480c4a18d524a2cddd194fcf9a1bfdd6b7610656;hp=5eb54cc0034279392c1eac3a4cdf8ad6b7d78b80;hpb=c06d57eb198004b3c6dd151594a1137b8875f6f1;p=rust.git diff --git a/compiler/rustc_lint/src/internal.rs b/compiler/rustc_lint/src/internal.rs index 5eb54cc0034..6cefaea2bc7 100644 --- a/compiler/rustc_lint/src/internal.rs +++ b/compiler/rustc_lint/src/internal.rs @@ -187,9 +187,9 @@ fn check_ty(&mut self, cx: &LateContext<'_>, ty: &'tcx Ty<'tcx>) { }, None => cx.emit_spanned_lint(USAGE_OF_TY_TYKIND, path.span, TykindDiag), } - } else if !ty.span.from_expansion() && path.segments.len() > 1 && let Some(t) = is_ty_or_ty_ctxt(cx, &path) { + } else if !ty.span.from_expansion() && path.segments.len() > 1 && let Some(ty) = is_ty_or_ty_ctxt(cx, &path) { cx.emit_spanned_lint(USAGE_OF_QUALIFIED_TY, path.span, TyQualified { - ty: t.clone(), + ty, suggestion: path.span, }); }