Improve unreachable error message

This commit is contained in:
Richard Feldman 2021-10-05 21:14:45 -04:00
parent 13a855f8dd
commit 54a1a33ddf

View file

@ -2693,8 +2693,6 @@ macro_rules! match_on_closure_argument {
let arg_layouts = top_level.arguments; let arg_layouts = top_level.arguments;
let ret_layout = top_level.result; let ret_layout = top_level.result;
match closure_data_layout { match closure_data_layout {
RawFunctionLayout::Function(_, lambda_set, _) => { RawFunctionLayout::Function(_, lambda_set, _) => {
lowlevel_match_on_lambda_set( lowlevel_match_on_lambda_set(
@ -2718,7 +2716,7 @@ macro_rules! match_on_closure_argument {
$hole, $hole,
) )
} }
RawFunctionLayout::ZeroArgumentThunk(_) => unreachable!(), RawFunctionLayout::ZeroArgumentThunk(_) => unreachable!("match_on_closure_argument received a zero-argument thunk"),
} }
}}; }};
} }