11error: this transmute is always evaluated eagerly, even if the condition is false
2- --> tests/ui/eager_transmute.rs:21 :33
2+ --> tests/ui/eager_transmute.rs:22 :33
33 |
44LL | (op < 4).then_some(unsafe { std::mem::transmute(op) })
55 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -13,7 +13,7 @@ LL + (op < 4).then(|| unsafe { std::mem::transmute(op) })
1313 |
1414
1515error: this transmute is always evaluated eagerly, even if the condition is false
16- --> tests/ui/eager_transmute.rs:28 :33
16+ --> tests/ui/eager_transmute.rs:29 :33
1717 |
1818LL | (op < 4).then_some(unsafe { std::mem::transmute::<_, Opcode>(op) });
1919 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -25,7 +25,7 @@ LL + (op < 4).then(|| unsafe { std::mem::transmute::<_, Opcode>(op) });
2525 |
2626
2727error: this transmute is always evaluated eagerly, even if the condition is false
28- --> tests/ui/eager_transmute.rs:30 :33
28+ --> tests/ui/eager_transmute.rs:31 :33
2929 |
3030LL | (op > 4).then_some(unsafe { std::mem::transmute::<_, Opcode>(op) });
3131 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -37,7 +37,7 @@ LL + (op > 4).then(|| unsafe { std::mem::transmute::<_, Opcode>(op) });
3737 |
3838
3939error: this transmute is always evaluated eagerly, even if the condition is false
40- --> tests/ui/eager_transmute.rs:32 :34
40+ --> tests/ui/eager_transmute.rs:33 :34
4141 |
4242LL | (op == 0).then_some(unsafe { std::mem::transmute::<_, Opcode>(op) });
4343 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -49,7 +49,7 @@ LL + (op == 0).then(|| unsafe { std::mem::transmute::<_, Opcode>(op) });
4949 |
5050
5151error: this transmute is always evaluated eagerly, even if the condition is false
52- --> tests/ui/eager_transmute.rs:35 :68
52+ --> tests/ui/eager_transmute.rs:36 :68
5353 |
5454LL | let _: Option<Opcode> = (op > 0 && op < 10).then_some(unsafe { std::mem::transmute(op) });
5555 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -61,7 +61,7 @@ LL + let _: Option<Opcode> = (op > 0 && op < 10).then(|| unsafe { std::mem::
6161 |
6262
6363error: this transmute is always evaluated eagerly, even if the condition is false
64- --> tests/ui/eager_transmute.rs:37 :86
64+ --> tests/ui/eager_transmute.rs:38 :86
6565 |
6666LL | let _: Option<Opcode> = (op > 0 && op < 10 && unrelated == 0).then_some(unsafe { std::mem::transmute(op) });
6767 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -73,7 +73,7 @@ LL + let _: Option<Opcode> = (op > 0 && op < 10 && unrelated == 0).then(|| u
7373 |
7474
7575error: this transmute is always evaluated eagerly, even if the condition is false
76- --> tests/ui/eager_transmute.rs:41 :84
76+ --> tests/ui/eager_transmute.rs:42 :84
7777 |
7878LL | let _: Option<Opcode> = (op2.foo[0] > 0 && op2.foo[0] < 10).then_some(unsafe { std::mem::transmute(op2.foo[0]) });
7979 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -85,7 +85,7 @@ LL + let _: Option<Opcode> = (op2.foo[0] > 0 && op2.foo[0] < 10).then(|| uns
8585 |
8686
8787error: this transmute is always evaluated eagerly, even if the condition is false
88- --> tests/ui/eager_transmute.rs:54 :70
88+ --> tests/ui/eager_transmute.rs:55 :70
8989 |
9090LL | let _: Option<Opcode> = (1..=3).contains(&op).then_some(unsafe { std::mem::transmute(op) });
9191 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -97,7 +97,7 @@ LL + let _: Option<Opcode> = (1..=3).contains(&op).then(|| unsafe { std::mem
9797 |
9898
9999error: this transmute is always evaluated eagerly, even if the condition is false
100- --> tests/ui/eager_transmute.rs:56 :83
100+ --> tests/ui/eager_transmute.rs:57 :83
101101 |
102102LL | let _: Option<Opcode> = ((1..=3).contains(&op) || op == 4).then_some(unsafe { std::mem::transmute(op) });
103103 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -109,7 +109,7 @@ LL + let _: Option<Opcode> = ((1..=3).contains(&op) || op == 4).then(|| unsa
109109 |
110110
111111error: this transmute is always evaluated eagerly, even if the condition is false
112- --> tests/ui/eager_transmute.rs:58 :69
112+ --> tests/ui/eager_transmute.rs:59 :69
113113 |
114114LL | let _: Option<Opcode> = (1..3).contains(&op).then_some(unsafe { std::mem::transmute(op) });
115115 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -121,7 +121,7 @@ LL + let _: Option<Opcode> = (1..3).contains(&op).then(|| unsafe { std::mem:
121121 |
122122
123123error: this transmute is always evaluated eagerly, even if the condition is false
124- --> tests/ui/eager_transmute.rs:60 :68
124+ --> tests/ui/eager_transmute.rs:61 :68
125125 |
126126LL | let _: Option<Opcode> = (1..).contains(&op).then_some(unsafe { std::mem::transmute(op) });
127127 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -133,7 +133,7 @@ LL + let _: Option<Opcode> = (1..).contains(&op).then(|| unsafe { std::mem::
133133 |
134134
135135error: this transmute is always evaluated eagerly, even if the condition is false
136- --> tests/ui/eager_transmute.rs:62 :68
136+ --> tests/ui/eager_transmute.rs:63 :68
137137 |
138138LL | let _: Option<Opcode> = (..3).contains(&op).then_some(unsafe { std::mem::transmute(op) });
139139 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -145,7 +145,7 @@ LL + let _: Option<Opcode> = (..3).contains(&op).then(|| unsafe { std::mem::
145145 |
146146
147147error: this transmute is always evaluated eagerly, even if the condition is false
148- --> tests/ui/eager_transmute.rs:64 :69
148+ --> tests/ui/eager_transmute.rs:65 :69
149149 |
150150LL | let _: Option<Opcode> = (..=3).contains(&op).then_some(unsafe { std::mem::transmute(op) });
151151 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -157,7 +157,7 @@ LL + let _: Option<Opcode> = (..=3).contains(&op).then(|| unsafe { std::mem:
157157 |
158158
159159error: this transmute is always evaluated eagerly, even if the condition is false
160- --> tests/ui/eager_transmute.rs:75 :28
160+ --> tests/ui/eager_transmute.rs:76 :28
161161 |
162162LL | (op < 4).then_some(std::mem::transmute::<_, Opcode>(op));
163163 | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -169,7 +169,7 @@ LL + (op < 4).then(|| std::mem::transmute::<_, Opcode>(op));
169169 |
170170
171171error: this transmute is always evaluated eagerly, even if the condition is false
172- --> tests/ui/eager_transmute.rs:106 :62
172+ --> tests/ui/eager_transmute.rs:109 :62
173173 |
174174LL | let _: Option<NonZero<u8>> = (v1 > 0).then_some(unsafe { std::mem::transmute(v1) });
175175 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -181,7 +181,7 @@ LL + let _: Option<NonZero<u8>> = (v1 > 0).then(|| unsafe { std::mem::transm
181181 |
182182
183183error: this transmute is always evaluated eagerly, even if the condition is false
184- --> tests/ui/eager_transmute.rs:113 :86
184+ --> tests/ui/eager_transmute.rs:116 :86
185185 |
186186LL | let _: Option<NonMaxU8> = (v2 < NonZero::new(255u8).unwrap()).then_some(unsafe { std::mem::transmute(v2) });
187187 | ^^^^^^^^^^^^^^^^^^^^^^^
@@ -193,7 +193,7 @@ LL + let _: Option<NonMaxU8> = (v2 < NonZero::new(255u8).unwrap()).then(|| u
193193 |
194194
195195error: this transmute is always evaluated eagerly, even if the condition is false
196- --> tests/ui/eager_transmute.rs:120 :93
196+ --> tests/ui/eager_transmute.rs:123 :93
197197 |
198198LL | let _: Option<NonZeroNonMaxU8> = (v2 < NonZero::new(255u8).unwrap()).then_some(unsafe { std::mem::transmute(v2) });
199199 | ^^^^^^^^^^^^^^^^^^^^^^^
0 commit comments