Debian Codegraph @

tests/compile-fail/E0031-no-bound-non-tyvar.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, E0031]
16 //~| [proptest_derive, E0008]
17 struct T1<T> {
18 #[proptest(no_bound)]
19 #[proptest(skip)]
20 field: ::std::marker::PhantomData<T>,
21 }
22
23 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0031]
24 struct T2<T>(
25 #[proptest(no_bound)]
26 ::std::marker::PhantomData<T>,
27 );
28
29 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0031]
30 enum T3<T> {
31 #[proptest(no_bound)]
32 V1(T),
33 }
34
35 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0031]
36 enum T4<T> {
37 #[proptest(no_bound)]
38 V1 {
39 field: T
40 }
41 }
42
43 #[derive(Debug, Arbitrary)] //~ ERROR: [proptest_derive, E0031]
44 enum T5<T> {
45 V1(
46 #[proptest(no_bound)]
47 T
48 ),
49 }