diff options
author | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
---|---|---|
committer | Benjamin Coenen <[email protected]> | 2020-04-18 16:14:24 +0100 |
commit | af3c19e85f55db9277ce9ad5b784df2ccfe3c9e4 (patch) | |
tree | 7a777f22f5fa79704b8d2c9aa8d67255d12123be /crates/ra_ide/src/syntax_highlighting.rs | |
parent | 379787858bbfb2691e134942d94fcbc70c5d1d7f (diff) | |
parent | 84e3304a9bf0d68e30d58b1e37a6db2e9ec97525 (diff) |
Merge branch 'master' of github.com:rust-analyzer/rust-analyzer
Diffstat (limited to 'crates/ra_ide/src/syntax_highlighting.rs')
-rw-r--r-- | crates/ra_ide/src/syntax_highlighting.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/crates/ra_ide/src/syntax_highlighting.rs b/crates/ra_ide/src/syntax_highlighting.rs index 83d161f45..7b15b82bd 100644 --- a/crates/ra_ide/src/syntax_highlighting.rs +++ b/crates/ra_ide/src/syntax_highlighting.rs | |||
@@ -174,7 +174,8 @@ pub(crate) fn highlight( | |||
174 | } | 174 | } |
175 | 175 | ||
176 | assert_eq!(res.len(), 1, "after DFS traversal, the stack should only contain a single element"); | 176 | assert_eq!(res.len(), 1, "after DFS traversal, the stack should only contain a single element"); |
177 | let res = res.pop().unwrap(); | 177 | let mut res = res.pop().unwrap(); |
178 | res.sort_by_key(|range| range.range.start()); | ||
178 | // Check that ranges are sorted and disjoint | 179 | // Check that ranges are sorted and disjoint |
179 | assert!(res | 180 | assert!(res |
180 | .iter() | 181 | .iter() |