1
1
error[E0080]: it is undefined behavior to use this value
2
- --> $DIR/const_refers_to_static_cross_crate.rs:11 :1
2
+ --> $DIR/const_refers_to_static_cross_crate.rs:12 :1
3
3
|
4
4
LL | / const SLICE_MUT: &[u8; 1] = {
5
5
LL | |
@@ -11,13 +11,13 @@ LL | | };
11
11
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
12
12
13
13
error: could not evaluate constant pattern
14
- --> $DIR/const_refers_to_static_cross_crate.rs:39 :9
14
+ --> $DIR/const_refers_to_static_cross_crate.rs:40 :9
15
15
|
16
16
LL | SLICE_MUT => true,
17
17
| ^^^^^^^^^
18
18
19
19
error[E0080]: it is undefined behavior to use this value
20
- --> $DIR/const_refers_to_static_cross_crate.rs:17 :1
20
+ --> $DIR/const_refers_to_static_cross_crate.rs:18 :1
21
21
|
22
22
LL | / const U8_MUT: &u8 = {
23
23
LL | |
@@ -29,13 +29,13 @@ LL | | };
29
29
= note: The rules on what exactly is undefined behavior aren't clear, so this check might be overzealous. Please open an issue on the rustc repository if you believe it should not be considered undefined behavior.
30
30
31
31
error: could not evaluate constant pattern
32
- --> $DIR/const_refers_to_static_cross_crate.rs:47 :9
32
+ --> $DIR/const_refers_to_static_cross_crate.rs:49 :9
33
33
|
34
34
LL | U8_MUT => true,
35
35
| ^^^^^^
36
36
37
37
warning: any use of this value will cause an error
38
- --> $DIR/const_refers_to_static_cross_crate.rs:26 :14
38
+ --> $DIR/const_refers_to_static_cross_crate.rs:27 :14
39
39
|
40
40
LL | / const U8_MUT2: &u8 = {
41
41
LL | | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
@@ -46,19 +46,19 @@ LL | | };
46
46
| |__-
47
47
|
48
48
note: the lint level is defined here
49
- --> $DIR/const_refers_to_static_cross_crate.rs:24 :8
49
+ --> $DIR/const_refers_to_static_cross_crate.rs:25 :8
50
50
|
51
51
LL | #[warn(const_err)]
52
52
| ^^^^^^^^^
53
53
54
54
error: could not evaluate constant pattern
55
- --> $DIR/const_refers_to_static_cross_crate.rs:57 :9
55
+ --> $DIR/const_refers_to_static_cross_crate.rs:60 :9
56
56
|
57
57
LL | U8_MUT2 => true,
58
58
| ^^^^^^^
59
59
60
60
warning: any use of this value will cause an error
61
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :51
61
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :51
62
62
|
63
63
LL | / const U8_MUT3: &u8 = {
64
64
LL | | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
@@ -69,76 +69,100 @@ LL | | };
69
69
| |__-
70
70
|
71
71
note: the lint level is defined here
72
- --> $DIR/const_refers_to_static_cross_crate.rs:30 :8
72
+ --> $DIR/const_refers_to_static_cross_crate.rs:31 :8
73
73
|
74
74
LL | #[warn(const_err)]
75
75
| ^^^^^^^^^
76
76
77
77
error: could not evaluate constant pattern
78
- --> $DIR/const_refers_to_static_cross_crate.rs:64:9
78
+ --> $DIR/const_refers_to_static_cross_crate.rs:68:9
79
+ |
80
+ LL | U8_MUT3 => true,
81
+ | ^^^^^^^
82
+
83
+ error: could not evaluate constant pattern
84
+ --> $DIR/const_refers_to_static_cross_crate.rs:40:9
85
+ |
86
+ LL | SLICE_MUT => true,
87
+ | ^^^^^^^^^
88
+
89
+ error: could not evaluate constant pattern
90
+ --> $DIR/const_refers_to_static_cross_crate.rs:49:9
91
+ |
92
+ LL | U8_MUT => true,
93
+ | ^^^^^^
94
+
95
+ error: could not evaluate constant pattern
96
+ --> $DIR/const_refers_to_static_cross_crate.rs:60:9
97
+ |
98
+ LL | U8_MUT2 => true,
99
+ | ^^^^^^^
100
+
101
+ error: could not evaluate constant pattern
102
+ --> $DIR/const_refers_to_static_cross_crate.rs:68:9
79
103
|
80
104
LL | U8_MUT3 => true,
81
105
| ^^^^^^^
82
106
83
107
warning: skipping const checks
84
108
|
85
109
help: skipping check that does not even have a feature gate
86
- --> $DIR/const_refers_to_static_cross_crate.rs:14 :15
110
+ --> $DIR/const_refers_to_static_cross_crate.rs:15 :15
87
111
|
88
112
LL | unsafe { &static_cross_crate::ZERO }
89
113
| ^^^^^^^^^^^^^^^^^^^^^^^^
90
114
help: skipping check that does not even have a feature gate
91
- --> $DIR/const_refers_to_static_cross_crate.rs:14 :15
115
+ --> $DIR/const_refers_to_static_cross_crate.rs:15 :15
92
116
|
93
117
LL | unsafe { &static_cross_crate::ZERO }
94
118
| ^^^^^^^^^^^^^^^^^^^^^^^^
95
119
help: skipping check that does not even have a feature gate
96
- --> $DIR/const_refers_to_static_cross_crate.rs:20 :15
120
+ --> $DIR/const_refers_to_static_cross_crate.rs:21 :15
97
121
|
98
122
LL | unsafe { &static_cross_crate::ZERO[0] }
99
123
| ^^^^^^^^^^^^^^^^^^^^^^^^
100
124
help: skipping check that does not even have a feature gate
101
- --> $DIR/const_refers_to_static_cross_crate.rs:20 :15
125
+ --> $DIR/const_refers_to_static_cross_crate.rs:21 :15
102
126
|
103
127
LL | unsafe { &static_cross_crate::ZERO[0] }
104
128
| ^^^^^^^^^^^^^^^^^^^^^^^^
105
129
help: skipping check that does not even have a feature gate
106
- --> $DIR/const_refers_to_static_cross_crate.rs:20 :15
130
+ --> $DIR/const_refers_to_static_cross_crate.rs:21 :15
107
131
|
108
132
LL | unsafe { &static_cross_crate::ZERO[0] }
109
133
| ^^^^^^^^^^^^^^^^^^^^^^^^
110
134
help: skipping check that does not even have a feature gate
111
- --> $DIR/const_refers_to_static_cross_crate.rs:26 :17
135
+ --> $DIR/const_refers_to_static_cross_crate.rs:27 :17
112
136
|
113
137
LL | unsafe { &(*static_cross_crate::ZERO_REF)[0] }
114
138
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
115
139
help: skipping check that does not even have a feature gate
116
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :20
140
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :20
117
141
|
118
142
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
119
143
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
120
144
help: skipping check that does not even have a feature gate
121
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :20
145
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :20
122
146
|
123
147
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
124
148
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
125
149
help: skipping check that does not even have a feature gate
126
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :20
150
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :20
127
151
|
128
152
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
129
153
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
130
154
help: skipping check for `const_panic` feature
131
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :77
155
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :77
132
156
|
133
157
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
134
158
| ^^^^^^^^
135
159
help: skipping check that does not even have a feature gate
136
- --> $DIR/const_refers_to_static_cross_crate.rs:32 :20
160
+ --> $DIR/const_refers_to_static_cross_crate.rs:33 :20
137
161
|
138
162
LL | unsafe { match static_cross_crate::OPT_ZERO { Some(ref u) => u, None => panic!() } }
139
163
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^
140
164
= note: this warning originates in a macro (in Nightly builds, run with -Z macro-backtrace for more info)
141
165
142
- error: aborting due to 6 previous errors; 3 warnings emitted
166
+ error: aborting due to 10 previous errors; 3 warnings emitted
143
167
144
168
For more information about this error, try `rustc --explain E0080`.
0 commit comments