Skip to content

Commit

Permalink
debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
jyn514 committed Nov 18, 2020
1 parent ee0cad5 commit e27b769
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/librustdoc/formats/cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,8 @@ impl DocFolder for Cache {
| clean::StructFieldItem(..)
| clean::VariantItem(..) => (
(
Some(*self.parent_stack.last().expect("parent_stack is empty")),
Some(*self.parent_stack.last()
.unwrap_or_else(|| panic!("parent_stack is empty (while indexing {:?})", item.kind))),
Some(&self.stack[..self.stack.len() - 1]),
),
false,
Expand Down Expand Up @@ -303,7 +304,7 @@ impl DocFolder for Cache {

match parent {
(parent, Some(path)) if is_inherent_impl_item || !self.stripped_mod => {
debug_assert!(!item.is_stripped());
debug_assert!(!item.is_stripped(), "name={:?}, kind={:?}", item.name, item.kind);

// A crate has a module at its root, containing all items,
// which should not be indexed. The crate-item itself is
Expand Down

0 comments on commit e27b769

Please sign in to comment.