Skip to content

ICE "attempting to document proc-macro re-export" #52129

Closed

Description

@Bobo1239

Running cargo doc on synstructure 0.6.1 (which is transitively depended on by the latest failure_derive release) fails with an ICE.
Repro:

git clone git@github.com:mystor/synstructure
cd synstructure
git checkout 41cd679439568ecd32acd46569ad89c36239af86
cargo doc
thread '<unnamed>' panicked at 'attempting to document proc-macro re-export', librustdoc/clean/inline.rs:474:39
note: Run with `RUST_BACKTRACE=1` for a backtrace.
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.29.0-nightly (e06c87544 2018-07-06) running on x86_64-unknown-linux-gnu
error: Could not document `synstructure`.
Caused by:
  process didn't exit successfully: `rustdoc --crate-name synstructure src/lib.rs -o /home/bobo1239/Development/Rust/synstructure/target/doc -L dependency=/home/bobo1239/Development/Rust/synstructure/target/debug/deps --extern quote=/home/bobo1239/Development/Rust/synstructure/target/debug/deps/libquote-60e72af659eb759e.rmeta --extern syn=/home/bobo1239/Development/Rust/synstructure/target/debug/deps/libsyn-8c0b65e753b5dc70.rmeta` (exit code: 101)

Meta

rustc --version --verbose:

rustc 1.29.0-nightly (e06c87544 2018-07-06)
binary: rustc
commit-hash: e06c875442e91cc2c597135d1e807a69e73eee26
commit-date: 2018-07-06
host: x86_64-unknown-linux-gnu
release: 1.29.0-nightly
LLVM version: 6.0

Backtrace:

thread '<unnamed>' panicked at 'attempting to document proc-macro re-export', librustdoc/clean/inline.rs:474:39
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::print
             at libstd/sys_common/backtrace.rs:71
             at libstd/sys_common/backtrace.rs:59
   2: std::panicking::default_hook::{{closure}}
             at libstd/panicking.rs:211
   3: std::panicking::default_hook
             at libstd/panicking.rs:227
   4: std::panicking::rust_panic_with_hook
             at libstd/panicking.rs:475
   5: std::panicking::begin_panic
             at /checkout/src/libstd/panicking.rs:409
   6: rustdoc::clean::inline::try_inline
             at librustdoc/clean/inline.rs:474
             at librustdoc/clean/inline.rs:107
   7: rustdoc::clean::inline::build_module::fill_in
             at librustdoc/clean/inline.rs:442
   8: <rustdoc::doctree::Import as rustdoc::clean::Clean<alloc::vec::Vec<rustdoc::clean::Item>>>::clean
             at librustdoc/clean/inline.rs:427
             at librustdoc/clean/inline.rs:134
             at librustdoc/clean/mod.rs:3938
   9: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
             at librustdoc/clean/mod.rs:590
             at /checkout/src/libcore/ops/function.rs:271
             at /checkout/src/libcore/option.rs:414
             at /checkout/src/libcore/iter/mod.rs:1392
             at /checkout/src/libcore/iter/mod.rs:2684
             at /checkout/src/libcore/iter/mod.rs:2521
             at /checkout/src/liballoc/vec.rs:1963
             at /checkout/src/liballoc/vec.rs:1860
  10: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
             at /checkout/src/liballoc/vec.rs:1824
             at librustdoc/clean/mod.rs:590
  11: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
             at librustdoc/clean/mod.rs:596
             at /checkout/src/libcore/ops/function.rs:271
             at /checkout/src/libcore/option.rs:414
             at /checkout/src/libcore/iter/mod.rs:1392
             at /checkout/src/liballoc/vec.rs:1886
  12: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
             at /checkout/src/liballoc/vec.rs:1824
             at librustdoc/clean/mod.rs:596
  13: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::spec_extend
             at librustdoc/clean/mod.rs:596
             at /checkout/src/libcore/ops/function.rs:271
             at /checkout/src/libcore/option.rs:414
             at /checkout/src/libcore/iter/mod.rs:1392
             at /checkout/src/liballoc/vec.rs:1886
  14: <rustdoc::doctree::Module as rustdoc::clean::Clean<rustdoc::clean::Item>>::clean
             at /checkout/src/liballoc/vec.rs:1824
             at librustdoc/clean/mod.rs:596
  15: <rustdoc::visit_ast::RustdocVisitor<'a, 'tcx, 'rcx> as rustdoc::clean::Clean<rustdoc::clean::Crate>>::clean
             at librustdoc/clean/mod.rs:167
  16: rustdoc::core::run_core::{{closure}}::{{closure}}
             at librustdoc/core.rs:363
  17: rustc::ty::context::tls::enter_context
             at /checkout/src/librustc_driver/driver.rs:1315
             at /checkout/src/librustc/ty/context.rs:1862
             at /checkout/src/librustc/ty/context.rs:1830
             at /checkout/src/librustc/ty/context.rs:1769
             at /checkout/src/librustc/ty/context.rs:1829
  18: <std::thread::local::LocalKey<T>>::with
             at /checkout/src/librustc/ty/context.rs:1861
             at /checkout/src/librustc/ty/context.rs:1819
             at /checkout/src/libstd/thread/local.rs:294
             at /checkout/src/libstd/thread/local.rs:248
             at /checkout/src/librustc/ty/context.rs:1811
             at /checkout/src/libstd/thread/local.rs:294
             at /checkout/src/libstd/thread/local.rs:248
  19: rustc::ty::context::TyCtxt::create_and_enter
             at /checkout/src/librustc/ty/context.rs:1803
             at /checkout/src/librustc/ty/context.rs:1841
             at /checkout/src/librustc/ty/context.rs:1186
  20: rustc_driver::driver::phase_3_run_analysis_passes
             at /checkout/src/librustc_driver/driver.rs:1227
  21: <scoped_tls::ScopedKey<T>>::set
             at librustdoc/core.rs:308
             at /checkout/src/librustc_driver/driver.rs:73
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  22: rustdoc::core::run_core
             at /checkout/src/librustc_driver/driver.rs:72
             at librustdoc/core.rs:236
  23: <scoped_tls::ScopedKey<T>>::set
             at librustdoc/lib.rs:674
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /checkout/src/libsyntax/lib.rs:98
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  24: syntax::with_globals
             at /checkout/src/libsyntax/lib.rs:97
  25: <std::panic::AssertUnwindSafe<F> as core::ops::function::FnOnce<()>>::call_once
             at librustdoc/lib.rs:670
             at /checkout/src/librustc_driver/lib.rs:1613
             at /checkout/src/libstd/panic.rs:313
  26: std::panicking::try::do_call
             at /checkout/src/libstd/panicking.rs:310
  27: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  28: rustc_driver::monitor
             at /checkout/src/libstd/panicking.rs:289
             at /checkout/src/libstd/panic.rs:392
             at /checkout/src/librustc_driver/lib.rs:1545
             at /checkout/src/librustc_driver/lib.rs:1612
  29: rustdoc::rust_input
             at librustdoc/lib.rs:670
  30: rustdoc::main_args
             at librustdoc/lib.rs:590
             at librustdoc/lib.rs:545
  31: <scoped_tls::ScopedKey<T>>::set
             at librustdoc/lib.rs:116
             at /checkout/src/libcore/option.rs:414
             at librustdoc/lib.rs:116
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /checkout/src/libsyntax/lib.rs:98
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  32: syntax::with_globals
             at /checkout/src/libsyntax/lib.rs:97
  33: std::panicking::try::do_call
             at /checkout/src/libstd/thread/mod.rs:409
             at /checkout/src/libstd/panic.rs:313
             at /checkout/src/libstd/panicking.rs:310
  34: __rust_maybe_catch_panic
             at libpanic_unwind/lib.rs:105
  35: <F as alloc::boxed::FnBox<A>>::call_box
             at /checkout/src/libstd/panicking.rs:289
             at /checkout/src/libstd/panic.rs:392
             at /checkout/src/libstd/thread/mod.rs:408
             at /checkout/src/liballoc/boxed.rs:640
  36: std::sys_common::thread::start_thread
             at /checkout/src/liballoc/boxed.rs:650
             at libstd/sys_common/thread.rs:24
  37: std::sys::unix::thread::Thread::new::thread_start
             at libstd/sys/unix/thread.rs:90
  38: start_thread
  39: clone

Activity

  1. added
    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
    on Jul 7, 2018
  2. ollie27 commented on Jul 8, 2018

    @ollie27
    Contributor

    This was caused by #51611. It used to be a silent failure but was changed into an ICE. cc. @QuietMisdreavus

  3. sugar700 commented on Jul 12, 2018

    @sugar700
    Contributor
  4. QuietMisdreavus commented on Jul 14, 2018

    @QuietMisdreavus
    Contributor

    Minimal reproduction:

    extern crate proc_macro;
    
    pub use proc_macro::*;

    ...although it depends on quote!() being both a bang macro and a proc-macro. I have a patch ready to ignore this, but i dunno how to reduce it to a test that doesn't depend on libproc_macro's quote!().

  5. added a commit that references this issue on Jul 15, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions