Skip to content

Commit 55cf63c

Browse files
author
bors-servo
authored
Auto merge of rust-lang#1128 - emilio:not-yet-type, r=fitzgen
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
2 parents 3d623d3 + 1554388 commit 55cf63c

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ name = "bindgen"
1313
readme = "README.md"
1414
repository = "https://github.com/rust-lang-nursery/rust-bindgen"
1515
documentation = "https://docs.rs/bindgen"
16-
version = "0.31.2"
16+
version = "0.31.3"
1717
build = "build.rs"
1818

1919
include = [

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)