@@ -243,7 +243,7 @@ fn look_for_tests<'a, 'tcx: 'a, 'rcx: 'a, 'cstore: 'rcx>(
243
243
if tests. found_tests == 0 {
244
244
let mut diag = cx. tcx . struct_span_lint_node (
245
245
lint:: builtin:: MISSING_DOC_CODE_EXAMPLES ,
246
- NodeId :: new ( 0 ) ,
246
+ NodeId :: from_u32 ( 0 ) ,
247
247
span_of_attrs ( & item. attrs ) ,
248
248
"Missing code example in this documentation" ) ;
249
249
diag. emit ( ) ;
@@ -281,14 +281,14 @@ impl<'a, 'tcx, 'rcx, 'cstore> DocFolder for LinkCollector<'a, 'tcx, 'rcx, 'cstor
281
281
let current_item = match item. inner {
282
282
ModuleItem ( ..) => {
283
283
if item. attrs . inner_docs {
284
- if item_node_id. unwrap ( ) != NodeId :: new ( 0 ) {
284
+ if item_node_id. unwrap ( ) != NodeId :: from_u32 ( 0 ) {
285
285
item. name . clone ( )
286
286
} else {
287
287
None
288
288
}
289
289
} else {
290
290
match parent_node. or ( self . mod_ids . last ( ) . cloned ( ) ) {
291
- Some ( parent) if parent != NodeId :: new ( 0 ) => {
291
+ Some ( parent) if parent != NodeId :: from_u32 ( 0 ) => {
292
292
//FIXME: can we pull the parent module's name from elsewhere?
293
293
Some ( self . cx . tcx . hir . name ( parent) . to_string ( ) )
294
294
}
@@ -538,13 +538,13 @@ fn resolution_failure(
538
538
) ;
539
539
540
540
diag = cx. tcx . struct_span_lint_node ( lint:: builtin:: INTRA_DOC_LINK_RESOLUTION_FAILURE ,
541
- NodeId :: new ( 0 ) ,
541
+ NodeId :: from_u32 ( 0 ) ,
542
542
sp,
543
543
& msg) ;
544
544
diag. span_label ( sp, "cannot be resolved, ignoring" ) ;
545
545
} else {
546
546
diag = cx. tcx . struct_span_lint_node ( lint:: builtin:: INTRA_DOC_LINK_RESOLUTION_FAILURE ,
547
- NodeId :: new ( 0 ) ,
547
+ NodeId :: from_u32 ( 0 ) ,
548
548
sp,
549
549
& msg) ;
550
550
@@ -564,7 +564,7 @@ fn resolution_failure(
564
564
diag
565
565
} else {
566
566
cx. tcx . struct_span_lint_node ( lint:: builtin:: INTRA_DOC_LINK_RESOLUTION_FAILURE ,
567
- NodeId :: new ( 0 ) ,
567
+ NodeId :: from_u32 ( 0 ) ,
568
568
sp,
569
569
& msg)
570
570
} ;
0 commit comments