We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 007390c commit 38f3ad4Copy full SHA for 38f3ad4
src/librustc_mir/transform/qualify_min_const_fn.rs
@@ -164,14 +164,11 @@ fn check_rvalue(
164
}
165
166
Rvalue::Cast(CastKind::UnsafeFnPointer, _, _) |
167
+ Rvalue::Cast(CastKind::ClosureFnPointer, _, _) |
168
Rvalue::Cast(CastKind::ReifyFnPointer, _, _) => Err((
169
span,
170
"function pointer casts are not allowed in const fn".into(),
171
)),
- Rvalue::Cast(CastKind::ClosureFnPointer, _, _) => Err((
172
- span,
173
- "closures are not allowed in const fn".into(),
174
- )),
175
Rvalue::Cast(CastKind::Unsize, _, _) => Err((
176
177
"unsizing casts are not allowed in const fn".into(),
0 commit comments