summaryrefslogtreecommitdiffstats
path: root/vendor/pin-project-lite/tests/ui/pin_project/invalid-bounds.rs
blob: 64b397a37ed173b93988ac0bcfd27faeea46b69c (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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
use pin_project_lite::pin_project;

pin_project! {
    struct Generics1<T: 'static : Sized> { //~ ERROR no rules expected the token `:`
        field: T,
    }
}

pin_project! {
    struct Generics2<T: 'static : ?Sized> { //~ ERROR no rules expected the token `:`
        field: T,
    }
}

pin_project! {
    struct Generics3<T: Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
        field: T,
    }
}

pin_project! {
    struct Generics4<T: ?Sized : 'static> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
        field: T,
    }
}

pin_project! {
    struct Generics5<T: Sized : ?Sized> { //~ ERROR expected one of `+`, `,`, `=`, or `>`, found `:`
        field: T,
    }
}

pin_project! {
    struct Generics6<T: ?Sized : Sized> { //~ ERROR no rules expected the token `Sized`
        field: T,
    }
}

pin_project! {
    struct WhereClause1<T>
    where
        T: 'static : Sized //~ ERROR no rules expected the token `:`
    {
        field: T,
    }
}

pin_project! {
    struct WhereClause2<T>
    where
        T: 'static : ?Sized //~ ERROR no rules expected the token `:`
    {
        field: T,
    }
}

pin_project! {
    struct WhereClause3<T>
    where
        T: Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
    {
        field: T,
    }
}

pin_project! {
    struct WhereClause4<T>
    where
        T: ?Sized : 'static //~ ERROR expected `where`, or `{` after struct name, found `:`
    {
        field: T,
    }
}

pin_project! {
    struct WhereClause5<T>
    where
        T: Sized : ?Sized //~ ERROR expected `where`, or `{` after struct name, found `:`
    {
        field: T,
    }
}

pin_project! {
    struct WhereClause6<T>
    where
        T: ?Sized : Sized //~ ERROR no rules expected the token `Sized`
    {
        field: T,
    }
}

fn main() {}