Closed
Description
enum Foo {
Bar(u8)
}
fn main(){
foo(|| {
match Foo::Bar(1) {
Foo::Baz(..) => (), //~ ERROR no associated
_ => (),
}
});
}
fn foo<F>(f: F) where F: FnMut() {
f();
}
on rustc 1.5.0-nightly (9d3e79ad3 2015-10-10)
gives an ICE:
rustc on-the-rocks.rs
on-the-rocks.rs:7:13: 7:25 error: no associated item named `Baz` found for type `Foo` in the current scope
on-the-rocks.rs:7 Foo::Baz(..) => (), //~ ERROR no associated
^~~~~~~~~~~~
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/blob/master/CONTRIBUTING.md#bug-reports
note: run with `RUST_BACKTRACE=1` for a backtrace
thread 'rustc' panicked at 'path not fully resolved: PathResolution { base_def: DefTy(DefId { krate: 0, node: DefIndex(4) => Foo }, true), last_private: LastMod(AllPublic), depth: 1 }', ../src/librustc/middle/def.rs:83
I'm working on a fix.