Skip to content

Commit

Permalink
ICE: Unexpected type returned from struct_tai
Browse files Browse the repository at this point in the history
  • Loading branch information
Bruno Tavares committed Oct 24, 2015
1 parent 10e8088 commit 57ee9fa
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
9 changes: 9 additions & 0 deletions src/16812_1.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
enum Foo {
Bar(u32, [u32]),
}

fn main() {
// Either of these lines can cause the ICE
let _x: &(u32, [u32]);
let _y: &Foo;
}
18 changes: 18 additions & 0 deletions src/16812_2.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
use std::path::Path;
use std::path::PathBuf;

pub enum Source
{
File(Path), // compiler error :(
//File(PathBuf), // works :)
}

pub fn source_to_dbtype(src: &Source) -> u8
{
match src
{
&Source::File(..) => 1,
}
}

fn main() {}

0 comments on commit 57ee9fa

Please sign in to comment.