diff options
| author | Matthias Krüger <matthias.krueger@famsik.de> | 2024-05-10 07:30:22 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-05-10 07:30:22 +0200 |
| commit | 0ee258009ce443cd882303f25d0f26c99c80cfa6 (patch) | |
| tree | 43e497b9a7ecee33fb1c0b1e516534748f3064ce /compiler/rustc_lint | |
| parent | 30bd6cb726a4051c8a85dedae1173aeb9ecaca16 (diff) | |
| parent | fe843feaabfd48fa5ed7e10f00a9d22bb64a20ef (diff) | |
| download | rust-0ee258009ce443cd882303f25d0f26c99c80cfa6.tar.gz rust-0ee258009ce443cd882303f25d0f26c99c80cfa6.zip | |
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``
Diffstat (limited to 'compiler/rustc_lint')
| -rw-r--r-- | compiler/rustc_lint/src/non_local_def.rs | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/compiler/rustc_lint/src/non_local_def.rs b/compiler/rustc_lint/src/non_local_def.rs index 7bdf5ef6af4..885c0bb3a89 100644 --- a/compiler/rustc_lint/src/non_local_def.rs +++ b/compiler/rustc_lint/src/non_local_def.rs @@ -1,6 +1,5 @@ use rustc_hir::{def::DefKind, Body, Item, ItemKind, Node, TyKind}; use rustc_hir::{Path, QPath}; -use rustc_infer::infer::type_variable::TypeVariableOrigin; use rustc_infer::infer::InferCtxt; use rustc_infer::traits::{Obligation, ObligationCause}; use rustc_middle::ty::{self, Binder, Ty, TyCtxt, TypeFoldable, TypeFolder}; @@ -337,7 +336,7 @@ impl<'a, 'tcx, F: FnMut(DefId) -> bool> TypeFolder<TyCtxt<'tcx>> if let Some(def) = t.ty_adt_def() && (self.did_has_local_parent)(def.did()) { - self.infcx.next_ty_var(TypeVariableOrigin { param_def_id: None, span: self.infer_span }) + self.infcx.next_ty_var(self.infer_span) } else { t.super_fold_with(self) } |
