You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
$ RUST_BACKTRACE=1 rustdoc +nightly z.rs --edition 2018error: internal compiler error: src/librustc/hir/def.rs:257: attempted .def_id() on invalid def: NonMacroAttr(Builtin)thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:605:9note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.stack backtrace: 0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:39 1: std::sys_common::backtrace::_print at src/libstd/sys_common/backtrace.rs:70 2: std::panicking::default_hook::{{closure}} at src/libstd/sys_common/backtrace.rs:58 at src/libstd/panicking.rs:200 3: std::panicking::default_hook at src/libstd/panicking.rs:215 4: std::panicking::rust_panic_with_hook at src/libstd/panicking.rs:478 5: std::panicking::begin_panic 6: rustc_errors::Handler::bug 7: rustc::util::bug::opt_span_bug_fmt::{{closure}} 8: rustc::ty::context::tls::with_opt::{{closure}} 9: rustc::ty::context::tls::with_context_opt 10: rustc::ty::context::tls::with_opt 11: rustc::util::bug::opt_span_bug_fmt 12: rustc::util::bug::bug_fmt 13: rustc::hir::def::Def::def_id::{{closure}} 14: rustc::hir::def::Def::def_id 15: rustdoc::clean::register_def at src/librustdoc/clean/mod.rs:3809 16: <rustdoc::doctree::Import as rustdoc::clean::Clean<alloc::vec::Vec<rustdoc::clean::Item>>>::clean [20/1873] at src/librustdoc/clean/mod.rs:3824 at src/librustdoc/clean/mod.rs:3586 17: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend at src/librustdoc/clean/mod.rs:591 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libcore/ops/function.rs:279 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libcore/option.rs:414 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libcore/iter/adapters/mod.rs:567 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libcore/iter/adapters/flatten.rs:218 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libcore/iter/adapters/flatten.rs:48 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/liballoc/vec.rs:1933 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/liballoc/vec.rs:1830 18: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/liballoc/vec.rs:1794 at src/librustdoc/clean/mod.rs:591 19: <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx, 'rcx> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean at src/librustdoc/clean/mod.rs:162 20: rustdoc::core::run_core::{{closure}}::{{closure}} at src/librustdoc/core.rs:540 21: <std::thread::local::LocalKey<T>>::with at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc_driver/driver.rs:1318 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1990 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1956 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1889 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1955 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1989 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1944 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libstd/thread/local.rs:296 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libstd/thread/local.rs:242 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1936 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libstd/thread/local.rs:296 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libstd/thread/local.rs:242 22: rustc::ty::context::TyCtxt::create_and_enter at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1928 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1967 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc/ty/context.rs:1287 23: rustc_driver::driver::phase_3_run_analysis_passes at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc_driver/driver.rs:1208 24: <scoped_tls::ScopedKey<T>>::set at src/librustdoc/core.rs:485 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc_driver/driver.rs:65 at /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155 25: rustdoc::core::run_core at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/librustc_driver/driver.rs:64 at src/librustdoc/core.rs:391 26: <scoped_tls::ScopedKey<T>>::set at src/librustdoc/lib.rs:435 at /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155 at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libsyntax/lib.rs:112 at /cargo/registry/src/gh.neting.cc-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155 27: syntax::with_globals at /rustc/f29b4fbd742b8180edb5e06cad0977b08881541b/src/libsyntax/lib.rs:111note: the compiler unexpectedly panicked. this is a bug.note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reportsnote: rustc 1.34.0-nightly (f29b4fbd7 2019-01-31) running on x86_64-unknown-linux-gnu
The text was updated successfully, but these errors were encountered:
QuietMisdreavus
added
T-rustdoc
Relevant to the rustdoc team, which will review and decide on the PR/issue.
I-ICE
Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
labels
Feb 1, 2019
rustdoc: don't try to get a DefId for a Def that doesn't have one
Fixes#58054
The compiler allows you to write a `use` statement for a built-in non-macro attribute, since `use proc_macro` can apply to both the `proc_macro` crate and the `#[proc_macro]` attribute. However, if you write a use statement for something that *doesn't* have this crossover, rustdoc will try to use it the same way as anything else... which resulted in an ICE because it tried to pull a DefId for something that didn't have one. This PR makes rustdoc skip those lookups when it encounters them, allowing it to properly process and render these imports.
I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️T-rustdocRelevant to the rustdoc team, which will review and decide on the PR/issue.
Error found when documenting the
diff-enum
crate on docs.rs.The text was updated successfully, but these errors were encountered: