regression test for ICE I encountered in my patch.
This commit is contained in:
parent
7e761967ad
commit
f09a0eb9c1
1 changed files with 31 additions and 0 deletions
|
@ -0,0 +1,31 @@
|
||||||
|
// compile-pass
|
||||||
|
#![feature(nll)]
|
||||||
|
|
||||||
|
// This test is reduced from a scenario pnkfelix encountered while
|
||||||
|
// bootstrapping the compiler.
|
||||||
|
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
|
pub struct Spanned<T> {
|
||||||
|
pub node: T,
|
||||||
|
pub span: Span,
|
||||||
|
}
|
||||||
|
|
||||||
|
pub type Variant = Spanned<VariantKind>;
|
||||||
|
// #[derive(Clone)] pub struct Variant { pub node: VariantKind, pub span: Span, }
|
||||||
|
|
||||||
|
#[derive(Clone)]
|
||||||
|
pub struct VariantKind { }
|
||||||
|
|
||||||
|
#[derive(Copy, Clone)]
|
||||||
|
pub struct Span;
|
||||||
|
|
||||||
|
pub fn variant_to_span(variant: Variant) {
|
||||||
|
match variant {
|
||||||
|
Variant {
|
||||||
|
span: _span,
|
||||||
|
..
|
||||||
|
} => { }
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
fn main() { }
|
Loading…
Add table
Add a link
Reference in a new issue