diff options
| author | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-04-13 12:41:12 +1000 |
|---|---|---|
| committer | Nicholas Nethercote <n.nethercote@gmail.com> | 2023-04-14 11:28:16 +1000 |
| commit | f07c335e90d2705f2db5a18f0b912a08652610f5 (patch) | |
| tree | 891066970903dcec86ddfa36af33d0c0be222a83 /compiler | |
| parent | 7dbd2e2370897c8363f4b17eb87a3a376811deaa (diff) | |
| download | rust-f07c335e90d2705f2db5a18f0b912a08652610f5.tar.gz rust-f07c335e90d2705f2db5a18f0b912a08652610f5.zip | |
Remove another use of `BrAnon(Some(_))`.
Diffstat (limited to 'compiler')
| -rw-r--r-- | compiler/rustc_hir_typeck/src/generator_interior/mod.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/rustc_hir_typeck/src/generator_interior/mod.rs b/compiler/rustc_hir_typeck/src/generator_interior/mod.rs index 0a9992c9557..f3971080443 100644 --- a/compiler/rustc_hir_typeck/src/generator_interior/mod.rs +++ b/compiler/rustc_hir_typeck/src/generator_interior/mod.rs @@ -256,15 +256,14 @@ pub fn resolve_interior<'a, 'tcx>( _ => mk_bound_region(ty::BrAnon(None)), } } - // FIXME: these should use `BrNamed` ty::ReEarlyBound(region) => { mk_bound_region(ty::BrNamed(region.def_id, region.name)) } ty::ReLateBound(_, ty::BoundRegion { kind, .. }) | ty::ReFree(ty::FreeRegion { bound_region: kind, .. }) => match kind { ty::BoundRegionKind::BrAnon(span) => mk_bound_region(ty::BrAnon(span)), - ty::BoundRegionKind::BrNamed(def_id, _) => { - mk_bound_region(ty::BrAnon(Some(fcx.tcx.def_span(def_id)))) + ty::BoundRegionKind::BrNamed(def_id, sym) => { + mk_bound_region(ty::BrNamed(def_id, sym)) } ty::BoundRegionKind::BrEnv => mk_bound_region(ty::BrAnon(None)), }, |
