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

"Broken MIR" error on latest nightly #93209

Closed
kaimast opened this issue Jan 22, 2022 · 5 comments
Closed

"Broken MIR" error on latest nightly #93209

kaimast opened this issue Jan 22, 2022 · 5 comments
Labels
C-bug Category: This is a bug.

Comments

@kaimast
Copy link

kaimast commented Jan 22, 2022

When compiling lsm-rs on latest rust I get a panic.

Meta

rustc --version --verbose:

rustc 1.60.0-nightly (17d29dcdc 2022-01-21)
binary: rustc
commit-hash: 17d29dcdce9b9e838635eb0adefd9b8b1588410b
commit-date: 2022-01-21
host: x86_64-unknown-linux-gnu
release: 1.60.0-nightly
LLVM version: 13.0.0

Notes

This also happens on github actions, so I can reproduce it on multiple machines.

I can only reproduce this on the most recent nightly (2022-01-21), 2022-01-20 and earlier work fine.

The crate uses a few unstable features, that might trigger this.

Backtrace

Backtrace

``` Compiling lsm v0.2.0 (/home/kai/dev/lsm-rs) error: internal compiler error: compiler/rustc_mir_transform/src/generator.rs:755:13: Broken MIR: generator contains type &mut dyn InternalIterator in MIR, but typeck only knows about {ResumeTy, &mut DbIteratorInner, usize, std::option::Option<(u64, usize)>, &mut [Box], Box, dyn InternalIterator, DbIteratorInner, std::option::Option>, &std::option::Option>, &Vec, bool, Pin + std::marker::Send>>, ()} and [&mut async_iter::DbIteratorInner, usize, std::option::Option<(u64, usize)>] --> src/async_iter.rs:121:83 | 121 | async fn parse_iter(&mut self, offset: usize, min_kv: MinKV) -> (bool, MinKV) { | ___________________________________________________________________________________^ 122 | | // Split slices to make the borrow checker happy 123 | | let (prev, cur) = self.iterators[..].split_at_mut(offset); 124 | | let iter = &mut *cur[0]; ... | 158 | | } 159 | | } | |_____^

thread 'rustc' panicked at 'Box', /rustc/17d29dcdce9b9e838635eb0adefd9b8b1588410b/compiler/rustc_errors/src/lib.rs:1115:9
stack backtrace:
0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
1: std::panic::panic_any::<rustc_errors::ExplicitBug>
2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span>
3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span>
4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>
5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
7: <rustc_mir_transform::generator::StateTransform as rustc_middle::mir::MirPass>::run_pass
8: rustc_mir_transform::pass_manager::run_passes
9: rustc_mir_transform::optimized_mir
10: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>
11: rustc_data_structures::stack::ensure_sufficient_stack::<(&rustc_middle::mir::Body, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>::{closure#3}>
12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
13: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
14: <rustc_middle::ty::context::TyCtxt>::generator_layout
15: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
16: rustc_middle::ty::layout::layout_of
17: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
18: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
19: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
20: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError, <core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>>::{closure#0}, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>
21: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError, <core::result::Result<rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>>::{closure#0}, rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>>
22: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
23: rustc_middle::ty::layout::layout_of
24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
25: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
27: rustc_middle::ty::layout::layout_of
28: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
29: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
30: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
31: <rustc_mir_transform::const_prop::ConstProp as rustc_middle::mir::MirPass>::run_pass
32: rustc_mir_transform::pass_manager::run_passes
33: rustc_mir_transform::optimized_mir
34: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>
35: rustc_data_structures::stack::ensure_sufficient_stack::<(&rustc_middle::mir::Body, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>::{closure#3}>
36: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
38: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
39: rustc_metadata::rmeta::encoder::encode_metadata_impl
40: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata::rmeta::encoder::EncodedMetadata, ()>
41: rustc_metadata::rmeta::encoder::encode_metadata
42: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box, rustc_errors::ErrorReported>>
43: <rustc_interface::queries::Queries>::ongoing_codegen
44: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
45: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
46: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with RUST_BACKTRACE=full for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0-nightly (17d29dc 2022-01-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for async_iter::<impl at src/async_iter.rs:103:1: 235:2>::parse_iter::{closure#0}
#1 [layout_of] computing layout of [static generator@src/async_iter.rs:121:83: 159:6]
#2 [layout_of] computing layout of core::future::from_generator::GenFuture<[static generator@src/async_iter.rs:121:83: 159:6]>
#3 [layout_of] computing layout of impl core::future::future::Future<Output = [async output]>
#4 [optimized_mir] optimizing MIR for async_iter::<impl at src/async_iter.rs:103:1: 235:2>::parse_iter
end of query stack
error: could not compile lsm

</p>
</details>
@kaimast kaimast added the C-bug Category: This is a bug. label Jan 22, 2022
@bmoxb
Copy link
Contributor

bmoxb commented Jan 22, 2022

I believe I'm encountering the same issue compiling tide on nightly 1.60.0.

$ rustc --version --verbose
rustc 1.60.0-nightly (17d29dcdc 2022-01-21)
binary: rustc
commit-hash: 17d29dcdce9b9e838635eb0adefd9b8b1588410b
commit-date: 2022-01-21
host: x86_64-unknown-linux-gnu
release: 1.60.0-nightly
LLVM version: 13.0.0
Backtrace
error: internal compiler error: compiler/rustc_mir_transform/src/generator.rs:755:13: Broken MIR: generator contains type Box<dyn Listener<State>> in MIR, but typeck only knows about {ResumeTy, &mut FailoverListener<State>, FailoverListener<State>, std::option::Option<usize>, usize, Pin<Box<dyn futures_util::Future<Output = std::result::Result<(), std::io::Error>> + std::marker::Send>>, ()} and [&mut listener::failover_listener::FailoverListener<State>]
   --> /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/listener/failover_listener.rs:126:50
    |
126 |       async fn accept(&mut self) -> io::Result<()> {
    |  __________________________________________________^
127 | |         match self.index {
128 | |             Some(index) => {
129 | |                 let mut listener = self.listeners[index].take().expect("accept called twice");
...   |
137 | |         }
138 | |     }
    | |_____^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/17d29dcdce9b9e838635eb0adefd9b8b1588410b/compiler/rustc_errors/src/lib.rs:1115:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span>
   3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span>
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_mir_transform::generator::StateTransform as rustc_middle::mir::MirPass>::run_pass
   8: rustc_mir_transform::pass_manager::run_passes
   9: rustc_mir_transform::optimized_mir
  10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  11: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  12: <rustc_middle::ty::context::TyCtxt>::generator_layout
  13: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  14: rustc_middle::ty::layout::layout_of
  15: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  17: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError, <core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>>::{closure#0}, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>
  18: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError, <core::result::Result<rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>>::{closure#0}, rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>>
  19: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  20: rustc_middle::ty::layout::layout_of
  21: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  23: rustc_middle::ty::layout::layout_of
  24: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  25: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  26: <rustc_mir_transform::const_prop::ConstProp as rustc_middle::mir::MirPass>::run_pass
  27: rustc_mir_transform::pass_manager::run_passes
  28: rustc_mir_transform::optimized_mir
  29: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  30: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  31: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
  32: rustc_metadata::rmeta::encoder::encode_metadata_impl
  33: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata::rmeta::encoder::EncodedMetadata, ()>
  34: rustc_metadata::rmeta::encoder::encode_metadata
  35: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorReported>>
  36: <rustc_interface::queries::Queries>::ongoing_codegen
  37: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
  38: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  39: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0-nightly (17d29dcdc 2022-01-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for `listener::failover_listener::<impl at /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/listener/failover_listener.rs:99:1: 149:2>::accept::{closure#0}`
#1 [layout_of] computing layout of `[static generator@/home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/listener/failover_listener.rs:126:50: 138:6]`
#2 [layout_of] computing layout of `core::future::from_generator::GenFuture<[static generator@/home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/listener/failover_listener.rs:126:50: 138:6]>`
#3 [layout_of] computing layout of `impl core::future::future::Future<Output = [async output]>`
#4 [optimized_mir] optimizing MIR for `listener::failover_listener::<impl at /home/max/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/listener/failover_listener.rs:99:1: 149:2>::accept`
end of query stack
error: could not compile `tide`

asomers added a commit to bfffs/bfffs that referenced this issue Jan 22, 2022
@dwrensha
Copy link
Contributor

dwrensha commented Jan 23, 2022

I'm seeing a similar error in capnproto-rust, which does not use any unstable features:

error with backtrace
   Compiling capnp-rpc-test v0.0.0 (/home/dwrensha/src/capnproto-rust/capnp-rpc/test)
error: internal compiler error: compiler/rustc_mir_transform/src/generator.rs:755:13: Broken MIR: generator contains type RemotePromise<get_cap_results::Owned> in MIR, but typeck only knows about {ResumeTy, &test_capnp::bootstrap::Client, test_capnp::bootstrap::Client, RemotePromise<test_pipeline_results::Owned>, Promise<Response<test_pipeline_results::Owned>, capnp::Error>, (), Response<test_pipeline_results::Owned>, test_pipeline::Client, Request<get_cap_params::Owned, get_cap_results::Owned>, TestInterface, Rc<Cell<u64>>, Request<test_interface::foo_params::Owned, foo_results::Owned>, RemotePromise<foo_results::Owned>, RemotePromise<test_all_types::Owned>, Promise<Response<foo_results::Owned>, capnp::Error>, Response<foo_results::Owned>, Promise<Response<test_all_types::Owned>, capnp::Error>} and [test_capnp::bootstrap::Client]
   --> capnp-rpc/test/test.rs:247:49
    |
247 |       rpc_top_level(|_spawner, client| async move {
    |  _________________________________________________^
248 | |         let response = client.test_pipeline_request().send().promise.await?;
249 | |         let client = response.get()?.get_cap()?;
250 | |
...   |
285 | |         Ok(())
286 | |     });
    | |_____^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/17d29dcdce9b9e838635eb0adefd9b8b1588410b/compiler/rustc_errors/src/lib.rs:1115:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span>
   3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span>
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_mir_transform::generator::StateTransform as rustc_middle::mir::MirPass>::run_pass
   8: rustc_mir_transform::pass_manager::run_passes
   9: rustc_mir_transform::optimized_mir
  10: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>
  11: rustc_data_structures::stack::ensure_sufficient_stack::<(&rustc_middle::mir::Body, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>::{closure#3}>
  12: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  13: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  14: <rustc_middle::ty::context::TyCtxt>::generator_layout
  15: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  16: rustc_middle::ty::layout::layout_of
  17: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
  18: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  19: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  20: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError, <core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>>::{closure#0}, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>
  21: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError, <core::result::Result<rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>>::{closure#0}, rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>>
  22: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  23: rustc_middle::ty::layout::layout_of
  24: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
  25: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  26: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  27: rustc_middle::ty::layout::layout_of
  28: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_middle::ty::ParamEnvAnd<&rustc_middle::ty::TyS>, core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>
  29: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  30: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  31: <rustc_mir_transform::const_prop::ConstProp as rustc_middle::mir::MirPass>::run_pass
  32: rustc_mir_transform::pass_manager::run_passes
  33: rustc_mir_transform::optimized_mir
  34: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>
  35: rustc_data_structures::stack::ensure_sufficient_stack::<(&rustc_middle::mir::Body, rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, rustc_span::def_id::DefId, &rustc_middle::mir::Body>::{closure#3}>
  36: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  38: <rustc_middle::ty::context::TyCtxt>::instance_mir
  39: rustc_monomorphize::collector::collect_neighbours
  40: rustc_monomorphize::collector::collect_items_rec
  41: rustc_monomorphize::collector::collect_items_rec
  42: rustc_monomorphize::collector::collect_items_rec
  43: rustc_monomorphize::collector::collect_items_rec
  44: rustc_monomorphize::collector::collect_items_rec
  45: <rustc_session::session::Session>::time::<(), rustc_monomorphize::collector::collect_crate_mono_items::{closure#1}>
  46: rustc_monomorphize::collector::collect_crate_mono_items
  47: rustc_monomorphize::partitioning::collect_and_partition_mono_items
  48: <rustc_middle::dep_graph::dep_node::DepKind as rustc_query_system::dep_graph::DepKind>::with_deps::<<rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task_impl<rustc_middle::ty::context::TyCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>::{closure#0}, (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>
  49: <rustc_query_system::dep_graph::graph::DepGraph<rustc_middle::dep_graph::dep_node::DepKind>>::with_task::<rustc_middle::ty::context::TyCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>
  50: rustc_data_structures::stack::ensure_sufficient_stack::<((&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit]), rustc_query_system::dep_graph::graph::DepNodeIndex), rustc_query_system::query::plumbing::execute_job<rustc_query_impl::plumbing::QueryCtxt, (), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>::{closure#3}>
  51: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<(), (&std::collections::hash::set::HashSet<rustc_span::def_id::DefId, core::hash::BuildHasherDefault<rustc_hash::FxHasher>>, &[rustc_middle::mir::mono::CodegenUnit])>>
  52: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::collect_and_partition_mono_items, rustc_query_impl::plumbing::QueryCtxt>
  53: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  54: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  55: <rustc_session::session::Session>::time::<alloc::boxed::Box<dyn core::any::Any>, rustc_interface::passes::start_codegen::{closure#0}>
  56: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorReported>>
  57: <rustc_interface::queries::Queries>::ongoing_codegen
  58: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
  59: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  60: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0-nightly (17d29dcdc 2022-01-21) running on x86_64-unknown-linux-gnu

note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for `basic_pipelining::{closure#0}::{closure#0}`
#1 [layout_of] computing layout of `[static generator@capnp-rpc/test/test.rs:247:49: 286:6]`
#2 [layout_of] computing layout of `core::future::from_generator::GenFuture<[static generator@capnp-rpc/test/test.rs:247:49: 286:6]>`
#3 [layout_of] computing layout of `impl core::future::future::Future<Output = [async output]>`
#4 [optimized_mir] optimizing MIR for `basic_pipelining::{closure#0}`
#5 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: could not compile `capnp-rpc-test`

@tisonkun
Copy link
Contributor

ditto when compile tonic

error with backtrace
error: internal compiler error: compiler/rustc_mir_transform/src/generator.rs:755:13: Broken MIR: generator contains type http::uri::Parts in MIR, but typeck only knows about {ResumeTy, &mut client::grpc::Grpc<T>, C, http::Request<UnsyncBoxBody<bytes::Bytes, Status>>, client::grpc::Grpc<T>, <T as GrpcService<UnsyncBoxBody<bytes::Bytes, Status>>>::Future, ()} and [&mut client::grpc::Grpc<T>, request::Request<S>, http::uri::PathAndQuery, C]
   --> /Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.2/src/client/grpc.rs:234:5
    |
234 | /     {
235 | |         let mut parts = Parts::default();
236 | |         parts.path_and_query = Some(path);
237 | |
...   |
324 | |         Ok(Response::from_http(response))
325 | |     }
    | |_____^

thread 'rustc' panicked at 'Box<dyn Any>', /rustc/17d29dcdce9b9e838635eb0adefd9b8b1588410b/compiler/rustc_errors/src/lib.rs:1115:9
stack backtrace:
   0: std::panicking::begin_panic::<rustc_errors::ExplicitBug>
   1: std::panic::panic_any::<rustc_errors::ExplicitBug>
   2: <rustc_errors::HandlerInner>::span_bug::<rustc_span::span_encoding::Span>
   3: <rustc_errors::Handler>::span_bug::<rustc_span::span_encoding::Span>
   4: rustc_middle::ty::context::tls::with_opt::<rustc_middle::util::bug::opt_span_bug_fmt<rustc_span::span_encoding::Span>::{closure#0}, ()>
   5: rustc_middle::util::bug::opt_span_bug_fmt::<rustc_span::span_encoding::Span>
   6: rustc_middle::util::bug::span_bug_fmt::<rustc_span::span_encoding::Span>
   7: <rustc_mir_transform::generator::StateTransform as rustc_middle::mir::MirPass>::run_pass
   8: rustc_mir_transform::pass_manager::run_passes
   9: rustc_mir_transform::optimized_mir
  10: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  11: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
  12: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  13: rustc_middle::ty::layout::layout_of
  14: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  15: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  16: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_middle::ty::layout::LayoutOf>::layout_of
  17: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>, rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError, <core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::FieldDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}::{closure#0}>>::{closure#0}, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>
  18: core::iter::adapters::process_results::<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError, <core::result::Result<rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>, rustc_middle::ty::layout::LayoutError> as core::iter::traits::collect::FromIterator<core::result::Result<alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>, rustc_middle::ty::layout::LayoutError>>>::from_iter<core::iter::adapters::map::Map<core::slice::iter::Iter<rustc_middle::ty::VariantDef>, <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached::{closure#5}>>::{closure#0}, rustc_index::vec::IndexVec<rustc_target::abi::VariantIdx, alloc::vec::Vec<rustc_target::abi::TyAndLayout<&rustc_middle::ty::TyS>>>>
  19: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>>::layout_of_uncached
  20: rustc_middle::ty::layout::layout_of
  21: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  22: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  23: rustc_middle::ty::layout::layout_of
  24: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::layout_of, rustc_query_impl::plumbing::QueryCtxt>
  25: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_of
  26: <rustc_mir_transform::const_prop::ConstProp as rustc_middle::mir::MirPass>::run_pass
  27: rustc_mir_transform::pass_manager::run_passes
  28: rustc_mir_transform::optimized_mir
  29: rustc_query_system::query::plumbing::try_execute_query::<rustc_query_impl::plumbing::QueryCtxt, rustc_query_system::query::caches::DefaultCache<rustc_span::def_id::DefId, &rustc_middle::mir::Body>>
  30: rustc_query_system::query::plumbing::get_query::<rustc_query_impl::queries::optimized_mir, rustc_query_impl::plumbing::QueryCtxt>
  31: <rustc_metadata::rmeta::encoder::EncodeContext>::encode_crate_root
  32: rustc_metadata::rmeta::encoder::encode_metadata_impl
  33: rustc_data_structures::sync::join::<rustc_metadata::rmeta::encoder::encode_metadata::{closure#0}, rustc_metadata::rmeta::encoder::encode_metadata::{closure#1}, rustc_metadata::rmeta::encoder::EncodedMetadata, ()>
  34: rustc_metadata::rmeta::encoder::encode_metadata
  35: <rustc_interface::passes::QueryContext>::enter::<<rustc_interface::queries::Queries>::ongoing_codegen::{closure#0}::{closure#0}, core::result::Result<alloc::boxed::Box<dyn core::any::Any>, rustc_errors::ErrorReported>>
  36: <rustc_interface::queries::Queries>::ongoing_codegen
  37: <rustc_interface::interface::Compiler>::enter::<rustc_driver::run_compiler::{closure#1}::{closure#2}, core::result::Result<core::option::Option<rustc_interface::queries::Linker>, rustc_errors::ErrorReported>>
  38: rustc_span::with_source_map::<core::result::Result<(), rustc_errors::ErrorReported>, rustc_interface::interface::create_compiler_and_run<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#1}>
  39: <scoped_tls::ScopedKey<rustc_span::SessionGlobals>>::set::<rustc_interface::util::setup_callbacks_and_run_in_thread_pool_with_globals<rustc_interface::interface::run_compiler<core::result::Result<(), rustc_errors::ErrorReported>, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>::{closure#0}::{closure#0}, core::result::Result<(), rustc_errors::ErrorReported>>
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.

note: the compiler unexpectedly panicked. this is a bug.

note: we would appreciate a bug report: https://github.com/rust-lang/rust/issues/new?labels=C-bug%2C+I-ICE%2C+T-compiler&template=ice.md

note: rustc 1.60.0-nightly (17d29dcdc 2022-01-21) running on x86_64-apple-darwin

note: compiler flags: -C embed-bitcode=no -C split-debuginfo=unpacked -C debuginfo=2 --crate-type lib

note: some of the compiler flags provided by cargo are hidden

query stack during panic:
#0 [optimized_mir] optimizing MIR for `client::grpc::<impl at /Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.2/src/client/grpc.rs:42:1: 326:2>::streaming::{closure#0}`
#1 [layout_of] computing layout of `[static generator@/Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.2/src/client/grpc.rs:234:5: 325:6]`
#2 [layout_of] computing layout of `core::future::from_generator::GenFuture<[static generator@/Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.2/src/client/grpc.rs:234:5: 325:6]>`
#3 [layout_of] computing layout of `impl core::future::future::Future<Output = [async output]>`
#4 [optimized_mir] optimizing MIR for `client::grpc::<impl at /Users/tison/.cargo/registry/src/github.com-1ecc6299db9ec823/tonic-0.6.2/src/client/grpc.rs:42:1: 326:2>::streaming`
end of query stack
error: could not compile `tonic`

@lqd
Copy link
Member

lqd commented Jan 23, 2022

These are duplicates of #93161 and are already fixed on master, but not available on nightly yet. They will be fixed in the next nightly which will contain #93165.

The most recent 2 nightlies have this issue:

  • "nightly-2022-01-23" on rustup: rustc 1.60.0-nightly (bfe156467 2022-01-22)
  • "nightly-2022-01-22" on rustup: rustc 1.60.0-nightly (17d29dcdc 2022-01-21).

We've checked yesterday that this PR fixes tonic, and I've now checked it fixes lsm-rs as well (via rustup-toolchain-master of PR #93165's try artifacts d634ef421795e0140724aa9fddf8137b83e616c9 ) so I'll close this issue as a duplicate.

Please reopen this issue if tomorrow's nightly doesn't fix it. There are other ICEs that it does not fix but it's expected that the 3 above will be.

@lqd lqd closed this as completed Jan 23, 2022
@kaimast
Copy link
Author

kaimast commented Jan 23, 2022

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

5 participants