1
+ // Tested with nightly-2025-02-13
2
+
1
3
#![ feature( rustc_private) ]
2
4
3
5
extern crate rustc_driver;
@@ -9,8 +11,6 @@ extern crate rustc_interface;
9
11
extern crate rustc_session;
10
12
extern crate rustc_span;
11
13
12
- use std:: sync:: Arc ;
13
-
14
14
use rustc_errors:: registry;
15
15
use rustc_hash:: FxHashMap ;
16
16
use rustc_session:: config;
@@ -56,7 +56,7 @@ fn main() {
56
56
expanded_args : Vec :: new ( ) ,
57
57
ice_file : None ,
58
58
hash_untracked_state : None ,
59
- using_internal_features : Arc :: default ( ) ,
59
+ using_internal_features : & rustc_driver :: USING_INTERNAL_FEATURES ,
60
60
} ;
61
61
rustc_interface:: run_compiler ( config, |compiler| {
62
62
// Parse the program and print the syntax tree.
@@ -68,7 +68,7 @@ fn main() {
68
68
let hir = tcx. hir ( ) ;
69
69
let item = hir. item ( id) ;
70
70
match item. kind {
71
- rustc_hir:: ItemKind :: Static ( _, _, _) | rustc_hir:: ItemKind :: Fn ( _ , _ , _ ) => {
71
+ rustc_hir:: ItemKind :: Static ( _, _, _) | rustc_hir:: ItemKind :: Fn { .. } => {
72
72
let name = item. ident ;
73
73
let ty = tcx. type_of ( item. hir_id ( ) . owner . def_id ) ;
74
74
println ! ( "{name:?}:\t {ty:?}" )
0 commit comments