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

Where clause Binder(<...>) was applicable to Obligation(predicate=Binder(TraitPredicate(<...>)),depth=1) but now is not #52893

Closed
akiselev opened this issue Jul 31, 2018 · 10 comments · Fixed by #89768
Labels
A-traits Area: Trait system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@akiselev
Copy link
Contributor

akiselev commented Jul 31, 2018

EDITED: MCVE is here: #52893 (comment)

error: internal compiler error: librustc\traits\select.rs:2469: Where clause `Binder(<Class<P, T> as At<Name>>)` was applicable to `Obligation(predicate=Binder(TraitPredicate(<Class<_, _> as At<_>>)),depth=1)` but now is not

thread 'main' panicked at 'Box<Any>', librustc_errors\lib.rs:554:9
stack backtrace:
   0: <u128 as compiler_builtins::int::Int>::min_value
   1: <std::sync::mpsc::RecvTimeoutError as std::error::Error>::cause
   2: std::panicking::take_hook
   3: std::panicking::take_hook
   4: rustc::ty::structural_impls::<impl rustc::ty::context::Lift<'tcx> for rustc::middle::const_val::ErrKind<'a>>::lift_to_tcx
   5: std::panicking::rust_panic_with_hook
   6: <rustc_errors::diagnostic::SubDiagnostic as core::fmt::Debug>::fmt
   7: rustc_errors::Handler::bug
   8: rustc::mir::interpret::UndefMask::grow
   9: rustc::ty::context::tls::track_diagnostic
  10: rustc::ty::context::tls::track_diagnostic
  11: rustc::ty::context::tls::track_diagnostic
  12: rustc::session::bug_fmt
  13: rustc::session::bug_fmt
  14: rustc::traits::select::SelectionContext::coinductive_predicate
  15: rustc::traits::select::SelectionContext::select
  16: rustc::infer::InferCtxt::commit_from
  17: rustc::traits::project::normalize_projection_type
  18: rustc::traits::project::normalize_projection_type
  19: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  20: <rustc::hir::intravisit::IdRange as core::fmt::Debug>::fmt
  21: rustc::ty::fast_reject::simplify_type
  22: rustc::ty::fast_reject::simplify_type
  23: rustc::traits::project::poly_project_and_unify_type
  24: rustc::ty::context::TyCtxt::_intern_canonical_var_infos
  25: <unknown>
  26: <unknown>
  27: rustc::traits::select::SelectionContext::coinductive_predicate
  28: rustc::traits::select::SelectionContext::coinductive_predicate
  29: rustc::traits::select::SelectionContext::select
  30: rustc::infer::InferCtxt::commit_from
  31: rustc::traits::project::normalize_projection_type
  32: rustc::traits::project::normalize_projection_type
  33: <rustc::traits::project::AssociatedTypeNormalizer<'a, 'b, 'gcx, 'tcx> as rustc::ty::fold::TypeFolder<'gcx, 'tcx>>::fold_ty
  34: <rustc_typeck::coherence::inherent_impls_overlap::InherentOverlapChecker<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
  35: <rustc_typeck::check::method::probe::ProbeContext<'a, 'gcx, 'tcx> as core::ops::deref::Deref>::deref
  36: <rustc_typeck::check::method::probe::ProbeContext<'a, 'gcx, 'tcx> as core::ops::deref::Deref>::deref
  37: <rustc_typeck::check::method::probe::ProbeContext<'a, 'gcx, 'tcx> as core::ops::deref::Deref>::deref
  38: rustc_typeck::hir_trait_to_predicates
  39: <unknown>
  40: <unknown>
  41: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  42: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  43: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  44: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  45: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  46: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  47: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  48: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  49: <rustc_typeck::check::FnCtxt<'a, 'gcx, 'tcx> as rustc_typeck::astconv::AstConv<'gcx, 'tcx>>::record_ty
  50: <rustc_typeck::check::GatherLocalsVisitor<'a, 'gcx, 'tcx> as rustc::hir::intravisit::Visitor<'gcx>>::visit_pat
  51: <rustc_typeck::coherence::inherent_impls_overlap::InherentOverlapChecker<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'v>>::visit_trait_item
  52: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  53: rustc::ty::maps::<impl rustc::ty::maps::config::QueryConfig<'tcx> for rustc::ty::maps::queries::typeck_tables_of<'tcx>>::compute
  54: rustc::ty::context::tls::track_diagnostic
  55: rustc::dep_graph::graph::DepGraph::assert_ignored
  56: rustc::ty::context::tls::track_diagnostic
  57: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_mark_green_and_read
  58: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_mark_green_and_read
  59: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_mark_green_and_read
  60: <rustc_typeck::check::Diverges as core::fmt::Debug>::fmt
  61: <rustc_typeck::check::CheckItemTypesVisitor<'a, 'tcx> as rustc::hir::itemlikevisit::ItemLikeVisitor<'tcx>>::visit_item
  62: rustc::ty::context::tls::track_diagnostic
  63: rustc::dep_graph::graph::DepGraph::assert_ignored
  64: rustc::ty::context::tls::track_diagnostic
  65: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_mark_green_and_read
  66: rustc::ty::maps::plumbing::<impl rustc::ty::context::TyCtxt<'a, 'gcx, 'tcx>>::try_mark_green_and_read
  67: rustc_typeck::check_crate
  68: <env_logger::Logger as log::Log>::flush
  69: <rustc_driver::pretty::UserIdentifiedItem as core::fmt::Debug>::fmt
  70: <unknown>
  71: rustc_driver::driver::compile_input
  72: rustc_driver::run_compiler
  73: rustc_driver::driver::build_output_filenames
  74: <unknown>
  75: rustc_driver::driver::build_output_filenames
  76: _rust_maybe_catch_panic
  77: rustc_driver::profile::trace::write_style
  78: rustc_driver::main
  79: <unknown>
  80: std::panicking::update_panic_count
  81: _rust_maybe_catch_panic
  82: std::rt::lang_start_internal
  83: <unknown>
  84: <unknown>
  85: BaseThreadInitThunk
  86: RtlUserThreadStart
query stack during panic:
#0 [typeck_tables_of] processing `<Class<P, T> as AddClass<Name, F>>::init`
#1 [typeck_item_bodies] type-checking all item bodies
end of query stack
error: aborting due to previous error


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

note: we would appreciate a bug report: https://github.com/rust-lang/rust/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.27.2 (58cc626de 2018-07-18) running on x86_64-pc-windows-msvc

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

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

with

rustc 1.27.2 (58cc626de 2018-07-18)
binary: rustc
commit-hash: 58cc626de3301192d5d8c6dcbde43b5b44211ae2
commit-date: 2018-07-18
host: x86_64-pc-windows-msvc
release: 1.27.2
LLVM version: 6.0

From the code (Offending implementation at the top, specifically <X as Entry>::Data: Fn(Y) -> Class<P, OLIST>:

extern crate frunk;
extern crate frunk_core;

use std::marker::PhantomData;
use frunk::*;
use frunk::prelude::*;

impl<P, T, Name, F, OLIST: HList, X, Y, FINAL> AddClass<Name, F> for Class<P, T> 
where
    Self: At<Name>,
    Self::AtRes: Entry<Data=T>,
    X: Entry,
    F: Fn(Y) ->OLIST,
    T: Push<(PhantomData<HCons<Name, HCons<P, HNil>>>, F)>,
    <X as Entry>::Data: Fn(Y) -> Class<P, OLIST>,
    <Class<P, T> as At<Name>>::AtRes: Push<(Path<Hlist![Name, P]>, F)>,
    <<Class<P, T> as At<Name>>::AtRes as Push<(Path<Hlist![Name, P]>, F)>>::PushRes: for<'this> ToRef<'this, Output=HCons<X, Y>> + Push<OLIST>,
    <<<Class<P, T> as At<Name>>::AtRes as Push<(Path<HCons<Name, HCons<P, HNil>>>, F)>>::PushRes as Push<OLIST>>::PushRes: Entry<Data=FINAL>
{
    type Output = Class<P, FINAL>;

    fn init(self, func: F) -> Self::Output {
        let builder = self.at();
        let builder = builder.push((Path::new(), func));
        let output = {
            let refs = builder.to_ref();
            let func = refs.head.borrow_data();
            func(refs.tail)
        };
        let final_data = builder.push(output);
        Class {
            path: Path::new(),
            data: final_data.get_data()
        }
    }
}

struct Class<P, T> {
    path: Path<P>,
    data: T
}

trait At<Name> {
    type AtRes;

    fn at(self) -> Self::AtRes;
}

trait Push<T> {
    type PushRes;

    fn push(self, other: T) -> Self::PushRes;
}

impl<T> Push<T> for HNil {
    type PushRes = HCons<T, HNil>;

    fn push(self, other: T) -> HCons<T, HNil> {
        HCons {
            head: other,
            tail: HNil
        }
    }
}

impl<T, HEAD, TAIL> Push<T> for HCons<HEAD, TAIL> {
    type PushRes = HCons<T, HCons<HEAD, TAIL>>;

    fn push(self, other: T) -> HCons<T, HCons<HEAD, TAIL>> {
        HCons {
            head: other,
            tail: self
        }
    }
}

impl<Name, P, T> At<Name> for Class<P, T> {
    type AtRes = Class<HCons<Name, P>, T>;

    fn at(self) -> Class<HCons<Name, P>, T> {
        Class {
            path: Path::new(),
            data: self.data
        }
    }
}

trait AddClass<Name, F>: At<Name> {
    type Output;

    fn init(self, func: F) -> Self::Output;
}

trait Entry {
    type Path;
    type Data;

    fn get_data(self) -> Self::Data;
    fn borrow_data(&self) -> &Self::Data;
}

impl<N, T> Entry for (N, T) {
    type Path = N;
    type Data = T;

    fn get_data(self) -> Self::Data {
        self.1
    }

    fn borrow_data(&self) -> &Self::Data {
        &self.1
    }
}

impl<N, T> Entry for Class<N, T> {
    type Path = N;
    type Data = T;

    fn get_data(self) -> Self::Data {
        self.data
    }

    fn borrow_data(&self) -> &Self::Data {
        &self.data
    }
}

impl<'this, P, T: 'this> ToRef<'this> for Class<P, T>
where
    <Class<P, T> as Entry>::Data: ToRef<'this>,
    <T as frunk_core::traits::ToRef<'this>>::Output: 'this,
    T: frunk_core::traits::ToRef<'this>,
{
    type Output = <<Self as Entry>::Data as ToRef<'this>>::Output;

    fn to_ref(&'this self) -> <T as ToRef<'this>>::Output {
        self.borrow_data().to_ref()
    }
}

impl<P: HList, T> Class<P, T> {
    fn at<Name>(self) -> Class<HCons<Name, P>, T> {
        Class {
            path: Path::new(),
            data: self.data
        }
    }

    fn with<Name, F>(self, constructor: F) -> <Self as AddClass<Name, F>>::Output
    where 
        Self: AddClass<Name, F>
    {
        self.init(constructor)
    }

    fn from<F>(self, constructor: F) -> <Self as AddClass<P, F>>::Output
    where 
        Self: AddClass<P, F>
    {
        self.init(constructor)
    }
}

#[derive(Copy, Clone, Debug)]
pub struct Path<T> {
    path: PhantomData<T>
}

impl<P> Path<P> {
    pub fn new() -> Path<P> {
        Path {
            path: PhantomData
        }
    }
}

pub struct VEntry<P, T> {
    path: Path<P>,
    data: PhantomData<T>
}

Changing F: Fn(Y) -> OLIST to F: Fn(Y) -> Class<P, OLIST> does not fix the crash. Changing <X as Entry>::Data: Fn(Y) -> Class<P, OLIST> to <X as Entry>::Data: Fn(Y) -> OLIST compiles. The latter is the correct implementation and I discovered this crash in the middle of some refactoring so I did not expect anything specific to happen except a type checking error.

The crash also happens in nightly 2018-7-23 and 2018-7-30.

@cramertj cramertj added the I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ label Jul 31, 2018
@jonas-schievink jonas-schievink added A-traits Area: Trait system C-bug Category: This is a bug. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 18, 2019
@Centril Centril added the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Mar 10, 2020
@Centril
Copy link
Contributor

Centril commented Mar 10, 2020

@akiselev Do you think you could create a reproducer that doesn't depend on external crates?

@akiselev
Copy link
Contributor Author

@Centril I gave it a shot but I think I'm getting other confounding bugs and I can't get the type checking to pass. It's been over a year since I've looked at this Cthulhu's nest of code so I can't even tell if I'm moving in the right direction.

Good news is, it still crashes in its original form on rustc 1.41.1 (f3e1a954d 2020-02-24) stable-x86_64-apple-darwin!


error: internal compiler error: src/librustc/traits/select.rs:2933: Where clause `Binder(<Class<P, T> as At<Name>>)` was applicable to `Obligation(predicate=Binder(TraitPredicate(<Class<_, _> as At<_>>)), depth=1)` but now is not

thread 'rustc' panicked at 'Box<Any>', src/librustc_errors/lib.rs:905:9
stack backtrace:
   0: <unknown>
   1: <unknown>
   2: <unknown>
   3: <unknown>
   4: <unknown>
   5: <unknown>
   6: <unknown>
   7: <unknown>
   8: <unknown>
   9: <unknown>
  10: <unknown>
  11: <unknown>
  12: <unknown>
  13: <unknown>
  14: <unknown>
  15: <unknown>
  16: <unknown>
  17: <unknown>
  18: <unknown>
  19: <unknown>
  20: <unknown>
  21: <unknown>
  22: <unknown>
  23: <unknown>
  24: <unknown>
  25: <unknown>
  26: <unknown>
  27: <unknown>
  28: <unknown>
  29: <unknown>
  30: <unknown>
  31: <unknown>
  32: <unknown>
  33: <unknown>
  34: <unknown>
  35: <unknown>
  36: <unknown>
  37: <unknown>
  38: <unknown>
  39: <unknown>
  40: <unknown>
  41: <unknown>
  42: <unknown>
  43: <unknown>
  44: <unknown>
  45: <unknown>
  46: <unknown>
  47: <unknown>
  48: <unknown>
  49: <unknown>
  50: <unknown>
  51: <unknown>
  52: <unknown>
  53: <unknown>
  54: <unknown>
  55: <unknown>
  56: <unknown>
  57: <unknown>
  58: <unknown>
  59: <unknown>
  60: <unknown>
  61: <unknown>
  62: <unknown>
  63: <unknown>
  64: <unknown>
  65: <unknown>
  66: <unknown>
  67: <unknown>
  68: <unknown>
  69: <unknown>
  70: <unknown>
  71: <unknown>
  72: <unknown>
  73: <unknown>
  74: <unknown>
  75: <unknown>
  76: <unknown>
  77: <unknown>
  78: <unknown>
  79: <unknown>
  80: <unknown>
  81: <unknown>
  82: <unknown>
  83: <unknown>
  84: <unknown>
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/blob/master/CONTRIBUTING.md#bug-reports

note: rustc 1.41.1 (f3e1a954d 2020-02-24) running on x86_64-apple-darwin

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

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

query stack during panic:
#0 [typeck_tables_of] processing `<Class<P, T> as AddClass<Name, F>>::init`
#1 [typeck_item_bodies] type-checking all item bodies
#2 [analysis] running analysis passes on this crate
end of query stack
error: aborting due to previous error

Cargo.toml

[package]
name = "vtable"
version = "0.1.0"
authors = ["akiselev <code@akiselev.com>"]
edition = '2018'

[lib]
name = "vtable"

[dependencies]
frunk = "0.2.0"
frunk_core = { version = "0.2.0", features = ["serde"] }
failure = "0.1.1"
serde = "1.0.70"
serde_derive = "1.0.70"
serde_json = "1.0.24"

Cargo.lock (from a parent workspace)

# This file is automatically @generated by Cargo.
# It is not intended for manual editing.
[[package]]
name = "backtrace"
version = "0.3.45"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ad235dabf00f36301792cfe82499880ba54c6486be094d1047b02bacb67c14e8"
dependencies = [
 "backtrace-sys",
 "cfg-if",
 "libc",
 "rustc-demangle",
]

[[package]]
name = "backtrace-sys"
version = "0.1.34"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ca797db0057bae1a7aa2eef3283a874695455cecf08a43bfb8507ee0ebc1ed69"
dependencies = [
 "cc",
 "libc",
]

[[package]]
name = "cc"
version = "1.0.50"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "95e28fa049fda1c330bcf9d723be7663a899c4679724b34c81e9f5a326aab8cd"

[[package]]
name = "cfg-if"
version = "0.1.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4785bdd1c96b2a846b2bd7cc02e86b6b3dbf14e7e53446c4f54c92a361040822"

[[package]]
name = "failure"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8529c2421efa3066a5cbd8063d2244603824daccb6936b079010bb2aa89464b"
dependencies = [
 "backtrace",
 "failure_derive",
]

[[package]]
name = "failure_derive"
version = "0.1.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "030a733c8287d6213886dd487564ff5c8f6aae10278b3588ed177f9d18f8d231"
dependencies = [
 "proc-macro2 1.0.9",
 "quote 1.0.3",
 "syn 1.0.16",
 "synstructure",
]

[[package]]
name = "frunk"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8313555ac9fdcbe88b502fbd5b9f7de3270654635444d8279242613ad3fdc41e"
dependencies = [
 "frunk_core",
 "frunk_derives",
 "frunk_proc_macros",
]

[[package]]
name = "frunk_core"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26c09b4b25ef220d9b6ac31dc0bb3479fccdf539598893f1cbf27d5a5bc324b5"
dependencies = [
 "serde",
]

[[package]]
name = "frunk_derives"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "04a917380b97872efb7a5e560cbd67f6234c90133a60a8a17aa3b053b95d103f"
dependencies = [
 "frunk_core",
 "frunk_proc_macro_helpers",
 "quote 0.6.13",
 "syn 0.15.44",
]

[[package]]
name = "frunk_proc_macro_helpers"
version = "0.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "127176d3c96d6a9011bdb87194bd06b6f01c2524070a61669ad600cb4f3f08f6"
dependencies = [
 "frunk_core",
 "quote 0.6.13",
 "syn 0.15.44",
]

[[package]]
name = "frunk_proc_macros"
version = "0.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "46a82ea7fce299f0f0f78233cdf373425b13fa9c2b04df42d2bd3187d2cfe4fb"
dependencies = [
 "frunk_core",
 "frunk_proc_macros_impl",
 "proc-macro-hack",
 "quote 0.6.13",
 "syn 0.15.44",
]

[[package]]
name = "frunk_proc_macros_impl"
version = "0.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "98e073845f3791501385f17aa96d03527d982a9483013706684c86450c4fe3d0"
dependencies = [
 "frunk_core",
 "frunk_proc_macro_helpers",
 "proc-macro-hack",
 "quote 0.6.13",
 "syn 0.15.44",
]

[[package]]
name = "itoa"
version = "0.4.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b8b7a7c0c47db5545ed3fef7468ee7bb5b74691498139e4b3f6a20685dc6dd8e"

[[package]]
name = "libc"
version = "0.2.67"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb147597cdf94ed43ab7a9038716637d2d1bf2bc571da995d0028dec06bd3018"

[[package]]
name = "proc-macro-hack"
version = "0.5.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ecd45702f76d6d3c75a80564378ae228a85f0b59d2f3ed43c91b4a69eb2ebfc5"
dependencies = [
 "proc-macro2 1.0.9",
 "quote 1.0.3",
 "syn 1.0.16",
]

[[package]]
name = "proc-macro2"
version = "0.4.30"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf3d2011ab5c909338f7887f4fc896d35932e29146c12c8d01da6b22a80ba759"
dependencies = [
 "unicode-xid 0.1.0",
]

[[package]]
name = "proc-macro2"
version = "1.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6c09721c6781493a2a492a96b5a5bf19b65917fe6728884e7c44dd0c60ca3435"
dependencies = [
 "unicode-xid 0.2.0",
]

[[package]]
name = "quote"
version = "0.6.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ce23b6b870e8f94f81fb0a363d65d86675884b34a09043c81e5562f11c1f8e1"
dependencies = [
 "proc-macro2 0.4.30",
]

[[package]]
name = "quote"
version = "1.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2bdc6c187c65bca4260c9011c9e3132efe4909da44726bad24cf7572ae338d7f"
dependencies = [
 "proc-macro2 1.0.9",
]

[[package]]
name = "rustc-demangle"
version = "0.1.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c691c0e608126e00913e33f0ccf3727d5fc84573623b8d65b2df340b5201783"

[[package]]
name = "ryu"
version = "1.0.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfa8506c1de11c9c4e4c38863ccbe02a305c8188e85a05a784c9e11e1c3910c8"

[[package]]
name = "serde"
version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "414115f25f818d7dfccec8ee535d76949ae78584fc4f79a6f45a904bf8ab4449"
dependencies = [
 "serde_derive",
]

[[package]]
name = "serde_derive"
version = "1.0.104"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "128f9e303a5a29922045a830221b8f78ec74a5f544944f3d5984f8ec3895ef64"
dependencies = [
 "proc-macro2 1.0.9",
 "quote 1.0.3",
 "syn 1.0.16",
]

[[package]]
name = "serde_json"
version = "1.0.48"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9371ade75d4c2d6cb154141b9752cf3781ec9c05e0e5cf35060e1e70ee7b9c25"
dependencies = [
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "syn"
version = "0.15.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9ca4b3b69a77cbe1ffc9e198781b7acb0c7365a883670e8f1c1bc66fba79a5c5"
dependencies = [
 "proc-macro2 0.4.30",
 "quote 0.6.13",
 "unicode-xid 0.1.0",
]

[[package]]
name = "syn"
version = "1.0.16"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "123bd9499cfb380418d509322d7a6d52e5315f064fe4b3ad18a53d6b92c07859"
dependencies = [
 "proc-macro2 1.0.9",
 "quote 1.0.3",
 "unicode-xid 0.2.0",
]

[[package]]
name = "synstructure"
version = "0.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "67656ea1dc1b41b1451851562ea232ec2e5a80242139f7e679ceccfb5d61f545"
dependencies = [
 "proc-macro2 1.0.9",
 "quote 1.0.3",
 "syn 1.0.16",
 "unicode-xid 0.2.0",
]

[[package]]
name = "unicode-xid"
version = "0.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fc72304796d0818e357ead4e000d19c9c174ab23dc11093ac919054d20a6a7fc"

[[package]]
name = "unicode-xid"
version = "0.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826e7639553986605ec5979c7dd957c7895e93eabed50ab2ffa7f6128a75097c"

[[package]]
name = "vtable"
version = "0.1.0"
dependencies = [
 "failure",
 "frunk",
 "frunk_core",
 "serde",
 "serde_derive",
 "serde_json",
]

@Centril
Copy link
Contributor

Centril commented Mar 12, 2020

@rustbot ping ICEBreaker-Cleanup-Crew

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2020

Error: This team (ICEBreaker-Cleanup-Crew) cannot be pinged via this command;it may need to be added to triagebot.toml on the master branch.

Please let @rust-lang/release know if you're having trouble with this bot.

@Centril
Copy link
Contributor

Centril commented Mar 12, 2020

Let's see if we can get some help reducing the bug.

@rustbot ping icebreakers-cleanup-crew

@rustbot
Copy link
Collaborator

rustbot commented Mar 12, 2020

Hey Cleanup Crew ICE-breakers! This bug has been identified as a good
"Cleanup ICE-breaking candidate". In case it's useful, here are some
instructions for tackling these sorts of bugs. Maybe take a look?
Thanks! <3

cc @AminArria @chrissimpkins @contrun @DutchGhost @elshize @ethanboxx @h-michael @HallerPatrick @hdhoang @hellow554 @imtsuki @jakevossen5 @KarlK90 @LeSeulArtichaut @matheus-consoli @mental32 @nmccarty @Noah-Kennedy @pard68 @PeytonT @pierreN @Redblueflame @RobbieClarken @RobertoSnap @robjtede @SarthakSingh31 @senden9 @shekohex @sinato @spastorino @turboladen @woshilapin @yerke

@rustbot rustbot added the ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections label Mar 12, 2020
@pierreN
Copy link

pierreN commented Mar 12, 2020

Hi! First time I have some time to do some ICE work.

I could remove the frunk/frunk_core dependency and some trait implementations + simplify the where clause, and still have the compiler error : https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=e1c21a83a8395398330ddba7712a7f81 (thanks @hellow554 )

(other older bigger versions :
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=1aac277c8d36058712d3e8484553074c
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=bfb22ac86cab4c69f3f0eec1614d7864
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=3730b6c9fcdb911af08ae8fa4023f34e
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=d16040a3cbea4937ab97cef9926e4986
https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=167f57ce55de8123836b25d582c3b382 )

You could make Class::path and Class::data the same type but unless you change the Class<OLIST> as described above, you will get :

error[E0308]: mismatched types
  --> src/main.rs:25:39
   |
3  | impl<T, F, OLIST: HList, X, Y, FINAL> AddClass<F> for Class<T>
   |            ----- this type parameter
...
25 |         let final_data = builder.push(output);
   |                                       ^^^^^^ expected type parameter `OLIST`, found struct `Class`
   |
   = note: expected type parameter `OLIST`
                      found struct `Class<OLIST>`
   = help: type parameters must be constrained to match other types
   = note: for more information, visit https://doc.rust-lang.org/book/ch10-02-traits.html#traits-as-parameters

Which is I think the intended behavior by the author (once the rustc bug is fixed). Removing Name type from At also stops the bug from occuring. Curious to know how it pans out.

@hellow554
Copy link
Contributor

@pierreN removing all comments is also recommended ;) but good work so far!

@woshilapin
Copy link
Contributor

Thanks to the Rust playground provided by @pierreN, I was able to reduce a little bit more the example, removing a bunch more generic constraints, some functions, some useless body functions.

https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=c62b7e648247d70f210930efeb42fb10

fanninpm added a commit to fanninpm/glacier that referenced this issue Dec 17, 2020
@JohnTitor JohnTitor removed the E-needs-mcve Call for participation: This issue has a repro, but needs a Minimal Complete and Verifiable Example label Dec 17, 2020
fanninpm added a commit to fanninpm/glacier that referenced this issue Dec 19, 2020
@rust-lang-glacier-bot rust-lang-glacier-bot added the glacier ICE tracked in rust-lang/glacier. label Dec 20, 2020
@Alexendoo
Copy link
Member

No longer ICEs since #86506

@Alexendoo Alexendoo added the E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. label Oct 10, 2021
JohnTitor added a commit to JohnTitor/rust that referenced this issue Oct 13, 2021
add some more testcases

resolves rust-lang#52893
resolves rust-lang#68295
resolves rust-lang#87750
resolves rust-lang#88071

All these issues have been fixed according to glacier. Just adding a test so it can be closed.

Can anybody tell me why the github keywords do not work? 🤔
Please edit this post if you can fix it.
the8472 added a commit to the8472/rust that referenced this issue Oct 13, 2021
add some more testcases

resolves rust-lang#52893
resolves rust-lang#68295
resolves rust-lang#87750
resolves rust-lang#88071

All these issues have been fixed according to glacier. Just adding a test so it can be closed.

Can anybody tell me why the github keywords do not work? 🤔
Please edit this post if you can fix it.
@bors bors closed this as completed in 0caa616 Oct 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-traits Area: Trait system C-bug Category: This is a bug. E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. glacier ICE tracked in rust-lang/glacier. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️ ICEBreaker-Cleanup-Crew Helping to "clean up" bugs with minimal examples and bisections 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.