Skip to content

Commit f07c335

Browse files
committed
Remove another use of BrAnon(Some(_)).
1 parent 7dbd2e2 commit f07c335

File tree

2 files changed

+4
-5
lines changed

2 files changed

+4
-5
lines changed

compiler/rustc_hir_typeck/src/generator_interior/mod.rs

+2-3
Original file line numberDiff line numberDiff line change
@@ -256,15 +256,14 @@ pub fn resolve_interior<'a, 'tcx>(
256256
_ => mk_bound_region(ty::BrAnon(None)),
257257
}
258258
}
259-
// FIXME: these should use `BrNamed`
260259
ty::ReEarlyBound(region) => {
261260
mk_bound_region(ty::BrNamed(region.def_id, region.name))
262261
}
263262
ty::ReLateBound(_, ty::BoundRegion { kind, .. })
264263
| ty::ReFree(ty::FreeRegion { bound_region: kind, .. }) => match kind {
265264
ty::BoundRegionKind::BrAnon(span) => mk_bound_region(ty::BrAnon(span)),
266-
ty::BoundRegionKind::BrNamed(def_id, _) => {
267-
mk_bound_region(ty::BrAnon(Some(fcx.tcx.def_span(def_id))))
265+
ty::BoundRegionKind::BrNamed(def_id, sym) => {
266+
mk_bound_region(ty::BrNamed(def_id, sym))
268267
}
269268
ty::BoundRegionKind::BrEnv => mk_bound_region(ty::BrAnon(None)),
270269
},

tests/ui/generic-associated-types/bugs/issue-100013.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ LL | | async {}.await; // a yield point
2828
LL | | }
2929
| |_____^
3030
|
31-
note: the lifetime defined here...
31+
note: the lifetime `'b` defined here...
3232
--> $DIR/issue-100013.rs:21:14
3333
|
3434
LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {
3535
| ^^
36-
note: ...must outlive the lifetime defined here
36+
note: ...must outlive the lifetime `'a` defined here
3737
--> $DIR/issue-100013.rs:21:10
3838
|
3939
LL | fn call2<'a, 'b, I: FutureIterator>() -> impl Send {

0 commit comments

Comments
 (0)