1
1
error: this could be a `const fn`
2
- --> $DIR/could_be_const.rs:14 :5
2
+ --> $DIR/could_be_const.rs:13 :5
3
3
|
4
4
LL | / pub fn new() -> Self {
5
5
LL | | Self { guess: 42 }
@@ -9,23 +9,23 @@ LL | | }
9
9
= note: `-D clippy::missing-const-for-fn` implied by `-D warnings`
10
10
11
11
error: this could be a `const fn`
12
- --> $DIR/could_be_const.rs:18 :5
12
+ --> $DIR/could_be_const.rs:17 :5
13
13
|
14
14
LL | / fn const_generic_params<'a, T, const N: usize>(&self, b: &'a [T; N]) -> &'a [T; N] {
15
15
LL | | b
16
16
LL | | }
17
17
| |_____^
18
18
19
19
error: this could be a `const fn`
20
- --> $DIR/could_be_const.rs:24 :1
20
+ --> $DIR/could_be_const.rs:23 :1
21
21
|
22
22
LL | / fn one() -> i32 {
23
23
LL | | 1
24
24
LL | | }
25
25
| |_^
26
26
27
27
error: this could be a `const fn`
28
- --> $DIR/could_be_const.rs:29 :1
28
+ --> $DIR/could_be_const.rs:28 :1
29
29
|
30
30
LL | / fn two() -> i32 {
31
31
LL | | let abc = 2;
@@ -34,39 +34,39 @@ LL | | }
34
34
| |_^
35
35
36
36
error: this could be a `const fn`
37
- --> $DIR/could_be_const.rs:35 :1
37
+ --> $DIR/could_be_const.rs:34 :1
38
38
|
39
39
LL | / fn string() -> String {
40
40
LL | | String::new()
41
41
LL | | }
42
42
| |_^
43
43
44
44
error: this could be a `const fn`
45
- --> $DIR/could_be_const.rs:40 :1
45
+ --> $DIR/could_be_const.rs:39 :1
46
46
|
47
47
LL | / unsafe fn four() -> i32 {
48
48
LL | | 4
49
49
LL | | }
50
50
| |_^
51
51
52
52
error: this could be a `const fn`
53
- --> $DIR/could_be_const.rs:45 :1
53
+ --> $DIR/could_be_const.rs:44 :1
54
54
|
55
55
LL | / fn generic<T>(t: T) -> T {
56
56
LL | | t
57
57
LL | | }
58
58
| |_^
59
59
60
60
error: this could be a `const fn`
61
- --> $DIR/could_be_const.rs:68 :9
61
+ --> $DIR/could_be_const.rs:67 :9
62
62
|
63
63
LL | / pub fn b(self, a: &A) -> B {
64
64
LL | | B
65
65
LL | | }
66
66
| |_________^
67
67
68
68
error: this could be a `const fn`
69
- --> $DIR/could_be_const.rs:78 :5
69
+ --> $DIR/could_be_const.rs:77 :5
70
70
|
71
71
LL | / fn const_fn_stabilized_before_msrv(byte: u8) {
72
72
LL | | byte.is_ascii_digit();
0 commit comments