Debian Codegraph @

tests/compile-fail/E0028-skipped-variant-has-filter.rs

raw symbols SCIP
1 // Copyright 2018 The proptest developers
2 //
3 // Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
4 // http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
5 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
6 // option. This file may not be copied, modified, or distributed
7 // except according to those terms.
8
9 #[macro_use]
10 extern crate proptest_derive;
11
12 fn main() {}
13
14 #[derive(Debug, Arbitrary)] //~ ERROR: 2 errors
15 //~| [proptest_derive, E0028]
16 //~| [proptest_derive, E0006]
17 enum NonFatal {
18 #[proptest(skip, filter(foo))]
19 V1(u8),
20 }
21
22 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
23 enum T0 {
24 #[proptest(skip, filter(foo))]
25 V1(u8),
26 V2,
27 }
28
29 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
30 enum T1 {
31 #[proptest(
32 skip,
33 filter(foo)
34 )]
35 V1 {
36 field: u8
37 },
38 V2,
39 }
40
41 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
42 enum T2 {
43 #[proptest(skip)]
44 V1(
45 #[proptest(filter(foo))]
46 u8
47 ),
48 V2,
49 }
50
51 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
52 enum T3 {
53 #[proptest(skip)]
54 V1 {
55 #[proptest(filter(foo))]
56 field: u8
57 },
58 V2,
59 }
60
61 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
62 enum T4 {
63 #[proptest(skip, filter(foo))]
64 V1(u8),
65 V2,
66 }
67
68 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
69 enum T5 {
70 #[proptest(skip, filter(foo))]
71 V1 {
72 field: u8
73 },
74 V2,
75 }
76
77 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
78 enum T6 {
79 #[proptest(skip)]
80 V1(
81 #[proptest(filter(foo))]
82 u8
83 ),
84 V2,
85 }
86
87 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
88 enum T7 {
89 #[proptest(skip)]
90 V1 {
91 #[proptest(filter(foo))]
92 field: usize
93 },
94 V2,
95 }
96
97 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
98 enum T8 {
99 #[proptest(skip)]
100 V1 {
101 #[proptest(filter(foo))]
102 field: usize
103 },
104 V2,
105 }
106
107 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
108 enum T9 {
109 #[proptest(skip)]
110 V1 {
111 #[proptest(filter(foo))]
112 field: usize
113 },
114 V2,
115 }
116
117 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
118 enum T10 {
119 #[proptest(skip)]
120 V1 {
121 #[proptest(filter(foo))]
122 field: usize
123 },
124 V2,
125 }