mirror of
https://github.com/rust-lang/rust.git
synced 2025-01-26 06:35:27 +00:00
Merge #6447
6447: Textmate grammar: allow function declarations without curly brackets r=lnicola a=dustypomerleau Functions inside trait declarations can break subsequent highlighting, because they have no curly brackets. In a case such as: ```rust pub trait Summary { fn summarize(&self) -> String; } ``` the scope `meta.function.definition.rust` will continue past the end of the block looking for `{` after `fn`. This PR allows `meta.function.definition.rust` to terminate with `;` in these cases. Co-authored-by: Dusty Pomerleau <dustypomerleau@users.noreply.github.com>
This commit is contained in:
commit
658e97a39e
@ -462,7 +462,7 @@
|
||||
"name": "punctuation.brackets.angle.rust"
|
||||
}
|
||||
},
|
||||
"end": "\\{",
|
||||
"end": "\\{|;",
|
||||
"endCaptures": {
|
||||
"0": {
|
||||
"name": "punctuation.brackets.curly.rust"
|
||||
|
Loading…
Reference in New Issue
Block a user