forked from dbp/sublime-rust
-
Notifications
You must be signed in to change notification settings - Fork 105
/
Copy pathsyntax_test_misc.rs
63 lines (57 loc) · 1.73 KB
/
syntax_test_misc.rs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
// SYNTAX TEST "Packages/Rust Enhanced/RustEnhanced.sublime-syntax"
// Random things that don't deserve a file on their own.
// Unsafe
let x = unsafe { }
// ^^^^^^ storage.modifier
unsafe impl<T> Send for Interned<T> {}
// <- storage.modifier
//^^^^ storage.modifier
pub unsafe trait Alloc { }
// ^^^^^^ storage.modifier
fn f(a: unsafe fn() -> String) {}
// ^^^^^^ meta.function meta.function.parameters storage.modifier
// ^^ meta.function meta.function.parameters storage.type.function
// Previously reserved keywords now unreserved.
let pure = 1;
// ^^^^ -invalid.illegal.rust
let sizeof = 1;
// ^^^^^^ -invalid.illegal.rust
let alignof = 1;
// ^^^^^^^ -invalid.illegal.rust
let offsetof = 1;
// ^^^^^^^^ -invalid.illegal.rust
let proc = 1;
// ^^^^ -invalid.illegal.rust
// Reserved keywords.
let virtual = 1;
// ^^^^^^^ invalid.illegal.rust
let become = 1;
// ^^^^^^ invalid.illegal.rust
let priv = 1;
// ^^^^ invalid.illegal.rust
let typeof = 1;
// ^^^^^^ invalid.illegal.rust
let unsized = 1;
// ^^^^^^^ invalid.illegal.rust
let do = 1;
// ^^ invalid.illegal.rust
let abstract = 1;
// ^^^^^^^^ invalid.illegal.rust
let final = 1;
// ^^^^^ invalid.illegal.rust
let override = 1;
// ^^^^^^^^ invalid.illegal.rust
let macro = 1;
// ^^^^^ invalid.illegal.rust
// async/await
let x = async {}
// ^^^^^ keyword.control.rust
let y = future.await;
// ^^^^^ keyword.control.rust
// try keyword in 2018 edition
let x = try {}
// ^^^ keyword.control.rust
// Performance test for catastrophic backtracking.
impl ApplicationPreferenceseeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee {
// ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ entity.name.impl
}