about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
authorNick Cameron <ncameron@mozilla.com>2015-07-15 11:38:24 +1200
committerNick Cameron <ncameron@mozilla.com>2015-07-15 11:38:24 +1200
commit441b1c6103c55eb78532f9e3695463bddd3b5913 (patch)
tree803c2f30063bd921e12c45664bdc4969ded29951 /src
parentadcae006d250e40d7369d9bee3ecd05915acb22d (diff)
downloadrust-441b1c6103c55eb78532f9e3695463bddd3b5913.tar.gz
rust-441b1c6103c55eb78532f9e3695463bddd3b5913.zip
Some more default implementations for the compiler driver callbacks.
Diffstat (limited to 'src')
-rw-r--r--src/librustc_driver/lib.rs12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/librustc_driver/lib.rs b/src/librustc_driver/lib.rs
index 7ccada1079f..6a229ef3f5e 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<PathBuf>,
                      &Option<PathBuf>)
-                     -> 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<PathBuf>,
                 &Option<PathBuf>,
                 &diagnostics::registry::Registry)
-                -> Option<(Input, Option<PathBuf>)>;
+                -> Option<(Input, Option<PathBuf>)> {
+        None
+    }
 
     // Parse pretty printing information from the arguments. The implementer can
     // choose to ignore this (the default will return None) which will skip pretty