Skip to content

Commit

Permalink
context: Escape the try keyword properly
Browse files Browse the repository at this point in the history
  • Loading branch information
fionera authored and emilio committed Oct 30, 2021
1 parent da3f3a3 commit 2aed6b0
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/ir/context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -845,7 +845,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
"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" |
Expand Down
4 changes: 4 additions & 0 deletions tests/expectations/tests/keywords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,10 @@ extern "C" {
#[link_name = "\u{1}true"]
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;
Expand Down
1 change: 1 addition & 0 deletions tests/headers/keywords.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ int Self;
int super;
int trait;
int true;
int try;
int type;
int unsafe;
int use;
Expand Down

0 comments on commit 2aed6b0

Please sign in to comment.