Skip to content

Commit 9c7f101

Browse files
committed
ir: We can't guarantee the type to be in the item map while propagating AlreadyResolved.
The item may come from a recursive check down the stack, and as we say there: > Unchecked because we haven't finished this type yet. Fixes rust-lang#1127
1 parent 3d623d3 commit 9c7f101

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ir/item.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1512,7 +1512,7 @@ impl ClangItemParser for Item {
15121512
let result = Type::from_clang_ty(id, ty, location, parent_id, ctx);
15131513
let relevant_parent_id = parent_id.unwrap_or(current_module);
15141514
let ret = match result {
1515-
Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.expect_type_id(ctx)),
1515+
Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.as_type_id_unchecked()),
15161516
Ok(ParseResult::New(item, declaration)) => {
15171517
ctx.add_item(
15181518
Item::new(

0 commit comments

Comments
 (0)