Skip to content

Commit 4bf7c33

Browse files
committed
Fix rustdoc
1 parent a1d8926 commit 4bf7c33

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ fn look_for_tests<'a, 'tcx: 'a, 'rcx: 'a, 'cstore: 'rcx>(
243243
if tests.found_tests == 0 {
244244
let mut diag = cx.tcx.struct_span_lint_node(
245245
lint::builtin::MISSING_DOC_CODE_EXAMPLES,
246-
NodeId::new(0),
246+
NodeId::from_u32(0),
247247
span_of_attrs(&item.attrs),
248248
"Missing code example in this documentation");
249249
diag.emit();
@@ -281,14 +281,14 @@ impl<'a, 'tcx, 'rcx, 'cstore> DocFolder for LinkCollector<'a, 'tcx, 'rcx, 'cstor
281281
let current_item = match item.inner {
282282
ModuleItem(..) => {
283283
if item.attrs.inner_docs {
284-
if item_node_id.unwrap() != NodeId::new(0) {
284+
if item_node_id.unwrap() != NodeId::from_u32(0) {
285285
item.name.clone()
286286
} else {
287287
None
288288
}
289289
} else {
290290
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) => {
292292
//FIXME: can we pull the parent module's name from elsewhere?
293293
Some(self.cx.tcx.hir.name(parent).to_string())
294294
}
@@ -538,13 +538,13 @@ fn resolution_failure(
538538
);
539539

540540
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
541-
NodeId::new(0),
541+
NodeId::from_u32(0),
542542
sp,
543543
&msg);
544544
diag.span_label(sp, "cannot be resolved, ignoring");
545545
} else {
546546
diag = cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
547-
NodeId::new(0),
547+
NodeId::from_u32(0),
548548
sp,
549549
&msg);
550550

@@ -564,7 +564,7 @@ fn resolution_failure(
564564
diag
565565
} else {
566566
cx.tcx.struct_span_lint_node(lint::builtin::INTRA_DOC_LINK_RESOLUTION_FAILURE,
567-
NodeId::new(0),
567+
NodeId::from_u32(0),
568568
sp,
569569
&msg)
570570
};

0 commit comments

Comments
 (0)