Skip to content

Commit

Permalink
Merge #329
Browse files Browse the repository at this point in the history
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 <eric@huss.org>
  • Loading branch information
bors[bot] and ehuss committed Aug 20, 2018
2 parents 4281232 + dc0a603 commit 50d01f7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion RustEnhanced.sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -480,7 +480,7 @@ contexts:
- include: return-type
- match: '&'
scope: keyword.operator.rust
- match: \b(mut|ref|const)\b
- match: \b(mut|ref|const|unsafe)\b
scope: storage.modifier.rust
- match: \b(fn)\b(\()
captures:
Expand Down
3 changes: 3 additions & 0 deletions tests/syntax-rust/syntax_test_misc.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ unsafe impl<T> Send for Interned<T> {}
//^^^^ 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;
Expand Down

0 comments on commit 50d01f7

Please sign in to comment.