Skip to content

Commit 11d9dba

Browse files
committed
lex_via_rustc: updates for more recent rustc
TokenKind::Lifetime now has an IdentIsRaw field.
1 parent b82e517 commit 11d9dba

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
[toolchain]
2-
channel = "nightly-2024-07-29"
2+
channel = "nightly-2024-09-09"
33
components = ["rustc-dev", "llvm-tools"]

src/lex_via_rustc.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ extern crate rustc_session;
2525
extern crate rustc_span;
2626

2727
// This compiles with
28-
// rustc nightly from approximately 2024-07-29
28+
// rustc nightly from approximately 2024-09-09
2929

3030
use std::{
3131
mem,
@@ -398,7 +398,7 @@ fn token_from_ast_token(
398398
style: style.into(),
399399
identifier: symbol.to_string(),
400400
},
401-
TokenKind::Lifetime(symbol) => RustcTokenData::Lifetime {
401+
TokenKind::Lifetime(symbol, _is_raw) => RustcTokenData::Lifetime {
402402
symbol: symbol.to_string(),
403403
},
404404
TokenKind::Literal(rustc_ast::token::Lit {
@@ -438,7 +438,7 @@ fn token_from_ast_token(
438438
// These shouldn't happen
439439
TokenKind::Interpolated(_) => RustcTokenData::Other,
440440
TokenKind::NtIdent(_, _) => RustcTokenData::Other,
441-
TokenKind::NtLifetime(_) => RustcTokenData::Other,
441+
TokenKind::NtLifetime(_, _) => RustcTokenData::Other,
442442
TokenKind::Eof => RustcTokenData::Other,
443443
};
444444
RustcToken {

writeup/introduction.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ That means it describes `c""` literals, but not
2222
Other statements in this document are intended to be true as of August 2024.
2323

2424
The comparable implementation is intended to be compiled against (and compared against)\
25-
rustc nightly from approximately 2024-07-29
25+
rustc nightly from approximately 2024-09-09
2626

2727

2828
### Editions

0 commit comments

Comments
 (0)