Skip to content

Commit 26dfaef

Browse files
committed
Span delayed bug if there is no resolution for delegation
1 parent 8c4567f commit 26dfaef

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

compiler/rustc_ast_lowering/src/delegation.rs

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,11 @@ pub fn delegations_resolutions(
124124
if let Some(info) = resolver.delegation_info(def_id) {
125125
let res = info.resolution_id.map(|id| check_for_cycles(tcx, id, span).map(|_| id));
126126
result.insert(def_id, res.flatten());
127+
} else {
128+
tcx.dcx().span_delayed_bug(
129+
span,
130+
format!("delegation resolution record was not found for {def_id:?}"),
131+
);
127132
}
128133
}
129134

0 commit comments

Comments
 (0)