Rollup merge of #122811 - nnethercote:mv-SourceMap-init, r=WaffleLapkin

Move `SourceMap` initialization

So it happens at the same time as `SessionGlobals` initialization, rather than shortly afterward.

r? `@WaffleLapkin`
This commit is contained in:
Guillaume Gomez 2024-04-16 21:41:23 +02:00 committed by GitHub
commit c4f14ed785

View File

@ -38,7 +38,7 @@ pub fn check(
// of all `#[test]` attributes in not ignored code examples
fn check_code_sample(code: String, edition: Edition, ignore: bool) -> (bool, Vec<Range<usize>>) {
rustc_driver::catch_fatal_errors(|| {
rustc_span::create_session_globals_then(edition, || {
rustc_span::create_session_globals_then(edition, None, || {
let mut test_attr_spans = vec![];
let filename = FileName::anon_source_code(&code);