From 28ee3bba39a960ab98d9fa2e62681d41a2e678e2 Mon Sep 17 00:00:00 2001 From: Zekun Wang Date: Tue, 17 Oct 2023 22:51:42 -0400 Subject: [PATCH] add comments --- third_party/move/move-compiler/src/typing/expand.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/third_party/move/move-compiler/src/typing/expand.rs b/third_party/move/move-compiler/src/typing/expand.rs index be1cbe1aafffef..0f66d14864dc83 100644 --- a/third_party/move/move-compiler/src/typing/expand.rs +++ b/third_party/move/move-compiler/src/typing/expand.rs @@ -85,7 +85,8 @@ fn type_fun_ty_param( type_msg_(context, ty, &format!("Cannot infer the type parameter `{param_name}` for generic function `{m}::{n}`. Try providing a type parameter.")); } -pub fn type_msg_(context: &mut Context, ty: &mut Type, msg_uninferred: &str) { +// Try to expand the type of ty, warning with msg_uninferred if type cannot be inferred. +fn type_msg_(context: &mut Context, ty: &mut Type, msg_uninferred: &str) { use Type_::*; match &mut ty.value { Anything | UnresolvedError | Param(_) | Unit => (),