File tree Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Expand file tree Collapse file tree 3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ use std::path::Path;
1818
1919use rustc_ast_pretty:: pprust:: item_to_string;
2020use rustc_data_structures:: sync:: Lrc ;
21- use rustc_driver:: { Compilation , RunCompiler } ;
21+ use rustc_driver:: { Compilation , run_compiler } ;
2222use rustc_interface:: interface:: { Compiler , Config } ;
2323use rustc_middle:: ty:: TyCtxt ;
2424
@@ -87,5 +87,5 @@ impl rustc_driver::Callbacks for MyCallbacks {
8787}
8888
8989fn main ( ) {
90- RunCompiler :: new ( & [ "main.rs" . to_string ( ) ] , & mut MyCallbacks ) . run ( ) ;
90+ run_compiler ( & [ "main.rs" . to_string ( ) ] , & mut MyCallbacks ) ;
9191}
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ use std::path::Path;
1818
1919use rustc_ast_pretty:: pprust:: item_to_string;
2020use rustc_data_structures:: sync:: Lrc ;
21- use rustc_driver:: { Compilation , RunCompiler } ;
21+ use rustc_driver:: { Compilation , run_compiler } ;
2222use rustc_interface:: interface:: { Compiler , Config } ;
2323use rustc_middle:: ty:: TyCtxt ;
2424
@@ -94,5 +94,5 @@ impl rustc_driver::Callbacks for MyCallbacks {
9494}
9595
9696fn main ( ) {
97- RunCompiler :: new ( & [ "main.rs" . to_string ( ) ] , & mut MyCallbacks ) . run ( ) ;
97+ run_compiler ( & [ "main.rs" . to_string ( ) ] , & mut MyCallbacks ) ;
9898}
Original file line number Diff line number Diff line change @@ -6,7 +6,7 @@ The [`rustc_driver`] is essentially `rustc`'s `main` function.
66It acts as the glue for running the various phases of the compiler in the correct order,
77using the interface defined in the [ ` rustc_interface ` ] crate. Where possible, using [ ` rustc_driver ` ] rather than [ ` rustc_interface ` ] is recommended.
88
9- The main entry point of [ ` rustc_driver ` ] is [ ` rustc_driver::RunCompiler ` ] [ rd_rc ] .
9+ The main entry point of [ ` rustc_driver ` ] is [ ` rustc_driver::run_compiler ` ] [ rd_rc ] .
1010This builder accepts the same command-line args as rustc as well as an implementation of [ ` Callbacks ` ] [ cb ] and a couple of other optional options.
1111[ ` Callbacks ` ] [ cb ] is a ` trait ` that allows for custom compiler configuration,
1212as well as allowing custom code to run after different phases of the compilation.
@@ -40,7 +40,7 @@ specifically [`rustc_driver_impl::run_compiler`][rdi_rc]
4040[ cb ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/trait.Callbacks.html
4141[ example ] : https://github.com/rust-lang/rustc-dev-guide/blob/master/examples/rustc-interface-example.rs
4242[ i_rc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_interface/interface/fn.run_compiler.html
43- [ rd_rc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/struct.RunCompiler .html
43+ [ rd_rc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver/fn.run_compiler .html
4444[ rdi_rc ] : https://doc.rust-lang.org/nightly/nightly-rustc/rustc_driver_impl/fn.run_compiler.html
4545[ stupid-stats ] : https://github.com/nrc/stupid-stats
4646[ `nightly-rustc` ] : https://doc.rust-lang.org/nightly/nightly-rustc/
You can’t perform that action at this time.
0 commit comments