@@ -1383,6 +1383,9 @@ fn test_more() {
13831383
13841384#[ test]
13851385fn test_simplification ( ) {
1386+ use middle:: cstore:: LOCAL_CRATE ;
1387+ use rustc:: hir:: def_id:: CRATE_DEF_INDEX ;
1388+
13861389 let cx = mk_ctxt ( ) ;
13871390 let item = quote_item ! ( & cx,
13881391 fn new_int_alist<B >( ) -> alist<isize , B > {
@@ -1393,15 +1396,16 @@ fn test_simplification() {
13931396 let cx = mk_ctxt ( ) ;
13941397 with_testing_context ( |lcx| {
13951398 let hir_item = lcx. lower_item ( & item) ;
1396- let item_in = InlinedItemRef :: Item ( & hir_item) ;
1399+ let def_id = DefId { krate : LOCAL_CRATE , index : CRATE_DEF_INDEX } ; // dummy
1400+ let item_in = InlinedItemRef :: Item ( def_id, & hir_item) ;
13971401 let ( item_out, _) = simplify_ast ( item_in) ;
1398- let item_exp = InlinedItem :: Item ( P ( lcx. lower_item ( & quote_item ! ( & cx,
1402+ let item_exp = InlinedItem :: Item ( def_id , P ( lcx. lower_item ( & quote_item ! ( & cx,
13991403 fn new_int_alist<B >( ) -> alist<isize , B > {
14001404 return alist { eq_fn: eq_int, data: Vec :: new( ) } ;
14011405 }
14021406 ) . unwrap ( ) ) ) ) ;
14031407 match ( item_out, item_exp) {
1404- ( InlinedItem :: Item ( item_out) , InlinedItem :: Item ( item_exp) ) => {
1408+ ( InlinedItem :: Item ( _ , item_out) , InlinedItem :: Item ( _ , item_exp) ) => {
14051409 assert ! ( pprust:: item_to_string( & item_out) ==
14061410 pprust:: item_to_string( & item_exp) ) ;
14071411 }
0 commit comments