rust-lang / rust

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

Build failed on rustc 1.52.0 #85069

Closed leric closed 3 years ago

leric commented 3 years ago

Code

Failed to build project hyperapi after rustup to 1.52.0

Sorry, I'm still learning rust, not able to track down the exact source of error.

Meta

rustc --version --verbose:

rustc 1.52.0 (88f19c6da 2021-05-03)
binary: rustc
commit-hash: 88f19c6dab716c6281af7602e30f413e809c5974
commit-date: 2021-05-03
host: x86_64-apple-darwin
release: 1.52.0
LLVM version: 12.0.0

The nightly channel build succeed.

rustc 1.54.0-nightly (676ee1472 2021-05-06)
binary: rustc
commit-hash: 676ee14729462585b969bbc52f32c307403f4126
commit-date: 2021-05-06
host: x86_64-apple-darwin
release: 1.54.0-nightly
LLVM version: 12.0.0

Error output

thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(fd765172e71ed24f-74af1b4c748b026d): Ok(EvaluatedToOkModuloRegions)', /rustc/88f19c6dab716c6281af7602e30f413e809c5974/compiler/rustc_query_system/src/query/plumbing.rs:593:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace

error: internal compiler error: unexpected panic

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.52.0 (88f19c6da 2021-05-03) running on x86_64-apple-darwin

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

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `anyhow::Error: std::convert::Into<std::boxed::Box<dyn std::error::Error + std::marker::Send + std::marker::Sync>>`
#1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs: [hyper::service::make::MakeServiceFn<[closure@src/main.rs:64:40: 72:10]>, hyperapi::proxy::https::TlsStream, hyper::Body], item_def_id: DefId(32:937 ~ hyper[2b22]::service::make::MakeServiceRef::Future) } } }`
end of query stack
error: could not compile `hyperapi`

To learn more, run the command again with --verbose.
Backtrace

``` Compiling hyperapi v0.2.0 (/opt/apihub/hyperapi) thread 'rustc' panicked at 'found unstable fingerprints for evaluate_obligation(fd765172e71ed24f-74af1b4c748b026d): Ok(EvaluatedToOkModuloRegions)', /rustc/88f19c6dab716c6281af7602e30f413e809c5974/compiler/rustc_query_system/src/query/plumbing.rs:593:5 stack backtrace: 0: _rust_begin_unwind 1: std::panicking::begin_panic_fmt 2: rustc_query_system::query::plumbing::incremental_verify_ich 3: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory 4: rustc_data_structures::stack::ensure_sufficient_stack 5: rustc_query_system::query::plumbing::get_query_impl 6: ::evaluate_obligation 7: ::evaluate_obligation 8: ::evaluate_obligation_no_overflow 9: rustc_trait_selection::traits::fulfill::FulfillProcessor::process_trait_obligation 10: rustc_trait_selection::traits::fulfill::FulfillProcessor::progress_changed_obligations 11: rustc_data_structures::obligation_forest::ObligationForest::process_obligations 12: ::select_where_possible 13: ::enter_canonical_trait_query 14: rustc_traits::normalize_projection_ty::normalize_projection_ty 15: rustc_query_impl:: for rustc_query_impl::queries::normalize_projection_ty>::compute 16: rustc_middle::dep_graph::::with_deps 17: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory 18: rustc_data_structures::stack::ensure_sufficient_stack 19: rustc_query_system::query::plumbing::get_query_impl 20: ::normalize_projection_ty 21: ::fold_ty 22: as core::iter::traits::collect::Extend<::Item>>::extend 23: rustc_middle::ty::fold::TypeFoldable::fold_with 24: rustc_middle::ty::structural_impls::::super_fold_with 25: ::fold_ty 26: rustc_middle::ty::fold::TypeFoldable::fold_with 27: rustc_middle::ty::structural_impls::::super_fold_with 28: ::fold_ty 29: rustc_middle::ty::fold::TypeFoldable::fold_with 30: rustc_middle::ty::structural_impls::::super_fold_with 31: ::fold_ty 32: rustc_middle::ty::fold::TypeFoldable::fold_with 33: rustc_middle::ty::structural_impls::::super_fold_with 34: ::fold_ty 35: rustc_middle::ty::fold::TypeFoldable::fold_with 36: rustc_middle::ty::structural_impls::::super_fold_with 37: ::fold_ty 38: ::normalize 39: rustc_infer::infer::InferCtxtBuilder::enter 40: rustc_traits::normalize_erasing_regions::normalize_generic_arg_after_erasing_regions 41: rustc_middle::dep_graph::::with_deps 42: rustc_query_system::query::plumbing::load_from_disk_and_cache_in_memory 43: rustc_data_structures::stack::ensure_sufficient_stack 44: rustc_query_system::query::plumbing::get_query_impl 45: ::normalize_generic_arg_after_erasing_regions 46: ::fold_ty 47: rustc_middle::ty::instance::Instance::subst_mir_and_normalize_erasing_regions 48: ::visit_terminator 49: rustc_mir::monomorphize::collector::collect_neighbours 50: rustc_mir::monomorphize::collector::collect_items_rec 51: rustc_mir::monomorphize::collector::collect_items_rec 52: rustc_mir::monomorphize::collector::collect_items_rec 53: rustc_mir::monomorphize::collector::collect_items_rec 54: rustc_mir::monomorphize::collector::collect_items_rec 55: rustc_mir::monomorphize::collector::collect_items_rec 56: rustc_mir::monomorphize::collector::collect_items_rec 57: rustc_mir::monomorphize::collector::collect_items_rec 58: rustc_mir::monomorphize::collector::collect_items_rec 59: rustc_mir::monomorphize::collector::collect_items_rec 60: rustc_mir::monomorphize::collector::collect_items_rec 61: rustc_mir::monomorphize::collector::collect_items_rec 62: rustc_mir::monomorphize::collector::collect_items_rec 63: rustc_mir::monomorphize::collector::collect_items_rec 64: rustc_mir::monomorphize::collector::collect_items_rec 65: rustc_mir::monomorphize::collector::collect_crate_mono_items 66: rustc_mir::monomorphize::partitioning::collect_and_partition_mono_items 67: rustc_query_impl:: for rustc_query_impl::queries::collect_and_partition_mono_items>::compute 68: rustc_middle::dep_graph::::with_deps 69: rustc_query_system::dep_graph::graph::DepGraph::with_task_impl 70: rustc_data_structures::stack::ensure_sufficient_stack 71: rustc_query_system::query::plumbing::force_query_with_job 72: rustc_query_system::query::plumbing::get_query_impl 73: ::collect_and_partition_mono_items 74: ::codegen_crate 75: rustc_interface::passes::QueryContext::enter 76: rustc_interface::queries::Queries::ongoing_codegen 77: rustc_interface::queries::::enter 78: rustc_span::with_source_map 79: rustc_interface::interface::create_compiler_and_run 80: scoped_tls::ScopedKey::set note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace. error: internal compiler error: unexpected panic 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.52.0 (88f19c6da 2021-05-03) running on x86_64-apple-darwin note: compiler flags: -C embed-bitcode=no -C debuginfo=2 -C incremental --crate-type bin note: some of the compiler flags provided by cargo are hidden query stack during panic: #0 [evaluate_obligation] evaluating trait selection obligation `anyhow::Error: std::convert::Into>` #1 [normalize_projection_ty] normalizing `Canonical { max_universe: U0, variables: [], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [], reveal: All }, value: ProjectionTy { substs: [hyper::service::make::MakeServiceFn<[closure@src/main.rs:64:40: 72:10]>, hyperapi::proxy::https::TlsStream, hyper::Body], item_def_id: DefId(32:937 ~ hyper[2b22]::service::make::MakeServiceRef::Future) } } }` #2 [normalize_generic_arg_after_erasing_regions] normalizing `fn(std::task::Poll as hyper::service::make::MakeServiceRef>::Future>, hyper::Error>>>) -> std::result::Result< as hyper::service::make::MakeServiceRef>::Future>, hyper::Error>>> as std::ops::Try>::Ok, as hyper::service::make::MakeServiceRef>::Future>, hyper::Error>>> as std::ops::Try>::Error> { as hyper::service::make::MakeServiceRef>::Future>, hyper::Error>>> as std::ops::Try>::into_result}` #3 [collect_and_partition_mono_items] collect_and_partition_mono_items end of query stack error: could not compile `hyperapi` To learn more, run the command again with --verbose. ```

lausek commented 3 years ago

Seems to be a known issue. See #84970

leric commented 3 years ago

Running cargo clean fixed the problem.

Thanks @lausek