Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rustdoc: rustc panicked at 'assertion failed: !self.is_proc_macro(item_id)' #38638

Closed
fluxxu opened this issue Dec 27, 2016 · 4 comments
Closed
Assignees
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@fluxxu
Copy link

fluxxu commented Dec 27, 2016

rustdoc panic while generating documentation

Reproduce:

  • diesel_codegen = { version = "0.9.0" }
  • #![feature(proc_macro)]
  • #[macro_use] extern crate diesel_codegen;
  • pub use <whatever>;
  • cargo doc

I made a minimal example here:
https://github.com/fluxxu/rustdoc-issue

I expected to see this happen: documentation generated

Instead, this happened:

thread 'rustc' panicked at 'assertion failed: !self.is_proc_macro(item_id)', C:\bot\slave\nightly-dist-rustc-win-msvc-64\build\src\librustc_metadata\decoder.rs:523

Backtrace

thread 'rustc' panicked at 'assertion failed: !self.is_proc_macro(item_id)', C:\bot\slave\nightly-dist-rustc-win-msvc-64\build\src\librustc_metadata\decoder.rs:523
stack backtrace:
   0:     0x7fffc324edaa - std::panicking::Location::line::h3f91a23a140528f1
   1:     0x7fffc324e234 - std::panicking::Location::line::h3f91a23a140528f1
   2:     0x7fffc3251c8d - std::panicking::rust_panic_with_hook::h7e1d2cc288a6d6e6
   3:     0x7fffbce05229 - <unknown>
   4:     0x7fffbce743f0 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::entry::hb1a80ffab1c26775
   5:     0x7fffbce76ba7 - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::get_visibility::hed8ab8e78c5d211c
   6:     0x7fffbce7717c - rustc_metadata::decoder::<impl rustc_metadata::cstore::CrateMetadata>::get_impl_trait::h82138501e2416767
   7:     0x7fffbce80369 - rustc_metadata::cstore_impl::<impl rustc::middle::cstore::CrateStore<'tcx> for rustc_metadata::cstore::CStore>::impl_trait_ref::h8de74aa911835a28
   8:     0x7fffb702f3f1 - rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::impl_trait_ref::hfb1edfda95a13315
   9:     0x7fffd2e866f3 - rustdoc::clean::inline::build_impl::h53c2f0f1eb945e58
  10:     0x7fffd2e86023 - rustdoc::clean::inline::build_impls::h13bbf40f3f04e450
  11:     0x7fffd2e813f4 - rustdoc::clean::inline::try_inline::h58b3a816a2eb28de
  12:     0x7fffd2e80adf - rustdoc::clean::inline::try_inline::h58b3a816a2eb28de
  13:     0x7fffd2eae888 - <rustdoc::doctree::Import as rustdoc::clean::Clean<collections::vec::Vec<rustdoc::clean::Item>>>::clean::h8bae7a1765e79682
  14:     0x7fffd2e8e634 - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h218d3de5ed973d32
  15:     0x7fffd2e7baaa - <unknown>
  16:     0x7fffd2e8ee7f - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h218d3de5ed973d32
  17:     0x7fffd2e7baaa - <unknown>
  18:     0x7fffd2e8ee7f - <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean::h218d3de5ed973d32
  19:     0x7fffd2e8b209 - <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean::h81959a1f562bc98e
  20:     0x7fffd2eb8d97 - rustdoc::core::run_core::h4b58c98803e5877c
  21:     0x7fffd2ddb27f - <unknown>
  22:     0x7fffd2e31d48 - <unknown>
  23:     0x7fffd2eb61ec - rustdoc::core::run_core::h4b58c98803e5877c
  24:     0x7fffd2dfec4d - <unknown>
  25:     0x7fffc3254611 - _rust_maybe_catch_panic
  26:     0x7fffd2e2301b - <unknown>
  27:     0x7fffc324c2fe - std::sys::imp::thread::Thread::new::hb29119a6ae6621b3
  28:     0x7fffe97e8363 - BaseThreadInitThunk

error: Could not document `s2`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name s2 src\lib.rs -o C:\Users\fluxx\Projects\s2\target\doc -L dependency=C:\Users\fluxx\Projects\s2\target\debug\deps --extern rand=C:\Users\fluxx\Projects\s2\target\debug\deps\librand-26cfd8d095643d5f.rlib --extern error_chain=C:\Users\fluxx\Projects\s2\target\debug\deps\liberror_chain-c70cadd7b5aa5bb1.rlib --extern lazy_static=C:\Users\fluxx\Projects\s2\target\debug\deps\liblazy_static-558fd24daf596ca5.rlib --extern crypto=C:\Users\fluxx\Projects\s2\target\debug\deps\libcrypto-84c1bd1acc23cedb.rlib --extern uuid=C:\Users\fluxx\Projects\s2\target\debug\deps\libuuid-3b9ce1f07977469a.rlib --extern router=C:\Users\fluxx\Projects\s2\target\debug\deps\librouter-1ec5c88e036a1c55.rlib --extern staticfile=C:\Users\fluxx\Projects\s2\target\debug\deps\libstaticfile-71a9fe52eddc1691.rlib --extern serde_json=C:\Users\fluxx\Projects\s2\target\debug\deps\libserde_json-99385da38ca59b91.rlib --extern base64=C:\Users\fluxx\Projects\s2\target\debug\deps\libbase64-703ed5cb661c42b8.rlib --extern serde_derive=C:\Users\fluxx\Projects\s2\target\debug\deps\serde_derive-f9682affc7dd49fb.dll --extern diesel_codegen=C:\Users\fluxx\Projects\s2\target\debug\deps\diesel_codegen-b5b438de9650d88f.dll --extern serde=C:\Users\fluxx\Projects\s2\target\debug\deps\libserde-f5bb5456e04e9a13.rlib --extern chrono=C:\Users\fluxx\Projects\s2\target\debug\deps\libchrono-df04c67c2203866e.rlib --extern diesel=C:\Users\fluxx\Projects\s2\target\debug\deps\libdiesel-bd497f9a6d56d1ca.rlib --extern iron=C:\Users\fluxx\Projects\s2\target\debug\deps\libiron-43102b3f2688c72f.rlib --extern dotenv=C:\Users\fluxx\Projects\s2\target\debug\deps\libdotenv-c0d2b5ada142d175.rlib` (exit code: 101)

Meta

rustc 1.15.0-nightly (71c06a56a 2016-12-18)
binary: rustc
commit-hash: 71c06a56a120a0d5e3b224105ee3e6754f83e5fa
commit-date: 2016-12-18
host: x86_64-pc-windows-msvc
release: 1.15.0-nightly
LLVM version: 3.9
@sanxiyn sanxiyn added the T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. label Dec 28, 2016
@fluxxu fluxxu changed the title rustdoc panicked at 'assertion failed: !self.is_proc_macro(item_id)' rustdoc: rustc panicked at 'assertion failed: !self.is_proc_macro(item_id)' Dec 28, 2016
@arielb1
Copy link
Contributor

arielb1 commented Jan 9, 2017

Is this fixed on the newer betas?

@arielb1 arielb1 added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Jan 9, 2017
@nikomatsakis
Copy link
Contributor

cc @jseyfried

@jseyfried jseyfried self-assigned this Jan 12, 2017
@nikomatsakis
Copy link
Contributor

triage: P-high

@jseyfried thinks it's already fixed though

@rust-highfive rust-highfive added P-high High priority and removed I-nominated labels Jan 12, 2017
@jseyfried
Copy link
Contributor

jseyfried commented Jan 13, 2017

This is #38237 -- fixed in #38537 and backported to beta in #38872.
I verified that https://github.com/fluxxu/rustdoc-issue works on beta and nightly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P-high High priority T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

6 participants