summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorbors-servo <lbergstrom+bors@mozilla.com>2017-10-31 12:57:30 -0500
committerGitHub <noreply@github.com>2017-10-31 12:57:30 -0500
commit55cf63c08c539df2a8c5437c062dda5fb57a8b18 (patch)
tree730b9b6e4d394f1f64ff4472f28d554f1c58c57c
parent3d623d3403f421f477182209a43aa39a54aebb20 (diff)
parent15543884260e97467a270f973960d0b60c6021da (diff)
Auto merge of #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 #1127
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--src/ir/item.rs2
3 files changed, 3 insertions, 3 deletions
diff --git a/Cargo.lock b/Cargo.lock
index e2e2284a..81551c76 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -23,7 +23,7 @@ dependencies = [
[[package]]
name = "bindgen"
-version = "0.31.2"
+version = "0.31.3"
dependencies = [
"cexpr 0.2.0 (registry+https://github.com/rust-lang/crates.io-index)",
"cfg-if 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)",
diff --git a/Cargo.toml b/Cargo.toml
index b6ed1b8a..eee82f0c 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ name = "bindgen"
readme = "README.md"
repository = "https://github.com/rust-lang-nursery/rust-bindgen"
documentation = "https://docs.rs/bindgen"
-version = "0.31.2"
+version = "0.31.3"
build = "build.rs"
include = [
diff --git a/src/ir/item.rs b/src/ir/item.rs
index d863d907..a9203639 100644
--- a/src/ir/item.rs
+++ b/src/ir/item.rs
@@ -1512,7 +1512,7 @@ impl ClangItemParser for Item {
let result = Type::from_clang_ty(id, ty, location, parent_id, ctx);
let relevant_parent_id = parent_id.unwrap_or(current_module);
let ret = match result {
- Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.expect_type_id(ctx)),
+ Ok(ParseResult::AlreadyResolved(ty)) => Ok(ty.as_type_id_unchecked()),
Ok(ParseResult::New(item, declaration)) => {
ctx.add_item(
Item::new(