Skip to content

Commit 939cd98

Browse files
committed
lex_via_rustc: updates for more recent rustc
TokenKind::ModSep has been renamed to TokenKind::PathSep rustc_span::create_session_globals_then expects a source map inputs parameter.
1 parent 8f8b325 commit 939cd98

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-03-07"
2+
channel = "nightly-2024-05-02"
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 1.78.0-nightly (7d3702e47 2024-03-06)
28+
// rustc nightly from approximately 2024-05-02
2929

3030
use std::{
3131
mem,
@@ -163,7 +163,7 @@ pub fn analyse(input: &str, edition: Edition) -> Analysis {
163163

164164
std::panic::catch_unwind(|| {
165165
match rustc_driver::catch_fatal_errors(|| {
166-
rustc_span::create_session_globals_then(rustc_edition, || {
166+
rustc_span::create_session_globals_then(rustc_edition, None, || {
167167
run_lexer(input, error_list.clone())
168168
})
169169
}) {
@@ -334,7 +334,7 @@ fn tokens_from_parser(mut parser: Parser, source_map: &SourceMap) -> Vec<RustcTo
334334
TokenKind::Comma => RustcTokenData::Punctuation,
335335
TokenKind::Semi => RustcTokenData::Punctuation,
336336
TokenKind::Colon => RustcTokenData::Punctuation,
337-
TokenKind::ModSep => RustcTokenData::Punctuation,
337+
TokenKind::PathSep => RustcTokenData::Punctuation,
338338
TokenKind::RArrow => RustcTokenData::Punctuation,
339339
TokenKind::LArrow => RustcTokenData::Punctuation,
340340
TokenKind::FatArrow => RustcTokenData::Punctuation,

writeup/introduction.md

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

2222
The comparable implementation is intended to be compiled against (and compared against)\
23-
`rustc 1.78.0-nightly (7d3702e47 2024-03-06)`
23+
rustc nightly from approximately 2024-05-02
2424

2525

2626
### Editions

0 commit comments

Comments
 (0)