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

rustc panic after merge of PR #76814 (refactor Binder) #83737

Closed
richkadel opened this issue Apr 1, 2021 · 38 comments · Fixed by #84682
Closed

rustc panic after merge of PR #76814 (refactor Binder) #83737

richkadel opened this issue Apr 1, 2021 · 38 comments · Fixed by #84682
Assignees
Labels
C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@richkadel
Copy link
Contributor

It looks PR #76814 introduced a bug. Is it possible to revert this change until resolved?

cc: @jackh726 , @nikomatsakis

FAILED: 
/b/s/w/ir/x/w/recipe_cleanup/rustTPrefG/bin/rustc --color=always --crate-name brightness_manager ../../src/ui/bin/brightness_manager/src/main.rs --crate-type bin --emit=dep-info=./brightness_manager.d,link -Zdep-info-omit-d-target -C link-args=--Map="./exe.unstripped/brightness_manager.map" --cfg=rust_panic=\"abort\" --cfg=__rust_toolchain=\"zlth2Vwh8AafQ2nu6NhLVhOq07bDg98afOzh7hxmxA0C\" -L gen/zircon/public/sysroot/cpp/lib -Clinker=/b/s/w/ir/x/w/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -Clink-arg=--sysroot=gen/zircon/public/sysroot/cpp -Clink-arg=-L/b/s/w/ir/x/w/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -Clink-arg=--pack-dyn-relocs=relr -Clink-arg=-dynamic-linker=ld.so.1 -Clink-arg=--icf=all --remap-path-prefix /b/s/w/ir/x/w/fuchsia/=../../ -Cforce-frame-pointers -Copt-level=0 -Cdebuginfo=2 --edition=2018 -Zallow-features= --target x86_64-fuchsia --cap-lints=warn -Wrust-2018-idioms -Dwarnings -Clink-args=-zstack-size=0x200000 -Cpanic=abort -Cforce-unwind-tables=yes -Zpanic_abort_tests -Cprefer-dynamic -o "./exe.unstripped/brightness_manager" -Ldependency=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc -Ldependency=obj/src/lib/fidl/rust/fidl -Ldependency=obj/src/lib/fuchsia-async -Ldependency=host_x64 -Ldependency=obj/src/lib/fuchsia-system-alloc -Ldependency=obj/src/lib/zircon/rust -Ldependency=obj/third_party/rust_crates -Ldependency=obj/src/lib/zerocopy -Ldependency=obj/zircon/vdso/zx/zx-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input2/fuchsia.ui.input2-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3-rustc -Ldependency=obj/sdk/fidl/fuchsia.input/fuchsia.input-rustc -Ldependency=obj/src/lib/fdio/rust -Ldependency=obj/sdk/fidl/fuchsia.device/fuchsia.device-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol-rustc -Ldependency=obj/src/lib/fuchsia-runtime -Ldependency=obj/src/lib/fuchsia-component -Ldependency=obj/garnet/lib/rust/files_async -Ldependency=obj/sdk/fidl/fuchsia.io/fuchsia.io-rustc -Ldependency=obj/sdk/fidl/fuchsia.io2/fuchsia.io2-rustc -Ldependency=obj/sdk/fidl/fuchsia.mem/fuchsia.mem-rustc -Ldependency=obj/garnet/lib/rust/io_util -Ldependency=obj/sdk/fidl/fuchsia.sys/fuchsia.sys-rustc -Ldependency=obj/sdk/fidl/fuchsia.sys2/fuchsia.sys2-rustc -Ldependency=obj/sdk/fidl/fuchsia.component/fuchsia.component-rustc -Ldependency=obj/sdk/fidl/fuchsia.data/fuchsia.data-rustc -Ldependency=obj/sdk/fidl/fuchsia.url/fuchsia.url-rustc -Ldependency=obj/src/lib/syslog/rust -Ldependency=obj/sdk/fidl/fuchsia.logger/fuchsia.logger-rustc -Ldependency=obj/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics-rustc -Ldependency=obj/src/lib/watch_handler -Lnative=obj/sdk/lib/syslog/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/fuchsia/diagnostics/stream/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/fuchsia/diagnostics/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/fuchsia/mem/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem -Lnative=obj/out/not-default/fidling/gen/zircon/vdso/zx/zx/zx/cpp -Lnative=obj/out/not-default/fidling/gen/zircon/vdso/zx -Lnative=obj/sdk/lib/fidl/cpp/internal -Lnative=obj/sdk/lib/fidl/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/fuchsia/logger/cpp -Lnative=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger -Lnative=obj/sdk/lib/syslog/streams/cpp -Lnative=user.libc_x64/obj/zircon/system/ulib/c -Lnative=x64-shared/lib.unstripped -Lnative=obj/sdk/lib/fit -Lnative=obj/sdk/lib/stdcompat -Lnative=obj/zircon/system/ulib/fidl -Lnative=obj/sdk/lib/fit-promise -Lnative=obj/zircon/system/ulib/zx -Lnative=obj/zircon/system/ulib/async -Lnative=user.libc_x64 -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -Clink-arg=obj/out/not-default/fidling/gen/zircon/vdso/zx/zx/zx/cpp/zx_hlcpp.fidl.cc.o -Clink-arg=obj/out/not-default/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -Clink-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -Clink-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -Clink-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -Clink-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -Clink-arg=obj/sdk/lib/fit/libfit.a -Clink-arg=obj/sdk/lib/stdcompat/libstdcompat.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -Clink-arg=obj/sdk/lib/fit-promise/libfit-promise.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl.a -Clink-arg=obj/zircon/system/ulib/zx/libzx.a -Clink-arg=obj/zircon/system/ulib/async/libasync.a -Clink-arg=x64-shared/lib.unstripped/libasync-default.so -Clink-arg=x64-shared/lib.unstripped/libfdio.so -Clink-arg=x64-shared/lib.unstripped/libsyslog.so -Clink-arg=user.libc_x64/libc.so.debug -Lnative=../../build/config/zircon/libc-dummy -Clink-arg=libzircon.so --extern fidl_fuchsia_hardware_backlight=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc/libfidl_fuchsia_hardware_backlight.rlib --extern fidl_fuchsia_hardware_input=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc/libfidl_fuchsia_hardware_input.rlib --extern fidl_fuchsia_ui_brightness=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc/libfidl_fuchsia_ui_brightness.rlib --extern fidl_fuchsia_ui_input=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc/libfidl_fuchsia_ui_input.rlib --extern fdio=obj/src/lib/fdio/rust/libfdio.rlib --extern fidl=obj/src/lib/fidl/rust/fidl/libfidl.rlib --extern fuchsia_async=obj/src/lib/fuchsia-async/libfuchsia_async.rlib --extern fuchsia_component=obj/src/lib/fuchsia-component/libfuchsia_component.rlib --extern fuchsia_runtime=obj/src/lib/fuchsia-runtime/libfuchsia_runtime.rlib --extern fuchsia_syslog=obj/src/lib/syslog/rust/libfuchsia_syslog.rlib --extern watch_handler=obj/src/lib/watch_handler/libwatch_handler.rlib --extern fuchsia_zircon=obj/src/lib/zircon/rust/libfuchsia_zircon.rlib --extern anyhow=obj/third_party/rust_crates/libanyhow-34b5b8ef286e2000.rlib --extern async_trait=host_x64/libasync_trait-c6b6d222802967e6.so --extern byteorder=obj/third_party/rust_crates/libbyteorder-e4429ddc31d502a7.rlib --extern futures=obj/third_party/rust_crates/libfutures-3c827392713a33d4.rlib --extern futures_util=obj/third_party/rust_crates/libfutures_util-9cbfc1877c4fcb4.rlib --extern lazy_static=obj/third_party/rust_crates/liblazy_static-cdf593bd3fb3d68f.rlib --extern num_traits=obj/third_party/rust_crates/libnum_traits-a6e1ee504861eea7.rlib --extern parking_lot=obj/third_party/rust_crates/libparking_lot-6721767503fecbee.rlib --extern serde=obj/third_party/rust_crates/libserde-51abe0aa53b0d3ac.rlib --extern serde_json=obj/third_party/rust_crates/libserde_json-7635f31531fde4db.rlib --extern splines=obj/third_party/rust_crates/libsplines-d1b51f4ec5d923f7.rlib --extern thiserror=obj/third_party/rust_crates/libthiserror-dcdc66d3bbb690d3.rlib && ../../prebuilt/third_party/python3/linux-x64/bin/python3.8 -S ../../build/gn/verify_depfile.py -t "//src/ui/bin/brightness_manager:bin" -d ./brightness_manager.d ../../src/ui/bin/brightness_manager/src/backlight.rs ../../src/ui/bin/brightness_manager/src/control.rs ../../src/ui/bin/brightness_manager/src/main.rs ../../src/ui/bin/brightness_manager/src/sender_channel.rs ../../src/ui/bin/brightness_manager/src/sensor.rs && ../../prebuilt/third_party/clang/linux-x64/bin/llvm-objcopy --strip-sections "./exe.unstripped/brightness_manager" "./brightness_manager" && ../../prebuilt/tools/buildidtool/linux-x64/buildidtool -build-id-dir .build-id -stamp "./brightness_manager.build-id.stamp" -entry "=./brightness_manager" -entry ".debug=./exe.unstripped/brightness_manager"
error: internal compiler error: compiler/rustc_mir/src/transform/generator.rs:751:13: Broken MIR: generator contains type impl futures::Future in MIR, but typeck only knows about for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {ResumeTy, ServiceFs<ServiceObjLocal<'r, ControlRequestStream>>, impl futures::Future, (), Backlight, Arc<futures::lock::Mutex<Backlight>>, impl futures::Future, Sensor, Arc<futures::lock::Mutex<Sensor>>, SenderChannel<f32>, Arc<futures::lock::Mutex<SenderChannel<f32>>>, SenderChannel<bool>, Arc<futures::lock::Mutex<SenderChannel<bool>>>, Arc<futures::lock::Mutex<(dyn SensorControl + 's)>>, Arc<futures::lock::Mutex<(dyn BacklightControl + 't0)>>, impl futures::Future, Control, Arc<futures::lock::Mutex<Control>>, fn(ControlRequestStream, Arc<futures::lock::Mutex<(dyn ControlTrait + 't1)>>) -> Pin<Box<(dyn futures::Future<Output = Result<(), anyhow::Error>> + 't2)>>, Arc<futures::lock::Mutex<(dyn ControlTrait + 't3)>>, impl futures::Future}
   --> ../../src/ui/bin/brightness_manager/src/main.rs:154:10
    |
154 | async fn main() -> Result<(), Error> {
    |          ^^^^

thread 'rustc' panicked at 'Box<Any>', /b/s/w/ir/x/w/rust/library/std/src/panic.rs:59:5
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::span_bug
   3: rustc_errors::Handler::span_bug
   4: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt::{{closure}}
   6: rustc_middle::ty::context::tls::with_opt
   7: rustc_middle::util::bug::opt_span_bug_fmt
   8: rustc_middle::util::bug::span_bug_fmt
   9: <rustc_mir::transform::generator::StateTransform as rustc_mir::transform::MirPass>::run_pass
  10: rustc_mir::transform::run_passes
  11: rustc_mir::transform::optimized_mir
  12: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  13: rustc_data_structures::stack::ensure_sufficient_stack
  14: rustc_query_system::query::plumbing::force_query_with_job
  15: rustc_query_system::query::plumbing::get_query_impl
  16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  17: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::generator_layout
  18: rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached
  19: rustc_middle::ty::layout::layout_raw
  20: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute
  21: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  22: rustc_data_structures::stack::ensure_sufficient_stack
  23: rustc_query_system::query::plumbing::force_query_with_job
  24: rustc_query_system::query::plumbing::get_query_impl
  25: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw
  26: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
  27: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  28: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  29: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  30: rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached
  31: rustc_middle::ty::layout::layout_raw
  32: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute
  33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  34: rustc_data_structures::stack::ensure_sufficient_stack
  35: rustc_query_system::query::plumbing::force_query_with_job
  36: rustc_query_system::query::plumbing::get_query_impl
  37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw
  38: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
  39: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
  40: rustc_mir::transform::run_passes
  41: rustc_mir::transform::optimized_mir
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_data_structures::stack::ensure_sufficient_stack
  44: rustc_query_system::query::plumbing::force_query_with_job
  45: rustc_query_system::query::plumbing::get_query_impl
  46: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  47: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::instance_mir
  48: rustc_mir::monomorphize::collector::collect_neighbours
  49: rustc_mir::monomorphize::collector::collect_items_rec
  50: rustc_session::utils::<impl rustc_session::session::Session>::time
  51: rustc_mir::monomorphize::collector::collect_crate_mono_items
  52: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  53: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute
  54: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  55: rustc_data_structures::stack::ensure_sufficient_stack
  56: rustc_query_system::query::plumbing::force_query_with_job
  57: rustc_query_system::query::plumbing::get_query_impl
  58: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  59: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  60: rustc_interface::passes::QueryContext::enter
  61: rustc_interface::queries::Queries::ongoing_codegen
  62: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  63: rustc_span::with_source_map
  64: rustc_interface::interface::create_compiler_and_run
  65: scoped_tls::ScopedKey<T>::set
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.53.0-nightly (4fdac23f3 2021-03-31) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z dep-info-omit-d-target -Z allow-features= -Z panic_abort_tests -C link-args=--Map=./exe.unstripped/brightness_manager.map -C linker=/b/s/w/ir/x/w/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=gen/zircon/public/sysroot/cpp -C link-arg=-L/b/s/w/ir/x/w/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -C prefer-dynamic -C link-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -C link-arg=obj/out/not-default/fidling/gen/zircon/vdso/zx/zx/zx/cpp/zx_hlcpp.fidl.cc.o -C link-arg=obj/out/not-default/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -C link-arg=obj/out/not-default/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -C link-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -C link-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -C link-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -C link-arg=obj/sdk/lib/fit/libfit.a -C link-arg=obj/sdk/lib/stdcompat/libstdcompat.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -C link-arg=obj/sdk/lib/fit-promise/libfit-promise.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl.a -C link-arg=obj/zircon/system/ulib/zx/libzx.a -C link-arg=obj/zircon/system/ulib/async/libasync.a -C link-arg=x64-shared/lib.unstripped/libasync-default.so -C link-arg=x64-shared/lib.unstripped/libfdio.so -C link-arg=x64-shared/lib.unstripped/libsyslog.so -C link-arg=user.libc_x64/libc.so.debug -C link-arg=libzircon.so --crate-type bin

query stack during panic:
#0 [optimized_mir] optimizing MIR for `main::func::{closure#0}`
#1 [layout_raw] computing layout of `[static generator@../../src/ui/bin/brightness_manager/src/main.rs:154:10: 154:14 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<'r, fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/backlight.rs:30:52: 34:6 {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:97:34: 106:6 {std::future::ResumeTy, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:32:54: 50:2 for<'t6, 't7, 't8> {std::future::ResumeTy, &'t6 str, &'t7 std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &'t8 fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 's)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't0)>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/control.rs:161:18: 188:6 for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 't6)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't7)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &'t8 futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<'t9, control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't1)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + 't2)>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't3)>>, impl futures::Future}]`
#2 [layout_raw] computing layout of `std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/main.rs:154:10: 154:14 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<'r, fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/backlight.rs:30:52: 34:6 {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:97:34: 106:6 {std::future::ResumeTy, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:32:54: 50:2 for<'t6, 't7, 't8> {std::future::ResumeTy, &'t6 str, &'t7 std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &'t8 fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 's)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't0)>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/control.rs:161:18: 188:6 for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 't6)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't7)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &'t8 futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<'t9, control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't1)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + 't2)>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't3)>>, impl futures::Future}]>`
#3 [optimized_mir] optimizing MIR for `main`
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: aborting due to previous error

Note, line 154 starts a function declared within a proc macro:

#[fasync::run_singlethreaded]
async fn main() -> Result<(), Error> {

cc: @tmandry

@richkadel richkadel added the C-bug Category: This is a bug. label Apr 1, 2021
@jyn514
Copy link
Member

jyn514 commented Apr 1, 2021

Can you link to the code that replicates this bug? It seems better to fix the bug rather than revert straight away, especially since #76814 was a pretty big refactor.

@jyn514 jyn514 added E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Apr 1, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Apr 1, 2021
@richkadel
Copy link
Contributor Author

@jackh726 jackh726 self-assigned this Apr 1, 2021
@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

Urgh. So, a MCVE would be super helpful here.

And this error is popping up in a bit of code I'm not at all familiar with. But just by guessing for the few minutes I've looked at this, we might need to erase late bound regions here.

As to exactly what's happening, I don't know. Because impl futures::Future is printed out opaquely, I'm not sure if we're actually missing an upvar or if it's just a region difference (I imagine the latter). But not exactly sure where the region difference could have come from.

I would definitely prefer not to revert #76814, but if we need to, I'll live.

@apiraino
Copy link
Contributor

apiraino commented Apr 1, 2021

@rustbot label +T-compiler

@rustbot rustbot added the T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. label Apr 1, 2021
@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

@richkadel if I were to get build artifacts with my potential fix from above, would you be able to check whether or not it works?

@nikomatsakis
Copy link
Contributor

One thing that might be helpful is to run with RUSTFLAGS=-Zverbose

@richkadel
Copy link
Contributor Author

I'm not building this locally. The error is from our CI system that dryruns rustc updates. So there's a bit of a setup, for me to build against a version of rust we haven't transitioned to. I will try to get it set up though. If you push a draft PR with your proposed patch, I can cherry-pick that on top of a pull with the breaking change and try to validate your fix.

Running with -Zverbose is going to be nearly equal effort for me to set up.

@richkadel
Copy link
Contributor Author

richkadel commented Apr 1, 2021 via email

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

@richkadel here's a patch: jackh726@b0bd48c

@richkadel
Copy link
Contributor Author

got it. I just tested locally with the latest rust without your patch and confirmed I can reproduce the error locally.

I'm rebuilding with your patch now.

Thanks!

@richkadel
Copy link
Contributor Author

Unfortunately that didn't work. But I can try adding -Zverbose now that I'm set up to build locally.

Here's what I'm getting as-is, with the patch:

/usr/local/google/home/richkadel/rust/install/fuchsia-rust/bin/rustc --color=always --crate-name brightness_manager ../../src/ui/bin/brightness_manager/src/main.rs --crate-type bin --emit=dep-info=./brightness_manager.d,link -Zdep-info-omit-d-target -C link-args=--Map="./exe.unstripped/brightness_manager.map" --cfg=rust_panic=\"abort\" --cfg=__rust_toolchain=\"1\" -L gen/zircon/public/sysroot/cpp/lib -Clinker=/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -Clink-arg=--sysroot=gen/zircon/public/sysroot/cpp -Clink-arg=-L/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -Clink-arg=--pack-dyn-relocs=relr -Clink-arg=-dynamic-linker=ld.so.1 -Clink-arg=--icf=all --remap-path-prefix /usr/local/google/home/richkadel/fuchsia/=../../ -Cforce-frame-pointers -Copt-level=0 -Cdebuginfo=2 --edition=2018 -Zallow-features= --target x86_64-fuchsia --cap-lints=deny -Wrust-2018-idioms -Dwarnings -Clink-args=-zstack-size=0x200000 -Cpanic=abort -Cforce-unwind-tables=yes -Zpanic_abort_tests -Cprefer-dynamic -o "./exe.unstripped/brightness_manager" -Ldependency=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc -Ldependency=obj/src/lib/fidl/rust/fidl -Ldependency=obj/src/lib/fuchsia-async -Ldependency=host_x64 -Ldependency=obj/src/lib/fuchsia-system-alloc -Ldependency=obj/src/lib/zircon/rust -Ldependency=obj/third_party/rust_crates -Ldependency=obj/src/lib/zerocopy -Ldependency=obj/zircon/vdso/zx/zx-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input2/fuchsia.ui.input2-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3-rustc -Ldependency=obj/sdk/fidl/fuchsia.input/fuchsia.input-rustc -Ldependency=obj/src/lib/fdio/rust -Ldependency=obj/sdk/fidl/fuchsia.device/fuchsia.device-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol-rustc -Ldependency=obj/src/lib/fuchsia-runtime -Ldependency=obj/src/lib/fuchsia-component -Ldependency=obj/garnet/lib/rust/files_async -Ldependency=obj/sdk/fidl/fuchsia.io/fuchsia.io-rustc -Ldependency=obj/sdk/fidl/fuchsia.io2/fuchsia.io2-rustc -Ldependency=obj/sdk/fidl/fuchsia.mem/fuchsia.mem-rustc -Ldependency=obj/garnet/lib/rust/io_util -Ldependency=obj/sdk/fidl/fuchsia.sys/fuchsia.sys-rustc -Ldependency=obj/sdk/fidl/fuchsia.sys2/fuchsia.sys2-rustc -Ldependency=obj/sdk/fidl/fuchsia.component/fuchsia.component-rustc -Ldependency=obj/sdk/fidl/fuchsia.data/fuchsia.data-rustc -Ldependency=obj/sdk/fidl/fuchsia.url/fuchsia.url-rustc -Ldependency=obj/src/lib/syslog/rust -Ldependency=obj/sdk/fidl/fuchsia.logger/fuchsia.logger-rustc -Ldependency=obj/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics-rustc -Ldependency=obj/src/lib/watch_handler -Lnative=obj/sdk/lib/syslog/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem -Lnative=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp -Lnative=obj/out/core.x64/fidling/gen/zircon/vdso/zx -Lnative=obj/sdk/lib/fidl/cpp/internal -Lnative=obj/sdk/lib/fidl/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger -Lnative=obj/sdk/lib/syslog/streams/cpp -Lnative=user.libc_x64/obj/zircon/system/ulib/c -Lnative=x64-shared/lib.unstripped -Lnative=obj/sdk/lib/fit -Lnative=obj/sdk/lib/stdcompat -Lnative=obj/zircon/system/ulib/fidl -Lnative=obj/sdk/lib/fit-promise -Lnative=obj/zircon/system/ulib/zx -Lnative=obj/zircon/system/ulib/async -Lnative=user.libc_x64 -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp/zx_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -Clink-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -Clink-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -Clink-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -Clink-arg=obj/sdk/lib/fit/libfit.a -Clink-arg=obj/sdk/lib/stdcompat/libstdcompat.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -Clink-arg=obj/sdk/lib/fit-promise/libfit-promise.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl.a -Clink-arg=obj/zircon/system/ulib/zx/libzx.a -Clink-arg=obj/zircon/system/ulib/async/libasync.a -Clink-arg=x64-shared/lib.unstripped/libasync-default.so -Clink-arg=x64-shared/lib.unstripped/libfdio.so -Clink-arg=x64-shared/lib.unstripped/libsyslog.so -Clink-arg=user.libc_x64/libc.so.debug -Lnative=../../build/config/zircon/libc-dummy -Clink-arg=libzircon.so --extern fidl_fuchsia_hardware_backlight=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc/libfidl_fuchsia_hardware_backlight.rlib --extern fidl_fuchsia_hardware_input=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc/libfidl_fuchsia_hardware_input.rlib --extern fidl_fuchsia_ui_brightness=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc/libfidl_fuchsia_ui_brightness.rlib --extern fidl_fuchsia_ui_input=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc/libfidl_fuchsia_ui_input.rlib --extern fdio=obj/src/lib/fdio/rust/libfdio.rlib --extern fidl=obj/src/lib/fidl/rust/fidl/libfidl.rlib --extern fuchsia_async=obj/src/lib/fuchsia-async/libfuchsia_async.rlib --extern fuchsia_component=obj/src/lib/fuchsia-component/libfuchsia_component.rlib --extern fuchsia_runtime=obj/src/lib/fuchsia-runtime/libfuchsia_runtime.rlib --extern fuchsia_syslog=obj/src/lib/syslog/rust/libfuchsia_syslog.rlib --extern watch_handler=obj/src/lib/watch_handler/libwatch_handler.rlib --extern fuchsia_zircon=obj/src/lib/zircon/rust/libfuchsia_zircon.rlib --extern anyhow=obj/third_party/rust_crates/libanyhow-34b5b8ef286e2000.rlib --extern async_trait=host_x64/libasync_trait-c6b6d222802967e6.so --extern byteorder=obj/third_party/rust_crates/libbyteorder-e4429ddc31d502a7.rlib --extern futures=obj/third_party/rust_crates/libfutures-3c827392713a33d4.rlib --extern futures_util=obj/third_party/rust_crates/libfutures_util-9cbfc1877c4fcb4.rlib --extern lazy_static=obj/third_party/rust_crates/liblazy_static-cdf593bd3fb3d68f.rlib --extern num_traits=obj/third_party/rust_crates/libnum_traits-a6e1ee504861eea7.rlib --extern parking_lot=obj/third_party/rust_crates/libparking_lot-6721767503fecbee.rlib --extern serde=obj/third_party/rust_crates/libserde-51abe0aa53b0d3ac.rlib --extern serde_json=obj/third_party/rust_crates/libserde_json-7635f31531fde4db.rlib --extern splines=obj/third_party/rust_crates/libsplines-d1b51f4ec5d923f7.rlib --extern thiserror=obj/third_party/rust_crates/libthiserror-dcdc66d3bbb690d3.rlib && ../../prebuilt/third_party/python3/linux-x64/bin/python3.8 -S ../../build/gn/verify_depfile.py -t "//src/ui/bin/brightness_manager:bin" -d ./brightness_manager.d ../../src/ui/bin/brightness_manager/src/backlight.rs ../../src/ui/bin/brightness_manager/src/control.rs ../../src/ui/bin/brightness_manager/src/main.rs ../../src/ui/bin/brightness_manager/src/sender_channel.rs ../../src/ui/bin/brightness_manager/src/sensor.rs && ../../prebuilt/third_party/clang/linux-x64/bin/llvm-objcopy --strip-sections "./exe.unstripped/brightness_manager" "./brightness_manager" && ../../prebuilt/tools/buildidtool/linux-x64/buildidtool -build-id-dir .build-id -stamp "./brightness_manager.build-id.stamp" -entry "=./brightness_manager" -entry ".debug=./exe.unstripped/brightness_manager"
error: internal compiler error: compiler/rustc_mir/src/transform/generator.rs:756:13: Broken MIR: generator contains type impl futures::Future in MIR, but typeck only knows about for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {ResumeTy, ServiceFs<ServiceObjLocal<'r, ControlRequestStream>>, impl futures::Future, (), Backlight, Arc<futures::lock::Mutex<Backlight>>, impl futures::Future, Sensor, Arc<futures::lock::Mutex<Sensor>>, SenderChannel<f32>, Arc<futures::lock::Mutex<SenderChannel<f32>>>, SenderChannel<bool>, Arc<futures::lock::Mutex<SenderChannel<bool>>>, Arc<futures::lock::Mutex<(dyn SensorControl + 's)>>, Arc<futures::lock::Mutex<(dyn BacklightControl + 't0)>>, impl futures::Future, Control, Arc<futures::lock::Mutex<Control>>, fn(ControlRequestStream, Arc<futures::lock::Mutex<(dyn ControlTrait + 't1)>>) -> Pin<Box<(dyn futures::Future<Output = Result<(), anyhow::Error>> + 't2)>>, Arc<futures::lock::Mutex<(dyn ControlTrait + 't3)>>, impl futures::Future}
   --> ../../src/ui/bin/brightness_manager/src/main.rs:154:10
    |
154 | async fn main() -> Result<(), Error> {
    |          ^^^^

thread 'rustc' panicked at 'Box<Any>', /usr/local/google/home/richkadel/rust/library/std/src/panic.rs:59:5
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::span_bug
   3: rustc_errors::Handler::span_bug
   4: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt::{{closure}}
   6: rustc_middle::ty::context::tls::with_opt
   7: rustc_middle::util::bug::opt_span_bug_fmt
   8: rustc_middle::util::bug::span_bug_fmt
   9: <rustc_mir::transform::generator::StateTransform as rustc_mir::transform::MirPass>::run_pass
  10: rustc_mir::transform::run_passes
  11: rustc_mir::transform::optimized_mir
  12: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  13: rustc_data_structures::stack::ensure_sufficient_stack
  14: rustc_query_system::query::plumbing::force_query_with_job
  15: rustc_query_system::query::plumbing::get_query_impl
  16: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  17: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::generator_layout
  18: rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached
  19: rustc_middle::ty::layout::layout_raw
  20: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute
  21: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  22: rustc_data_structures::stack::ensure_sufficient_stack
  23: rustc_query_system::query::plumbing::force_query_with_job
  24: rustc_query_system::query::plumbing::get_query_impl
  25: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw
  26: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
  27: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  28: <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold
  29: <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter
  30: rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached
  31: rustc_middle::ty::layout::layout_raw
  32: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute
  33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  34: rustc_data_structures::stack::ensure_sufficient_stack
  35: rustc_query_system::query::plumbing::force_query_with_job
  36: rustc_query_system::query::plumbing::get_query_impl
  37: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw
  38: <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of
  39: <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass
  40: rustc_mir::transform::run_passes
  41: rustc_mir::transform::optimized_mir
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  43: rustc_data_structures::stack::ensure_sufficient_stack
  44: rustc_query_system::query::plumbing::force_query_with_job
  45: rustc_query_system::query::plumbing::get_query_impl
  46: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir
  47: rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::instance_mir
  48: rustc_mir::monomorphize::collector::collect_neighbours
  49: rustc_mir::monomorphize::collector::collect_items_rec
  50: rustc_session::utils::<impl rustc_session::session::Session>::time
  51: rustc_mir::monomorphize::collector::collect_crate_mono_items
  52: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items
  53: rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute
  54: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  55: rustc_data_structures::stack::ensure_sufficient_stack
  56: rustc_query_system::query::plumbing::force_query_with_job
  57: rustc_query_system::query::plumbing::get_query_impl
  58: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items
  59: <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate
  60: rustc_interface::passes::QueryContext::enter
  61: rustc_interface::queries::Queries::ongoing_codegen
  62: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  63: rustc_span::with_source_map
  64: rustc_interface::interface::create_compiler_and_run
  65: scoped_tls::ScopedKey<T>::set
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.53.0-nightly (2d280e569 2021-04-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z dep-info-omit-d-target -Z allow-features= -Z panic_abort_tests -C link-args=--Map=./exe.unstripped/brightness_manager.map -C linker=/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=gen/zircon/public/sysroot/cpp -C link-arg=-L/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -C prefer-dynamic -C link-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp/zx_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -C link-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -C link-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -C link-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -C link-arg=obj/sdk/lib/fit/libfit.a -C link-arg=obj/sdk/lib/stdcompat/libstdcompat.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -C link-arg=obj/sdk/lib/fit-promise/libfit-promise.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl.a -C link-arg=obj/zircon/system/ulib/zx/libzx.a -C link-arg=obj/zircon/system/ulib/async/libasync.a -C link-arg=x64-shared/lib.unstripped/libasync-default.so -C link-arg=x64-shared/lib.unstripped/libfdio.so -C link-arg=x64-shared/lib.unstripped/libsyslog.so -C link-arg=user.libc_x64/libc.so.debug -C link-arg=libzircon.so --crate-type bin

query stack during panic:
#0 [optimized_mir] optimizing MIR for `main::func::{closure#0}`
#1 [layout_raw] computing layout of `[static generator@../../src/ui/bin/brightness_manager/src/main.rs:154:10: 154:14 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<'r, fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/backlight.rs:30:52: 34:6 {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:97:34: 106:6 {std::future::ResumeTy, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:32:54: 50:2 for<'t6, 't7, 't8> {std::future::ResumeTy, &'t6 str, &'t7 std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &'t8 fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 's)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't0)>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/control.rs:161:18: 188:6 for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 't6)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't7)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &'t8 futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<'t9, control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't1)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + 't2)>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't3)>>, impl futures::Future}]`
#2 [layout_raw] computing layout of `std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/main.rs:154:10: 154:14 for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<'r, fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/backlight.rs:30:52: 34:6 {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:97:34: 106:6 {std::future::ResumeTy, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/sensor.rs:32:54: 50:2 for<'t6, 't7, 't8> {std::future::ResumeTy, &'t6 str, &'t7 std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &'t8 fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 's)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't0)>>, std::future::from_generator::GenFuture<[static generator@../../src/ui/bin/brightness_manager/src/control.rs:161:18: 188:6 for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + 't6)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + 't7)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &'t8 futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<'t9, control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't1)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + 't2)>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + 't3)>>, impl futures::Future}]>`
#3 [optimized_mir] optimizing MIR for `main`
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items
end of query stack
error: aborting due to previous error

@richkadel

This comment has been minimized.

@richkadel
Copy link
Contributor Author

I need to try that again (the -Zverbose)

@richkadel
Copy link
Contributor Author

OK, this has -Zverbose:

$ /usr/local/google/home/richkadel/rust/install/fuchsia-rust/bin/rustc -Zverbose --color=always --crate-name brightness_manager ../../src/ui/bin/brightness_manager/src/main.rs --crate-type bin --emit=dep-info=./brightness_manager.d,link -Zdep-info-omit-d-target -C link-args=--Map="./exe.unstripped/brightness_manager.map" --cfg=rust_panic=\"abort\" --cfg=__rust_toolchain=\"1\" -L gen/zircon/public/sysroot/cpp/lib -Clinker=/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -Clink-arg=--sysroot=gen/zircon/public/sysroot/cpp -Clink-arg=-L/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -Clink-arg=--pack-dyn-relocs=relr -Clink-arg=-dynamic-linker=ld.so.1 -Clink-arg=--icf=all --remap-path-prefix /usr/local/google/home/richkadel/fuchsia/=../../ -Cforce-frame-pointers -Copt-level=0 -Cdebuginfo=2 --edition=2018 -Zallow-features= --target x86_64-fuchsia --cap-lints=deny -Wrust-2018-idioms -Dwarnings -Clink-args=-zstack-size=0x200000 -Cpanic=abort -Cforce-unwind-tables=yes -Zpanic_abort_tests -Cprefer-dynamic -o "./exe.unstripped/brightness_manager" -Ldependency=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc -Ldependency=obj/src/lib/fidl/rust/fidl -Ldependency=obj/src/lib/fuchsia-async -Ldependency=host_x64 -Ldependency=obj/src/lib/fuchsia-system-alloc -Ldependency=obj/src/lib/zircon/rust -Ldependency=obj/third_party/rust_crates -Ldependency=obj/src/lib/zerocopy -Ldependency=obj/zircon/vdso/zx/zx-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input2/fuchsia.ui.input2-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.views/fuchsia.ui.views-rustc -Ldependency=obj/sdk/fidl/fuchsia.ui.input3/fuchsia.ui.input3-rustc -Ldependency=obj/sdk/fidl/fuchsia.input/fuchsia.input-rustc -Ldependency=obj/src/lib/fdio/rust -Ldependency=obj/sdk/fidl/fuchsia.device/fuchsia.device-rustc -Ldependency=obj/sdk/fidl/fuchsia.hardware.power.statecontrol/fuchsia.hardware.power.statecontrol-rustc -Ldependency=obj/src/lib/fuchsia-runtime -Ldependency=obj/src/lib/fuchsia-component -Ldependency=obj/garnet/lib/rust/files_async -Ldependency=obj/sdk/fidl/fuchsia.io/fuchsia.io-rustc -Ldependency=obj/sdk/fidl/fuchsia.io2/fuchsia.io2-rustc -Ldependency=obj/sdk/fidl/fuchsia.mem/fuchsia.mem-rustc -Ldependency=obj/garnet/lib/rust/io_util -Ldependency=obj/sdk/fidl/fuchsia.sys/fuchsia.sys-rustc -Ldependency=obj/sdk/fidl/fuchsia.sys2/fuchsia.sys2-rustc -Ldependency=obj/sdk/fidl/fuchsia.component/fuchsia.component-rustc -Ldependency=obj/sdk/fidl/fuchsia.data/fuchsia.data-rustc -Ldependency=obj/sdk/fidl/fuchsia.url/fuchsia.url-rustc -Ldependency=obj/src/lib/syslog/rust -Ldependency=obj/sdk/fidl/fuchsia.logger/fuchsia.logger-rustc -Ldependency=obj/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics-rustc -Ldependency=obj/src/lib/watch_handler -Lnative=obj/sdk/lib/syslog/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem -Lnative=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp -Lnative=obj/out/core.x64/fidling/gen/zircon/vdso/zx -Lnative=obj/sdk/lib/fidl/cpp/internal -Lnative=obj/sdk/lib/fidl/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp -Lnative=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger -Lnative=obj/sdk/lib/syslog/streams/cpp -Lnative=user.libc_x64/obj/zircon/system/ulib/c -Lnative=x64-shared/lib.unstripped -Lnative=obj/sdk/lib/fit -Lnative=obj/sdk/lib/stdcompat -Lnative=obj/zircon/system/ulib/fidl -Lnative=obj/sdk/lib/fit-promise -Lnative=obj/zircon/system/ulib/zx -Lnative=obj/zircon/system/ulib/async -Lnative=user.libc_x64 -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -Clink-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp/zx_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -Clink-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -Clink-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -Clink-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -Clink-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -Clink-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -Clink-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -Clink-arg=obj/sdk/lib/fit/libfit.a -Clink-arg=obj/sdk/lib/stdcompat/libstdcompat.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -Clink-arg=obj/sdk/lib/fit-promise/libfit-promise.a -Clink-arg=obj/zircon/system/ulib/fidl/libfidl.a -Clink-arg=obj/zircon/system/ulib/zx/libzx.a -Clink-arg=obj/zircon/system/ulib/async/libasync.a -Clink-arg=x64-shared/lib.unstripped/libasync-default.so -Clink-arg=x64-shared/lib.unstripped/libfdio.so -Clink-arg=x64-shared/lib.unstripped/libsyslog.so -Clink-arg=user.libc_x64/libc.so.debug -Lnative=../../build/config/zircon/libc-dummy -Clink-arg=libzircon.so --extern fidl_fuchsia_hardware_backlight=obj/sdk/fidl/fuchsia.hardware.backlight/fuchsia.hardware.backlight-rustc/libfidl_fuchsia_hardware_backlight.rlib --extern fidl_fuchsia_hardware_input=obj/sdk/fidl/fuchsia.hardware.input/fuchsia.hardware.input-rustc/libfidl_fuchsia_hardware_input.rlib --extern fidl_fuchsia_ui_brightness=obj/sdk/fidl/fuchsia.ui.brightness/fuchsia.ui.brightness-rustc/libfidl_fuchsia_ui_brightness.rlib --extern fidl_fuchsia_ui_input=obj/sdk/fidl/fuchsia.ui.input/fuchsia.ui.input-rustc/libfidl_fuchsia_ui_input.rlib --extern fdio=obj/src/lib/fdio/rust/libfdio.rlib --extern fidl=obj/src/lib/fidl/rust/fidl/libfidl.rlib --extern fuchsia_async=obj/src/lib/fuchsia-async/libfuchsia_async.rlib --extern fuchsia_component=obj/src/lib/fuchsia-component/libfuchsia_component.rlib --extern fuchsia_runtime=obj/src/lib/fuchsia-runtime/libfuchsia_runtime.rlib --extern fuchsia_syslog=obj/src/lib/syslog/rust/libfuchsia_syslog.rlib --extern watch_handler=obj/src/lib/watch_handler/libwatch_handler.rlib --extern fuchsia_zircon=obj/src/lib/zircon/rust/libfuchsia_zircon.rlib --extern anyhow=obj/third_party/rust_crates/libanyhow-34b5b8ef286e2000.rlib --extern async_trait=host_x64/libasync_trait-c6b6d222802967e6.so --extern byteorder=obj/third_party/rust_crates/libbyteorder-e4429ddc31d502a7.rlib --extern futures=obj/third_party/rust_crates/libfutures-3c827392713a33d4.rlib --extern futures_util=obj/third_party/rust_crates/libfutures_util-9cbfc1877c4fcb4.rlib --extern lazy_static=obj/third_party/rust_crates/liblazy_static-cdf593bd3fb3d68f.rlib --extern num_traits=obj/third_party/rust_crates/libnum_traits-a6e1ee504861eea7.rlib --extern parking_lot=obj/third_party/rust_crates/libparking_lot-6721767503fecbee.rlib --extern serde=obj/third_party/rust_crates/libserde-51abe0aa53b0d3ac.rlib --extern serde_json=obj/third_party/rust_crates/libserde_json-7635f31531fde4db.rlib --extern splines=obj/third_party/rust_crates/libsplines-d1b51f4ec5d923f7.rlib --extern thiserror=obj/third_party/rust_crates/libthiserror-dcdc66d3bbb690d3.rlib
error: internal compiler error: compiler/rustc_mir/src/transform/generator.rs:756:13: Broken MIR: generator contains type Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>]) in MIR, but typeck only knows about for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {ResumeTy, ServiceFs<ServiceObjLocal<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }), ControlRequestStream>>, Opaque(DefId(0:111 ~ brightness_manager[317d]::backlight::{impl#0}::new::{opaque#0}), []), (), Backlight, Arc<futures::lock::Mutex<Backlight>>, Opaque(DefId(0:436 ~ brightness_manager[317d]::sensor::{impl#0}::new::{opaque#0}), []), Sensor, Arc<futures::lock::Mutex<Sensor>>, SenderChannel<f32>, Arc<futures::lock::Mutex<SenderChannel<f32>>>, SenderChannel<bool>, Arc<futures::lock::Mutex<SenderChannel<bool>>>, Arc<futures::lock::Mutex<(dyn SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }))>>, Arc<futures::lock::Mutex<(dyn BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }))>>, Opaque(DefId(0:280 ~ brightness_manager[317d]::control::{impl#5}::new::{opaque#0}), []), Control, Arc<futures::lock::Mutex<Control>>, fn(ControlRequestStream, Arc<futures::lock::Mutex<(dyn ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 3, kind: BrNamed('t1) }))>>) -> Pin<Box<(dyn futures::Future<Output = Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 4, kind: BrNamed('t2) }))>>, Arc<futures::lock::Mutex<(dyn ControlTrait + ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t3) }))>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>])}
   --> ../../src/ui/bin/brightness_manager/src/main.rs:154:10
    |
154 | async fn main() -> Result<(), Error> {
    |          ^^^^

thread 'rustc' panicked at 'Box<Any>', /usr/local/google/home/richkadel/rust/library/std/src/panic.rs:59:5
stack backtrace:
   0:     0x7f41fe3736c0 - std::backtrace_rs::backtrace::libunwind::trace::h3070b301bb5ab74e
                               at /usr/local/google/home/richkadel/rust/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7f41fe3736c0 - std::backtrace_rs::backtrace::trace_unsynchronized::h7dc08349d0fccbdb
                               at /usr/local/google/home/richkadel/rust/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7f41fe3736c0 - std::sys_common::backtrace::_print_fmt::hf0a8b45a4142c4c8
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7f41fe3736c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9fcd8c5a937d304b
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7f41fe3ee2ef - core::fmt::write::h66ce6b9f5c3dd1ae
                               at /usr/local/google/home/richkadel/rust/library/core/src/fmt/mod.rs:1094:17
   5:     0x7f41fe367d25 - std::io::Write::write_fmt::h73b66a0a6c7e21cb
                               at /usr/local/google/home/richkadel/rust/library/std/src/io/mod.rs:1578:15
   6:     0x7f41fe3772fb - std::sys_common::backtrace::_print::h7235368ebf13bc36
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7f41fe3772fb - std::sys_common::backtrace::print::h6646fe3fd64eb87e
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7f41fe3772fb - std::panicking::default_hook::{{closure}}::h9d50014b1a836df3
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:208:50
   9:     0x7f41fe376ddd - std::panicking::default_hook::h0dc17d3ed8af201e
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:225:9
  10:     0x7f41ff4b9f08 - rustc_driver::report_ice::hf9ac142861742502
  11:     0x7f41de70f8d3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h76ac0e733404f6ba
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1560:9
  12:     0x7f41de70c916 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hbcde13bfc6eca3f3
                               at /usr/local/google/home/richkadel/rust/library/proc_macro/src/bridge/client.rs:320:21
  13:     0x7f41fe377b80 - std::panicking::rust_panic_with_hook::h795bd5f87591701f
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:595:17
  14:     0x7f4200b2e3c0 - std::panicking::begin_panic::{{closure}}::h67f28f272ba5b299
  15:     0x7f4200b2e289 - std::sys_common::backtrace::__rust_end_short_backtrace::h97fb83ee94bace97
  16:     0x7f4200b2e342 - std::panicking::begin_panic::h9467f1cbeb0680aa
  17:     0x7f4200960b30 - std::panic::panic_any::h47ac84098d20382f
  18:     0x7f420095d405 - rustc_errors::HandlerInner::span_bug::hd47e97195754211a
  19:     0x7f420095d8c3 - rustc_errors::Handler::span_bug::ha07d3f2efbc4b3d3
  20:     0x7f420091d4c0 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h12cd570e8acb76b4
  21:     0x7f420091c5cb - rustc_middle::ty::context::tls::with_opt::{{closure}}::h7aa59fd781092bae
  22:     0x7f420091c57a - rustc_middle::ty::context::tls::with_opt::h0acb529f18cf2f6c
  23:     0x7f420091d3d3 - rustc_middle::util::bug::opt_span_bug_fmt::hc86428558dc512b5
  24:     0x7f420091d397 - rustc_middle::util::bug::span_bug_fmt::h9e46786f09ae7929
  25:     0x7f420084d517 - <rustc_mir::transform::generator::StateTransform as rustc_mir::transform::MirPass>::run_pass::h35fb8f3bebb5fa76
  26:     0x7f4200a53580 - rustc_mir::transform::run_passes::hadd0ed6897143b9e
  27:     0x7f4200a59509 - rustc_mir::transform::optimized_mir::h39ed0b27b4aefc95
  28:     0x7f420043c5b9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hd2659dfa0ecf2f94
  29:     0x7f42004facef - rustc_data_structures::stack::ensure_sufficient_stack::h005ce2d6bf554ae7
  30:     0x7f4200139e68 - rustc_query_system::query::plumbing::force_query_with_job::h18c0a204e19f48b1
  31:     0x7f42000bbfe9 - rustc_query_system::query::plumbing::get_query_impl::h7b8f88aa3b9abc9b
  32:     0x7f42003b45bc - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir::h6781c46c4fe79c1b
  33:     0x7f420179f897 - rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::generator_layout::h2c9a7f7e78ab7724
  34:     0x7f4201868dc1 - rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached::h64afc7180f63c225
  35:     0x7f4201864be3 - rustc_middle::ty::layout::layout_raw::h18811fb33f919669
  36:     0x7f42001d0a53 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute::haa2138f32522ab2b
  37:     0x7f420042a886 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9900c6a25fa944b2
  38:     0x7f420051725e - rustc_data_structures::stack::ensure_sufficient_stack::had5614b0d10064a9
  39:     0x7f4200150ac2 - rustc_query_system::query::plumbing::force_query_with_job::h87be078355284b1c
  40:     0x7f420009f4e8 - rustc_query_system::query::plumbing::get_query_impl::h3efad482f5b7ac0d
  41:     0x7f42003b96fd - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw::h637bf42247bed6c9
  42:     0x7f4201874643 - <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::he37b273ad2a07ac3
  43:     0x7f42018114e3 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h0737e81a2d4725ad
  44:     0x7f42017b7541 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h0916a09c46063fdd
  45:     0x7f420181b501 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hde16bed4df464c63
  46:     0x7f420186921c - rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached::h64afc7180f63c225
  47:     0x7f4201864be3 - rustc_middle::ty::layout::layout_raw::h18811fb33f919669
  48:     0x7f42001d0a53 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute::haa2138f32522ab2b
  49:     0x7f420042a886 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9900c6a25fa944b2
  50:     0x7f420051725e - rustc_data_structures::stack::ensure_sufficient_stack::had5614b0d10064a9
  51:     0x7f4200150ac2 - rustc_query_system::query::plumbing::force_query_with_job::h87be078355284b1c
  52:     0x7f420009f4e8 - rustc_query_system::query::plumbing::get_query_impl::h3efad482f5b7ac0d
  53:     0x7f42003b96fd - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw::h637bf42247bed6c9
  54:     0x7f4201874643 - <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::he37b273ad2a07ac3
  55:     0x7f420089a08d - <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass::he6bd2716bb6efaf5
  56:     0x7f4200a53580 - rustc_mir::transform::run_passes::hadd0ed6897143b9e
  57:     0x7f4200a59560 - rustc_mir::transform::optimized_mir::h39ed0b27b4aefc95
  58:     0x7f420043c5b9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hd2659dfa0ecf2f94
  59:     0x7f42004facef - rustc_data_structures::stack::ensure_sufficient_stack::h005ce2d6bf554ae7
  60:     0x7f4200139e68 - rustc_query_system::query::plumbing::force_query_with_job::h18c0a204e19f48b1
  61:     0x7f42000bbfe9 - rustc_query_system::query::plumbing::get_query_impl::h7b8f88aa3b9abc9b
  62:     0x7f42003b45bc - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir::h6781c46c4fe79c1b
  63:     0x7f420179e89b - rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::instance_mir::h2adcb21a67bb16aa
  64:     0x7f420094dcc8 - rustc_mir::monomorphize::collector::collect_neighbours::h1bbe0e2725316449
  65:     0x7f4200947348 - rustc_mir::monomorphize::collector::collect_items_rec::h43d412ee589f7bda
  66:     0x7f4200c83bf9 - rustc_session::utils::<impl rustc_session::session::Session>::time::h7a56f9b4149bfbea
  67:     0x7f4200945916 - rustc_mir::monomorphize::collector::collect_crate_mono_items::hf86b7fa3f70cb1f4
  68:     0x7f4200ccbe6c - rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items::ha60093a41932fa60
  69:     0x7f42001d1299 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute::h6a07781687f36953
  70:     0x7f420044432a - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hf2ef1b6c3a448afe
  71:     0x7f420051f34c - rustc_data_structures::stack::ensure_sufficient_stack::he2ad1d418c205690
  72:     0x7f420015616a - rustc_query_system::query::plumbing::force_query_with_job::ha07662fb9d448595
  73:     0x7f42000c5afd - rustc_query_system::query::plumbing::get_query_impl::h8c3d153258eb6b4b
  74:     0x7f42003bc9a0 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items::h45ac5f56bedc5b06
  75:     0x7f41ff772988 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h1b3edce9a41a8cd9
  76:     0x7f41ff612f7f - rustc_interface::passes::QueryContext::enter::hd53f7e1828200bf7
  77:     0x7f41ff61ec23 - rustc_interface::queries::Queries::ongoing_codegen::h95a8778005c3b397
  78:     0x7f41ff4c5873 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hc7b98d0ba93057dc
  79:     0x7f41ff4bbe1d - rustc_span::with_source_map::h681f81f772630eab
  80:     0x7f41ff4c681b - rustc_interface::interface::create_compiler_and_run::h78eeee49dabc90f2
  81:     0x7f41ff4ea980 - scoped_tls::ScopedKey<T>::set::hd80250aa98541d63
  82:     0x7f41ff4ecde0 - std::sys_common::backtrace::__rust_begin_short_backtrace::h77920e05c4fb0f5a
  83:     0x7f41ff4f8033 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hcac471670da73d1d
  84:     0x7f41fe388573 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfb93e846e02b3a24
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1546:9
  85:     0x7f41fe388573 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1b4addec7ba447a1
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1546:9
  86:     0x7f41fe388573 - std::sys::unix::thread::Thread::new::thread_start::h48d9f3e91a2da8f4
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys/unix/thread.rs:71:17
  87:     0x7f41fa5c0ea7 - start_thread
  88:     0x7f41fe196def - clone

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.53.0-nightly (2d280e569 2021-04-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z verbose -Z dep-info-omit-d-target -Z allow-features= -Z panic_abort_tests -C link-args=--Map=./exe.unstripped/brightness_manager.map -C linker=/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=gen/zircon/public/sysroot/cpp -C link-arg=-L/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -C prefer-dynamic -C link-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp/zx_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -C link-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -C link-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -C link-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -C link-arg=obj/sdk/lib/fit/libfit.a -C link-arg=obj/sdk/lib/stdcompat/libstdcompat.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -C link-arg=obj/sdk/lib/fit-promise/libfit-promise.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl.a -C link-arg=obj/zircon/system/ulib/zx/libzx.a -C link-arg=obj/zircon/system/ulib/async/libasync.a -C link-arg=x64-shared/lib.unstripped/libasync-default.so -C link-arg=x64-shared/lib.unstripped/libfdio.so -C link-arg=x64-shared/lib.unstripped/libsyslog.so -C link-arg=user.libc_x64/libc.so.debug -C link-arg=libzircon.so --crate-type bin

query stack during panic:
#0 [optimized_mir] optimizing MIR for `main::func::{closure#0}` [optimized_mir]
#1 [layout_raw] computing layout of `[static main::func::{closure#0} upvar_tys=() for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }), fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static backlight::<impl at ../../src/ui/bin/brightness_manager/src/backlight.rs:29:1: 64:2>::new::{closure#0} upvar_tys=() {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static sensor::<impl at ../../src/ui/bin/brightness_manager/src/sensor.rs:96:1: 115:2>::new::{closure#0} upvar_tys=() {std::future::ResumeTy, std::future::from_generator::GenFuture<[static sensor::open_sensor::{closure#0} upvar_tys=() for<'t6, 't7, 't8> {std::future::ResumeTy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }) str, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }) std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }))>>, std::future::from_generator::GenFuture<[static control::<impl at ../../src/ui/bin/brightness_manager/src/control.rs:154:1: 495:2>::new::{closure#0} upvar_tys=(std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>) for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }))>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t9) }), control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 3, kind: BrNamed('t1) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 4, kind: BrNamed('t2) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t3) }))>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>])}]` [layout_raw]
#2 [layout_raw] computing layout of `std::future::from_generator::GenFuture<[static main::func::{closure#0} upvar_tys=() for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }), fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static backlight::<impl at ../../src/ui/bin/brightness_manager/src/backlight.rs:29:1: 64:2>::new::{closure#0} upvar_tys=() {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static sensor::<impl at ../../src/ui/bin/brightness_manager/src/sensor.rs:96:1: 115:2>::new::{closure#0} upvar_tys=() {std::future::ResumeTy, std::future::from_generator::GenFuture<[static sensor::open_sensor::{closure#0} upvar_tys=() for<'t6, 't7, 't8> {std::future::ResumeTy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }) str, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }) std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }))>>, std::future::from_generator::GenFuture<[static control::<impl at ../../src/ui/bin/brightness_manager/src/control.rs:154:1: 495:2>::new::{closure#0} upvar_tys=(std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>) for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }))>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t9) }), control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 3, kind: BrNamed('t1) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 4, kind: BrNamed('t2) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t3) }))>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>])}]>` [layout_raw]
#3 [optimized_mir] optimizing MIR for `main` [optimized_mir]
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items [collect_and_partition_mono_items]
end of query stack
error: aborting due to previous error

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

Okay weird.
decl_ty is

Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [
	fn(
		fidl_fuchsia_ui_brightness::ControlRequestStream,
		std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>
	) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>
])

which makes sense, because we erased all bound vars

But witness has

Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [
	fn(
		fidl_fuchsia_ui_brightness::ControlRequestStream,
		std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>
	) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>
])

which looks the same except for the late bound regions, which I would have thought would have been replaced by ReErased in erase_late_bound_regions

@nikomatsakis
Copy link
Contributor

@jackh726 erase_late_bound_regions only erases one level of binders, i think, could that be related?

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

I mean, the bound vars in the witness are definitely bound correctly:
ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }) (bound by the Binder on GeneratorWitness types, not on the fn binders)

erase_late_bound_regions does descend through fns, so it should be seeing that bound var.

So, really not sure. Maybe the has_escaping_bound_vars isn't returning true on the witness.skip_binder()?

@richkadel
Copy link
Contributor Author

@tmandry suggested sharing the output of -Zunpretty=expanded:

https://gist.github.com/6d27a91c1c8e402a181ddc3d47bca747

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

@richkadel can I get you to try another patch for me? jackh726@fb97c61

I'm not expecting this to change anything, but running with -Zverbose should help debug some more.

I appreciate it!

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

It's important to note: the output that we saw above with from the decl that was erased is actually coming directly from Body (decl.ty not decl_ty) i.e. regions were already erased (good) and makes sense why erasing regions again didn't change anything. But I'm wondering if that normalize bit is causing problems.

@richkadel
Copy link
Contributor Author

error: internal compiler error: compiler/rustc_mir/src/transform/generator.rs:756:13: Broken MIR: generator contains type Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>]) in MIR, but typeck only knows about {ResumeTy, ServiceFs<ServiceObjLocal<ControlRequestStream>>, Opaque(DefId(0:111 ~ brightness_manager[317d]::backlight::{impl#0}::new::{opaque#0}), []), (), Backlight, Arc<futures::lock::Mutex<Backlight>>, Opaque(DefId(0:436 ~ brightness_manager[317d]::sensor::{impl#0}::new::{opaque#0}), []), Sensor, Arc<futures::lock::Mutex<Sensor>>, SenderChannel<f32>, Arc<futures::lock::Mutex<SenderChannel<f32>>>, SenderChannel<bool>, Arc<futures::lock::Mutex<SenderChannel<bool>>>, Arc<futures::lock::Mutex<(dyn SensorControl + ReErased)>>, Arc<futures::lock::Mutex<(dyn BacklightControl + ReErased)>>, Opaque(DefId(0:280 ~ brightness_manager[317d]::control::{impl#5}::new::{opaque#0}), []), Control, Arc<futures::lock::Mutex<Control>>, fn(ControlRequestStream, Arc<futures::lock::Mutex<(dyn ControlTrait + ReErased)>>) -> Pin<Box<(dyn futures::Future<Output = Result<(), anyhow::Error>> + ReErased)>>, Arc<futures::lock::Mutex<(dyn ControlTrait + ReErased)>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>])} and []
   --> ../../src/ui/bin/brightness_manager/src/main.rs:154:10
    |
154 | async fn main() -> Result<(), Error> {
    |          ^^^^

thread 'rustc' panicked at 'Box<Any>', /usr/local/google/home/richkadel/rust/library/std/src/panic.rs:59:5
stack backtrace:
   0:     0x7fda5841b6c0 - std::backtrace_rs::backtrace::libunwind::trace::h3070b301bb5ab74e
                               at /usr/local/google/home/richkadel/rust/library/std/src/../../backtrace/src/backtrace/libunwind.rs:90:5
   1:     0x7fda5841b6c0 - std::backtrace_rs::backtrace::trace_unsynchronized::h7dc08349d0fccbdb
                               at /usr/local/google/home/richkadel/rust/library/std/src/../../backtrace/src/backtrace/mod.rs:66:5
   2:     0x7fda5841b6c0 - std::sys_common::backtrace::_print_fmt::hf0a8b45a4142c4c8
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:67:5
   3:     0x7fda5841b6c0 - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::h9fcd8c5a937d304b
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:46:22
   4:     0x7fda584962ef - core::fmt::write::h66ce6b9f5c3dd1ae
                               at /usr/local/google/home/richkadel/rust/library/core/src/fmt/mod.rs:1094:17
   5:     0x7fda5840fd25 - std::io::Write::write_fmt::h73b66a0a6c7e21cb
                               at /usr/local/google/home/richkadel/rust/library/std/src/io/mod.rs:1578:15
   6:     0x7fda5841f2fb - std::sys_common::backtrace::_print::h7235368ebf13bc36
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:49:5
   7:     0x7fda5841f2fb - std::sys_common::backtrace::print::h6646fe3fd64eb87e
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys_common/backtrace.rs:36:9
   8:     0x7fda5841f2fb - std::panicking::default_hook::{{closure}}::h9d50014b1a836df3
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:208:50
   9:     0x7fda5841eddd - std::panicking::default_hook::h0dc17d3ed8af201e
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:225:9
  10:     0x7fda59562028 - rustc_driver::report_ice::hf9ac142861742502
  11:     0x7fda387af8d3 - <alloc::boxed::Box<F,A> as core::ops::function::Fn<Args>>::call::h76ac0e733404f6ba
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1560:9
  12:     0x7fda387ac916 - proc_macro::bridge::client::<impl proc_macro::bridge::Bridge>::enter::{{closure}}::{{closure}}::hbcde13bfc6eca3f3
                               at /usr/local/google/home/richkadel/rust/library/proc_macro/src/bridge/client.rs:320:21
  13:     0x7fda5841fb80 - std::panicking::rust_panic_with_hook::h795bd5f87591701f
                               at /usr/local/google/home/richkadel/rust/library/std/src/panicking.rs:595:17
  14:     0x7fda5abd65d0 - std::panicking::begin_panic::{{closure}}::h67f28f272ba5b299
  15:     0x7fda5abd6499 - std::sys_common::backtrace::__rust_end_short_backtrace::h97fb83ee94bace97
  16:     0x7fda5abd6552 - std::panicking::begin_panic::h9467f1cbeb0680aa
  17:     0x7fda5aa08cb0 - std::panic::panic_any::h47ac84098d20382f
  18:     0x7fda5aa05585 - rustc_errors::HandlerInner::span_bug::hd47e97195754211a
  19:     0x7fda5aa05a43 - rustc_errors::Handler::span_bug::ha07d3f2efbc4b3d3
  20:     0x7fda5a9c5640 - rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}::h12cd570e8acb76b4
  21:     0x7fda5a9c474b - rustc_middle::ty::context::tls::with_opt::{{closure}}::h7aa59fd781092bae
  22:     0x7fda5a9c46fa - rustc_middle::ty::context::tls::with_opt::h0acb529f18cf2f6c
  23:     0x7fda5a9c5553 - rustc_middle::util::bug::opt_span_bug_fmt::hc86428558dc512b5
  24:     0x7fda5a9c5517 - rustc_middle::util::bug::span_bug_fmt::h9e46786f09ae7929
  25:     0x7fda5a8f5791 - <rustc_mir::transform::generator::StateTransform as rustc_mir::transform::MirPass>::run_pass::h35fb8f3bebb5fa76
  26:     0x7fda5aafb700 - rustc_mir::transform::run_passes::hadd0ed6897143b9e
  27:     0x7fda5ab01689 - rustc_mir::transform::optimized_mir::h39ed0b27b4aefc95
  28:     0x7fda5a4e46d9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hd2659dfa0ecf2f94
  29:     0x7fda5a5a2e0f - rustc_data_structures::stack::ensure_sufficient_stack::h005ce2d6bf554ae7
  30:     0x7fda5a1e1f88 - rustc_query_system::query::plumbing::force_query_with_job::h18c0a204e19f48b1
  31:     0x7fda5a164109 - rustc_query_system::query::plumbing::get_query_impl::h7b8f88aa3b9abc9b
  32:     0x7fda5a45c6dc - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir::h6781c46c4fe79c1b
  33:     0x7fda5b847aa7 - rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::generator_layout::h2c9a7f7e78ab7724
  34:     0x7fda5b910fd1 - rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached::h64afc7180f63c225
  35:     0x7fda5b90cdf3 - rustc_middle::ty::layout::layout_raw::h18811fb33f919669
  36:     0x7fda5a278b73 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute::haa2138f32522ab2b
  37:     0x7fda5a4d29a6 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9900c6a25fa944b2
  38:     0x7fda5a5bf37e - rustc_data_structures::stack::ensure_sufficient_stack::had5614b0d10064a9
  39:     0x7fda5a1f8be2 - rustc_query_system::query::plumbing::force_query_with_job::h87be078355284b1c
  40:     0x7fda5a147608 - rustc_query_system::query::plumbing::get_query_impl::h3efad482f5b7ac0d
  41:     0x7fda5a46181d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw::h637bf42247bed6c9
  42:     0x7fda5b91c853 - <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::he37b273ad2a07ac3
  43:     0x7fda5b8b96f3 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::h0737e81a2d4725ad
  44:     0x7fda5b85f751 - <core::iter::adapters::map::Map<I,F> as core::iter::traits::iterator::Iterator>::try_fold::h0916a09c46063fdd
  45:     0x7fda5b8c3711 - <alloc::vec::Vec<T> as alloc::vec::spec_from_iter::SpecFromIter<T,I>>::from_iter::hde16bed4df464c63
  46:     0x7fda5b91142c - rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt>::layout_raw_uncached::h64afc7180f63c225
  47:     0x7fda5b90cdf3 - rustc_middle::ty::layout::layout_raw::h18811fb33f919669
  48:     0x7fda5a278b73 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::layout_raw>::compute::haa2138f32522ab2b
  49:     0x7fda5a4d29a6 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::h9900c6a25fa944b2
  50:     0x7fda5a5bf37e - rustc_data_structures::stack::ensure_sufficient_stack::had5614b0d10064a9
  51:     0x7fda5a1f8be2 - rustc_query_system::query::plumbing::force_query_with_job::h87be078355284b1c
  52:     0x7fda5a147608 - rustc_query_system::query::plumbing::get_query_impl::h3efad482f5b7ac0d
  53:     0x7fda5a46181d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::layout_raw::h637bf42247bed6c9
  54:     0x7fda5b91c853 - <rustc_middle::ty::layout::LayoutCx<rustc_middle::ty::context::TyCtxt> as rustc_target::abi::LayoutOf>::layout_of::he37b273ad2a07ac3
  55:     0x7fda5a94220d - <rustc_mir::transform::const_prop::ConstProp as rustc_mir::transform::MirPass>::run_pass::he6bd2716bb6efaf5
  56:     0x7fda5aafb700 - rustc_mir::transform::run_passes::hadd0ed6897143b9e
  57:     0x7fda5ab016e0 - rustc_mir::transform::optimized_mir::h39ed0b27b4aefc95
  58:     0x7fda5a4e46d9 - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hd2659dfa0ecf2f94
  59:     0x7fda5a5a2e0f - rustc_data_structures::stack::ensure_sufficient_stack::h005ce2d6bf554ae7
  60:     0x7fda5a1e1f88 - rustc_query_system::query::plumbing::force_query_with_job::h18c0a204e19f48b1
  61:     0x7fda5a164109 - rustc_query_system::query::plumbing::get_query_impl::h7b8f88aa3b9abc9b
  62:     0x7fda5a45c6dc - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::optimized_mir::h6781c46c4fe79c1b
  63:     0x7fda5b846aab - rustc_middle::ty::<impl rustc_middle::ty::context::TyCtxt>::instance_mir::h2adcb21a67bb16aa
  64:     0x7fda5a9f5e48 - rustc_mir::monomorphize::collector::collect_neighbours::h1bbe0e2725316449
  65:     0x7fda5a9ef4c8 - rustc_mir::monomorphize::collector::collect_items_rec::h43d412ee589f7bda
  66:     0x7fda5ad2be09 - rustc_session::utils::<impl rustc_session::session::Session>::time::h7a56f9b4149bfbea
  67:     0x7fda5a9eda96 - rustc_mir::monomorphize::collector::collect_crate_mono_items::hf86b7fa3f70cb1f4
  68:     0x7fda5ad7407c - rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items::ha60093a41932fa60
  69:     0x7fda5a2793b9 - rustc_query_impl::<impl rustc_query_system::query::config::QueryAccessors<rustc_query_impl::plumbing::QueryCtxt> for rustc_query_impl::queries::collect_and_partition_mono_items>::compute::h6a07781687f36953
  70:     0x7fda5a4ec44a - rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl::hf2ef1b6c3a448afe
  71:     0x7fda5a5c746c - rustc_data_structures::stack::ensure_sufficient_stack::he2ad1d418c205690
  72:     0x7fda5a1fe28a - rustc_query_system::query::plumbing::force_query_with_job::ha07662fb9d448595
  73:     0x7fda5a16dc1d - rustc_query_system::query::plumbing::get_query_impl::h8c3d153258eb6b4b
  74:     0x7fda5a464ac0 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::collect_and_partition_mono_items::h45ac5f56bedc5b06
  75:     0x7fda5981aaa8 - <rustc_codegen_llvm::LlvmCodegenBackend as rustc_codegen_ssa::traits::backend::CodegenBackend>::codegen_crate::h1b3edce9a41a8cd9
  76:     0x7fda596bb09f - rustc_interface::passes::QueryContext::enter::hd53f7e1828200bf7
  77:     0x7fda596c6d43 - rustc_interface::queries::Queries::ongoing_codegen::h95a8778005c3b397
  78:     0x7fda5956d993 - rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter::hc7b98d0ba93057dc
  79:     0x7fda59563f3d - rustc_span::with_source_map::h681f81f772630eab
  80:     0x7fda5956e93b - rustc_interface::interface::create_compiler_and_run::h78eeee49dabc90f2
  81:     0x7fda59592aa0 - scoped_tls::ScopedKey<T>::set::hd80250aa98541d63
  82:     0x7fda59594f00 - std::sys_common::backtrace::__rust_begin_short_backtrace::h77920e05c4fb0f5a
  83:     0x7fda595a0153 - core::ops::function::FnOnce::call_once{{vtable.shim}}::hcac471670da73d1d
  84:     0x7fda58430573 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::hfb93e846e02b3a24
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1546:9
  85:     0x7fda58430573 - <alloc::boxed::Box<F,A> as core::ops::function::FnOnce<Args>>::call_once::h1b4addec7ba447a1
                               at /usr/local/google/home/richkadel/rust/library/alloc/src/boxed.rs:1546:9
  86:     0x7fda58430573 - std::sys::unix::thread::Thread::new::thread_start::h48d9f3e91a2da8f4
                               at /usr/local/google/home/richkadel/rust/library/std/src/sys/unix/thread.rs:71:17
  87:     0x7fda54668ea7 - start_thread
  88:     0x7fda5823edef - clone

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.53.0-nightly (70010af2c 2021-04-01) running on x86_64-unknown-linux-gnu

note: compiler flags: -Z verbose -Z dep-info-omit-d-target -Z allow-features= -Z panic_abort_tests -C link-args=--Map=./exe.unstripped/brightness_manager.map -C linker=/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/bin/lld -C link-arg=--sysroot=gen/zircon/public/sysroot/cpp -C link-arg=-L/usr/local/google/home/richkadel/fuchsia/prebuilt/third_party/clang/linux-x64/lib/clang/13.0.0/x86_64-fuchsia/lib -C link-arg=--pack-dyn-relocs=relr -C link-arg=-dynamic-linker=ld.so.1 -C link-arg=--icf=all -C force-frame-pointers -C opt-level=0 -C debuginfo=2 -C link-args=-zstack-size=0x200000 -C panic=abort -C force-unwind-tables=yes -C prefer-dynamic -C link-arg=obj/sdk/lib/syslog/cpp/cpp.log_settings.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/cpp.macros.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream/hlcpp/fuchsia/diagnostics/stream/cpp/fuchsia.diagnostics.stream_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics.stream/fuchsia.diagnostics.stream_tables.fuchsia.diagnostics.stream.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics/hlcpp/fuchsia/diagnostics/cpp/fuchsia.diagnostics_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.diagnostics/fuchsia.diagnostics_tables.fuchsia.diagnostics.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem/hlcpp/fuchsia/mem/cpp/fuchsia.mem_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.mem/fuchsia.mem_tables.fuchsia.mem.fidl.tables.c.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx/hlcpp/zx/cpp/zx_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/zircon/vdso/zx/zx_tables.zx.fidl.tables.c.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_handler.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.message_reader.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.pending_response.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.proxy_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp.weak_stub_controller.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.logging.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.message_sender.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/internal/cpp_sync.synchronous_proxy.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.builder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.clone.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.decoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.encoder.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_buffer.cc.o -C link-arg=obj/sdk/lib/fidl/cpp/cpp_base.message_builder.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger/hlcpp/fuchsia/logger/cpp/fuchsia.logger_hlcpp.fidl.cc.o -C link-arg=obj/out/core.x64/fidling/gen/sdk/fidl/fuchsia.logger/fuchsia.logger_tables.fuchsia.logger.fidl.tables.c.o -C link-arg=obj/sdk/lib/syslog/streams/cpp/streams-encoder.encode.cc.o -C link-arg=user.libc_x64/obj/zircon/system/ulib/c/crt1.Scrt1.cc.o -C link-arg=obj/sdk/lib/syslog/cpp/libbackend_fuchsia_lib_rust.a -C link-arg=x64-shared/lib.unstripped/libbackend_fuchsia_globals.so -C link-arg=obj/sdk/lib/fit/libfit.a -C link-arg=obj/sdk/lib/stdcompat/libstdcompat.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl_base.a -C link-arg=obj/sdk/lib/fit-promise/libfit-promise.a -C link-arg=obj/zircon/system/ulib/fidl/libfidl.a -C link-arg=obj/zircon/system/ulib/zx/libzx.a -C link-arg=obj/zircon/system/ulib/async/libasync.a -C link-arg=x64-shared/lib.unstripped/libasync-default.so -C link-arg=x64-shared/lib.unstripped/libfdio.so -C link-arg=x64-shared/lib.unstripped/libsyslog.so -C link-arg=user.libc_x64/libc.so.debug -C link-arg=libzircon.so --crate-type bin

query stack during panic:
#0 [optimized_mir] optimizing MIR for `main::func::{closure#0}` [optimized_mir]
#1 [layout_raw] computing layout of `[static main::func::{closure#0} upvar_tys=() for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }), fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static backlight::<impl at ../../src/ui/bin/brightness_manager/src/backlight.rs:29:1: 64:2>::new::{closure#0} upvar_tys=() {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static sensor::<impl at ../../src/ui/bin/brightness_manager/src/sensor.rs:96:1: 115:2>::new::{closure#0} upvar_tys=() {std::future::ResumeTy, std::future::from_generator::GenFuture<[static sensor::open_sensor::{closure#0} upvar_tys=() for<'t6, 't7, 't8> {std::future::ResumeTy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }) str, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }) std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }))>>, std::future::from_generator::GenFuture<[static control::<impl at ../../src/ui/bin/brightness_manager/src/control.rs:154:1: 495:2>::new::{closure#0} upvar_tys=(std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>) for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }))>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t9) }), control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 3, kind: BrNamed('t1) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 4, kind: BrNamed('t2) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t3) }))>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>])}]` [layout_raw]
#2 [layout_raw] computing layout of `std::future::from_generator::GenFuture<[static main::func::{closure#0} upvar_tys=() for<'r, 's, 't0, 't1, 't2, 't3, 't4, 't5> {std::future::ResumeTy, fuchsia_component::server::ServiceFs<fuchsia_component::server::ServiceObjLocal<ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('r) }), fidl_fuchsia_ui_brightness::ControlRequestStream>>, std::future::from_generator::GenFuture<[static backlight::<impl at ../../src/ui/bin/brightness_manager/src/backlight.rs:29:1: 64:2>::new::{closure#0} upvar_tys=() {}]>, (), backlight::Backlight, std::sync::Arc<futures::lock::Mutex<backlight::Backlight>>, std::future::from_generator::GenFuture<[static sensor::<impl at ../../src/ui/bin/brightness_manager/src/sensor.rs:96:1: 115:2>::new::{closure#0} upvar_tys=() {std::future::ResumeTy, std::future::from_generator::GenFuture<[static sensor::open_sensor::{closure#0} upvar_tys=() for<'t6, 't7, 't8> {std::future::ResumeTy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }) str, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }) std::path::Path, std::fs::ReadDir, std::result::Result<std::fs::DirEntry, std::io::Error>, std::fs::DirEntry, fidl_fuchsia_hardware_input::DeviceProxy, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) fidl_fuchsia_hardware_input::DeviceProxy, fidl::client::QueryResponseFut<std::vec::Vec<u8>>, ()}]>, ()}]>, sensor::Sensor, std::sync::Arc<futures::lock::Mutex<sensor::Sensor>>, sender_channel::SenderChannel<f32>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, sender_channel::SenderChannel<bool>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('s) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t0) }))>>, std::future::from_generator::GenFuture<[static control::<impl at ../../src/ui/bin/brightness_manager/src/control.rs:154:1: 495:2>::new::{closure#0} upvar_tys=(std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReErased)>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>) for<'t6, 't7, 't8, 't9> {std::future::ResumeTy, std::sync::Arc<futures::lock::Mutex<(dyn sensor::SensorControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 0, kind: BrNamed('t6) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn backlight::BacklightControl + ReLateBound(DebruijnIndex(0), BoundRegion { var: 1, kind: BrNamed('t7) }))>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<f32>>>, std::sync::Arc<futures::lock::Mutex<sender_channel::SenderChannel<bool>>>, std::sync::Arc<futures::lock::Mutex<std::option::Option<futures::future::AbortHandle>>>, &ReLateBound(DebruijnIndex(0), BoundRegion { var: 2, kind: BrNamed('t8) }) futures::lock::Mutex<control::BrightnessTable>, control::BRIGHTNESS_TABLE, futures::lock::MutexLockFuture<ReLateBound(DebruijnIndex(0), BoundRegion { var: 3, kind: BrNamed('t9) }), control::BrightnessTable>, ()}]>, control::Control, std::sync::Arc<futures::lock::Mutex<control::Control>>, fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 3, kind: BrNamed('t1) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 4, kind: BrNamed('t2) }))>>, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(0), BoundRegion { var: 5, kind: BrNamed('t3) }))>>, Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReLateBound(DebruijnIndex(1), BoundRegion { var: 6, kind: BrNamed('t4) }))>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReLateBound(DebruijnIndex(1), BoundRegion { var: 7, kind: BrNamed('t5) }))>>])}]>` [layout_raw]
#3 [optimized_mir] optimizing MIR for `main` [optimized_mir]
#4 [collect_and_partition_mono_items] collect_and_partition_mono_items [collect_and_partition_mono_items]
end of query stack
error: aborting due to previous error

@jackh726
Copy link
Member

jackh726 commented Apr 1, 2021

Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>])

not found in

[
Opaque(DefId(0:456 ~ brightness_manager[317d]::run_brightness_service::{opaque#0}), [fn(fidl_fuchsia_ui_brightness::ControlRequestStream, std::sync::Arc<futures::lock::Mutex<(dyn control::ControlTrait + ReErased)>>) -> std::pin::Pin<std::boxed::Box<(dyn futures::Future<Output = std::result::Result<(), anyhow::Error>> + ReErased)>>])
]

umm...hashing issue?

@Fishrock123
Copy link
Contributor

Fishrock123 commented Apr 1, 2021

I believe I have also run into this issue compiling Tide as a dependency of tide-sqlx.
See this github run: https://github.com/eaze/tide-sqlx/runs/2249783716

log copied for posterity
    Checking tide v0.16.0
error: internal compiler error: compiler/rustc_mir/src/transform/generator.rs:751:13: Broken MIR: generator contains type Pin<Box<dyn std::future::Future<Output = std::result::Result<response::Response, http_types::Error>> + std::marker::Send>> in MIR, but typeck only knows about for<'r, 's, 't0> {ResumeTy, &'r F, request::Request<State>, middleware::Next<'s, State>, Pin<Box<(dyn std::future::Future<Output = std::result::Result<response::Response, http_types::Error>> + std::marker::Send + 't0)>>, ()}
  --> /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/middleware.rs:35:89
   |
35 |       async fn handle(&self, req: Request<State>, next: Next<'_, State>) -> crate::Result {
   |  _________________________________________________________________________________________^
36 | |         (self)(req, next).await
37 | |     }
   | |_____^

thread 'rustc' panicked at 'Box<Any>', /rustc/4fdac23f3171e2f8864d359a21da600dd3faafc9/library/std/src/panic.rs:59:5
note: run with `RUST_BACKTRACE=1` environment variable to display a 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.53.0-nightly (4fdac23f3 2021-03-31) 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 `middleware::<impl at /home/runner/.cargo/registry/src/github.com-1ecc6299db9ec823/tide-0.16.0/src/middleware.rs:24:1: 38:2>::handle::{closure#0}`
end of query stack
error: aborting due to previous error

error: could not compile `tide`

I'm not quite sure if I can get rustc -Vv from the github actions machine, but it did print out this:

note: rustc 1.53.0-nightly (4fdac23f3 2021-03-31) running on x86_64-unknown-linux-gnu

@Fishrock123
Copy link
Contributor

Some extra info - that was from running cargo +nightly doc --no-deps --features=docs, which we use to do #![cfg_attr(feature = "docs", feature(doc_cfg))].

@tmandry
Copy link
Member

tmandry commented Apr 2, 2021

@jyn514 Fuchsia is not a tier 1 target, so we run our own CI and build Fuchsia against every bors merge. We don't use nightly, but instead try to update to the latest tip-of-tree once a week. We do the same for clang.

A project of this size can exercise a lot of edge cases in the compiler, and we regularly find bugs in rustc and LLVM. The cost of fixing bugs is usually much lower right after they're introduced, so getting bug reports like this one up sooner than later is a big help (to everyone, hopefully). Without this we have ended up in a situation where we're blocked from updating the compiler for many weeks.

The other reason we do this is because we're doing active feature development in the compiler (source-based code coverage) and are testing it out in our own infrastructure. So breakage can create a situation where we're blocked from testing out those changes.

Breaking our rustc CI is not a huge deal, and we can always tolerate not updating the compiler one week. But the longer our CI is red and the further behind our production compiler gets, the more bugs can "sneak in" that will have to be unwound later. So we prefer to get it green as soon as we can.

I think this is helpful to the project overall. But of course it has to be balanced against other concerns, like the overall impact and (as in this case) the difficulty of reverting and re-landing a big change.

To be clear, I don't want us to be putting undue pressure on the project to revert a change because it inconveniences us. But if a fix isn't already in sight, it's worth asking the question. A clearer policy around when to revert might be helpful here; I think the release team has floated the idea of writing one before.

@jackh726
Copy link
Member

jackh726 commented Apr 3, 2021

Update: problem identified, just have to figure out best fix

@apiraino
Copy link
Contributor

apiraino commented Apr 6, 2021

Assigning priority as discussed as part of the Prioritization Working Group procedure and removing I-prioritize.

@rustbot label -I-prioritize +P-high

@rustbot rustbot added P-high High priority and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Apr 6, 2021
@richkadel
Copy link
Contributor Author

@jackh726 @nikomatsakis - We found a second compiler failure that only crops up when enabling -Zinstrument-coverage:

It breaks when compiling a third-party crate--arbitrary--for at least some versions of that crate. We are currently locking in version 0.4.0, but the arbitrary repo only tags back to 0.4.1. Fortunately, I can easily reproduce the error on both versions, so the instructions for anyone to repro this are fairly straightforward:

$ curl -L https://github.com/richkadel/arbitrary/archive/refs/tags/0.4.1.tar.gz --output arbitrary-0.4.1.tar.gz
$ tar xf arbitrary-0.4.1.tar.gz
$ arbitrary-0.4.1/src/lib.rs --crate-type rlib --edition=2018 --cfg=feature=\"derive\" --cfg=feature=\"derive_arbitrary\" -Zinstrument-coverage --extern derive_arbitrary=location/of/previously/built/libderive_arbitrary-707386e28fd45df8.so
error: symbol `_RINvMNtNtCsdUfrJSq0CiO_4core3ptr7mut_ptrOINtNtCsf2kEqRrZ9O4_5alloc3vec3VecINtNtBI_5boxed3BoxDNtNtNtNtB7_4iter6traits8iterator8Iteratorp4ItemcEL_EE4castuECshGpAVYOtgW1_3lib` is already defined

error: aborting due to previous error

The mangled name demangles to:

<*mut alloc::boxed::Box<dyn core::iter::traits::iterator::Iterator<Item = char>>>::cast::<()>

Is this error resolved by your proposed fix as well?

@richkadel
Copy link
Contributor Author

@jackh726 - So, I cherry-picked your proposed fix #83870 and unfortunately it still fails (for the problem I reported initially).

However it does fix the error I just reported above, with -Zinstrument-coverage.

I'll add a note to your PR, and provided the updated verbose output.

@tmandry
Copy link
Member

tmandry commented Apr 7, 2021

Cross posting from https://github.com/rust-lang/rust/pull/83870/files#issuecomment-814514317

We found the code that was triggering this. A closure was being coerced to a function pointer in an async fn. The unused for<'r> came out of that coercion somehow. Removing the type attribution on that binding fixed the ICE for us.

   let run_server: fn(
        stream: ControlRequestStream,
        control: Arc<Mutex<dyn ControlTrait>>,
   ) -> Pin<Box<dyn Future<Output = Result<(), Error>>>> =
        |stream, control| Box::pin(run_brightness_server(stream, control));

bors added a commit to rust-lang-ci/rust that referenced this issue Apr 9, 2021
…atsakis

Don't concatenate binders across types

Partially addresses rust-lang#83737

There's actually two issues that I uncovered in rust-lang#83737. The first is that we are concatenating bound vars across types, i.e. in
```
F: Fn(&()) -> &mut (dyn Future<Output = ()> + Unpin)
```
the bound vars on `Future` get set as `for<anon>` since those are the binders on `Fn(&()`. This is obviously wrong, since we should only concatenate directly nested trait refs. This is solved here by introducing a new `TraitRefBoundary` scope, that we put around the "syntactical" trait refs and basically don't allow concatenation across.

Now, this alone *shouldn't* be a super terrible problem. At least not until you consider the other issue, which is a much more elusive and harder to design a "perfect" fix. A repro can be seen in:
```
use core::future::Future;

async fn handle<F>(slf: &F)
where
    F: Fn(&()) -> &mut (dyn for<'a> Future<Output = ()> + Unpin),
{
    (slf)(&()).await;
}
```
Notice the `for<'a>` around `Future`. Here, `'a` is unused, so the `for<'a>` Binder gets changed to a `for<>` Binder in the generator witness, but the "local decl" still has it. This has heavy intersections with region anonymization and erasing. Luckily, it's not *super* common to find this unique set of circumstances. It only became apparently because of the first issue mentioned here. However, this *is* still a problem, so I'm leaving rust-lang#83737 open.

r? `@nikomatsakis`
fanninpm added a commit to fanninpm/glacier that referenced this issue Apr 9, 2021
@Alexendoo Alexendoo removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Apr 10, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Apr 10, 2021
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 29, 2021
Add HAS_RE_LATE_BOUND if there are bound vars

Fixes rust-lang#83737
Fixes rust-lang#84604

I can rename `HAS_RE_LATE_BOUND`, to something like `HAS_LATE_BOUND_VARS`.

r? `@nikomatsakis`
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 29, 2021
Add HAS_RE_LATE_BOUND if there are bound vars

Fixes rust-lang#83737
Fixes rust-lang#84604

I can rename `HAS_RE_LATE_BOUND`, to something like `HAS_LATE_BOUND_VARS`.

r? ``@nikomatsakis``
Dylan-DPC-zz pushed a commit to Dylan-DPC-zz/rust that referenced this issue Apr 29, 2021
Add HAS_RE_LATE_BOUND if there are bound vars

Fixes rust-lang#83737
Fixes rust-lang#84604

I can rename `HAS_RE_LATE_BOUND`, to something like `HAS_LATE_BOUND_VARS`.

r? ```@nikomatsakis```
jackh726 added a commit to jackh726/rust that referenced this issue Apr 29, 2021
…r=nikomatsakis

Don't rebind in `transitive_bounds_that_define_assoc_type`

Fixes rust-lang#83737
Fixes rust-lang#84604

Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445)

r? `@nikomatsakis`
jackh726 added a commit to jackh726/rust that referenced this issue Apr 29, 2021
…r=nikomatsakis

Don't rebind in `transitive_bounds_that_define_assoc_type`

Fixes rust-lang#83737
Fixes rust-lang#84604

Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445)

r? ``@nikomatsakis``
jackh726 added a commit to jackh726/rust that referenced this issue Apr 29, 2021
…r=nikomatsakis

Don't rebind in `transitive_bounds_that_define_assoc_type`

Fixes rust-lang#83737
Fixes rust-lang#84604

Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445)

r? ```@nikomatsakis```
jackh726 added a commit to jackh726/rust that referenced this issue Apr 29, 2021
…r=nikomatsakis

Don't rebind in `transitive_bounds_that_define_assoc_type`

Fixes rust-lang#83737
Fixes rust-lang#84604

Also fixes another issue that I don't have a test for, popped up in [zulip](https://rust-lang.zulipchat.com/#narrow/stream/144729-wg-traits/topic/Duplicate.20symbol.20error.20.2384604/near/236570445)

r? ````@nikomatsakis````
@bors bors closed this as completed in 26a4f46 Apr 30, 2021
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. glacier ICE tracked in rust-lang/glacier. P-high High priority regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet