Skip to content

Commit 50d01f7

Browse files
bors[bot]ehuss
andcommitted
Merge #329
329: Syntax: Fix unsafe prefix for function types. r=ehuss a=ehuss <img width="603" alt="image" src="https://user-images.githubusercontent.com/43198/43736495-a13d96d0-9972-11e8-82bf-55cc4c05a61e.png"> Co-authored-by: Eric Huss <[email protected]>
2 parents 4281232 + dc0a603 commit 50d01f7

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

RustEnhanced.sublime-syntax

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -480,7 +480,7 @@ contexts:
480480
- include: return-type
481481
- match: '&'
482482
scope: keyword.operator.rust
483-
- match: \b(mut|ref|const)\b
483+
- match: \b(mut|ref|const|unsafe)\b
484484
scope: storage.modifier.rust
485485
- match: \b(fn)\b(\()
486486
captures:

tests/syntax-rust/syntax_test_misc.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ unsafe impl<T> Send for Interned<T> {}
99
//^^^^ storage.modifier
1010
pub unsafe trait Alloc { }
1111
// ^^^^^^ storage.modifier
12+
fn f(a: unsafe fn() -> String) {}
13+
// ^^^^^^ meta.function meta.function.parameters storage.modifier
14+
// ^^ meta.function meta.function.parameters storage.type.function
1215

1316
// Previously reserved keywords now unreserved.
1417
let pure = 1;

0 commit comments

Comments
 (0)