diff --git a/src/librustdoc/json/mod.rs b/src/librustdoc/json/mod.rs
index db3a0c5ceb1..434286e72f9 100644
--- a/src/librustdoc/json/mod.rs
+++ b/src/librustdoc/json/mod.rs
@@ -176,7 +176,7 @@ fn item(&mut self, item: clean::Item) -> Result<(), Error> {
// to make sure the items are unique. The main place this happens is when an item, is
// reexported in more than one place. See `rustdoc-json/reexport/in_root_and_mod`
if let Some(old_item) = removed {
- assert_eq!(old_item, new_item);
+ pretty_assertions::assert_eq!(old_item, new_item);
}
}
rustdoc +nightly trait.rs -w json
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `Item { id: Id("0:11"), crate_id: 0, name: Some("load_num"), span: Some(Span { filename: "trait.rs", begin: (11, 4), end: (13, 5) }), visibility: Default, docs: None, links: {}, attrs: [], deprecation: None, inner: Method(Method { decl: FnDecl { inputs: [("self", BorrowedRef { lifetime: None, mutable: false, type_: Generic("Self") })], output: Some(Primitive("i32")), c_variadic: false }, generics: Generics { params: [], where_predicates: [] }, header: {}, abi: "\"Rust\"", has_body: true }) }`,
right: `Item { id: Id("0:11"), crate_id: 0, name: Some("load_num"), span: Some(Span { filename: "trait.rs", begin: (11, 4), end: (13, 5) }), visibility: Public, docs: None, links: {}, attrs: [], deprecation: None, inner: Method(Method { decl: FnDecl { inputs: [("", BorrowedRef { lifetime: None, mutable: false, type_: Generic("Self") })], output: Some(Primitive("i32")), c_variadic: false }, generics: Generics { params: [], where_predicates: [] }, header: {}, abi: "\"Rust\"", has_body: true }) }`', src/librustdoc/json/mod.rs:175:17
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: internal compiler error: unexpected panic
error: Unrecognized option: 'w'
rustdoc 1.53.0-nightly (07e0e2ec2 2021-03-24)
binary: rustdoc
commit-hash: 07e0e2ec268c140e607e1ac7f49f145612d0f597
commit-date: 2021-03-24
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0
rustdoc +stage1 trait.rs -w jsonInteresingly, and shockingly If you remove
pub struct Wrapper<T>(T);andimpl<T> Get for Wrapper<T>, this doesn't panic.Whats up with the diff?
The assetion format is differnt to usual as I've patch rustc with
to make it readable, but this can also be repoduced with the latest nightly
@rustbot modify labels: +A-rustdoc-json +T-rustdoc