rust-lang / rust

Empowering everyone to build reliable and efficient software.
https://www.rust-lang.org
Other
97.28k stars 12.58k forks source link

Panic compiling docs for `typenum` #53505

Closed aliblong closed 5 years ago

aliblong commented 6 years ago

Here's the output with backtrace:

$ RUST_BACKTRACE=1 cargo doc
 Documenting typenum v1.10.0
   Compiling backtrace-sys v0.1.23
   Compiling ring v0.13.2
    Checking aho-corasick v0.6.6
    Checking rand v0.3.22
 Documenting aho-corasick v0.6.6
 Documenting rand v0.3.22
 Documenting bytes v0.4.9
    Checking stringprep v0.1.2
 Documenting stringprep v0.1.2
 Documenting idna v0.1.5
    Checking idna v0.1.5
 Documenting num-traits v0.2.5
    Checking num-traits v0.2.5
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached

thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:579:9
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
   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::traits::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::traits::SelectionError<'a>>::lift_to_tcx
  14: rustc::ty::context::TyCtxt::lift_to_global
  15: rustc::traits::select::SelectionContext::candidate_from_obligation
  16: rustc::traits::select::SelectionContext::evaluate_stack
  17: rustc::dep_graph::graph::DepGraph::with_anon_task
  18: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  19: rustc::infer::InferCtxt::probe
  20: <&'a mut I as core::iter::iterator::Iterator>::next
  21: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  22: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  23: rustc::dep_graph::graph::DepGraph::with_anon_task
  24: rustc::traits::select::SelectionContext::candidate_from_obligation
  25: rustc::traits::select::SelectionContext::evaluate_stack
  26: rustc::dep_graph::graph::DepGraph::with_anon_task
  27: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  28: rustc::infer::InferCtxt::probe
  29: <&'a mut I as core::iter::iterator::Iterator>::next
  30: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  31: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  32: rustc::dep_graph::graph::DepGraph::with_anon_task
  33: rustc::traits::select::SelectionContext::candidate_from_obligation
  34: rustc::traits::select::SelectionContext::evaluate_stack
  35: rustc::dep_graph::graph::DepGraph::with_anon_task
  36: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  37: rustc::infer::InferCtxt::probe
  38: <&'a mut I as core::iter::iterator::Iterator>::next
  39: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  40: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  41: rustc::dep_graph::graph::DepGraph::with_anon_task
  42: rustc::traits::select::SelectionContext::candidate_from_obligation
  43: rustc::traits::select::SelectionContext::evaluate_stack
  44: rustc::dep_graph::graph::DepGraph::with_anon_task
  45: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  46: rustc::infer::InferCtxt::probe
  47: <&'a mut I as core::iter::iterator::Iterator>::next
  48: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  49: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  50: rustc::dep_graph::graph::DepGraph::with_anon_task
  51: rustc::traits::select::SelectionContext::candidate_from_obligation
  52: rustc::traits::select::SelectionContext::evaluate_stack
  53: rustc::dep_graph::graph::DepGraph::with_anon_task
  54: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  55: rustc::infer::InferCtxt::probe
  56: <&'a mut I as core::iter::iterator::Iterator>::next
  57: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  58: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  59: rustc::dep_graph::graph::DepGraph::with_anon_task
  60: rustc::traits::select::SelectionContext::candidate_from_obligation
  61: rustc::traits::select::SelectionContext::evaluate_stack
  62: rustc::dep_graph::graph::DepGraph::with_anon_task
  63: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  64: rustc::infer::InferCtxt::probe
  65: <&'a mut I as core::iter::iterator::Iterator>::next
  66: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  67: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  68: rustc::dep_graph::graph::DepGraph::with_anon_task
  69: rustc::traits::select::SelectionContext::candidate_from_obligation
  70: rustc::traits::select::SelectionContext::evaluate_stack
  71: rustc::dep_graph::graph::DepGraph::with_anon_task
  72: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  73: rustc::infer::InferCtxt::probe
  74: <&'a mut I as core::iter::iterator::Iterator>::next
  75: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  76: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  77: rustc::dep_graph::graph::DepGraph::with_anon_task
  78: rustc::traits::select::SelectionContext::candidate_from_obligation
  79: rustc::traits::select::SelectionContext::evaluate_stack
  80: rustc::dep_graph::graph::DepGraph::with_anon_task
  81: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  82: rustc::infer::InferCtxt::probe
  83: <&'a mut I as core::iter::iterator::Iterator>::next
  84: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  85: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  86: rustc::dep_graph::graph::DepGraph::with_anon_task
  87: rustc::traits::select::SelectionContext::candidate_from_obligation
  88: rustc::traits::select::SelectionContext::evaluate_stack
  89: rustc::dep_graph::graph::DepGraph::with_anon_task
  90: rustc::traits::select::SelectionContext::evaluate_predicate_recursively
  91: rustc::infer::InferCtxt::probe
  92: <&'a mut I as core::iter::iterator::Iterator>::next
  93: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
  94: rustc::traits::select::SelectionContext::candidate_from_obligation_no_cache
  95: rustc::dep_graph::graph::DepGraph::with_anon_task
  96: rustc::traits::select::SelectionContext::candidate_from_obligation
  97: rustc::traits::select::SelectionContext::evaluate_stack
  98: rustc::dep_graph::graph::DepGraph::with_anon_task
  99: rustc::traits::select::SelectionContext::evaluate_predicate_recursively

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.30.0-nightly (33b923fd4 2018-08-18) running on x86_64-unknown-linux-gnu

error: Could not document `typenum`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /home/aaron/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow -o/home/aaron/project/rustnabi/target/doc -L dependency=/home/aaron/project/rustnabi/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
XOSplicer commented 6 years ago

I can reproduce this error on nightly-x86_64-pc-windows-msvc with MINGW64,

$ rustup show active-toolchain
nightly-x86_64-pc-windows-msvc

$ rustc --version
rustc 1.30.0-nightly (33b923fd4 2018-08-18)

$ cargo --version
cargo 1.29.0-nightly (6a7672ef5 2018-08-14)

$ RUST_BACKTRACE=1 cargo doc
 Documenting typenum v1.10.0 (file:///C:/Users/[redacted]/tmp/typenum)
error: internal compiler error: librustc\traits\structural_impls.rs:178: impossible case reached

thread '<unnamed>' panicked at 'Box<Any>', librustc_errors\lib.rs:579:9
stack backtrace:
   0: <std::sys::windows::args::Args as core::ops::drop::Drop>::drop
   1: <std::sys::windows::dynamic_lib::DynamicLibrary as core::ops::drop::Drop>::drop
   2: std::panicking::take_hook
   3: std::panicking::take_hook
   4: std::panicking::rust_panic_with_hook
   5: <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt
   6: rustc_errors::Handler::bug
   7: rustc::util::bug::bug_fmt
   8: rustc::ty::context::tls::track_diagnostic
   9: rustc::ty::context::tls::track_diagnostic
  10: rustc::ty::context::tls::track_diagnostic
  11: rustc::util::bug::bug_fmt
  12: rustc::util::bug::bug_fmt
  13: rustc::traits::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::traits::SelectionError<'a>>::lift_to_tcx
  14: rustc::ty::context::TyCtxt::intern_layout
  15: rustc::traits::select::SelectionContext::coinductive_predicate
  16: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  17: rustc::dep_graph::graph::DepGraph::assert_ignored
  18: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  19: rustc::infer::InferCtxt::commit_from
  20: rustc::ty::context::TypeckTables::expr_ty
  21: <unknown>
  22: rustc::traits::select::SelectionContext::coinductive_predicate
  23: rustc::dep_graph::graph::DepGraph::assert_ignored
  24: rustc::traits::select::SelectionContext::coinductive_predicate
  25: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  26: rustc::dep_graph::graph::DepGraph::assert_ignored
  27: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  28: rustc::infer::InferCtxt::commit_from
  29: rustc::ty::context::TypeckTables::expr_ty
  30: <unknown>
  31: rustc::traits::select::SelectionContext::coinductive_predicate
  32: rustc::dep_graph::graph::DepGraph::assert_ignored
  33: rustc::traits::select::SelectionContext::coinductive_predicate
  34: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  35: rustc::dep_graph::graph::DepGraph::assert_ignored
  36: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  37: rustc::infer::InferCtxt::commit_from
  38: rustc::ty::context::TypeckTables::expr_ty
  39: <unknown>
  40: rustc::traits::select::SelectionContext::coinductive_predicate
  41: rustc::dep_graph::graph::DepGraph::assert_ignored
  42: rustc::traits::select::SelectionContext::coinductive_predicate
  43: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  44: rustc::dep_graph::graph::DepGraph::assert_ignored
  45: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  46: rustc::infer::InferCtxt::commit_from
  47: rustc::ty::context::TypeckTables::expr_ty
  48: <unknown>
  49: rustc::traits::select::SelectionContext::coinductive_predicate
  50: rustc::dep_graph::graph::DepGraph::assert_ignored
  51: rustc::traits::select::SelectionContext::coinductive_predicate
  52: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  53: rustc::dep_graph::graph::DepGraph::assert_ignored
  54: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  55: rustc::infer::InferCtxt::commit_from
  56: rustc::ty::context::TypeckTables::expr_ty
  57: <unknown>
  58: rustc::traits::select::SelectionContext::coinductive_predicate
  59: rustc::dep_graph::graph::DepGraph::assert_ignored
  60: rustc::traits::select::SelectionContext::coinductive_predicate
  61: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  62: rustc::dep_graph::graph::DepGraph::assert_ignored
  63: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  64: rustc::infer::InferCtxt::commit_from
  65: rustc::ty::context::TypeckTables::expr_ty
  66: <unknown>
  67: rustc::traits::select::SelectionContext::coinductive_predicate
  68: rustc::dep_graph::graph::DepGraph::assert_ignored
  69: rustc::traits::select::SelectionContext::coinductive_predicate
  70: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  71: rustc::dep_graph::graph::DepGraph::assert_ignored
  72: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  73: rustc::infer::InferCtxt::commit_from
  74: rustc::ty::context::TypeckTables::expr_ty
  75: <unknown>
  76: rustc::traits::select::SelectionContext::coinductive_predicate
  77: rustc::dep_graph::graph::DepGraph::assert_ignored
  78: rustc::traits::select::SelectionContext::coinductive_predicate
  79: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  80: rustc::dep_graph::graph::DepGraph::assert_ignored
  81: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  82: rustc::infer::InferCtxt::commit_from
  83: rustc::ty::context::TypeckTables::expr_ty
  84: <unknown>
  85: rustc::traits::select::SelectionContext::coinductive_predicate
  86: rustc::dep_graph::graph::DepGraph::assert_ignored
  87: rustc::traits::select::SelectionContext::coinductive_predicate
  88: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  89: rustc::dep_graph::graph::DepGraph::assert_ignored
  90: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  91: rustc::infer::InferCtxt::commit_from
  92: rustc::ty::context::TypeckTables::expr_ty
  93: <unknown>
  94: rustc::traits::select::SelectionContext::coinductive_predicate
  95: rustc::dep_graph::graph::DepGraph::assert_ignored
  96: rustc::traits::select::SelectionContext::coinductive_predicate
  97: rustc::traits::select::SelectionContext::evaluate_obligation_recursively
  98: rustc::dep_graph::graph::DepGraph::assert_ignored
  99: rustc::traits::select::SelectionContext::evaluate_obligation_recursively

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.30.0-nightly (33b923fd4 2018-08-18) running on x86_64-pc-windows-msvc

error: Could not document `typenum`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum 'src\lib.rs' -o 'C:\Users\[redacted]\tmp\typenum\target\doc' -L 'dependency=C:\Users\[redacted]\tmp\typenum\target\debug\deps'` (exit code: 1)
XOSplicer commented 6 years ago

possible duplicate of #52873

JMurph2015 commented 6 years ago

I can reproduce on both the beta for x86_64-unknown-linux-gnu and the nightly on x86_64-unknown-linux-gnu.

murphyj@murphyj-AX370:~/src/spacebox-org/spacebox$ cargo doc --open
    Checking void v1.0.2
   Compiling version_check v0.1.4
 Documenting void v1.0.2
    Checking libc v0.2.43
    Checking rand_core v0.2.1
 Documenting stable_deref_trait v1.1.1
    Checking stable_deref_trait v1.1.1
 Documenting rand_core v0.2.1
 Documenting libc v0.2.43
 Documenting cfg-if v0.1.5
 Documenting scopeguard v0.3.3
   Compiling typenum v1.10.0
   Compiling proc-macro2 v0.4.17
    Checking byteorder v1.2.6
 Documenting byteorder v1.2.6
    Checking scopeguard v0.3.3
    Checking cfg-if v0.1.5
   Compiling unicode-xid v0.1.0
 Documenting futures v0.1.23
   Compiling regex v1.0.4
 Documenting unicode-xid v0.1.0
    Checking ucd-util v0.1.1
 Documenting ucd-util v0.1.1
    Checking lazycell v0.6.0
 Documenting slab v0.4.1
 Documenting lazycell v0.6.0
    Checking slab v0.4.1
    Checking futures v0.1.23
   Compiling ryu v0.2.6
 Documenting utf8-ranges v1.0.1
 Documenting crossbeam-utils v0.5.0
    Checking utf8-ranges v1.0.1
   Compiling serde v1.0.76
    Checking crossbeam-utils v0.5.0
 Documenting lazycell v1.0.0
 Documenting arrayref v0.3.4
    Checking bitflags v1.0.4
 Documenting same-file v1.0.3
    Checking same-file v1.0.3
    Checking arrayref v0.3.4
    Checking byte-tools v0.2.0
 Documenting fnv v1.0.6
    Checking fnv v1.0.6
 Documenting byte-tools v0.2.0
 Documenting bitflags v1.0.4
    Checking lazycell v1.0.0
 Documenting itoa v0.4.2
 Documenting keccak v0.1.0
 Documenting crossbeam v0.3.2
    Checking keccak v0.1.0
    Checking crossbeam v0.3.2
    Checking itoa v0.4.2
    Checking unreachable v1.0.0
    Checking owning_ref v0.3.3
    Checking log v0.4.5
 Documenting log v0.4.5
 Documenting owning_ref v0.3.3
   Compiling lazy_static v1.1.0
    Checking regex-syntax v0.6.2
 Documenting regex-syntax v0.6.2
    Checking rand v0.5.5
    Checking iovec v0.1.2
    Checking net2 v0.2.33
    Checking memchr v2.0.2
    Checking num_cpus v1.8.0
    Checking inotify-sys v0.1.3
    Checking filetime v0.2.1
    Checking block-buffer v0.3.3
    Checking walkdir v2.2.5
    Checking smallvec v0.6.5
 Documenting unreachable v1.0.0
    Checking lock_api v0.1.3
 Documenting proc-macro2 v0.4.17
 Documenting walkdir v2.2.5
 Documenting typenum v1.10.0
    Checking bytes v0.4.10
    Checking aho-corasick v0.6.8
 Documenting ryu v0.2.6
 Documenting serde v1.0.76
    Checking mio v0.6.15
 Documenting block-buffer v0.3.3
 Documenting smallvec v0.6.5
 Documenting lazy_static v1.1.0
    Checking quote v0.6.8
error: internal compiler error: librustc/traits/structural_impls.rs:178: impossible case reached

thread '<unnamed>' panicked at 'Box<Any>', librustc_errors/lib.rs:578:9
note: Run with `RUST_BACKTRACE=1` for a backtrace.

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-beta.12 (4dcf42f98 2018-09-04) running on x86_64-unknown-linux-gnu

 Documenting tokio-executor v0.1.4
error: Could not document `typenum`.

Caused by:
  process didn't exit successfully: `rustdoc --crate-name typenum /home/murphyj/.cargo/registry/src/github.com-1ecc6299db9ec823/typenum-1.10.0/src/lib.rs --cap-lints allow -o /home/murphyj/src/spacebox-org/spacebox/target/doc -L dependency=/home/murphyj/src/spacebox-org/spacebox/target/debug/deps` (exit code: 1)
warning: build failed, waiting for other jobs to finish...
error: build failed
Aaron1011 commented 5 years ago

I can't reproduce this on the latest nightly - rustc 1.31.0-nightly (424a749a0 2018-10-21)

Aaron1011 commented 5 years ago

I can't reproduce this on the latest nightly - rustc 1.31.0-nightly (424a749a0 2018-10-21)

mhogrefe commented 5 years ago

I'm getting the same error on the latest stable, rustc 1.30.0 (da5f414c2 2018-10-24)

Aaron1011 commented 5 years ago

I believe the issue is only fixed on Nightly at the moment.

joelgallant commented 5 years ago

Yup, introduced in stable now, see #52873 and the PR that needs to be backported there

QuietMisdreavus commented 5 years ago

Closing as duplicate of https://github.com/rust-lang/rust/issues/52873.