Skip to content

Commit 1eea181

Browse files
author
Yin Jifeng
committed
chore: update keywords list
1 parent 57781b9 commit 1eea181

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

graphql_client_codegen/src/codegen/shared.rs

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,11 @@ use proc_macro2::TokenStream;
22
use quote::quote;
33
use std::borrow::Cow;
44

5-
// List of keywords based on https://doc.rust-lang.org/grammar.html#keywords
5+
// List of keywords based on https://doc.rust-lang.org/reference/keywords.html
6+
// code snippet: `[...new Set($$("code.hljs").map(x => x.textContent).filter(x => x.match(/^[_a-z0-9]+$/i)))].sort()`
67
const RUST_KEYWORDS: &[&str] = &[
8+
"Self",
79
"abstract",
8-
"alignof",
910
"as",
1011
"async",
1112
"await",
@@ -16,20 +17,16 @@ const RUST_KEYWORDS: &[&str] = &[
1617
"continue",
1718
"crate",
1819
"do",
20+
"dyn",
1921
"else",
2022
"enum",
2123
"extern",
22-
"extern crate",
2324
"false",
2425
"final",
2526
"fn",
2627
"for",
27-
"for",
28-
"if let",
29-
"if",
3028
"if",
3129
"impl",
32-
"impl",
3330
"in",
3431
"let",
3532
"loop",
@@ -38,27 +35,24 @@ const RUST_KEYWORDS: &[&str] = &[
3835
"mod",
3936
"move",
4037
"mut",
41-
"offsetof",
4238
"override",
4339
"priv",
44-
"proc",
4540
"pub",
46-
"pure",
4741
"ref",
4842
"return",
4943
"self",
50-
"sizeof",
5144
"static",
5245
"struct",
5346
"super",
5447
"trait",
5548
"true",
49+
"try",
5650
"type",
5751
"typeof",
52+
"union",
5853
"unsafe",
5954
"unsized",
6055
"use",
61-
"use",
6256
"virtual",
6357
"where",
6458
"while",

0 commit comments

Comments
 (0)