@@ -45,11 +45,11 @@ fn main() {
45
45
file_loader : None ,
46
46
locale_resources : rustc_driver:: DEFAULT_LOCALE_RESOURCES ,
47
47
lint_caps : rustc_hash:: FxHashMap :: default ( ) ,
48
- parse_sess_created : None ,
48
+ psess_created : None ,
49
49
register_lints : None ,
50
50
override_queries : None ,
51
51
make_codegen_backend : None ,
52
- registry : registry:: Registry :: new ( rustc_error_codes :: DIAGNOSTICS ) ,
52
+ registry : registry:: Registry :: new ( rustc_errors :: codes :: DIAGNOSTICS ) ,
53
53
expanded_args : Vec :: new ( ) ,
54
54
ice_file : None ,
55
55
hash_untracked_state : None ,
@@ -73,8 +73,8 @@ fn main() {
73
73
if let rustc_hir:: ItemKind :: Fn ( _, _, body_id) = item. kind {
74
74
let expr = & tcx. hir ( ) . body ( body_id) . value ;
75
75
if let rustc_hir:: ExprKind :: Block ( block, _) = expr. kind {
76
- if let rustc_hir:: StmtKind :: Local ( local ) = block. stmts [ 0 ] . kind {
77
- if let Some ( expr) = local . init {
76
+ if let rustc_hir:: StmtKind :: Let ( let_stmt ) = block. stmts [ 0 ] . kind {
77
+ if let Some ( expr) = let_stmt . init {
78
78
let hir_id = expr. hir_id ; // hir_id identifies the string "Hello, world!"
79
79
let def_id = item. hir_id ( ) . owner . def_id ; // def_id identifies the main function
80
80
let ty = tcx. typeck ( def_id) . node_type ( hir_id) ;
0 commit comments