Skip to content

Commit 2aed6b0

Browse files
fioneraemilio
authored andcommitted
context: Escape the try keyword properly
1 parent da3f3a3 commit 2aed6b0

File tree

3 files changed

+6
-1
lines changed

3 files changed

+6
-1
lines changed

src/ir/context.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -845,7 +845,7 @@ If you encounter an error missing from this list, please file an issue or a PR!"
845845
"macro" | "match" | "mod" | "move" | "mut" | "offsetof" |
846846
"override" | "priv" | "proc" | "pub" | "pure" | "ref" |
847847
"return" | "Self" | "self" | "sizeof" | "static" |
848-
"struct" | "super" | "trait" | "true" | "type" | "typeof" |
848+
"struct" | "super" | "trait" | "true" | "try" | "type" | "typeof" |
849849
"unsafe" | "unsized" | "use" | "virtual" | "where" |
850850
"while" | "yield" | "str" | "bool" | "f32" | "f64" |
851851
"usize" | "isize" | "u128" | "i128" | "u64" | "i64" |

tests/expectations/tests/keywords.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,10 @@ extern "C" {
145145
#[link_name = "\u{1}true"]
146146
pub static mut true_: ::std::os::raw::c_int;
147147
}
148+
extern "C" {
149+
#[link_name = "\u{1}try"]
150+
pub static mut try_: ::std::os::raw::c_int;
151+
}
148152
extern "C" {
149153
#[link_name = "\u{1}type"]
150154
pub static mut type_: ::std::os::raw::c_int;

tests/headers/keywords.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ int Self;
3434
int super;
3535
int trait;
3636
int true;
37+
int try;
3738
int type;
3839
int unsafe;
3940
int use;

0 commit comments

Comments
 (0)