Closed
Description
Code
From the syn
source code:
pub trait Spanned {
/// Returns a `Span` covering the complete contents of this syntax tree
/// node, or [`Span::call_site()`] if this node is empty.
///
/// [`Span::call_site()`]: proc_macro2::Span::call_site
fn span(&self) -> Span;
}
impl<T: ?Sized + ToTokens> Spanned for T {
fn span(&self) -> Span {
self.__span()
}
}
Meta
rustc +nightly --version
rustc 1.56.0-nightly (ccffcafd5 2021-08-11)
rustdoc +nightly --version
rustdoc 1.56.0-nightly (ccffcafd5 2021-08-11)
Error output
thread 'rustc' panicked at 'assertion failed: `(left == right)`
left: `Item { id: Id("0:3511"), crate_id: 0, name: Some("span"), span: Some(Span { filename: "REDACTED/.cargo/registry/src/github.com-1285ae84e5963aae/syn-1.0.74/src/spanned.rs", begin: (111, 4), end: (113, 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(ResolvedPath { name: "Span", id: Id("20:909"), args: Some(AngleBracketed { args: [], bindings: [] }), param_names: [] }), c_variadic: false }, generics: Generics { params: [], where_predicates: [] }, header: {}, abi: "\"Rust\"", has_body: true }) }`,
right: `Item { id: Id("0:3511"), crate_id: 0, name: Some("span"), span: Some(Span { filename: "REDACTED/.cargo/registry/src/github.com-1285ae84e5963aae/syn-1.0.74/src/spanned.rs", begin: (111, 4), end: (113, 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(ResolvedPath { name: "Span", id: Id("20:909"), args: Some(AngleBracketed { args: [], bindings: [] }), param_names: [] }), c_variadic: false }, generics: Generics { params: [], where_predicates: [] }, header: {}, abi: "\"Rust\"", has_body: true }) }`', src/librustdoc/json/mod.rs:179:17
Backtrace
stack backtrace:
0: rust_begin_unwind
at /rustc/ccffcafd55e58f769d4b0efc0064bf65e76998e4/library/std/src/panicking.rs:517:5
1: core::panicking::panic_fmt
at /rustc/ccffcafd55e58f769d4b0efc0064bf65e76998e4/library/core/src/panicking.rs:93:14
2: core::panicking::assert_failed_inner
3: core::panicking::assert_failed
4: <rustdoc::json::JsonRenderer as rustdoc::formats::renderer::FormatRenderer>::item
5: <rustdoc::json::JsonRenderer as rustdoc::formats::renderer::FormatRenderer>::item
6: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::fold
7: <rustdoc::json::JsonRenderer as rustdoc::formats::renderer::FormatRenderer>::item
8: <rustdoc::json::JsonRenderer as rustdoc::formats::renderer::FormatRenderer>::item
9: <rustdoc::json::JsonRenderer as rustdoc::formats::renderer::FormatRenderer>::item
10: rustdoc::formats::renderer::run_format
11: rustdoc::run_renderer
12: rustc_interface::interface::create_compiler_and_run
13: rustdoc::main_options
14: scoped_tls::ScopedKey<T>::set