diff options
author | Fionera <fionera@fionera.de> | 2021-10-30 01:37:26 +0200 |
---|---|---|
committer | Emilio Cobos Álvarez <emilio@crisal.io> | 2021-10-30 02:10:46 +0200 |
commit | 2aed6b0216805e27228ed39988ffe1a1ffd7e940 (patch) | |
tree | 0a079dce818badfcd572d41c6d4dfc9488dc0961 | |
parent | da3f3a3ab13fb335b525d74a38e6a8634a117fe5 (diff) |
context: Escape the try keyword properly
-rw-r--r-- | src/ir/context.rs | 2 | ||||
-rw-r--r-- | tests/expectations/tests/keywords.rs | 4 | ||||
-rw-r--r-- | tests/headers/keywords.h | 1 |
3 files changed, 6 insertions, 1 deletions
diff --git a/src/ir/context.rs b/src/ir/context.rs index 874fb5df..ffb49d74 100644 --- a/src/ir/context.rs +++ b/src/ir/context.rs @@ -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" | diff --git a/tests/expectations/tests/keywords.rs b/tests/expectations/tests/keywords.rs index f77bda0b..055b0f00 100644 --- a/tests/expectations/tests/keywords.rs +++ b/tests/expectations/tests/keywords.rs @@ -146,6 +146,10 @@ extern "C" { 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 78ad2784..d7fe2065 100644 --- a/tests/headers/keywords.h +++ b/tests/headers/keywords.h @@ -34,6 +34,7 @@ int Self; int super; int trait; int true; +int try; int type; int unsafe; int use; |