-
-
Notifications
You must be signed in to change notification settings - Fork 14.2k
Closed
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️
Description
#![feature(associated_types)]
impl X for f64 { type Y = int; }
trait X {type Y; }
//impl X for f64 { type Y = int; }
fn main() {}gives
error: internal compiler error: unexpected panic
note: the compiler unexpectedly panicked. 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
thread 'rustc' panicked at 'No def'n found for DefId { krate: 0, node: 13 } in tcx.impl_or_trait_items', /build/rust-git/src/rust/src/librustc/middle/ty.rs:4801
Swapping the comments on the impls removes the ICE. Similar to #18611.
(Side note: the above test case started as 46KB of source, but creduce only took two minutes to reduce to basically the above; very cool.)
Metadata
Metadata
Assignees
Labels
A-associated-itemsArea: Associated items (types, constants & functions)Area: Associated items (types, constants & functions)I-ICEIssue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️Issue: The compiler panicked, giving an Internal Compilation Error (ICE) ❄️