forked from rust-lang/glacier
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ICE: Unexpected type returned from struct_tai
Reference rust-lang/rust#16812
- Loading branch information
Bruno Tavares
committed
Oct 24, 2015
1 parent
10e8088
commit 57ee9fa
Showing
2 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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() {} |