1+ // Tested with nightly-2025-02-13
2+
13#![ feature( rustc_private) ]
24
35extern crate rustc_driver;
@@ -9,8 +11,6 @@ extern crate rustc_interface;
911extern crate rustc_session;
1012extern crate rustc_span;
1113
12- use std:: sync:: Arc ;
13-
1414use rustc_errors:: registry;
1515use rustc_hash:: FxHashMap ;
1616use rustc_session:: config;
@@ -56,7 +56,7 @@ fn main() {
5656 expanded_args : Vec :: new ( ) ,
5757 ice_file : None ,
5858 hash_untracked_state : None ,
59- using_internal_features : Arc :: default ( ) ,
59+ using_internal_features : & rustc_driver :: USING_INTERNAL_FEATURES ,
6060 } ;
6161 rustc_interface:: run_compiler ( config, |compiler| {
6262 // Parse the program and print the syntax tree.
@@ -68,7 +68,7 @@ fn main() {
6868 let hir = tcx. hir ( ) ;
6969 let item = hir. item ( id) ;
7070 match item. kind {
71- rustc_hir:: ItemKind :: Static ( _, _, _) | rustc_hir:: ItemKind :: Fn ( _ , _ , _ ) => {
71+ rustc_hir:: ItemKind :: Static ( _, _, _) | rustc_hir:: ItemKind :: Fn { .. } => {
7272 let name = item. ident ;
7373 let ty = tcx. type_of ( item. hir_id ( ) . owner . def_id ) ;
7474 println ! ( "{name:?}:\t {ty:?}" )
0 commit comments