33// NOTE: For the example to compile, you will need to first run the following:
44// rustup component add rustc-dev
55
6- // version: 1.53 .0-nightly (9b0edb7fd 2021-03-27 )
6+ // version: 1.61 .0-nightly (68369a041 2022-02-22 )
77
88extern crate rustc_error_codes;
99extern crate rustc_errors;
@@ -15,7 +15,7 @@ extern crate rustc_span;
1515
1616use rustc_errors:: registry;
1717use rustc_hash:: { FxHashMap , FxHashSet } ;
18- use rustc_session:: config;
18+ use rustc_session:: config:: { self , CheckCfg } ;
1919use rustc_span:: source_map;
2020use std:: path;
2121use std:: process;
@@ -36,6 +36,7 @@ fn main() {
3636 } ,
3737 // cfg! configuration in addition to the default ones
3838 crate_cfg : FxHashSet :: default ( ) , // FxHashSet<(String, Option<String>)>
39+ crate_check_cfg : CheckCfg :: default ( ) , // CheckCfg
3940 input : config:: Input :: Str {
4041 name : source_map:: FileName :: Custom ( "main.rs" . to_string ( ) ) ,
4142 input : "static HELLO: &str = \" Hello, world!\" ; fn main() { println!(\" {}\" , HELLO); }"
@@ -46,8 +47,6 @@ fn main() {
4647 output_file : None , // Option<PathBuf>
4748 file_loader : None , // Option<Box<dyn FileLoader + Send + Sync>>
4849 diagnostic_output : rustc_session:: DiagnosticOutput :: Default ,
49- // Set to capture stderr output during compiler execution
50- stderr : None , // Option<Arc<Mutex<Vec<u8>>>>
5150 lint_caps : FxHashMap :: default ( ) , // FxHashMap<lint::LintId, lint::Level>
5251 // This is a callback from the driver that is called when [`ParseSess`] is created.
5352 parse_sess_created : None , //Option<Box<dyn FnOnce(&mut ParseSess) + Send>>
0 commit comments