summaryrefslogtreecommitdiffstats
path: root/tests/ui/regions/regions-in-enums.rs
blob: 8cf553a0f35de2bbe0e6c4f14497f1a3065897e6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
// Test that lifetimes must be declared for use on enums.
// See also regions-undeclared.rs

enum Yes0<'lt> {
    X3(&'lt usize)
}

enum Yes1<'a> {
    X4(&'a usize)
}

enum No0 {
    X5(&'foo usize) //~ ERROR use of undeclared lifetime name `'foo`
}

enum No1 {
    X6(&'a usize) //~ ERROR use of undeclared lifetime name `'a`
}

fn main() {}