Skip to content

Commit

Permalink
Update test suite to nightly-2023-12-19
Browse files Browse the repository at this point in the history
  • Loading branch information
dtolnay committed Dec 19, 2023
1 parent 66ee902 commit a6ac138
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions benches/rust.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ mod librustc_parse {

use rustc_data_structures::sync::Lrc;
use rustc_error_messages::FluentBundle;
use rustc_errors::{emitter::Emitter, translation::Translate, Diagnostic, Handler};
use rustc_errors::{emitter::Emitter, translation::Translate, DiagCtxt, Diagnostic};
use rustc_session::parse::ParseSess;
use rustc_span::source_map::{FilePathMapping, SourceMap};
use rustc_span::{edition::Edition, FileName};
Expand All @@ -79,10 +79,10 @@ mod librustc_parse {
}

rustc_span::create_session_if_not_set_then(Edition::Edition2018, |_| {
let cm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let source_map = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let emitter = Box::new(SilentEmitter);
let handler = Handler::with_emitter(emitter);
let sess = ParseSess::with_span_handler(handler, cm);
let handler = DiagCtxt::with_emitter(emitter);
let sess = ParseSess::with_dcx(handler, source_map);
if let Err(diagnostic) = rustc_parse::parse_crate_from_source_str(
FileName::Custom("bench".to_owned()),
content.to_owned(),
Expand Down

0 comments on commit a6ac138

Please sign in to comment.