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 "unresolved inference variable in outlives" #56822

Closed
SimonSapin opened this issue Dec 14, 2018 · 7 comments
Closed

ICE "unresolved inference variable in outlives" #56822

SimonSapin opened this issue Dec 14, 2018 · 7 comments
Labels
A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@SimonSapin
Copy link
Contributor

Documenting Servo with rustc 1.32.0-nightly (f4a421e 2018-12-13) gives the error below. Compiling the same crate works.

error: internal compiler error: unresolved inference variable in outlives: _#1t

error: internal compiler error: unresolved inference variable in outlives: _#6t

thread '<unnamed>' panicked at 'no errors encountered even though `delay_span_bug` issued', src/librustc_errors/lib.rs:334:17
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:210
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:224
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::begin_panic
   6: <rustc_errors::Handler as core::ops::drop::Drop>::drop
   7: core::ptr::real_drop_in_place
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/ptr.rs:204
   8: core::ptr::real_drop_in_place
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/ptr.rs:204
   9: core::ptr::real_drop_in_place
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/ptr.rs:204
  10: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/core.rs:623
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:76
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  11: rustdoc::core::run_core
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:75
             at src/librustdoc/core.rs:404
  12: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/lib.rs:425
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:123
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  13: syntax::with_globals
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:122
  14: std::panicking::try::do_call
             at src/librustdoc/lib.rs:422
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1642
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:319
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:306
  15: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  16: rustc_driver::monitor
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:285
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:398
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1556
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1567
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1641
  17: rustdoc::main_args
             at src/librustdoc/lib.rs:422
             at src/librustdoc/lib.rs:385
  18: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/lib.rs:108
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/option.rs:424
             at src/librustdoc/lib.rs:108
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:123
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  19: syntax::with_globals
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:122
  20: std::panicking::try::do_call
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/mod.rs:479
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:319
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:306
  21: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  22: <F as alloc::boxed::FnBox<A>>::call_box
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:285
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:398
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/mod.rs:478
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/boxed.rs:673
  23: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/boxed.rs:683
             at src/libstd/sys_common/thread.rs:24
             at src/libstd/sys/unix/thread.rs:91
  24: start_thread
  25: __clone

error: internal compiler error: unexpected panic

error: Unrecognized option: 'document-private-items'

error: Could not document `style`.

https://tools.taskcluster.net/groups/WPxk_v22QWeMYOGGDJbBIA/tasks/HSLf3bjIR8u7qj3mkKtYaQ/runs/0/logs/public%2Flogs%2Flive.log

@SimonSapin SimonSapin added T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ labels Dec 14, 2018
@QuietMisdreavus
Copy link
Member

I'm going to hazard a guess that the "unrecognized option" message is unrelated to the actual error. We get messages in travis about markdown-css as well.

The fact that this is an uncaught error makes it harder to see where it came from, though... Is it possible to run this with RUSTDOCFLAGS="-Z treat-err-as-bug" so we can catch it as it happens?

@QuietMisdreavus QuietMisdreavus changed the title ICE "Unrecognized option: 'document-private-items'" ICE "unresolved inference variable in outlives" Dec 14, 2018
@SimonSapin
Copy link
Contributor Author

Sure.

error: internal compiler error: unresolved inference variable in outlives: _#1t

thread '<unnamed>' panicked at 'encountered error with `-Z treat_err_as_bug', src/librustc_errors/lib.rs:500:13
stack backtrace:
   0: std::sys::unix::backtrace::tracing::imp::unwind_backtrace
             at src/libstd/sys/unix/backtrace/tracing/gcc_s.rs:49
   1: std::sys_common::backtrace::_print
             at src/libstd/sys_common/backtrace.rs:71
   2: std::panicking::default_hook::{{closure}}
             at src/libstd/sys_common/backtrace.rs:59
             at src/libstd/panicking.rs:210
   3: std::panicking::default_hook
             at src/libstd/panicking.rs:224
   4: std::panicking::rust_panic_with_hook
             at src/libstd/panicking.rs:491
   5: std::panicking::begin_panic
   6: rustc_errors::Handler::emit_db
   7: rustc_errors::Handler::emit
   8: rustc_errors::Handler::span_bug
   9: rustc_errors::Handler::delay_span_bug
  10: <rustc::infer::outlives::obligations::TypeOutlives<'cx, 'gcx, 'tcx, D>>::components_must_outlive
  11: <rustc::infer::outlives::obligations::TypeOutlives<'cx, 'gcx, 'tcx, D>>::type_must_outlive
  12: rustc::infer::outlives::obligations::<impl rustc::infer::InferCtxt<'cx, 'gcx, 'tcx>>::process_registered_region_obligations
  13: rustc::ty::context::tls::with_context::{{closure}}
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/traits/auto_trait.rs:240
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/infer/mod.rs:526
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1635
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2003
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1938
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2002
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1634
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2103
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2087
  14: rustc::ty::context::GlobalCtxt::enter_local
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2078
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2087
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2098
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1627
  15: rustc::traits::auto_trait::AutoTraitFinder::find_auto_trait_generics
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/infer/mod.rs:525
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/traits/auto_trait.rs:133
  16: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impl_for
             at src/librustdoc/clean/auto_trait.rs:200
             at src/librustdoc/clean/auto_trait.rs:123
  17: rustdoc::clean::auto_trait::AutoTraitFinder::get_auto_trait_impls
             at src/librustdoc/clean/auto_trait.rs:76
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/option.rs:632
             at src/librustdoc/clean/auto_trait.rs:73
  18: rustdoc::clean::def_ctor::get_def_from_node_id
             at src/librustdoc/clean/auto_trait.rs:41
             at src/librustdoc/clean/def_ctor.rs:59
  19: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item
             at src/librustdoc/clean/auto_trait.rs:39
             at src/librustdoc/clean/mod.rs:3362
             at src/librustdoc/passes/collect_trait_impls.rs:170
  20: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
             at src/librustdoc/fold.rs:65
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/mod.rs:1589
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1908
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1805
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1800
  21: rustdoc::fold::DocFolder::fold_inner_recur
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1700
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/iterator.rs:1477
             at src/librustdoc/fold.rs:110
             at src/librustdoc/fold.rs:37
  22: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item
             at src/librustdoc/fold.rs:100
             at src/librustdoc/passes/collect_trait_impls.rs:178
  23: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
             at src/librustdoc/fold.rs:65
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/mod.rs:1589
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1908
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1805
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1800
  24: rustdoc::fold::DocFolder::fold_inner_recur
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1700
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/iterator.rs:1477
             at src/librustdoc/fold.rs:110
             at src/librustdoc/fold.rs:37
  25: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item
             at src/librustdoc/fold.rs:100
             at src/librustdoc/passes/collect_trait_impls.rs:178
  26: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
             at src/librustdoc/fold.rs:65
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/mod.rs:1589
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1908
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1805
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1800
  27: rustdoc::fold::DocFolder::fold_inner_recur
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1700
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/iterator.rs:1477
             at src/librustdoc/fold.rs:110
             at src/librustdoc/fold.rs:37
  28: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item
             at src/librustdoc/fold.rs:100
             at src/librustdoc/passes/collect_trait_impls.rs:178
  29: <alloc::vec::Vec<T> as alloc::vec::SpecExtend<T, I>>::from_iter
             at src/librustdoc/fold.rs:65
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/mod.rs:1589
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1908
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1805
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1800
  30: rustdoc::fold::DocFolder::fold_inner_recur
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/vec.rs:1700
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/iter/iterator.rs:1477
             at src/librustdoc/fold.rs:110
             at src/librustdoc/fold.rs:37
  31: <rustdoc::passes::collect_trait_impls::SyntheticImplCollector<'a, 'tcx, 'rcx, 'cstore> as rustdoc::fold::DocFolder>::fold_item
             at src/librustdoc/fold.rs:100
             at src/librustdoc/passes/collect_trait_impls.rs:178
  32: rustdoc::passes::collect_trait_impls::collect_trait_impls
             at src/librustdoc/fold.rs:115
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/option.rs:632
             at src/librustdoc/fold.rs:115
             at src/librustdoc/passes/collect_trait_impls.rs:26
  33: rustdoc::core::run_core::{{closure}}::{{closure}}
             at src/librustdoc/core.rs:615
  34: rustc::ty::context::tls::enter_global
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:1353
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2035
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2003
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1938
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2002
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2034
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1992
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/local.rs:309
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/local.rs:255
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1984
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/local.rs:309
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/local.rs:255
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1976
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:2014
  35: rustc::ty::context::TyCtxt::create_and_enter
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc/ty/context.rs:1216
  36: rustc_driver::driver::phase_3_run_analysis_passes
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:1261
  37: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/core.rs:497
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:76
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  38: rustdoc::core::run_core
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/driver.rs:75
             at src/librustdoc/core.rs:404
  39: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/lib.rs:425
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:123
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  40: syntax::with_globals
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:122
  41: std::panicking::try::do_call
             at src/librustdoc/lib.rs:422
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1642
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:319
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:306
  42: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  43: rustc_driver::monitor
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:285
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:398
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1556
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1567
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/librustc_driver/lib.rs:1641
  44: rustdoc::main_args
             at src/librustdoc/lib.rs:422
             at src/librustdoc/lib.rs:385
  45: <scoped_tls::ScopedKey<T>>::set
             at src/librustdoc/lib.rs:108
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libcore/option.rs:424
             at src/librustdoc/lib.rs:108
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:123
             at /cargo/registry/src/github.com-1ecc6299db9ec823/scoped-tls-0.1.2/src/lib.rs:155
  46: syntax::with_globals
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libsyntax/lib.rs:122
  47: std::panicking::try::do_call
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/mod.rs:479
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:319
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:306
  48: __rust_maybe_catch_panic
             at src/libpanic_unwind/lib.rs:102
  49: <F as alloc::boxed::FnBox<A>>::call_box
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panicking.rs:285
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/panic.rs:398
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/libstd/thread/mod.rs:478
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/boxed.rs:673
  50: std::sys::unix::thread::Thread::new::thread_start
             at /rustc/f4a421ee3cf1259f0750ac7fabd19da1d8551e4c/src/liballoc/boxed.rs:683
             at src/libstd/sys_common/thread.rs:24
             at src/libstd/sys/unix/thread.rs:91
  51: start_thread
  52: __clone

error: internal compiler error: unexpected panic

error: Unrecognized option: 'document-private-items'

error: Could not document `style`.

@QuietMisdreavus QuietMisdreavus added the A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls label Dec 14, 2018
@QuietMisdreavus
Copy link
Member

Aha, this is a problem with synthetic impls again. cc @Aaron1011 @nikomatsakis

Sadly, the PR which triggered this is mainly an upgrade from nightly-2018-10-05 to nightly-2018-12-14 and related code changes to bring Servo in line, so i'm not totally sure what is specifically raising this error. 😕

@SimonSapin
Copy link
Contributor Author

Here is the rustdoc command as printed by cargo.

rustdoc-with-private is rustdoc -Z "unstable-options" --cap-lints warn --document-private-items "$@"

  process didn't exit successfully: `/home/simon/servo2/etc/rustdoc-with-private --crate-name style components/style/lib.rs --color always -o /home/simon/servo2/target/doc --cfg 'feature="arrayvec"' --cfg 'feature="crossbeam-channel"' --cfg 'feature="cssparser"' --cfg 'feature="encoding_rs"' --cfg 'feature="html5ever"' --cfg 'feature="malloc_size_of"' --cfg 'feature="serde"' --cfg 'feature="servo"' --cfg 'feature="servo_atoms"' --cfg 'feature="servo_config"' --cfg 'feature="servo_url"' --cfg 'feature="string_cache"' --cfg 'feature="style_traits"' -L dependency=/home/simon/servo2/target/debug/deps --extern app_units=/home/simon/servo2/target/debug/deps/libapp_units-ae87cf6200d5e636.rmeta --extern arrayvec=/home/simon/servo2/target/debug/deps/libarrayvec-6a3e5bbc1833ca95.rmeta --extern atomic_refcell=/home/simon/servo2/target/debug/deps/libatomic_refcell-51a3ef40ce2397a3.rmeta --extern bitflags=/home/simon/servo2/target/debug/deps/libbitflags-76ac00ec522d13ab.rmeta --extern byteorder=/home/simon/servo2/target/debug/deps/libbyteorder-8ede2409b36ea8f6.rmeta --extern cfg_if=/home/simon/servo2/target/debug/deps/libcfg_if-7a818f1ce8b10334.rmeta --extern crossbeam_channel=/home/simon/servo2/target/debug/deps/libcrossbeam_channel-6e8f3ebd4de0feec.rmeta --extern cssparser=/home/simon/servo2/target/debug/deps/libcssparser-7420765c7fcb8fa0.rmeta --extern encoding_rs=/home/simon/servo2/target/debug/deps/libencoding_rs-3703e4065da1dabd.rmeta --extern euclid=/home/simon/servo2/target/debug/deps/libeuclid-a189108eebc96eb9.rmeta --extern fallible=/home/simon/servo2/target/debug/deps/libfallible-e577df33116b4e99.rmeta --extern fxhash=/home/simon/servo2/target/debug/deps/libfxhash-5309f25945bebf1a.rmeta --extern hashglobe=/home/simon/servo2/target/debug/deps/libhashglobe-b413073f4a851867.rmeta --extern html5ever=/home/simon/servo2/target/debug/deps/libhtml5ever-12d1fd7ddaf95b35.rmeta --extern itertools=/home/simon/servo2/target/debug/deps/libitertools-c678761a8b3a6c1e.rmeta --extern itoa=/home/simon/servo2/target/debug/deps/libitoa-667b43f502e124dd.rmeta --extern lazy_static=/home/simon/servo2/target/debug/deps/liblazy_static-d92d0d4c3a8078bf.rmeta --extern log=/home/simon/servo2/target/debug/deps/liblog-ec0594db0536d389.rmeta --extern malloc_size_of=/home/simon/servo2/target/debug/deps/libmalloc_size_of-cbeccba4e88e7290.rmeta --extern malloc_size_of_derive=/home/simon/servo2/target/debug/deps/libmalloc_size_of_derive-5498ca7263650609.so --extern matches=/home/simon/servo2/target/debug/deps/libmatches-deef0144dc44c609.rmeta --extern debug_unreachable=/home/simon/servo2/target/debug/deps/libdebug_unreachable-9e230620fd8d13d3.rmeta --extern num_derive=/home/simon/servo2/target/debug/deps/libnum_derive-5b4c661c83661719.so --extern num_integer=/home/simon/servo2/target/debug/deps/libnum_integer-a0d23db758f6350e.rmeta --extern num_traits=/home/simon/servo2/target/debug/deps/libnum_traits-d992fcc879337d35.rmeta --extern ordered_float=/home/simon/servo2/target/debug/deps/libordered_float-1e9adf0c80de1c6f.rmeta --extern owning_ref=/home/simon/servo2/target/debug/deps/libowning_ref-fdd56e7ac0c44ac0.rmeta --extern parking_lot=/home/simon/servo2/target/debug/deps/libparking_lot-3333398224a44110.rmeta --extern precomputed_hash=/home/simon/servo2/target/debug/deps/libprecomputed_hash-76aae32f5ba3beba.rmeta --extern rayon=/home/simon/servo2/target/debug/deps/librayon-b8fa7942fd6dc2f8.rmeta --extern selectors=/home/simon/servo2/target/debug/deps/libselectors-5b9d10f8a97bdadf.rmeta --extern serde=/home/simon/servo2/target/debug/deps/libserde-4777277708f643a3.rmeta --extern servo_arc=/home/simon/servo2/target/debug/deps/libservo_arc-7a590b7c4f0134d1.rmeta --extern servo_atoms=/home/simon/servo2/target/debug/deps/libservo_atoms-013a3f7263a046e0.rmeta --extern servo_config=/home/simon/servo2/target/debug/deps/libservo_config-e8d32383d9eab38f.rmeta --extern servo_url=/home/simon/servo2/target/debug/deps/libservo_url-b7304442293a9a08.rmeta --extern smallbitvec=/home/simon/servo2/target/debug/deps/libsmallbitvec-7de92a07a0a0245a.rmeta --extern smallvec=/home/simon/servo2/target/debug/deps/libsmallvec-0eda9a67bfdf997e.rmeta --extern string_cache=/home/simon/servo2/target/debug/deps/libstring_cache-41e4f65266d31eb7.rmeta --extern style_derive=/home/simon/servo2/target/debug/deps/libstyle_derive-2402b5e8b31fc012.so --extern style_traits=/home/simon/servo2/target/debug/deps/libstyle_traits-7194c8b4143ce5fc.rmeta --extern thin_slice=/home/simon/servo2/target/debug/deps/libthin_slice-6c8c5c98346ae897.rmeta --extern time=/home/simon/servo2/target/debug/deps/libtime-1d2e0770d1dc1d66.rmeta --extern uluru=/home/simon/servo2/target/debug/deps/libuluru-9f38b4f588702e9b.rmeta --extern unicode_bidi=/home/simon/servo2/target/debug/deps/libunicode_bidi-daa8c68c24d3e006.rmeta --extern unicode_segmentation=/home/simon/servo2/target/debug/deps/libunicode_segmentation-14f8d301431397ac.rmeta --extern void=/home/simon/servo2/target/debug/deps/libvoid-777d0f5189f4bd4e.rmeta -Z treat-err-as-bug` (exit code: 1)

@QuietMisdreavus
Copy link
Member

Based on trying it myself, i think the type at fault is PathParser here - at least that's the last one i get logs from before it bails.

@QuietMisdreavus
Copy link
Member

If you want to try this yourself with a local rustdoc, i was able to clone Servo, check out the rustup branch, and run the following command to reproduce:

RUST_LOG=rustdoc::clean::auto_trait cargo +other rustdoc --manifest-path ports/servo/Cargo.toml -p style -- -Z unstable-options -Z treat-err-as-bug

May help in the absence of a reduced test case.

@Aaron1011
Copy link
Member

Minimized reproduction:

struct Wrapper<T>(T);

trait MyTrait {
    type Output;
}

impl<'a, I, T: 'a> MyTrait for Wrapper<I>
    where I: MyTrait<Output=&'a T>
{
    type Output = T;
}

struct Inner<'a, T>(&'a T);

impl<'a, T> MyTrait for Inner<'a, T> {
    type Output = &'a T;
}


struct Parser<'a> {
    field: <Wrapper<Inner<'a, u8>> as MyTrait>::Output
}

Aaron1011 added a commit to Aaron1011/rust that referenced this issue Dec 15, 2018
Commit f57247c (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).

This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.

Fixes rust-lang#56822
bors added a commit that referenced this issue Dec 27, 2018
Call poly_project_and_unify_type on types that contain inference types

Commit f57247c (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).

This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.

Fixes #56822
@SimonSapin SimonSapin added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Dec 27, 2018
pietroalbini pushed a commit to pietroalbini/rust that referenced this issue Jan 3, 2019
Commit f57247c (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).

This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.

Fixes rust-lang#56822
Aaron1011 added a commit to Aaron1011/rust that referenced this issue Jan 4, 2019
Commit f57247c (Ensure that Rusdoc discovers all necessary auto
trait bounds) added a check to ensure that we only attempt to unify a
projection predicatre with inference variables. However, the check it
added was too strict - instead of checking that a type *contains* an
inference variable (e.g. '&_', 'MyType<_>'), it required the type to
*be* an inference variable (i.e. only '_' would match).

This commit relaxes the check to use 'ty.has_infer_types', ensuring that
we perform unification wherever possible.

Fixes rust-lang#56822
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-synthetic-impls Area: Synthetic impls, used by rustdoc to document auto traits and traits with blanket impls I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. 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

3 participants