Open uwuzote opened 1 year ago
Thank you so much for providing a minimial reproduction ❤️
But as far as I know, this issue is already fixed on nightly (and I think beta too now). Although I was unable to reproduce this on 1.67.2 stable (which should not have the fix) so you should try yourself to make sure before closing.
Code
Build with
cargo check
orrustc main.rs --crate-type lib -C incremental=./target/debug/incremental -L dependency=./target/debug/deps
Meta
Runnng with
rustc +nightly main.rs --crate-type lib -C incremental=./target/debug/incremental -L dependency=./target/debug/deps
does not produce compiler panicrustc --version --verbose
:Error output
rustc main.rs --crate-type lib -C incremental=./target/debug/incremental -L dependency=./target/debug/deps
:cargo +beta build
:rustc +nightly main.rs --crate-type lib -C incremental=./target/debug/incremental -L dependency=./target/debug/deps
:Backtrace
```error[E0392]: parameter `P` is never used --> src/lib.rs:2:11 | 2 | struct S2
(); | ^ unused parameter | = help: consider removing `P`, referring to it in a field, or using a marker such as `PhantomData` = help: if you intended `P` to be a const parameter, use `const P: usize` instead error[E0277]: the trait bound `>::Out: Qux
` is not satisfied --> src/lib.rs:23:10 | 23 | <<>::Out as Qux>::Out as Fuzz>>::Out,
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Qux ` is not implemented for `>::Out` | help: consider further restricting the associated type | 20 | impl, B> Fuzz> for S2 where >::Out: Qux { | ++++++++++++++++++++++++++++++++ thread 'rustc' panicked at 'type variables should not be hashed: _#1t', /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/compiler/rustc_type_ir/src/lib.rs:681:17 stack backtrace: 0: rust_begin_unwind at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/std/src/panicking.rs:575:5 1: core::panicking::panic_fmt at /rustc/d5a82bbd26e1ad8b7401f6a718a9c57c96905483/library/core/src/panicking.rs:64:14 2:>::hash_stable
3: > as rustc_data_structures::stable_hasher::HashStable>::hash_stable
4: <&rustc_middle::ty::list::List as rustc_data_structures::stable_hasher::HashStable>::hash_stable
5: >> as rustc_data_structures::stable_hasher::HashStable>::hash_stable
6: <(rustc_middle::ty::Predicate, rustc_middle::traits::WellFormedLoc) as rustc_data_structures::stable_hasher::HashStable>::hash_stable
7: >>::to_dep_node
8: rustc_query_system::query::plumbing::try_execute_query::>>
9: rustc_query_system::query::plumbing::get_query::
10: ::diagnostic_hir_wf_check
11: ::report_selection_error
12: ::report_fulfillment_error
13: ::report_fulfillment_errors
14: rustc_hir_analysis::check::wfcheck::check_associated_item
15: rustc_hir_analysis::check::wfcheck::check_well_formed
16: >::with_task::
17: rustc_query_system::query::plumbing::get_query::
18: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir::ImplItemId], ::par_impl_items::{closure#0}>
19: rustc_hir_analysis::check::wfcheck::check_mod_type_wf
20: >::with_task::
21: rustc_query_system::query::plumbing::try_execute_query::>
22: rustc_query_system::query::plumbing::get_query::
23: rustc_data_structures::sync::par_for_each_in::<&[rustc_hir::hir_id::OwnerId], ::par_for_each_module::{closure#0}>
24: ::track_errors::
25: rustc_hir_analysis::check_crate
26: rustc_interface::passes::analysis
27: >::with_task::>
28: rustc_query_system::query::plumbing::try_execute_query::>>
29: rustc_query_system::query::plumbing::get_query::
30: ::enter::>
31: ::enter::, rustc_errors::ErrorGuaranteed>>
32: rustc_span::with_source_map::, rustc_interface::interface::run_compiler, rustc_driver::run_compiler::{closure#1}>::{closure#0}::{closure#0}>
33: >::set::, rustc_driver::run_compiler::{closure#1}>::{closure#0}, core::result::Result<(), rustc_errors::ErrorGuaranteed>>
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.67.1 (d5a82bbd2 2023-02-07) running on x86_64-unknown-linux-gnu
note: compiler flags: --crate-type lib -C embed-bitcode=no -C debuginfo=2 -C incremental=[REDACTED]
note: some of the compiler flags provided by cargo are hidden
query stack during panic:
#0 [diagnostic_hir_wf_check] performing HIR wf-checking for predicate `Binder(TraitPredicate(<>::Out as Bar, _>>, polarity:Positive), [])` at item `Ty(DefId(0:24 ~ xuwunum_rev[2847]::{impl#0}::Out))`
#1 [check_well_formed] checking that `::Out` is well-formed
#2 [check_mod_type_wf] checking that types are well-formed in top-level module
#3 [analysis] running analysis passes on this crate
end of query stack
Some errors have detailed explanations: E0277, E0392.
For more information about an error, try `rustc --explain E0277`.
error: could not compile `xuwunum-rev` due to 2 previous errors
```