From 246f239d9f40f633160f0c18f87a20922d4e77bb Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:06:37 +0200 Subject: Merging debian version 1.65.0+dfsg1-2. Signed-off-by: Daniel Baumann --- compiler/rustc_infer/src/infer/free_regions.rs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'compiler/rustc_infer/src/infer/free_regions.rs') diff --git a/compiler/rustc_infer/src/infer/free_regions.rs b/compiler/rustc_infer/src/infer/free_regions.rs index d566634a4..728d691a2 100644 --- a/compiler/rustc_infer/src/infer/free_regions.rs +++ b/compiler/rustc_infer/src/infer/free_regions.rs @@ -27,13 +27,13 @@ impl<'a, 'tcx> RegionRelations<'a, 'tcx> { } } -#[derive(Clone, Debug, Default)] +#[derive(Clone, Debug)] pub struct FreeRegionMap<'tcx> { // Stores the relation `a < b`, where `a` and `b` are regions. // // Invariant: only free regions like `'x` or `'static` are stored // in this relation, not scopes. - relation: TransitiveRelation>, + pub(crate) relation: TransitiveRelation>, } impl<'tcx> FreeRegionMap<'tcx> { @@ -45,15 +45,6 @@ impl<'tcx> FreeRegionMap<'tcx> { self.relation.is_empty() } - // Record that `'sup:'sub`. Or, put another way, `'sub <= 'sup`. - // (with the exception that `'static: 'x` is not notable) - pub fn relate_regions(&mut self, sub: Region<'tcx>, sup: Region<'tcx>) { - debug!("relate_regions(sub={:?}, sup={:?})", sub, sup); - if sub.is_free_or_static() && sup.is_free() { - self.relation.add(sub, sup) - } - } - /// Tests whether `r_a <= r_b`. /// /// Both regions must meet `is_free_or_static`. -- cgit v1.2.3