Skip to content

Nightly Cargo doc fail on proc macro #57841

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

Closed
DutchGhost opened this issue Jan 22, 2019 · 1 comment
Closed

Nightly Cargo doc fail on proc macro #57841

DutchGhost opened this issue Jan 22, 2019 · 1 comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@DutchGhost
Copy link
Contributor

DutchGhost commented Jan 22, 2019

//! [`bug`]
extern crate proc_macro;

use self::proc_macro::TokenStream;

#[proc_macro_attribute]
pub fn bug(_: TokenStream, item: TokenStream) -> TokenStream {
    item
}

If I run cargo doc on nightly rustc 1.33.0-nightly (ceb2512 2019-01-16), I get this ICE:

Backtrace:

thread 'rustc' panicked at 'called `Option::unwrap()` on a `None` value', src\libcore\option.rs:345:21
stack backtrace:
   0: std::sys_common::alloc::realloc_fallback
   1: std::panicking::take_hook
   2: std::panicking::take_hook
   3: std::panicking::rust_panic_with_hook
   4: std::panicking::begin_panic_fmt
   5: rust_begin_unwind
   6: core::panicking::panic_fmt
   7: core::panicking::panic
   8: rustc_metadata::cstore::CStore::new
   9: rustc_metadata::cstore_impl::<impl rustc_metadata::cstore::CStore>::load_macro_untracked
  10: rustc_resolve::build_reduced_graph::<impl rustc_resolve::Resolver<'a>>::get_macro
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: _rust_maybe_catch_panic
  24: <unknown>
  25: std::sys::windows::thread::Thread::new
  26: BaseThreadInitThunk
  27: RtlUserThreadStart

error: internal compiler error: unexpected panic

note: 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-reports

note: rustc 1.33.0-nightly (ceb251214 2019-01-16) running on x86_64-pc-windows-msvc

error: Could not document `rustdoc_crash`.

Running it in stable/beta works just fine.

A full setup with a Cargo.toml file can be found here: https://github.com/DutchGhost/rustdoc_proc_macro_crash

@QuietMisdreavus QuietMisdreavus added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name labels Jan 22, 2019
@DutchGhost
Copy link
Contributor Author

Can actually be closed, this is a dupe of #55399 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-intra-doc-links Area: Intra-doc links, the ability to link to items in docs by name 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

2 participants