Skip to content

Commit 0b567f1

Browse files
committed
Auto merge of #123991 - fmease:rollup-96xcgnm, r=fmease
Rollup of 7 pull requests Successful merges: - #123016 (Remove `TypeVariableOriginKind` and `ConstVariableOriginKind`) - #123462 (Cleanup: Rename `ModSep` to `PathSep`) - #123603 (Don't even parse an intrinsic unless the feature gate is enabled) - #123926 (Fix pretty HIR for anon consts in diagnostics) - #123973 (crashes: readme: add reminder to add Fixes #abcde to prs to automatically close issues.) - #123984 (sanitizers: Add rustc_sanitizers to triagebot.toml) - #123989 (Just use `type_dependent_def_id` to figure out what the method is for an expr) r? `@ghost` `@rustbot` modify labels: rollup
2 parents 2b63131 + 0115de2 commit 0b567f1

File tree

5 files changed

+6
-6
lines changed

5 files changed

+6
-6
lines changed

clippy_lints/src/casts/ptr_as_ptr.rs

Lines changed: 1 addition & 1 deletion
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);

clippy_lints/src/crate_in_macro_def.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ fn contains_unhygienic_crate_reference(tts: &TokenStream) -> Option<Span> {
8888
if !prev_is_dollar
8989
&& let Some(span) = is_crate_keyword(curr)
9090
&& let Some(next) = cursor.look_ahead(0)
91-
&& is_token(next, &TokenKind::ModSep)
91+
&& is_token(next, &TokenKind::PathSep)
9292
{
9393
return Some(span);
9494
}

clippy_lints/src/matches/match_wild_err_arm.rs

Lines changed: 1 addition & 1 deletion
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;

clippy_lints/src/mut_reference.rs

Lines changed: 1 addition & 1 deletion
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
}

clippy_utils/src/ty.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ use rustc_hir as hir;
1010
use rustc_hir::def::{CtorKind, CtorOf, DefKind, Res};
1111
use rustc_hir::def_id::DefId;
1212
use rustc_hir::{Expr, FnDecl, LangItem, TyKind, Unsafety};
13-
use rustc_infer::infer::type_variable::{TypeVariableOrigin, TypeVariableOriginKind};
13+
use rustc_infer::infer::type_variable::{TypeVariableOrigin};
1414
use rustc_infer::infer::TyCtxtInferExt;
1515
use rustc_lint::LateContext;
1616
use rustc_middle::mir::interpret::Scalar;
@@ -276,8 +276,8 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
276276
.map(|arg| {
277277
arg.into().unwrap_or_else(|| {
278278
let orig = TypeVariableOrigin {
279-
kind: TypeVariableOriginKind::MiscVariable,
280279
span: DUMMY_SP,
280+
param_def_id: None,
281281
};
282282
infcx.next_ty_var(orig).into()
283283
})

0 commit comments

Comments
 (0)