blob: ff5b2244e4833110b15f14ced7af162782820c64 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
// check-pass
// 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() { }
|