Debian Codegraph @

tests/compile-fail/E0028-skipped-variant-has-weight.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, weight = 2)]
19 V1,
20 }
21
22 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
23 enum T0 {
24 #[proptest(skip, weight = 2)]
25 V1,
26 V2,
27 }
28
29 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
30 enum T1 {
31 #[proptest(skip, w = 3)]
32 V1(u8),
33 V2,
34 }
35
36 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0028]
37 enum T2 {
38 #[proptest(skip, w = 3)]
39 V1 {
40 field: String,
41 },
42 V2,
43 }