Skip to content

Commit 976131f

Browse files
committed
stabilize const_mut_refs
1 parent b5ea5c2 commit 976131f

File tree

4 files changed

+29
-31
lines changed

4 files changed

+29
-31
lines changed

tests/ui/arithmetic_side_effects.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
//@aux-build:proc_macro_derive.rs
22

3+
#![feature(f128)]
4+
#![feature(f16)]
5+
36
#![allow(
47
clippy::assign_op_pattern,
58
clippy::erasing_op,
@@ -10,9 +13,6 @@
1013
arithmetic_overflow,
1114
unconditional_panic
1215
)]
13-
#![feature(const_mut_refs)]
14-
#![feature(f128)]
15-
#![feature(f16)]
1616
#![warn(clippy::arithmetic_side_effects)]
1717

1818
extern crate proc_macro_derive;

tests/ui/missing_const_for_fn/could_be_const.fixed

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![warn(clippy::missing_const_for_fn)]
22
#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)]
33
#![allow(unsupported_calling_conventions)]
4-
#![feature(const_mut_refs)]
54
#![feature(const_trait_impl)]
65

76
use std::mem::transmute;

tests/ui/missing_const_for_fn/could_be_const.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#![warn(clippy::missing_const_for_fn)]
22
#![allow(incomplete_features, clippy::let_and_return, clippy::missing_transmute_annotations)]
33
#![allow(unsupported_calling_conventions)]
4-
#![feature(const_mut_refs)]
54
#![feature(const_trait_impl)]
65

76
use std::mem::transmute;

tests/ui/missing_const_for_fn/could_be_const.stderr

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
error: this could be a `const fn`
2-
--> tests/ui/missing_const_for_fn/could_be_const.rs:15:5
2+
--> tests/ui/missing_const_for_fn/could_be_const.rs:14:5
33
|
44
LL | / pub fn new() -> Self {
55
LL | |
@@ -16,7 +16,7 @@ LL | pub const fn new() -> Self {
1616
| +++++
1717

1818
error: this could be a `const fn`
19-
--> tests/ui/missing_const_for_fn/could_be_const.rs:21:5
19+
--> tests/ui/missing_const_for_fn/could_be_const.rs:20:5
2020
|
2121
LL | / fn const_generic_params<'a, T, const N: usize>(&self, b: &'a [T; N]) -> &'a [T; N] {
2222
LL | |
@@ -30,7 +30,7 @@ LL | const fn const_generic_params<'a, T, const N: usize>(&self, b: &'a [T;
3030
| +++++
3131

3232
error: this could be a `const fn`
33-
--> tests/ui/missing_const_for_fn/could_be_const.rs:28:1
33+
--> tests/ui/missing_const_for_fn/could_be_const.rs:27:1
3434
|
3535
LL | / fn one() -> i32 {
3636
LL | |
@@ -44,7 +44,7 @@ LL | const fn one() -> i32 {
4444
| +++++
4545

4646
error: this could be a `const fn`
47-
--> tests/ui/missing_const_for_fn/could_be_const.rs:34:1
47+
--> tests/ui/missing_const_for_fn/could_be_const.rs:33:1
4848
|
4949
LL | / fn two() -> i32 {
5050
LL | |
@@ -59,7 +59,7 @@ LL | const fn two() -> i32 {
5959
| +++++
6060

6161
error: this could be a `const fn`
62-
--> tests/ui/missing_const_for_fn/could_be_const.rs:41:1
62+
--> tests/ui/missing_const_for_fn/could_be_const.rs:40:1
6363
|
6464
LL | / fn string() -> String {
6565
LL | |
@@ -73,7 +73,7 @@ LL | const fn string() -> String {
7373
| +++++
7474

7575
error: this could be a `const fn`
76-
--> tests/ui/missing_const_for_fn/could_be_const.rs:47:1
76+
--> tests/ui/missing_const_for_fn/could_be_const.rs:46:1
7777
|
7878
LL | / unsafe fn four() -> i32 {
7979
LL | |
@@ -87,7 +87,7 @@ LL | const unsafe fn four() -> i32 {
8787
| +++++
8888

8989
error: this could be a `const fn`
90-
--> tests/ui/missing_const_for_fn/could_be_const.rs:53:1
90+
--> tests/ui/missing_const_for_fn/could_be_const.rs:52:1
9191
|
9292
LL | / fn generic<T>(t: T) -> T {
9393
LL | |
@@ -101,7 +101,7 @@ LL | const fn generic<T>(t: T) -> T {
101101
| +++++
102102

103103
error: this could be a `const fn`
104-
--> tests/ui/missing_const_for_fn/could_be_const.rs:62:1
104+
--> tests/ui/missing_const_for_fn/could_be_const.rs:61:1
105105
|
106106
LL | / fn generic_arr<T: Copy>(t: [T; 1]) -> T {
107107
LL | |
@@ -115,7 +115,7 @@ LL | const fn generic_arr<T: Copy>(t: [T; 1]) -> T {
115115
| +++++
116116

117117
error: this could be a `const fn`
118-
--> tests/ui/missing_const_for_fn/could_be_const.rs:76:9
118+
--> tests/ui/missing_const_for_fn/could_be_const.rs:75:9
119119
|
120120
LL | / pub fn b(self, a: &A) -> B {
121121
LL | |
@@ -129,7 +129,7 @@ LL | pub const fn b(self, a: &A) -> B {
129129
| +++++
130130

131131
error: this could be a `const fn`
132-
--> tests/ui/missing_const_for_fn/could_be_const.rs:86:5
132+
--> tests/ui/missing_const_for_fn/could_be_const.rs:85:5
133133
|
134134
LL | / fn const_fn_stabilized_before_msrv(byte: u8) {
135135
LL | |
@@ -143,7 +143,7 @@ LL | const fn const_fn_stabilized_before_msrv(byte: u8) {
143143
| +++++
144144

145145
error: this could be a `const fn`
146-
--> tests/ui/missing_const_for_fn/could_be_const.rs:98:1
146+
--> tests/ui/missing_const_for_fn/could_be_const.rs:97:1
147147
|
148148
LL | / fn msrv_1_46() -> i32 {
149149
LL | |
@@ -157,7 +157,7 @@ LL | const fn msrv_1_46() -> i32 {
157157
| +++++
158158

159159
error: this could be a `const fn`
160-
--> tests/ui/missing_const_for_fn/could_be_const.rs:118:1
160+
--> tests/ui/missing_const_for_fn/could_be_const.rs:117:1
161161
|
162162
LL | fn d(this: D) {}
163163
| ^^^^^^^^^^^^^^^^
@@ -168,7 +168,7 @@ LL | const fn d(this: D) {}
168168
| +++++
169169

170170
error: this could be a `const fn`
171-
--> tests/ui/missing_const_for_fn/could_be_const.rs:126:9
171+
--> tests/ui/missing_const_for_fn/could_be_const.rs:125:9
172172
|
173173
LL | / fn deref_ptr_can_be_const(self) -> usize {
174174
LL | |
@@ -182,7 +182,7 @@ LL | const fn deref_ptr_can_be_const(self) -> usize {
182182
| +++++
183183

184184
error: this could be a `const fn`
185-
--> tests/ui/missing_const_for_fn/could_be_const.rs:131:9
185+
--> tests/ui/missing_const_for_fn/could_be_const.rs:130:9
186186
|
187187
LL | / fn deref_copied_val(self) -> usize {
188188
LL | |
@@ -196,7 +196,7 @@ LL | const fn deref_copied_val(self) -> usize {
196196
| +++++
197197

198198
error: this could be a `const fn`
199-
--> tests/ui/missing_const_for_fn/could_be_const.rs:142:5
199+
--> tests/ui/missing_const_for_fn/could_be_const.rs:141:5
200200
|
201201
LL | / fn union_access_can_be_const() {
202202
LL | |
@@ -211,7 +211,7 @@ LL | const fn union_access_can_be_const() {
211211
| +++++
212212

213213
error: this could be a `const fn`
214-
--> tests/ui/missing_const_for_fn/could_be_const.rs:150:9
214+
--> tests/ui/missing_const_for_fn/could_be_const.rs:149:9
215215
|
216216
LL | extern "C" fn c() {}
217217
| ^^^^^^^^^^^^^^^^^^^^
@@ -222,7 +222,7 @@ LL | const extern "C" fn c() {}
222222
| +++++
223223

224224
error: this could be a `const fn`
225-
--> tests/ui/missing_const_for_fn/could_be_const.rs:154:9
225+
--> tests/ui/missing_const_for_fn/could_be_const.rs:153:9
226226
|
227227
LL | extern fn implicit_c() {}
228228
| ^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -233,7 +233,7 @@ LL | const extern fn implicit_c() {}
233233
| +++++
234234

235235
error: this could be a `const fn`
236-
--> tests/ui/missing_const_for_fn/could_be_const.rs:171:9
236+
--> tests/ui/missing_const_for_fn/could_be_const.rs:170:9
237237
|
238238
LL | / pub fn new(strings: Vec<String>) -> Self {
239239
LL | | Self { strings }
@@ -246,7 +246,7 @@ LL | pub const fn new(strings: Vec<String>) -> Self {
246246
| +++++
247247

248248
error: this could be a `const fn`
249-
--> tests/ui/missing_const_for_fn/could_be_const.rs:176:9
249+
--> tests/ui/missing_const_for_fn/could_be_const.rs:175:9
250250
|
251251
LL | / pub fn empty() -> Self {
252252
LL | | Self { strings: Vec::new() }
@@ -259,7 +259,7 @@ LL | pub const fn empty() -> Self {
259259
| +++++
260260

261261
error: this could be a `const fn`
262-
--> tests/ui/missing_const_for_fn/could_be_const.rs:187:9
262+
--> tests/ui/missing_const_for_fn/could_be_const.rs:186:9
263263
|
264264
LL | / pub fn new(text: String) -> Self {
265265
LL | | let vec = Vec::new();
@@ -273,7 +273,7 @@ LL | pub const fn new(text: String) -> Self {
273273
| +++++
274274

275275
error: this could be a `const fn`
276-
--> tests/ui/missing_const_for_fn/could_be_const.rs:206:5
276+
--> tests/ui/missing_const_for_fn/could_be_const.rs:205:5
277277
|
278278
LL | fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
279279
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -284,7 +284,7 @@ LL | const fn alias_ty_is_projection(bar: <() as FooTrait>::Foo) {}
284284
| +++++
285285

286286
error: this could be a `const fn`
287-
--> tests/ui/missing_const_for_fn/could_be_const.rs:210:5
287+
--> tests/ui/missing_const_for_fn/could_be_const.rs:209:5
288288
|
289289
LL | extern "C-unwind" fn c_unwind() {}
290290
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -295,7 +295,7 @@ LL | const extern "C-unwind" fn c_unwind() {}
295295
| +++++
296296

297297
error: this could be a `const fn`
298-
--> tests/ui/missing_const_for_fn/could_be_const.rs:212:5
298+
--> tests/ui/missing_const_for_fn/could_be_const.rs:211:5
299299
|
300300
LL | extern "system" fn system() {}
301301
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -306,7 +306,7 @@ LL | const extern "system" fn system() {}
306306
| +++++
307307

308308
error: this could be a `const fn`
309-
--> tests/ui/missing_const_for_fn/could_be_const.rs:214:5
309+
--> tests/ui/missing_const_for_fn/could_be_const.rs:213:5
310310
|
311311
LL | extern "system-unwind" fn system_unwind() {}
312312
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -317,7 +317,7 @@ LL | const extern "system-unwind" fn system_unwind() {}
317317
| +++++
318318

319319
error: this could be a `const fn`
320-
--> tests/ui/missing_const_for_fn/could_be_const.rs:216:5
320+
--> tests/ui/missing_const_for_fn/could_be_const.rs:215:5
321321
|
322322
LL | pub extern "stdcall" fn std_call() {}
323323
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -328,7 +328,7 @@ LL | pub const extern "stdcall" fn std_call() {}
328328
| +++++
329329

330330
error: this could be a `const fn`
331-
--> tests/ui/missing_const_for_fn/could_be_const.rs:218:5
331+
--> tests/ui/missing_const_for_fn/could_be_const.rs:217:5
332332
|
333333
LL | pub extern "stdcall-unwind" fn std_call_unwind() {}
334334
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

0 commit comments

Comments
 (0)