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

Type checking for this incorrect impl trait panics with incremental compilation #87549

Closed
BattyBoopers opened this issue Jul 28, 2021 · 4 comments · Fixed by #87811
Closed

Type checking for this incorrect impl trait panics with incremental compilation #87549

BattyBoopers opened this issue Jul 28, 2021 · 4 comments · Fixed by #87811
Assignees
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@BattyBoopers
Copy link

When trying to compile this incorrect code using cargo, nightly rustc panics.
When compiling using rustc directly without further arguments (or using the same command cargo calls with -C incremental=... removed), it outputs an error message instead.

Code

trait XTrait<A> {}

struct X<T: XTrait<A>, A> (T, A);

trait Y<'t> {
    type M;
    type N: 't;
}

impl<'t, T: XTrait<A>, A> Y<'t> for X<T, A> {
    type M = X<T, Self::N>;
    type N = &'t ();
}

fn main() {
    println!("Hello, world!");
}

I also noticed that changing type N = &'t (); to type N = (); will also result in an error message instead of a panic.

Meta

rustc --version --verbose:

rustc 1.56.0-nightly (2faabf579 2021-07-27)
binary: rustc
commit-hash: 2faabf579323f5252329264cc53ba9ff803429a3
commit-date: 2021-07-27
host: x86_64-unknown-linux-gnu
release: 1.56.0-nightly
LLVM version: 12.0.1

Error output

cargo +nightly --verbose run

   Compiling crash v0.1.0 (/home/dinky/code/rust/tmp/crash)
     Running `rustc --crate-name crash --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d474572ba93d44de -C extra-filename=-d474572ba93d44de --out-dir /home/dinky/code/rust/tmp/crash/target/debug/deps -C incremental=/home/dinky/code/rust/tmp/crash/target/debug/incremental -L dependency=/home/dinky/code/rust/tmp/crash/target/debug/deps`
error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#0r

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1034:9
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.56.0-nightly (2faabf579 2021-07-27) running on x86_64-unknown-linux-gnu

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 [check_impl_item_well_formed] checking that `<impl at src/main.rs:10:1: 13:2>::M` is well-formed
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `crash`

Caused by:
  process didn't exit successfully: `rustc --crate-name crash --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d474572ba93d44de -C extra-filename=-d474572ba93d44de --out-dir /home/dinky/code/rust/tmp/crash/target/debug/deps -C incremental=/home/dinky/code/rust/tmp/crash/target/debug/incremental -L dependency=/home/dinky/code/rust/tmp/crash/target/debug/deps` (exit status: 101)
Backtrace

RUST_BACKTRACE=1 cargo +nightly --verbose run

   Compiling crash v0.1.0 (/home/dinky/code/rust/tmp/crash)
     Running `rustc --crate-name crash --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d474572ba93d44de -C extra-filename=-d474572ba93d44de --out-dir /home/dinky/code/rust/tmp/crash/target/debug/deps -C incremental=/home/dinky/code/rust/tmp/crash/target/debug/incremental -L dependency=/home/dinky/code/rust/tmp/crash/target/debug/deps`
error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#0r

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1034:9
stack backtrace:
   0: std::panicking::begin_panic
   1: std::panic::panic_any
   2: rustc_errors::HandlerInner::bug
   3: rustc_errors::Handler::bug
   4: rustc_middle::ty::context::tls::with_opt
   5: rustc_middle::util::bug::opt_span_bug_fmt
   6: rustc_middle::util::bug::bug_fmt
   7: rustc_middle::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::RegionKind>::hash_stable
   8: <rustc_middle::ty::TyS as rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext>>::hash_stable
   9: std::thread::local::LocalKey<T>::with
  10: rustc_middle::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::Binder<T>>::hash_stable
  11: rustc_query_system::dep_graph::dep_node::DepNode<K>::construct
  12: rustc_query_system::query::plumbing::get_query_impl
  13: rustc_query_system::query::plumbing::get_query
  14: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error
  15: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error
  16: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors
  17: rustc_typeck::check::fn_ctxt::_impl::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::select_all_obligations_or_error
  18: rustc_infer::infer::InferCtxtBuilder::enter
  19: rustc_typeck::check::wfcheck::check_associated_item
  20: rustc_typeck::check::check::check_impl_item_well_formed
  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>::check_impl_item_well_formed
  26: <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item
  27: std::panicking::try
  28: rustc_data_structures::sync::par_for_each_in
  29: rustc_session::session::Session::track_errors
  30: rustc_typeck::check_crate
  31: rustc_interface::passes::analysis
  32: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  33: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task_impl
  34: rustc_query_system::dep_graph::graph::DepGraph<K>::with_eval_always_task
  35: rustc_data_structures::stack::ensure_sufficient_stack
  36: rustc_query_system::query::plumbing::force_query_with_job
  37: rustc_query_system::query::plumbing::get_query_impl
  38: <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::analysis
  39: rustc_interface::queries::<impl rustc_interface::interface::Compiler>::enter
  40: rustc_span::with_source_map
  41: rustc_interface::interface::create_compiler_and_run
  42: 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.56.0-nightly (2faabf579 2021-07-27) running on x86_64-unknown-linux-gnu

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 [check_impl_item_well_formed] checking that `<impl at src/main.rs:10:1: 13:2>::M` is well-formed
#1 [analysis] running analysis passes on this crate
end of query stack
error: could not compile `crash`

Caused by:
  process didn't exit successfully: `rustc --crate-name crash --edition=2018 src/main.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type bin --emit=dep-info,link -C embed-bitcode=no -C debuginfo=2 -C metadata=d474572ba93d44de -C extra-filename=-d474572ba93d44de --out-dir /home/dinky/code/rust/tmp/crash/target/debug/deps -C incremental=/home/dinky/code/rust/tmp/crash/target/debug/incremental -L dependency=/home/dinky/code/rust/tmp/crash/target/debug/deps` (exit status: 101)

@BattyBoopers BattyBoopers added C-bug Category: This is a bug. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Jul 28, 2021
@jonas-schievink jonas-schievink added the A-incr-comp Area: Incremental compilation label Jul 28, 2021
@Luro02
Copy link
Contributor

Luro02 commented Aug 3, 2021

I seem to have run into the same issue with this code:

pub struct Table<T, const N: usize>([Option<T>; N]);

impl<'a, T, const N: usize> IntoIterator for &'a Table<T, N> {
    type IntoIter = ::core::iter::Flatten<::core::slice::Iter<'a, T>>;
    type Item = &'a T;

    fn into_iter(self) -> Self::IntoIter {
        unimplemented!()
    }
}

cargo +nightly --verbose check

     Running `rustc --crate-name ice --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=1c3553409c4d9998 -C extra-filename=-1c3553409c4d9998 --out-dir "target\debug\deps" -C "incremental=target\debug\incremental" -L "dependency=target\debug\deps"`
error: internal compiler error: compiler\rustc_middle\src\ich\impls_ty.rs:94:17: StableHasher: unexpected region '_#0r

thread 'rustc' panicked at 'Box<dyn Any>', compiler\rustc_errors\src\lib.rs:1034:9
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.56.0-nightly (08095fc1f 2021-07-26) running on x86_64-pc-windows-msvc

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

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

query stack during panic:
#0 [check_impl_item_well_formed] checking that `<impl at src\lib.rs:3:1: 10:2>::IntoIter` is well-formed
#1 [analysis] running analysis passes on this crate
end of query stack
error[E0277]: `&T` is not an iterator
   --> src\lib.rs:7:27
    |
7   |     fn into_iter(self) -> Self::IntoIter {
    |                           ^^^^^^^^^^^^^^ `&T` is not an iterator
    |
   ::: .rustup\toolchains\nightly-x86_64-pc-windows-msvc\lib/rustlib/src/rust\library\core\src\iter\adapters\flatten.rs:150:38
    |
150 | pub struct Flatten<I: Iterator<Item: IntoIterator>> {
    |                                      ------------ required by this bound in `Flatten`
    |
    = help: the trait `Iterator` is not implemented for `&T`
    = note: required because of the requirements on the impl of `IntoIterator` for `&T`

For more information about this error, try `rustc --explain E0277`.
error: could not compile `ice` due to previous error

Caused by:
  process didn't exit successfully: `rustc --crate-name ice --edition=2018 src\lib.rs --error-format=json --json=diagnostic-rendered-ansi --crate-type lib --emit=dep-info,metadata -C embed-bitcode=no -C debuginfo=2 -C metadata=1c3553409c4d9998 -C extra-filename=-1c3553409c4d9998 --out-dir "target\debug\deps" -C "incremental=target\debug\incremental" -L "dependency=target\debug\deps"` (exit code: 101)

rustc --version --verbose

rustc 1.56.0-nightly (08095fc1f 2021-07-26)
binary: rustc
commit-hash: 08095fc1f875c89e507f17cf6c6a780c8ffa4c01
commit-date: 2021-07-26
host: x86_64-pc-windows-msvc
release: 1.56.0-nightly
LLVM version: 12.0.1
Backtrace
thread 'rustc' panicked at 'Box<dyn Any>', compiler\rustc_errors\src\lib.rs:1034:9
stack backtrace:
   0:     0x7fffef6f72af - <std::sys_common::backtrace::_print::DisplayBacktrace as core::fmt::Display>::fmt::hf8f9ccaaf737268c
   1:     0x7fffef7202ea - core::fmt::write::h7e004fee938dc3bd
   2:     0x7fffef6eaa48 - <std::io::IoSlice as core::fmt::Debug>::fmt::h5e8f50613d775ee8
   3:     0x7fffef6faed6 - std::panicking::take_hook::hb09930640d1f28d1
   4:     0x7fffef6fa9b9 - std::panicking::take_hook::hb09930640d1f28d1
   5:     0x7fffe65b210e - <sha2::sha512::Sha512 as std::io::Write>::flush::h720d3aa9a35641a4
   6:     0x7fffef6fb7d0 - std::panicking::rust_panic_with_hook::ha77067ca1c3aa04d
   7:     0x7fffea84dff0 - rustc_errors::diagnostic_builder::DiagnosticBuilder::code::h17316800dfe2f643
   8:     0x7fffea84dfc9 - rustc_errors::diagnostic_builder::DiagnosticBuilder::code::h17316800dfe2f643
   9:     0x7fffeab0c6a1 - rustc_query_system::query::job::report_cycle::h37e4bf0df2043575
  10:     0x7fffea880290 - <rustc_errors::json::Diagnostic::from_errors_diagnostic::BufWriter as std::io::Write>::flush::h40a088e8c152c98f
  11:     0x7fffea886b15 - rustc_errors::HandlerInner::emit_diagnostic::h605f2fc202d4eea0
  12:     0x7fffea884622 - rustc_errors::Handler::bug::ha197644133cfa24e
  13:     0x7fffea7426d7 - rustc_middle::ty::walk::<impl rustc_middle::ty::subst::GenericArg>::walk_shallow::h2e0646470201bd9e
  14:     0x7fffea741fa0 - rustc_middle::ty::walk::<impl rustc_middle::ty::subst::GenericArg>::walk_shallow::h2e0646470201bd9e
  15:     0x7fffea741f48 - rustc_middle::ty::walk::<impl rustc_middle::ty::subst::GenericArg>::walk_shallow::h2e0646470201bd9e
  16:     0x7fffea742609 - rustc_middle::ty::walk::<impl rustc_middle::ty::subst::GenericArg>::walk_shallow::h2e0646470201bd9e
  17:     0x7fffeab08be7 - rustc_middle::util::bug::bug_fmt::h66e69068a677c29e
  18:     0x7fffea724198 - rustc_middle::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::RegionKind>::hash_stable::h06caf495d24d485b
  19:     0x7fffea6e26e4 - <rustc_middle::ty::TyS as rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext>>::hash_stable::h8bcc894d8e8fafcd
  20:     0x7fffea57b5df - <rustc_infer::traits::project::ProjectionCacheEntry as core::fmt::Debug>::fmt::h0f137517fe2c6105
  21:     0x7fffea72466e - rustc_middle::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::RegionKind>::hash_stable::h06caf495d24d485b
  22:     0x7fffe99a2922 - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  23:     0x7fffe97ef07c - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  24:     0x7fffe9a7603b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  25:     0x7fffea347d84 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_selection_error::h7556b0cf2e4f5cc4
  26:     0x7fffea3517fd - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtPrivExt>::report_fulfillment_error::h763b7d46de7cfc90
  27:     0x7fffea346071 - <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::error_reporting::InferCtxtExt>::report_fulfillment_errors::ha2f2c168eee417d3
  28:     0x7fffe8c5da5d - rustc_typeck::check::fn_ctxt::_impl::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::field_ty::h3cbfaf9ed5d45b96
  29:     0x7fffe8d57501 - <rustc_typeck::check::regionck::RegionCtxt as rustc_hir::intravisit::Visitor>::visit_expr::h02adde056c81ec89
  30:     0x7fffe8cf7c7f - <rustc_typeck::check::method::probe::ProbeScope as core::fmt::Debug>::fmt::hb5b3726d1521d739
  31:     0x7fffe8e3ca40 - rustc_typeck::check::check::check_item_type::ha94a19386e8638d1
  32:     0x7fffe9aee0a6 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  33:     0x7fffe9ac3059 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  34:     0x7fffe9bccdcf - rustc_query_impl::on_disk_cache::__ty_decoder_impl::<impl rustc_serialize::serialize::Decoder for rustc_query_impl::on_disk_cache::CacheDecoder>::error::h1345e6f615df1d2d
  35:     0x7fffe98d5971 - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  36:     0x7fffe985580d - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  37:     0x7fffe9a71391 - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  38:     0x7fffe8ce337c - <rustc_typeck::check::wfcheck::CheckTypeWellFormedVisitor as rustc_hir::intravisit::Visitor>::visit_impl_item::h9e73050a69cf68be
  39:     0x7fffe8cc5dd3 - rustc_typeck::check::method::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::resolve_fully_qualified_call::h0e4aa83e76db2063
  40:     0x7fffe8dd715a - <rustc_typeck::constrained_generic_params::Parameter as core::fmt::Debug>::fmt::h3ea920eb9c7a4ad7
  41:     0x7fffe8d24175 - <rustc_typeck::outlives::explicit::ExplicitPredicatesMap as core::fmt::Debug>::fmt::he1d4e3e051288eac
  42:     0x7fffe8cf4fb1 - rustc_typeck::check_crate::h6bf0390329652898
  43:     0x7fffe66facd2 - rustc_interface::passes::analysis::h3a1cc36134a75432
  44:     0x7fffe9aef70b - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  45:     0x7fffe9aae79d - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  46:     0x7fffe9bcf745 - rustc_query_impl::on_disk_cache::__ty_decoder_impl::<impl rustc_serialize::serialize::Decoder for rustc_query_impl::on_disk_cache::CacheDecoder>::error::h1345e6f615df1d2d
  47:     0x7fffe98bdf63 - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  48:     0x7fffe97aa9dc - <aho_corasick::packed::rabinkarp::RabinKarp as core::fmt::Debug>::fmt::hde8c8300ff16d93a
  49:     0x7fffe9a6852c - <rustc_query_impl::Queries as rustc_middle::ty::query::QueryEngine>::try_mark_green::h00bfb97540d859ae
  50:     0x7fffe6606f01 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h5df0c4d8fb3d3c5e
  51:     0x7fffe65cbb35 - chalk_engine::TimeStamp::increment::h8dcb95b70021502b
  52:     0x7fffe6608759 - <rustc_driver::args::Error as core::fmt::Debug>::fmt::h5df0c4d8fb3d3c5e
  53:     0x7fffe65d7b20 - rustc_driver::pretty::print_after_hir_lowering::h5170af9d47465e28
  54:     0x7fffe65c6d7d - <rustc_driver::Compilation as core::fmt::Debug>::fmt::h64cba24964385564
  55:     0x7fffef70931c - std::sys::windows::thread::Thread::new::h0a6e657a03ae2a48
  56:     0x7ff873fc7034 - BaseThreadInitThunk
  57:     0x7ff875f22651 - RtlUserThreadStart

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

@lqd
Copy link
Member

lqd commented Aug 3, 2021

I believe these ICEs trigger because of / are made visible by #83898 cc @Aaron1011 @estebank.

@estebank estebank added the regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. label Aug 3, 2021
@rustbot rustbot added the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 3, 2021
@estebank
Copy link
Contributor

estebank commented Aug 3, 2021

I'm not able to repro this with rustc 1.56.0-nightly (e3b1c12 2021-08-02):

% rustc +nightly f33.rs --edition=2018
error[E0277]: the trait bound `T: XTrait<&()>` is not satisfied
  --> f33.rs:11:14
   |
3  | struct X<T: XTrait<A>, A> (T, A);
   |             --------- required by this bound in `X`
...
11 |     type M = X<T, Self::N>;
   |              ^^^^^^^^^^^^^ the trait `XTrait<&()>` is not implemented for `T`
   |
help: consider further restricting this bound
   |
10 | impl<'t, T: XTrait<A> + XTrait<&()>, A> Y<'t> for X<T, A> {
   |                       ^^^^^^^^^^^^^

Could you verify that you see it with a recent nightly? There have been significant changes in this area recently.


Edit: ah! with incremental enabled I see it:

% rustc +nightly f33.rs -C incremental=true
error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:94:17: StableHasher: unexpected region '_#0r

thread 'rustc' panicked at 'Box<dyn Any>', compiler/rustc_errors/src/lib.rs:1034:9
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.56.0-nightly (e3b1c12be 2021-08-02) running on x86_64-apple-darwin

note: compiler flags: -C incremental

query stack during panic:
#0 [check_impl_item_well_formed] checking that `<impl at f33.rs:10:1: 13:2>::M` is well-formed
#1 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

@estebank estebank added regression-from-stable-to-beta Performance or correctness regression from stable to beta. and removed regression-from-stable-to-nightly Performance or correctness regression from stable to nightly. labels Aug 3, 2021
@Luro02

This comment has been minimized.

@estebank estebank self-assigned this Aug 6, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 10, 2021
Do not ICE on HIR based WF check when involving lifetimes

Fix rust-lang#87549.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 10, 2021
Do not ICE on HIR based WF check when involving lifetimes

Fix rust-lang#87549.
JohnTitor added a commit to JohnTitor/rust that referenced this issue Aug 10, 2021
Do not ICE on HIR based WF check when involving lifetimes

Fix rust-lang#87549.
@bors bors closed this as completed in f93cbed Aug 11, 2021
@apiraino apiraino removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Aug 12, 2021
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Aug 12, 2021
Mark-Simulacrum pushed a commit to Mark-Simulacrum/rust that referenced this issue Aug 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ regression-from-stable-to-beta Performance or correctness regression from stable to beta. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

8 participants