Skip to content

Commit b69b3d0

Browse files
erase late-bound regions in dyn projection types for debuginfo
1 parent 461e807 commit b69b3d0

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed

compiler/rustc_codegen_ssa/src/debuginfo/type_names.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,8 @@ fn push_debuginfo_type_name<'tcx>(
217217
let projection_bounds: SmallVec<[_; 4]> = trait_data
218218
.projection_bounds()
219219
.map(|bound| {
220-
let ExistentialProjection { item_def_id, term, .. } = bound.skip_binder();
220+
let ExistentialProjection { item_def_id, term, .. } =
221+
tcx.erase_late_bound_regions(bound);
221222
// FIXME(associated_const_equality): allow for consts here
222223
(item_def_id, term.ty().unwrap())
223224
})
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
// build-pass
2+
// compile-flags: -Cdebuginfo=2 --crate-type=rlib
3+
// Fixes issue #94998
4+
5+
pub trait Trait {}
6+
7+
pub fn run(_: &dyn FnOnce(&()) -> Box<dyn Trait + '_>) {}

0 commit comments

Comments
 (0)