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: With (unnecessary) extra generic argument #16562

Closed
japaric opened this issue Aug 17, 2014 · 0 comments · Fixed by #18099
Closed

ICE: With (unnecessary) extra generic argument #16562

japaric opened this issue Aug 17, 2014 · 0 comments · Fixed by #18099
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️

Comments

@japaric
Copy link
Member

japaric commented Aug 17, 2014

STR

trait MatrixShape {}

struct Col<D, C> {
    data: D,
    col: C,
}

// NB The `T` parameter is not necessary (it shouldn't be in the list), but it triggers the ICE
impl<T, M: MatrixShape> Collection for Col<M, uint> {
    fn len(&self) -> uint {
        unimplemented!()
    }
}

fn main() {}

Backtrace

ice.rs:9:1: 13:2 error: cannot determine a type for this bounded type parameter: unconstrained type
ice.rs:9 impl<T, M: MatrixShape> Collection for Col<M, uint> {
ice.rs:10     fn len(&self) -> uint {
ice.rs:11         unimplemented!()
ice.rs:12     }
ice.rs:13 }
error: internal compiler error: unexpected failure
note: the compiler hit an unexpected failure path. this is a bug.
note: we would appreciate a bug report: http://doc.rust-lang.org/complement-bugreport.html
note: run with `RUST_BACKTRACE=1` for a backtrace
task 'rustc' failed at 't_f should be a trait', /var/tmp/paludis/build/dev-lang-rust-scm/work/rust-scm/src/librustc/middle/typeck/check/vtable.rs:572

stack backtrace:
   1:     0x7f0a70dc8cf0 - rt::backtrace::imp::write::hd882173939e2d158lxr
   2:     0x7f0a70dcbdc0 - <unknown>
   3:     0x7f0a715a2ce0 - unwind::begin_unwind_inner::h65c561bad0624ee8pie
   4:     0x7f0a719827f0 - <unknown>
   5:     0x7f0a71ef4f60 - <unknown>
   6:     0x7f0a71ef1df0 - <unknown>
   7:     0x7f0a71eb7ea0 - middle::ty::each_bound_trait_and_supertraits::h477415d2339bd77d4iJ
   8:     0x7f0a71ef1870 - <unknown>
   9:     0x7f0a71eef6b0 - <unknown>
  10:     0x7f0a71f002c0 - middle::typeck::check::vtable::resolve_impl::h5d941955100c3ed0hsN
  11:     0x7f0a71f5a4f0 - middle::typeck::check::check_item::h5c01327523eacc2cc8T
  12:     0x7f0a71f61190 - middle::typeck::check::check_item_types::h929141f69725396elyT
  13:     0x7f0a719757a0 - <unknown>
  14:     0x7f0a7216f3c0 - middle::typeck::check_crate::h17528f3293b3d1e3Nbl
  15:     0x7f0a7223d080 - driver::driver::phase_3_run_analysis_passes::hefc53f5f304abf28UMz
  16:     0x7f0a722381c0 - driver::driver::compile_input::h0bf12e1ffd3fd3430yz
  17:     0x7f0a722e56c0 - <unknown>
  18:     0x7f0a722e55d0 - <unknown>
  19:     0x7f0a722f8000 - <unknown>
  20:     0x7f0a722f7e00 - <unknown>
  21:     0x7f0a72d48bb0 - <unknown>
  22:     0x7f0a715f2a90 - <unknown>
  23:     0x7f0a715f2a80 - rust_try
  24:     0x7f0a715a0340 - unwind::try::hb59840f49a9c268eF6d
  25:     0x7f0a715a00e0 - task::Task::run::h16546e7aae493143Zcd
  26:     0x7f0a72d48970 - <unknown>
  27:     0x7f0a715a1f20 - <unknown>
  28:     0x7f0a70859000 - start_thread
  29:     0x7f0a71271269 - clone
  30:                0x0 - <unknown>

Version

rustc 0.12.0-pre (eff87bc9d 2014-08-17 13:11:06 +0000)

Note The ICE doesn't occurr in the playpen (master nor 0.11 snapshot). So the ICE must have been introduced in a recent commit.

wickerwaka pushed a commit to wickerwaka/rust that referenced this issue Sep 1, 2014
Detect ty_err in fixup_substs and return None instead of failing.
In search_for_vtable return vtable_error in both early and non-early
if fixup_substs returns None. This was asserting previously. I don't
know anything about the early vs. non-early stages and whether this
is significant or not.

Reduced the amount of data being printed to the debug log in
tydecode.rs. It was printing several megabytes of metadata.

Added license text to test
@ghost ghost 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 3, 2014
bors added a commit that referenced this issue Oct 18, 2014
Closes #9249.
Closes #13105.
Closes #13837.
Closes #13847.
Closes #15207.
Closes #15261.
Closes #16048. 
Closes #16098.
Closes #16256.
Closes #16562.
Closes #16596.
Closes #16709.
Closes #16747.
Closes #17025.
Closes #17121.
Closes #17450.
Closes #17636.
bors added a commit to rust-lang-ci/rust that referenced this issue Feb 18, 2024
internal: Add a clippy and rustfmt problem matcher to CI
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-needs-test Call for participation: An issue has been fixed and does not reproduce, but no test has been added. I-ICE Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants