From bfc4bd4dbefaf3bd80eda2f3e764e03757fc9f46 Mon Sep 17 00:00:00 2001 From: Lzu Tao Date: Tue, 11 Feb 2020 22:52:00 +0700 Subject: [PATCH] Impl DefaultCallbacks on our side --- src/driver.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/driver.rs b/src/driver.rs index 27ff7fa9116e..087c8c67b4a0 100644 --- a/src/driver.rs +++ b/src/driver.rs @@ -63,10 +63,10 @@ fn test_arg_value() { assert_eq!(arg_value(args, "--foo", |_| true), None); } -#[allow(clippy::too_many_lines)] +struct DefaultCallbacks; +impl rustc_driver::Callbacks for DefaultCallbacks {} struct ClippyCallbacks; - impl rustc_driver::Callbacks for ClippyCallbacks { fn config(&mut self, config: &mut interface::Config) { let previous = config.register_lints.take(); @@ -387,7 +387,7 @@ pub fn main() { } } let mut clippy = ClippyCallbacks; - let mut default = rustc_driver::DefaultCallbacks; + let mut default = DefaultCallbacks; let callbacks: &mut (dyn rustc_driver::Callbacks + Send) = if clippy_enabled { &mut clippy } else { &mut default }; rustc_driver::run_compiler(&args, callbacks, None, None)