Skip to content

Commit b8997e3

Browse files
authored
Rollup merge of #124955 - nnethercote:next_ty_var, r=lcnr
Use fewer origins when creating type variables. To reduce lots of repetitive boilerplate code. Details in the individual commit messages. r? ``@lcnr``
2 parents 9b4ad01 + dbeae8d commit b8997e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

clippy_utils/src/ty.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ 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;
1413
use rustc_infer::infer::TyCtxtInferExt;
1514
use rustc_lint::LateContext;
1615
use rustc_middle::mir::interpret::Scalar;
@@ -276,11 +275,7 @@ pub fn implements_trait_with_env_from_iter<'tcx>(
276275
.into_iter()
277276
.map(|arg| {
278277
arg.into().unwrap_or_else(|| {
279-
let orig = TypeVariableOrigin {
280-
span: DUMMY_SP,
281-
param_def_id: None,
282-
};
283-
infcx.next_ty_var(orig).into()
278+
infcx.next_ty_var(DUMMY_SP).into()
284279
})
285280
})
286281
.collect::<Vec<_>>();

0 commit comments

Comments
 (0)