From cf94bdc0742c13e2a0cac864c478b8626b266e1b Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Wed, 17 Apr 2024 14:11:38 +0200 Subject: Merging upstream version 1.66.0+dfsg1. Signed-off-by: Daniel Baumann --- vendor/syn/benches/file.rs | 2 +- vendor/syn/benches/rust.rs | 11 +++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) (limited to 'vendor/syn/benches') diff --git a/vendor/syn/benches/file.rs b/vendor/syn/benches/file.rs index c500dc24a..bd4a247df 100644 --- a/vendor/syn/benches/file.rs +++ b/vendor/syn/benches/file.rs @@ -1,4 +1,4 @@ -// $ cargo bench --features full --bench file +// $ cargo bench --features full,test --bench file #![feature(rustc_private, test)] #![recursion_limit = "1024"] diff --git a/vendor/syn/benches/rust.rs b/vendor/syn/benches/rust.rs index 5e4fba182..e3f8f550a 100644 --- a/vendor/syn/benches/rust.rs +++ b/vendor/syn/benches/rust.rs @@ -1,7 +1,7 @@ -// $ cargo bench --features full --bench rust +// $ cargo bench --features full,test --bench rust // // Syn only, useful for profiling: -// $ RUSTFLAGS='--cfg syn_only' cargo build --release --features full --bench rust +// $ RUSTFLAGS='--cfg syn_only' cargo build --release --features full,test --bench rust #![cfg_attr(not(syn_only), feature(rustc_private))] #![recursion_limit = "1024"] @@ -46,7 +46,7 @@ mod librustc_parse { use rustc_data_structures::sync::Lrc; use rustc_error_messages::FluentBundle; - use rustc_errors::{emitter::Emitter, Diagnostic, Handler}; + use rustc_errors::{emitter::Emitter, translation::Translate, Diagnostic, Handler}; use rustc_session::parse::ParseSess; use rustc_span::source_map::{FilePathMapping, SourceMap}; use rustc_span::{edition::Edition, FileName}; @@ -59,6 +59,9 @@ mod librustc_parse { fn source_map(&self) -> Option<&Lrc> { None } + } + + impl Translate for SilentEmitter { fn fluent_bundle(&self) -> Option<&Lrc> { None } @@ -88,7 +91,7 @@ mod librustc_parse { #[cfg(not(syn_only))] mod read_from_disk { pub fn bench(content: &str) -> Result<(), ()> { - let _ = content; + _ = content; Ok(()) } } -- cgit v1.2.3