Skip to content
This repository was archived by the owner on May 23, 2024. It is now read-only.

16812 #30

Merged
merged 1 commit into from
Oct 24, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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() {}