Skip to content

ICE: Computing fictitious types #6319

Closed
@alexcrichton

Description

@alexcrichton

This program

fn error(m: uint, positions: ~[()]) { 
  match m {                           
    i => {                            
      let (a, b) = positions[i];      
    }                                 
  }                                   
}                                     

fn main() {}                          

generates:

$ rustc ./foo.rs
error: internal compiler error: Asked to compute contents of fictitious type

Additionally, a similar program

fn error(m: uint, positions: ~[()]) { 
  let (a, b) = positions[m];      
}                                     

fn main() {}                          

yields

$ rustc ./foo.rs
./foo.rs:4:11: 4:12 warning: unused variable: `a`
./foo.rs:4       let (a, b) = positions[m];
                      ^
./foo.rs:4:14: 4:15 warning: unused variable: `b`
./foo.rs:4       let (a, b) = positions[m];
                         ^
error: internal compiler error: adt::represent_type called on non-ADT type

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions