Skip to content

Commit e27b769

Browse files
committed
debugging
1 parent ee0cad5 commit e27b769

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/librustdoc/formats/cache.rs

+3-2
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,8 @@ impl DocFolder for Cache {
269269
| clean::StructFieldItem(..)
270270
| clean::VariantItem(..) => (
271271
(
272-
Some(*self.parent_stack.last().expect("parent_stack is empty")),
272+
Some(*self.parent_stack.last()
273+
.unwrap_or_else(|| panic!("parent_stack is empty (while indexing {:?})", item.kind))),
273274
Some(&self.stack[..self.stack.len() - 1]),
274275
),
275276
false,
@@ -303,7 +304,7 @@ impl DocFolder for Cache {
303304

304305
match parent {
305306
(parent, Some(path)) if is_inherent_impl_item || !self.stripped_mod => {
306-
debug_assert!(!item.is_stripped());
307+
debug_assert!(!item.is_stripped(), "name={:?}, kind={:?}", item.name, item.kind);
307308

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

0 commit comments

Comments
 (0)