Use a builder instead of boolean/option arguments

This commit is contained in:
Oli Scherer 2023-07-25 10:27:34 +00:00
parent cf9f53c837
commit 2b444672e1
12 changed files with 45 additions and 56 deletions

View file

@ -40,7 +40,7 @@ fn check_rust_syntax(
let emitter = BufferEmitter { buffer: Lrc::clone(&buffer), fallback_bundle };
let sm = Lrc::new(SourceMap::new(FilePathMapping::empty()));
let handler = Handler::with_emitter(false, None, Box::new(emitter), None);
let handler = Handler::with_emitter(Box::new(emitter)).disable_warnings();
let source = dox[code_block.code].to_owned();
let sess = ParseSess::with_span_handler(handler, sm);