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

Existential type doc example ICE #53674

Closed
DutchGhost opened this issue Aug 24, 2018 · 1 comment
Closed

Existential type doc example ICE #53674

DutchGhost opened this issue Aug 24, 2018 · 1 comment

Comments

@DutchGhost
Copy link
Contributor

DutchGhost commented Aug 24, 2018

Trying to run 'cargo test' on https://github.com/DutchGhost/rust_fun/blob/master/src/lib.rs, ICE's on the compose documentation example.

Backtrace:
---- src\lib.rs - compose (line 12) stdout ----
thread 'src\lib.rs - compose (line 12)' panicked at 'librustc_resolve\build_reduced_graph.rs:741: unexpected definition: Existential(DefId(9/0:3))', librustc\util\bug.rs:47:26
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: <rustc::ty::sty::Binder<rustc::ty::ProjectionPredicate<'tcx>> as rustc::ty::ToPredicate<'tcx>>::to_predicate
   5: std::panicking::rust_panic_with_hook
   6: <rustc::hir::intravisit::IdRange as core::fmt::Debug>::fmt
   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_resolve::build_reduced_graph::<impl rustc_resolve::Resolver<'a, 'cl>>::populate_module_if_necessary
  14: rustc_resolve::build_reduced_graph::<impl rustc_resolve::ToNameBinding<'a> for (&'a rustc_resolve::ModuleData<'a>, rustc::ty::Visibility, syntax_pos::span_encoding::Span, syntax_pos::hygiene::Mark)>::to_name_binding
  15: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b, 'cl> as syntax::visit::Visitor<'a>>::visit_item
  16: <rustc_resolve::BindingError as core::cmp::PartialOrd>::partial_cmp
  17: <rustc_resolve::build_reduced_graph::BuildReducedGraphVisitor<'a, 'b, 'cl> as syntax::visit::Visitor<'a>>::visit_item
  18: <rustc_resolve::BindingError as core::cmp::PartialOrd>::partial_cmp
  19: rustc_resolve::macros::<impl syntax::ext::base::Resolver for rustc_resolve::Resolver<'a, 'crateloader>>::visit_ast_fragment_with_placeholders
  20: syntax::ext::expand::MacroExpander::expand_crate
  21: syntax::ext::expand::MacroExpander::expand_crate
  22: syntax::ext::expand::MacroExpander::expand_crate
  23: <unknown>
  24: <unknown>
  25: rustc_driver::driver::count_nodes
  26: rustc_driver::driver::compile_input
  27: <unknown>
  28: _rust_maybe_catch_panic
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: _rust_maybe_catch_panic
  35: <unknown>
  36: <unknown>
  37: test::Metric::new
  38: _rust_maybe_catch_panic
  39: <test::TestOpts as core::fmt::Debug>::fmt
  40: test::stats::winsorize
  41: _rust_maybe_catch_panic
  42: test::stats::winsorize
  43: std::process::id
  44: std::sys::windows::thread::Thread::new
  45: BaseThreadInitThunk
  46: RtlUserThreadStart
query stack during panic:
end of query stack
thread 'src\lib.rs - compose (line 12)' panicked at 'couldn't compile the test', librustdoc\test.rs:333:13
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: <rustc::ty::sty::Binder<rustc::ty::ProjectionPredicate<'tcx>> as rustc::ty::ToPredicate<'tcx>>::to_predicate
   5: std::panicking::rust_panic_with_hook
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: _rust_maybe_catch_panic
  12: <unknown>
  13: <unknown>
  14: test::Metric::new
  15: _rust_maybe_catch_panic
  16: <test::TestOpts as core::fmt::Debug>::fmt
  17: test::stats::winsorize
  18: _rust_maybe_catch_panic
  19: test::stats::winsorize
  20: std::process::id
  21: std::sys::windows::thread::Thread::new
  22: BaseThreadInitThunk
  23: RtlUserThreadStart
query stack during panic:
end of query stack

Playground: https://play.rust-lang.org/?version=nightly&mode=debug&edition=2015

@Arnavion
Copy link

Duplicate of #53443

@oli-obk oli-obk closed this as completed Aug 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants