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

ICE when documenting crate that triggers PR 31362 warning #36747

Closed
Moredread opened this Issue Sep 26, 2016 · 4 comments

Comments

Projects
None yet
6 participants
@Moredread
Copy link

Moredread commented Sep 26, 2016

I get an ICE on an older project, when running cargo doc - when documenting glium v0.13.5 specifically - with the current nightly build.

The issue seems to be the line in src/lib.rs of that glium version

pub use backend::glutin_backend::glutin;

The glium crate is linked in the backend::glutin_backend module. The compiler warns about PR #31362, but at the moment it compiles fine, only generating docs doesn't work.

A minimal example, that generates the same behaviour, when documenting, is:

lib.rs:

pub use bar::std;
pub mod bar {
    extern crate std;
}

Meta

rustc --version --verbose:

rustc 1.13.0-nightly (4f9812a59 2016-09-21)
binary: rustc
commit-hash: 4f9812a59ab7247f0f52b01ca89b0793a2d289c3
commit-date: 2016-09-21
host: x86_64-unknown-linux-gnu
release: 1.13.0-nightly

Backtrace for minimal example:

> RUST_BACKTRACE=1 cargo doc
 Documenting bug v0.1.0 (file:///home/vagrant/bug)
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: run with `RUST_BACKTRACE=1` for a backtrace

thread 'rustc' panicked at 'no def-map entry for node id', ../src/libcore/option.rs:707
stack backtrace:
   1:     0x7ff4d311d612 - std::sys::backtrace::tracing::imp::write::h4b09e6e8c01db097
   2:     0x7ff4d312e42d - std::panicking::default_hook::{{closure}}::h1d3243f546573ff4
   3:     0x7ff4d312b87e - std::panicking::default_hook::h96c288d728df3ebf
   4:     0x7ff4d312bf68 - std::panicking::rust_panic_with_hook::hb1322e5f2588b4db
   5:     0x7ff4d312be02 - std::panicking::begin_panic::hfbeda5aad583dc32
   6:     0x7ff4d312bd40 - std::panicking::begin_panic_fmt::h4fe9fb9d5109c4bf
   7:     0x7ff4d312bcc1 - rust_begin_unwind
   8:     0x7ff4d317955c - core::panicking::panic_fmt::h4395919ece15c671
   9:     0x7ff4d31795d5 - core::option::expect_failed::h5dd2c705a513d3b5
  10:     0x7ff4d01ddf0f - rustc::ty::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::expect_def::h5c9a08fe67cca227
  11:     0x7ff4d3548549 - rustdoc::visit_ast::RustdocVisitor::maybe_inline_local::hf96126d6362d38ff
  12:     0x7ff4d354d851 - rustdoc::visit_ast::RustdocVisitor::visit_item::h2fadfa2767c0a66e
  13:     0x7ff4d3547db2 - rustdoc::visit_ast::RustdocVisitor::visit_mod_contents::h989fe16db7e9414a
  14:     0x7ff4d3545f55 - rustdoc::visit_ast::RustdocVisitor::visit::h39a640ec871ce22e
  15:     0x7ff4d35776c7 - rustdoc::core::run_core::{{closure}}::h33e9f2e8226a3e78
  16:     0x7ff4d3576095 - rustc_driver::driver::phase_3_run_analysis_passes::{{closure}}::hb3804c35ca7b47cd
  17:     0x7ff4d3451449 - rustc::ty::context::TyCtxt::create_and_enter::hf6c8264ec308c831
  18:     0x7ff4d34f492f - rustdoc::core::run_core::h3fbc8dc3bea0acb4
  19:     0x7ff4d3420730 - std::panicking::try::do_call::h3155b39d0d34d908
  20:     0x7ff4d3136326 - __rust_maybe_catch_panic
  21:     0x7ff4d3445d14 - <F as alloc::boxed::FnBox<A>>::call_box::hb7be029431bfcd04
  22:     0x7ff4d312a2d0 - std::sys::thread::Thread::new::thread_start::h022e3887023c6290
  23:     0x7ff4cb47b453 - start_thread
  24:     0x7ff4d2df87de - __GI___clone
  25:                0x0 - <unknown>

error: Could not document `bug`.

To learn more, run the command again with --verbose.
@TimNN

This comment has been minimized.

Copy link
Contributor

TimNN commented Sep 27, 2016

Introduced between nightly-2016-08-21 and nightly-2016-08-22 (Changes)

@alexcrichton

This comment has been minimized.

Copy link
Member

alexcrichton commented Oct 6, 2016

cc @jseyfried, looks like this points to #35776, any ideas here?

@brson brson added the P-high label Oct 6, 2016

@jseyfried

This comment has been minimized.

Copy link
Contributor

jseyfried commented Oct 6, 2016

Hmm, that's odd -- I'll investigate.

@jseyfried

This comment has been minimized.

Copy link
Contributor

jseyfried commented Oct 7, 2016

Fixed in #37023.

jonathandturner added a commit to jonathandturner/rust that referenced this issue Oct 11, 2016

Rollup merge of rust-lang#37023 - jseyfried:fix_extern_crate_back_com…
…pat, r=nrc

Fix importing inaccessible `extern crate`s (with a warning)

Fixes rust-lang#36747, fixes rust-lang#37020, and fixes rust-lang#37021.
r? @nrc

alexcrichton added a commit to alexcrichton/rust that referenced this issue Oct 12, 2016

Rollup merge of rust-lang#37023 - jseyfried:fix_extern_crate_back_com…
…pat, r=nrc

Fix importing inaccessible `extern crate`s (with a warning)

Fixes rust-lang#36747, fixes rust-lang#37020, and fixes rust-lang#37021.
r? @nrc

alexcrichton added a commit to alexcrichton/rust that referenced this issue Oct 12, 2016

Rollup merge of rust-lang#37023 - jseyfried:fix_extern_crate_back_com…
…pat, r=nrc

Fix importing inaccessible `extern crate`s (with a warning)

Fixes rust-lang#36747, fixes rust-lang#37020, and fixes rust-lang#37021.
r? @nrc

@bors bors closed this in #37023 Oct 13, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.