Squash closure cast error into fn ptr cast error
This commit is contained in:
parent
007390c21c
commit
38f3ad41c0
1 changed files with 1 additions and 4 deletions
|
@ -164,14 +164,11 @@ fn check_rvalue(
|
|||
}
|
||||
}
|
||||
Rvalue::Cast(CastKind::UnsafeFnPointer, _, _) |
|
||||
Rvalue::Cast(CastKind::ClosureFnPointer, _, _) |
|
||||
Rvalue::Cast(CastKind::ReifyFnPointer, _, _) => Err((
|
||||
span,
|
||||
"function pointer casts are not allowed in const fn".into(),
|
||||
)),
|
||||
Rvalue::Cast(CastKind::ClosureFnPointer, _, _) => Err((
|
||||
span,
|
||||
"closures are not allowed in const fn".into(),
|
||||
)),
|
||||
Rvalue::Cast(CastKind::Unsize, _, _) => Err((
|
||||
span,
|
||||
"unsizing casts are not allowed in const fn".into(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue