From 441b1c6103c55eb78532f9e3695463bddd3b5913 Mon Sep 17 00:00:00 2001 From: Nick Cameron Date: Wed, 15 Jul 2015 11:38:24 +1200 Subject: [PATCH] Some more default implementations for the compiler driver callbacks. --- src/librustc_driver/lib.rs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs index 7ccada1079ff..6a229ef3f5e9 100644 --- a/src/librustc_driver/lib.rs +++ b/src/librustc_driver/lib.rs @@ -204,7 +204,9 @@ pub trait CompilerCalls<'a> { fn early_callback(&mut self, &getopts::Matches, &diagnostics::registry::Registry) - -> Compilation; + -> Compilation { + Compilation::Continue + } // Hook for a callback late in the process of handling arguments. This will // be called just before actual compilation starts (and before build_controller @@ -215,7 +217,9 @@ pub trait CompilerCalls<'a> { &Input, &Option, &Option) - -> Compilation; + -> Compilation { + Compilation::Continue + } // Called after we extract the input from the arguments. Gives the implementer // an opportunity to change the inputs or to add some custom input handling. @@ -236,7 +240,9 @@ pub trait CompilerCalls<'a> { &Option, &Option, &diagnostics::registry::Registry) - -> Option<(Input, Option)>; + -> Option<(Input, Option)> { + None + } // Parse pretty printing information from the arguments. The implementer can // choose to ignore this (the default will return None) which will skip pretty