1
1
#![ feature( rustc_private) ]
2
2
3
- extern crate rustc_interface;
4
3
extern crate rustc_driver;
4
+ extern crate rustc_interface;
5
5
extern crate rustc_session;
6
6
extern crate rustc_span;
7
7
8
- use rustc_session:: config:: { Input , Options , OutputType , OutputTypes } ;
9
8
use rustc_interface:: interface;
9
+ use rustc_session:: config:: { Input , Options , OutputType , OutputTypes } ;
10
10
use rustc_span:: source_map:: FileName ;
11
11
12
12
use std:: path:: PathBuf ;
@@ -50,7 +50,6 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
50
50
crate_cfg : Default :: default ( ) ,
51
51
crate_check_cfg : Default :: default ( ) ,
52
52
input,
53
- input_path : None ,
54
53
output_file : Some ( output) ,
55
54
output_dir : None ,
56
55
file_loader : None ,
@@ -64,9 +63,7 @@ fn compile(code: String, output: PathBuf, sysroot: PathBuf) {
64
63
65
64
interface:: run_compiler ( config, |compiler| {
66
65
// This runs all the passes prior to linking, too.
67
- let linker = compiler. enter ( |queries| {
68
- queries. linker ( )
69
- } ) ;
66
+ let linker = compiler. enter ( |queries| queries. linker ( ) ) ;
70
67
if let Ok ( linker) = linker {
71
68
linker. link ( ) ;
72
69
}
0 commit comments