diff options
Diffstat (limited to 'crates/syntax')
-rw-r--r-- | crates/syntax/Cargo.toml | 2 | ||||
-rw-r--r-- | crates/syntax/src/ast/edit.rs | 2 | ||||
-rw-r--r-- | crates/syntax/src/parsing/lexer.rs | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/crates/syntax/Cargo.toml b/crates/syntax/Cargo.toml index af61bb658..0b15f10e9 100644 --- a/crates/syntax/Cargo.toml +++ b/crates/syntax/Cargo.toml | |||
@@ -13,7 +13,7 @@ doctest = false | |||
13 | [dependencies] | 13 | [dependencies] |
14 | itertools = "0.9.0" | 14 | itertools = "0.9.0" |
15 | rowan = "0.10.0" | 15 | rowan = "0.10.0" |
16 | rustc_lexer = { version = "673.0.0", package = "rustc-ap-rustc_lexer" } | 16 | rustc_lexer = { version = "681.0.0", package = "rustc-ap-rustc_lexer" } |
17 | rustc-hash = "1.1.0" | 17 | rustc-hash = "1.1.0" |
18 | arrayvec = "0.5.1" | 18 | arrayvec = "0.5.1" |
19 | once_cell = "1.3.1" | 19 | once_cell = "1.3.1" |
diff --git a/crates/syntax/src/ast/edit.rs b/crates/syntax/src/ast/edit.rs index dda0a0319..77233ab31 100644 --- a/crates/syntax/src/ast/edit.rs +++ b/crates/syntax/src/ast/edit.rs | |||
@@ -159,7 +159,7 @@ impl ast::AssocItemList { | |||
159 | let whitespace = | 159 | let whitespace = |
160 | last_token_before_curly.clone().into_token().and_then(ast::Whitespace::cast)?; | 160 | last_token_before_curly.clone().into_token().and_then(ast::Whitespace::cast)?; |
161 | let text = whitespace.syntax().text(); | 161 | let text = whitespace.syntax().text(); |
162 | let newline = text.rfind("\n")?; | 162 | let newline = text.rfind('\n')?; |
163 | let keep = tokens::WsBuilder::new(&text[newline..]); | 163 | let keep = tokens::WsBuilder::new(&text[newline..]); |
164 | Some(self.replace_children( | 164 | Some(self.replace_children( |
165 | first_token_after_items..=last_token_before_curly, | 165 | first_token_after_items..=last_token_before_curly, |
diff --git a/crates/syntax/src/parsing/lexer.rs b/crates/syntax/src/parsing/lexer.rs index fa3be1016..f1202113b 100644 --- a/crates/syntax/src/parsing/lexer.rs +++ b/crates/syntax/src/parsing/lexer.rs | |||
@@ -120,10 +120,10 @@ fn rustc_token_kind_to_syntax_kind( | |||
120 | 120 | ||
121 | let syntax_kind = { | 121 | let syntax_kind = { |
122 | match rustc_token_kind { | 122 | match rustc_token_kind { |
123 | rustc_lexer::TokenKind::LineComment => COMMENT, | 123 | rustc_lexer::TokenKind::LineComment { doc_style: _ } => COMMENT, |
124 | 124 | ||
125 | rustc_lexer::TokenKind::BlockComment { terminated: true } => COMMENT, | 125 | rustc_lexer::TokenKind::BlockComment { doc_style: _, terminated: true } => COMMENT, |
126 | rustc_lexer::TokenKind::BlockComment { terminated: false } => { | 126 | rustc_lexer::TokenKind::BlockComment { doc_style: _, terminated: false } => { |
127 | return ( | 127 | return ( |
128 | COMMENT, | 128 | COMMENT, |
129 | Some("Missing trailing `*/` symbols to terminate the block comment"), | 129 | Some("Missing trailing `*/` symbols to terminate the block comment"), |
@@ -164,7 +164,7 @@ fn rustc_token_kind_to_syntax_kind( | |||
164 | rustc_lexer::TokenKind::Colon => T![:], | 164 | rustc_lexer::TokenKind::Colon => T![:], |
165 | rustc_lexer::TokenKind::Dollar => T![$], | 165 | rustc_lexer::TokenKind::Dollar => T![$], |
166 | rustc_lexer::TokenKind::Eq => T![=], | 166 | rustc_lexer::TokenKind::Eq => T![=], |
167 | rustc_lexer::TokenKind::Not => T![!], | 167 | rustc_lexer::TokenKind::Bang => T![!], |
168 | rustc_lexer::TokenKind::Lt => T![<], | 168 | rustc_lexer::TokenKind::Lt => T![<], |
169 | rustc_lexer::TokenKind::Gt => T![>], | 169 | rustc_lexer::TokenKind::Gt => T![>], |
170 | rustc_lexer::TokenKind::Minus => T![-], | 170 | rustc_lexer::TokenKind::Minus => T![-], |