]> git.lizzy.rs Git - rust.git/blob - tests/ui/nll/user-annotations/issue-54570-bootstrapping.rs
Rollup merge of #106946 - dtolnay:hashlinecolumn, r=m-ou-se
[rust.git] / tests / ui / nll / user-annotations / issue-54570-bootstrapping.rs
1 // check-pass
2
3 // This test is reduced from a scenario pnkfelix encountered while
4 // bootstrapping the compiler.
5
6 #[derive(Copy, Clone)]
7 pub struct Spanned<T> {
8     pub node: T,
9     pub span: Span,
10 }
11
12 pub type Variant = Spanned<VariantKind>;
13 // #[derive(Clone)] pub struct Variant { pub node: VariantKind, pub span: Span, }
14
15 #[derive(Clone)]
16 pub struct VariantKind { }
17
18 #[derive(Copy, Clone)]
19 pub struct Span;
20
21 pub fn variant_to_span(variant: Variant) {
22     match variant {
23         Variant {
24             span: _span,
25             ..
26         } => { }
27     };
28 }
29
30 fn main() { }