Skip to content

Commit 130dbe4

Browse files
committed
Remove incorrect assert
1 parent 388eb24 commit 130dbe4

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/librustdoc/passes/collect_intra_doc_links.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -436,8 +436,8 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
436436
// Try looking for methods and associated items.
437437
let mut split = path_str.rsplitn(2, "::");
438438
// NB: `split`'s first element is always defined, even if the delimiter was not present.
439+
// NB: `item_str` could be empty when resolving in the root namespace (e.g. `::std`).
439440
let item_str = split.next().unwrap();
440-
assert!(!item_str.is_empty());
441441
let item_name = Symbol::intern(item_str);
442442
let path_root = split
443443
.next()

0 commit comments

Comments
 (0)