diff options
| author | Boxy <rust@boxyuwu.dev> | 2025-08-21 16:50:54 +0100 |
|---|---|---|
| committer | lcnr <rust@lcnr.de> | 2025-09-09 14:49:16 +0200 |
| commit | e379c7758667f900aaf5551c4553c7d4c121e3e1 (patch) | |
| tree | c181eeace32e95f479fe817db4261200beb69662 /compiler/rustc_lint/src | |
| parent | fefce3cecd63cebf2d7c9aa3dd90a84379fcfa1a (diff) | |
| download | rust-e379c7758667f900aaf5551c4553c7d4c121e3e1.tar.gz rust-e379c7758667f900aaf5551c4553c7d4c121e3e1.zip | |
erase_regions to erase_and_anonymize_regions
Diffstat (limited to 'compiler/rustc_lint/src')
| -rw-r--r-- | compiler/rustc_lint/src/deref_into_dyn_supertrait.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/for_loops_over_fallibles.rs | 2 | ||||
| -rw-r--r-- | compiler/rustc_lint/src/types.rs | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/compiler/rustc_lint/src/deref_into_dyn_supertrait.rs b/compiler/rustc_lint/src/deref_into_dyn_supertrait.rs index 943fcc0801b..e1c51ff8299 100644 --- a/compiler/rustc_lint/src/deref_into_dyn_supertrait.rs +++ b/compiler/rustc_lint/src/deref_into_dyn_supertrait.rs @@ -78,7 +78,7 @@ impl<'tcx> LateLintPass<'tcx> for DerefIntoDynSupertrait { { // erase regions in self type for better diagnostic presentation let (self_ty, target_principal, supertrait_principal) = - tcx.erase_regions((self_ty, target_principal, supertrait_principal)); + tcx.erase_and_anonymize_regions((self_ty, target_principal, supertrait_principal)); let label2 = tcx .associated_items(item.owner_id) .find_by_ident_and_kind( diff --git a/compiler/rustc_lint/src/for_loops_over_fallibles.rs b/compiler/rustc_lint/src/for_loops_over_fallibles.rs index a56b753bda7..9e1fc598171 100644 --- a/compiler/rustc_lint/src/for_loops_over_fallibles.rs +++ b/compiler/rustc_lint/src/for_loops_over_fallibles.rs @@ -176,7 +176,7 @@ fn suggest_question_mark<'tcx>( cause, param_env, // Erase any region vids from the type, which may not be resolved - infcx.tcx.erase_regions(ty), + infcx.tcx.erase_and_anonymize_regions(ty), into_iterator_did, ); diff --git a/compiler/rustc_lint/src/types.rs b/compiler/rustc_lint/src/types.rs index a72b802eb5d..88527fa2e6e 100644 --- a/compiler/rustc_lint/src/types.rs +++ b/compiler/rustc_lint/src/types.rs @@ -935,7 +935,7 @@ impl<'tcx> LateLintPass<'tcx> for VariantSizeDifferences { fn check_item(&mut self, cx: &LateContext<'_>, it: &hir::Item<'_>) { if let hir::ItemKind::Enum(_, _, ref enum_definition) = it.kind { let t = cx.tcx.type_of(it.owner_id).instantiate_identity(); - let ty = cx.tcx.erase_regions(t); + let ty = cx.tcx.erase_and_anonymize_regions(t); let Ok(layout) = cx.layout_of(ty) else { return }; let Variants::Multiple { tag_encoding: TagEncoding::Direct, tag, variants, .. } = &layout.variants |
