Skip to content

Conversation

@dustypomerleau
Copy link
Contributor

Functions inside trait declarations can break subsequent highlighting, because they have no curly brackets. In a case such as:

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.

@lnicola
Copy link
Member

lnicola commented Nov 3, 2020

bors r+

@bors
Copy link
Contributor

bors bot commented Nov 3, 2020

@bors bors bot merged commit 658e97a into rust-lang:master Nov 3, 2020
@dustypomerleau dustypomerleau deleted the fn branch November 3, 2020 08:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants