Skip to content

Commit 441b1c6

Browse files
committed
Some more default implementations for the compiler driver callbacks.
1 parent adcae00 commit 441b1c6

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

src/librustc_driver/lib.rs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,9 @@ pub trait CompilerCalls<'a> {
204204
fn early_callback(&mut self,
205205
&getopts::Matches,
206206
&diagnostics::registry::Registry)
207-
-> Compilation;
207+
-> Compilation {
208+
Compilation::Continue
209+
}
208210

209211
// Hook for a callback late in the process of handling arguments. This will
210212
// be called just before actual compilation starts (and before build_controller
@@ -215,7 +217,9 @@ pub trait CompilerCalls<'a> {
215217
&Input,
216218
&Option<PathBuf>,
217219
&Option<PathBuf>)
218-
-> Compilation;
220+
-> Compilation {
221+
Compilation::Continue
222+
}
219223

220224
// Called after we extract the input from the arguments. Gives the implementer
221225
// an opportunity to change the inputs or to add some custom input handling.
@@ -236,7 +240,9 @@ pub trait CompilerCalls<'a> {
236240
&Option<PathBuf>,
237241
&Option<PathBuf>,
238242
&diagnostics::registry::Registry)
239-
-> Option<(Input, Option<PathBuf>)>;
243+
-> Option<(Input, Option<PathBuf>)> {
244+
None
245+
}
240246

241247
// Parse pretty printing information from the arguments. The implementer can
242248
// choose to ignore this (the default will return None) which will skip pretty

0 commit comments

Comments
 (0)