Skip to content

Commit

Permalink
Address review feedback.
Browse files Browse the repository at this point in the history
  • Loading branch information
tritao committed Feb 1, 2024
1 parent 970534d commit 6eadefb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
4 changes: 2 additions & 2 deletions sway-core/src/ir_generation/function.rs
Original file line number Diff line number Diff line change
Expand Up @@ -623,8 +623,8 @@ impl<'eng> FnCompiler<'eng> {
self.compile_reassignment(context, md_mgr, reassignment, span_md_idx)
}
ty::TyExpressionVariant::ImplicitReturn(_exp) => {
// TODO: This is currently handled at the top-level handler, `compile_ast_node`.
todo!();
// This is currently handled at the top-level handler, `compile_ast_node`.
unreachable!();
}
ty::TyExpressionVariant::Return(exp) => {
self.compile_return(context, md_mgr, exp, span_md_idx)
Expand Down
5 changes: 4 additions & 1 deletion sway-core/src/language/ty/expression/expression_variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1421,7 +1421,10 @@ impl DebugWithEngines for TyExpressionVariant {
}
format!("reassignment to {place}")
}
TyExpressionVariant::ImplicitReturn(exp) | TyExpressionVariant::Return(exp) => {
TyExpressionVariant::ImplicitReturn(exp) => {
format!("implicit return {:?}", engines.help_out(&**exp))
}
TyExpressionVariant::Return(exp) => {
format!("return {:?}", engines.help_out(&**exp))
}
TyExpressionVariant::Ref(exp) => {
Expand Down

0 comments on commit 6eadefb

Please sign in to comment.