3
3
// NOTE: For the example to compile, you will need to first run the following:
4
4
// rustup component add rustc-dev
5
5
6
- // version: 1.53 .0-nightly (9b0edb7fd 2021-03-27 )
6
+ // version: 1.61 .0-nightly (68369a041 2022-02-22 )
7
7
8
8
extern crate rustc_error_codes;
9
9
extern crate rustc_errors;
@@ -15,7 +15,7 @@ extern crate rustc_span;
15
15
16
16
use rustc_errors:: registry;
17
17
use rustc_hash:: { FxHashMap , FxHashSet } ;
18
- use rustc_session:: config;
18
+ use rustc_session:: config:: { self , CheckCfg } ;
19
19
use rustc_span:: source_map;
20
20
use std:: path;
21
21
use std:: process;
@@ -36,6 +36,7 @@ fn main() {
36
36
} ,
37
37
// cfg! configuration in addition to the default ones
38
38
crate_cfg : FxHashSet :: default ( ) , // FxHashSet<(String, Option<String>)>
39
+ crate_check_cfg : CheckCfg :: default ( ) , // CheckCfg
39
40
input : config:: Input :: Str {
40
41
name : source_map:: FileName :: Custom ( "main.rs" . to_string ( ) ) ,
41
42
input : "static HELLO: &str = \" Hello, world!\" ; fn main() { println!(\" {}\" , HELLO); }"
@@ -46,8 +47,6 @@ fn main() {
46
47
output_file : None , // Option<PathBuf>
47
48
file_loader : None , // Option<Box<dyn FileLoader + Send + Sync>>
48
49
diagnostic_output : rustc_session:: DiagnosticOutput :: Default ,
49
- // Set to capture stderr output during compiler execution
50
- stderr : None , // Option<Arc<Mutex<Vec<u8>>>>
51
50
lint_caps : FxHashMap :: default ( ) , // FxHashMap<lint::LintId, lint::Level>
52
51
// This is a callback from the driver that is called when [`ParseSess`] is created.
53
52
parse_sess_created : None , //Option<Box<dyn FnOnce(&mut ParseSess) + Send>>
0 commit comments