1
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
1
+ error: expression with side effects as the initial value in a zero-sized array initializer
2
2
--> tests/ui/zero_repeat_side_effects.rs:16:5
3
3
|
4
4
LL | let a = [f(); 0];
@@ -12,7 +12,7 @@ LL - let a = [f(); 0];
12
12
LL + f(); let a: [i32; 0] = [];
13
13
|
14
14
15
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
15
+ error: expression with side effects as the initial value in a zero-sized array initializer
16
16
--> tests/ui/zero_repeat_side_effects.rs:19:5
17
17
|
18
18
LL | b = [f(); 0];
@@ -24,7 +24,7 @@ LL - b = [f(); 0];
24
24
LL + f(); b = [] as [i32; 0];
25
25
|
26
26
27
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
27
+ error: expression with side effects as the initial value in a zero-sized array initializer
28
28
--> tests/ui/zero_repeat_side_effects.rs:24:5
29
29
|
30
30
LL | let c = vec![f(); 0];
@@ -36,7 +36,7 @@ LL - let c = vec![f(); 0];
36
36
LL + f(); let c: std::vec::Vec<i32> = vec![];
37
37
|
38
38
39
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
39
+ error: expression with side effects as the initial value in a zero-sized array initializer
40
40
--> tests/ui/zero_repeat_side_effects.rs:27:5
41
41
|
42
42
LL | d = vec![f(); 0];
@@ -48,7 +48,7 @@ LL - d = vec![f(); 0];
48
48
LL + f(); d = vec![] as std::vec::Vec<i32>;
49
49
|
50
50
51
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
51
+ error: expression with side effects as the initial value in a zero-sized array initializer
52
52
--> tests/ui/zero_repeat_side_effects.rs:31:5
53
53
|
54
54
LL | let e = [println!("side effect"); 0];
@@ -60,7 +60,7 @@ LL - let e = [println!("side effect"); 0];
60
60
LL + println!("side effect"); let e: [(); 0] = [];
61
61
|
62
62
63
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
63
+ error: expression with side effects as the initial value in a zero-sized array initializer
64
64
--> tests/ui/zero_repeat_side_effects.rs:35:5
65
65
|
66
66
LL | let g = [{ f() }; 0];
@@ -72,7 +72,7 @@ LL - let g = [{ f() }; 0];
72
72
LL + { f() }; let g: [i32; 0] = [];
73
73
|
74
74
75
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
75
+ error: expression with side effects as the initial value in a zero-sized array initializer
76
76
--> tests/ui/zero_repeat_side_effects.rs:39:10
77
77
|
78
78
LL | drop(vec![f(); 0]);
@@ -84,7 +84,7 @@ LL - drop(vec![f(); 0]);
84
84
LL + drop({ f(); vec![] as std::vec::Vec<i32> });
85
85
|
86
86
87
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
87
+ error: expression with side effects as the initial value in a zero-sized array initializer
88
88
--> tests/ui/zero_repeat_side_effects.rs:43:5
89
89
|
90
90
LL | vec![f(); 0];
@@ -96,7 +96,7 @@ LL - vec![f(); 0];
96
96
LL + { f(); vec![] as std::vec::Vec<i32> };
97
97
|
98
98
99
- error: function or method calls as the initial value in zero-sized array initializers may cause side effects
99
+ error: expression with side effects as the initial value in a zero-sized array initializer
100
100
--> tests/ui/zero_repeat_side_effects.rs:45:5
101
101
|
102
102
LL | [f(); 0];
0 commit comments