From 40fce55bb2561eb40139dcd080ff8a397d69bc2c Mon Sep 17 00:00:00 2001 From: Zekun Wang Date: Tue, 18 Jun 2024 04:32:39 -0400 Subject: [PATCH] unreachable! to panic! --- third_party/move/move-compiler/src/to_bytecode/translate.rs | 2 +- third_party/move/move-compiler/src/typing/core.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/third_party/move/move-compiler/src/to_bytecode/translate.rs b/third_party/move/move-compiler/src/to_bytecode/translate.rs index 1bb78a58aa503e..1e11182e40236e 100644 --- a/third_party/move/move-compiler/src/to_bytecode/translate.rs +++ b/third_party/move/move-compiler/src/to_bytecode/translate.rs @@ -618,7 +618,7 @@ fn visibility(v: Visibility) -> IR::FunctionVisibility { Visibility::Public(_) => IR::FunctionVisibility::Public, Visibility::Friend(_) => IR::FunctionVisibility::Friend, Visibility::Internal => IR::FunctionVisibility::Internal, - _ => unreachable!(), + _ => panic!("unexpected visibility"), } } diff --git a/third_party/move/move-compiler/src/typing/core.rs b/third_party/move/move-compiler/src/typing/core.rs index 65e22e544f0a36..1b1c196e57f3a0 100644 --- a/third_party/move/move-compiler/src/typing/core.rs +++ b/third_party/move/move-compiler/src/typing/core.rs @@ -860,7 +860,7 @@ pub fn make_function_type( (vis_loc, internal_msg), )); }, - Visibility::Package(_) => unreachable!(), + Visibility::Package(_) => panic!("unexpected visibility"), Visibility::Public(_) => (), }; (defined_loc, ty_args, params, acquires, return_ty)