context: Escape the try keyword properly
diff --git a/src/ir/context.rs b/src/ir/context.rs
index 874fb5d..ffb49d7 100644
--- a/src/ir/context.rs
+++ b/src/ir/context.rs
@@ -845,7 +845,7 @@
"macro" | "match" | "mod" | "move" | "mut" | "offsetof" |
"override" | "priv" | "proc" | "pub" | "pure" | "ref" |
"return" | "Self" | "self" | "sizeof" | "static" |
- "struct" | "super" | "trait" | "true" | "type" | "typeof" |
+ "struct" | "super" | "trait" | "true" | "try" | "type" | "typeof" |
"unsafe" | "unsized" | "use" | "virtual" | "where" |
"while" | "yield" | "str" | "bool" | "f32" | "f64" |
"usize" | "isize" | "u128" | "i128" | "u64" | "i64" |
diff --git a/tests/expectations/tests/keywords.rs b/tests/expectations/tests/keywords.rs
index f77bda0..055b0f0 100644
--- a/tests/expectations/tests/keywords.rs
+++ b/tests/expectations/tests/keywords.rs
@@ -146,6 +146,10 @@
pub static mut true_: ::std::os::raw::c_int;
}
extern "C" {
+ #[link_name = "\u{1}try"]
+ pub static mut try_: ::std::os::raw::c_int;
+}
+extern "C" {
#[link_name = "\u{1}type"]
pub static mut type_: ::std::os::raw::c_int;
}
diff --git a/tests/headers/keywords.h b/tests/headers/keywords.h
index 78ad278..d7fe206 100644
--- a/tests/headers/keywords.h
+++ b/tests/headers/keywords.h
@@ -34,6 +34,7 @@
int super;
int trait;
int true;
+int try;
int type;
int unsafe;
int use;