blob: cdbe72ca48f8f43797b962aa9d0163b0afdad715 (
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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
|
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:41:14
|
LL | const CFN1: Wrap<fn()> = Wrap(trivial);
| ---------------------- constant defined here
...
LL | Wrap(CFN1) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:49:14
|
LL | const CFN2: Wrap<fn(SM)> = Wrap(sm_to);
| ------------------------ constant defined here
...
LL | Wrap(CFN2) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:57:14
|
LL | const CFN3: Wrap<fn() -> SM> = Wrap(to_sm);
| ---------------------------- constant defined here
...
LL | Wrap(CFN3) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:65:14
|
LL | const CFN4: Wrap<fn(NotSM)> = Wrap(not_sm_to);
| --------------------------- constant defined here
...
LL | Wrap(CFN4) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:73:14
|
LL | const CFN5: Wrap<fn() -> NotSM> = Wrap(to_not_sm);
| ------------------------------- constant defined here
...
LL | Wrap(CFN5) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:81:14
|
LL | const CFN6: Wrap<fn(&SM)> = Wrap(r_sm_to);
| ------------------------- constant defined here
...
LL | Wrap(CFN6) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:89:14
|
LL | const CFN7: Wrap<fn(&()) -> &SM> = Wrap(r_to_r_sm);
| -------------------------------- constant defined here
...
LL | Wrap(CFN7) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:97:14
|
LL | const CFN8: Wrap<fn(&NotSM)> = Wrap(r_not_sm_to);
| ---------------------------- constant defined here
...
LL | Wrap(CFN8) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:105:14
|
LL | const CFN9: Wrap<fn(&()) -> &NotSM> = Wrap(r_to_r_not_sm);
| ----------------------------------- constant defined here
...
LL | Wrap(CFN9) => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: function pointers and raw pointers not derived from integers in patterns behave unpredictably and should not be relied upon
--> $DIR/fn-ptr-is-not-structurally-matchable.rs:127:9
|
LL | const CFOO: Foo = Foo {
| --------------- constant defined here
...
LL | CFOO => count += 1,
| ^^^^ can't be used in patterns
|
= note: see https://github.com/rust-lang/rust/issues/70861 for details
error: aborting due to 10 previous errors
|