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

ICE when using const_evaluatable_checked #79251

Closed
simon-auch opened this issue Nov 21, 2020 · 10 comments · Fixed by #88146
Closed

ICE when using const_evaluatable_checked #79251

simon-auch opened this issue Nov 21, 2020 · 10 comments · Fixed by #88146
Labels
A-const-generics Area: const generics (parameters and arguments) A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` 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.

Comments

@simon-auch
Copy link

simon-auch commented Nov 21, 2020

I'm creating this issue mainly because it seems to be a different one than the ones listed in #76560

Code

#![feature(const_generics)]
#![feature(const_evaluatable_checked)]

#[derive(Debug)]
struct Node<K, const D: usize>
where
    SmallVec<K, { D * 2 }>: ,
{
    keys: SmallVec<K, { D * 2 }>,
}

impl<K, const D: usize> Node<K, D>
where
    SmallVec<K, { D * 2 }>: ,
{
    fn new() -> Self {
        panic!()
    }

    #[inline(never)]
    fn split(&mut self, i: usize, k: K, right: bool) -> Node<K, D> {
        let mut node = Node::new();
        node.keys.push(k);
        node
    }
}

#[derive(Debug)]
struct SmallVec<T, const D: usize> {
    data: [T; D],
}
impl<T, const D: usize> SmallVec<T, D> {
    fn new() -> Self {
        panic!()
    }
}

Meta

rustc --version --verbose:

rustc 1.50.0-nightly (fe982319a 2020-11-19)
binary: rustc
commit-hash: fe982319aa0aa5bbfc2795791a753832292bd2ba
commit-date: 2020-11-19
host: x86_64-unknown-linux-gnu
release: 1.50.0-nightly

Error output

warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: consider using `min_const_generics` instead, which is more stable and complete

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:167:9: ty::TyKind::hash_stable() - can't hash a TyVid _#0t.

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:958: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.50.0-nightly (fe982319a 2020-11-19) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `std::pin::Pin<SmallVec<^1, { D * 2 }>>: std::ops::Deref`
#1 [method_autoderef_steps] computing autoderef types for `Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Const(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [ConstEvaluatable(WithOptConstParam { did: DefId(0:6 ~ btree_join[f727]::{impl#0}::{constant#0}), const_param_did: None }, [K, Const { ty: usize, val: Param(D/#1) }]), TraitPredicate(<K as std::marker::Sized>), OutlivesPredicate(SmallVec<K, { D * 2 }>, ReLateBound(DebruijnIndex(0), BrAnon(0))), OutlivesPredicate(K, ReLateBound(DebruijnIndex(0), BrAnon(0)))], reveal: UserFacing }, value: std::pin::Pin<SmallVec<^1, { D * 2 }>> } }`
end of query stack
Backtrace

   Compiling btree_join v0.1.0 (/home/simon/git_repositories/rust_test/btree_ice_mfe)
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: consider using `min_const_generics` instead, which is more stable and complete

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:167:9: ty::TyKind::hash_stable() - can't hash a TyVid _#0t.

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:958:9
stack backtrace:
   0: std::panicking::begin_panic
   1: rustc_errors::HandlerInner::bug
   2: rustc_errors::Handler::bug
   3: rustc_middle::util::bug::opt_span_bug_fmt::{{closure}}
   4: rustc_middle::ty::context::tls::with_opt::{{closure}}
   5: rustc_middle::ty::context::tls::with_opt
   6: rustc_middle::util::bug::opt_span_bug_fmt
   7: rustc_middle::util::bug::bug_fmt
   8: rustc_middle::ich::impls_ty::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::TyVid>::hash_stable
   9: rustc_middle::ty::sty::_DERIVE_rustc_data_structures_stable_hasher_HashStable_rustc_middle_ich_StableHashingContext_ctx_FOR_InferTy::<impl rustc_data_structures::stable_hasher::HashStable<rustc_middle::ich::hcx::StableHashingContext> for rustc_middle::ty::sty::InferTy>::hash_stable
  10: std::thread::local::LocalKey<T>::with
  11: <T as rustc_query_system::dep_graph::dep_node::DepNodeParams<Ctxt>>::to_fingerprint
  12: rustc_query_system::query::plumbing::get_query_impl
  13: rustc_middle::ty::relate::super_relate_consts
  14: <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::consts
  15: <rustc_middle::ty::subst::GenericArg as rustc_middle::ty::relate::Relate>::relate
  16: <core::result::Result<T,E> as rustc_middle::ty::context::InternIteratorElement<T,R>>::intern_with
  17: <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::relate_item_substs
  18: rustc_middle::ty::relate::super_relate_tys
  19: <rustc_infer::infer::combine::Generalizer as rustc_middle::ty::relate::TypeRelation>::tys
  20: rustc_infer::infer::combine::CombineFields::instantiate
  21: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
  22: <rustc_middle::ty::subst::GenericArg as rustc_middle::ty::relate::Relate>::relate
  23: <core::result::Result<T,E> as rustc_middle::ty::context::InternIteratorElement<T,R>>::intern_with
  24: rustc_middle::ty::relate::super_relate_tys
  25: rustc_infer::infer::combine::<impl rustc_infer::infer::InferCtxt>::super_combine_tys
  26: <rustc_infer::infer::equate::Equate as rustc_middle::ty::relate::TypeRelation>::tys
  27: <rustc_middle::ty::subst::GenericArg as rustc_middle::ty::relate::Relate>::relate
  28: <core::result::Result<T,E> as rustc_middle::ty::context::InternIteratorElement<T,R>>::intern_with
  29: <rustc_middle::ty::sty::TraitRef as rustc_middle::ty::relate::Relate>::relate
  30: rustc_infer::infer::InferCtxt::commit_if_ok
  31: rustc_trait_selection::traits::select::SelectionContext::match_impl
  32: rustc_infer::infer::InferCtxt::probe
  33: rustc_middle::ty::trait_def::<impl rustc_middle::ty::context::TyCtxt>::for_each_relevant_impl
  34: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates_from_impls
  35: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::assemble_candidates
  36: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation_no_cache
  37: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  38: rustc_query_system::dep_graph::graph::DepGraph<K>::with_anon_task
  39: rustc_trait_selection::traits::select::candidate_assembly::<impl rustc_trait_selection::traits::select::SelectionContext>::candidate_from_obligation
  40: rustc_trait_selection::traits::select::SelectionContext::evaluate_stack
  41: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  42: rustc_query_system::dep_graph::graph::DepGraph<K>::with_anon_task
  43: rustc_trait_selection::traits::select::SelectionContext::evaluate_trait_predicate_recursively
  44: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively::{{closure}}
  45: rustc_trait_selection::traits::select::SelectionContext::evaluate_predicate_recursively
  46: rustc_infer::infer::InferCtxt::probe
  47: rustc_trait_selection::traits::select::SelectionContext::evaluate_root_obligation
  48: rustc_infer::infer::InferCtxtBuilder::enter_with_canonical
  49: rustc_traits::evaluate_obligation::evaluate_obligation
  50: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::evaluate_obligation>::compute
  51: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  52: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  53: rustc_data_structures::stack::ensure_sufficient_stack
  54: rustc_query_system::query::plumbing::get_query_impl
  55: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation
  56: <rustc_infer::infer::InferCtxt as rustc_trait_selection::traits::query::evaluate_obligation::InferCtxtExt>::evaluate_obligation_no_overflow
  57: <rustc_trait_selection::autoderef::Autoderef as core::iter::traits::iterator::Iterator>::next
  58: <alloc::vec::Vec<T> as alloc::vec::SpecFromIter<T,I>>::from_iter
  59: rustc_infer::infer::InferCtxtBuilder::enter_with_canonical
  60: rustc_typeck::check::method::probe::method_autoderef_steps
  61: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::method_autoderef_steps>::compute
  62: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  63: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  64: rustc_data_structures::stack::ensure_sufficient_stack
  65: rustc_query_system::query::plumbing::get_query_impl
  66: rustc_typeck::check::method::probe::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::probe_for_name
  67: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::report_extended_method_error::{{closure}}
  68: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  69: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  70: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_stmt
  71: rustc_typeck::check::fn_ctxt::checks::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_block_with_expected
  72: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_kind
  73: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_expr_with_expectation
  74: rustc_typeck::check::expr::<impl rustc_typeck::check::fn_ctxt::FnCtxt>::check_return_expr
  75: rustc_typeck::check::check::check_fn
  76: rustc_infer::infer::InferCtxtBuilder::enter
  77: rustc_typeck::check::typeck
  78: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck>::compute
  79: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  80: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  81: rustc_data_structures::stack::ensure_sufficient_stack
  82: rustc_query_system::query::plumbing::get_query_impl
  83: rustc_query_system::query::plumbing::ensure_query_impl
  84: rustc_typeck::check::typeck_item_bodies
  85: rustc_middle::ty::query::<impl rustc_query_system::query::config::QueryAccessors<rustc_middle::ty::context::TyCtxt> for rustc_middle::ty::query::queries::typeck_item_bodies>::compute
  86: rustc_middle::dep_graph::<impl rustc_query_system::dep_graph::DepKind for rustc_middle::dep_graph::dep_node::DepKind>::with_deps
  87: rustc_query_system::dep_graph::graph::DepGraph<K>::with_task
  88: rustc_data_structures::stack::ensure_sufficient_stack
  89: rustc_query_system::query::plumbing::get_query_impl
  90: rustc_typeck::check_crate
  91: rustc_interface::passes::analysis
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.50.0-nightly (fe982319a 2020-11-19) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `std::pin::Pin<SmallVec<^1, { D * 2 }>>: std::ops::Deref`
#1 [method_autoderef_steps] computing autoderef types for `Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Ty(General(U0)) }, CanonicalVarInfo { kind: Const(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [ConstEvaluatable(WithOptConstParam { did: DefId(0:6 ~ btree_join[ecb8]::{impl#0}::{constant#0}), const_param_did: None }, [K, Const { ty: usize, val: Param(D/#1) }]), TraitPredicate(<K as std::marker::Sized>), OutlivesPredicate(SmallVec<K, { D * 2 }>, ReLateBound(DebruijnIndex(0), BrAnon(0))), OutlivesPredicate(K, ReLateBound(DebruijnIndex(0), BrAnon(0)))], reveal: UserFacing }, value: std::pin::Pin<SmallVec<^1, { D * 2 }>> } }`
#2 [typeck] type-checking `Node::<K, D>::split`
#3 [typeck_item_bodies] type-checking all item bodies
#4 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error; 2 warnings emitted

error: could not compile `btree_join`

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

@simon-auch simon-auch 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 Nov 21, 2020
@jonas-schievink jonas-schievink added the F-generic_const_exprs `#![feature(generic_const_exprs)]` label Nov 21, 2020
@camelid camelid changed the title ICE when using const_evaluatble_checked ICE when using const_evaluatable_checked Nov 22, 2020
@camelid
Copy link
Member

camelid commented Nov 22, 2020

@simon-auch What command are you running? I tried this code in the Playground, but I encountered an error that SmallVec doesn't have a push method.

Code

#![feature(const_generics)]
#![feature(const_evaluatable_checked)]

#[derive(Debug)]
struct Node<K, const D: usize>
where
    SmallVec<K, { D * 2 }>: ,
{
    keys: SmallVec<K, { D * 2 }>,
}

impl<K, const D: usize> Node<K, D>
where
    SmallVec<K, { D * 2 }>: ,
{
    fn new() -> Self {
        panic!()
    }

    #[inline(never)]
    fn split(&mut self, i: usize, k: K, right: bool) -> Node<K, D> {
        let mut node = Node::new();
        node.keys.push(k);
        node
    }
}

#[derive(Debug)]
struct SmallVec<T, const D: usize> {
    data: [T; D],
}
impl<T, const D: usize> SmallVec<T, D> {
    fn new() -> Self {
        panic!()
    }
}

Errors

   Compiling playground v0.0.1 (/playground)
warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: consider using `min_const_generics` instead, which is more stable and complete

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error[E0599]: no method named `push` found for struct `SmallVec<_, { D * 2 }>` in the current scope
  --> src/lib.rs:23:19
   |
23 |         node.keys.push(k);
   |                   ^^^^ method not found in `SmallVec<_, { D * 2 }>`
...
29 | struct SmallVec<T, const D: usize> {
   | ---------------------------------- method `push` not found for this

error: aborting due to previous error; 2 warnings emitted

For more information about this error, try `rustc --explain E0599`.
error: could not compile `playground`

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

@simon-auch
Copy link
Author

simon-auch commented Nov 22, 2020

how strange, for me cargo build just causes the ice and it doesn't even come to notice that the function is missing.
I just ran rustup update, and with the newest rustc (rustc 1.50.0-nightly (da3846948 2020-11-21)) I still get the same error as above (in a new cargo project with the code copied from the playground link above).

@simon-auch
Copy link
Author

Just ran rustup update again today and still get an ICE. Made the example a bit smaller:

#![feature(const_generics)]
#![feature(const_evaluatable_checked)]

struct Node<const D: usize>
where
    SmallVec<{ D * 2 }>: ,
{
    keys: SmallVec<{ D * 2 }>,
}

impl<const D: usize> Node<D>
where
    SmallVec<{ D * 2 }>: ,
{
    fn new() -> Self {
        let mut node = Node::new();
        node.keys.some_function();
        node
    }
}

struct SmallVec<const D: usize> {}

Output of cargo check (build also fails with the same message):

warning: the feature `const_generics` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:1:12
  |
1 | #![feature(const_generics)]
  |            ^^^^^^^^^^^^^^
  |
  = note: `#[warn(incomplete_features)]` on by default
  = note: see issue #44580 <https://github.com/rust-lang/rust/issues/44580> for more information
  = help: consider using `min_const_generics` instead, which is more stable and complete

warning: the feature `const_evaluatable_checked` is incomplete and may not be safe to use and/or cause compiler crashes
 --> src/lib.rs:2:12
  |
2 | #![feature(const_evaluatable_checked)]
  |            ^^^^^^^^^^^^^^^^^^^^^^^^^
  |
  = note: see issue #76560 <https://github.com/rust-lang/rust/issues/76560> for more information

error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:167:9: ty::TyKind::hash_stable() - can't hash a TyVid _#0t.

thread 'rustc' panicked at 'Box<Any>', compiler/rustc_errors/src/lib.rs:958: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.50.0-nightly (d9a105fdd 2020-11-23) running on x86_64-unknown-linux-gnu

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

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

query stack during panic:
#0 [evaluate_obligation] evaluating trait selection obligation `std::pin::Pin<SmallVec<{ D * 2 }>>: std::ops::Deref`
#1 [method_autoderef_steps] computing autoderef types for `Canonical { max_universe: U0, variables: [CanonicalVarInfo { kind: Region(U0) }, CanonicalVarInfo { kind: Const(U0) }], value: ParamEnvAnd { param_env: ParamEnv { caller_bounds: [ConstEvaluatable(WithOptConstParam { did: DefId(0:10 ~ btree_ice[5d5a]::{impl#0}::{constant#0}), const_param_did: None }, [Const { ty: usize, val: Param(D/#0) }]), OutlivesPredicate(SmallVec<{ D * 2 }>, ReLateBound(DebruijnIndex(0), BrAnon(0)))], reveal: UserFacing }, value: std::pin::Pin<SmallVec<{ D * 2 }>> } }`
end of query stack
error: aborting due to previous error; 2 warnings emitted

error: could not compile `btree_ice`

Considering the rustc versions it should be the same that is currently on the playground, however there it does not cause an ICE. Maybe someone could try to reproduce this in a local environment?

@lcnr
Copy link
Contributor

lcnr commented Nov 24, 2020

can reproduce this locally, not sure why it doesn't ICE on the playground

@camelid
Copy link
Member

camelid commented Nov 24, 2020

cc @shepmaster -- it ICEs locally, but not on the playground

@shepmaster
Copy link
Member

Try with the same settings?

[profile.dev]
codegen-units = 1
incremental = false

[profile.release]
codegen-units = 1
incremental = false

@simon-auch
Copy link
Author

simon-auch commented Nov 24, 2020

That indeed removes the ICE, let me just check which one of the options it is.
Adding incremental = false to the profile.dev (or profile.release in release mode) section causes the ice to disappear.

@camelid
Copy link
Member

camelid commented Nov 24, 2020

That's even weirder. Seems like this is partly an incr-comp bug then.

@camelid camelid added A-incr-comp Area: Incremental compilation I-prioritize Issue: Indicates that prioritization has been requested for this issue. labels Nov 24, 2020
@camelid
Copy link
Member

camelid commented Nov 24, 2020

Note that the ICE occurs in the incr-comp hasher (ICH):

error: internal compiler error: compiler/rustc_middle/src/ich/impls_ty.rs:167:9: ty::TyKind::hash_stable() - can't hash a TyVid _#0t.

So this seems to be an incr-comp bug.

@camelid camelid removed the I-prioritize Issue: Indicates that prioritization has been requested for this issue. label Nov 25, 2020
@camelid
Copy link
Member

camelid commented Nov 25, 2020

Reposting from Zulip:

lcnr:
i expect this bug to happen when hashing a ConstEvaluatable predicate
which only happens with const_evaluatable_checked
I do not think that this can leak onto stable

So I removed I-prioritize.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-const-generics Area: const generics (parameters and arguments) A-incr-comp Area: Incremental compilation C-bug Category: This is a bug. F-generic_const_exprs `#![feature(generic_const_exprs)]` 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.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants