Skip to content

Commit

Permalink
Remove incorrect assert
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Dec 12, 2020
1 parent 388eb24 commit 130dbe4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/librustdoc/passes/collect_intra_doc_links.rs
Original file line number Diff line number Diff line change
Expand Up @@ -436,8 +436,8 @@ impl<'a, 'tcx> LinkCollector<'a, 'tcx> {
// Try looking for methods and associated items.
let mut split = path_str.rsplitn(2, "::");
// NB: `split`'s first element is always defined, even if the delimiter was not present.
// NB: `item_str` could be empty when resolving in the root namespace (e.g. `::std`).
let item_str = split.next().unwrap();
assert!(!item_str.is_empty());
let item_name = Symbol::intern(item_str);
let path_root = split
.next()
Expand Down

0 comments on commit 130dbe4

Please sign in to comment.