diff --git a/sway-core/src/semantic_analysis/type_resolve.rs b/sway-core/src/semantic_analysis/type_resolve.rs index 06279dfceb5..820971992e2 100644 --- a/sway-core/src/semantic_analysis/type_resolve.rs +++ b/sway-core/src/semantic_analysis/type_resolve.rs @@ -286,7 +286,7 @@ pub fn resolve_call_path( .cloned() .collect(); - let (decl, mod_path) = resolve_symbol_and_mod_path( + let decl = resolve_symbol( handler, engines, &root.module, @@ -333,14 +333,14 @@ pub fn resolve_call_path( Ok(decl) } -fn resolve_symbol_and_mod_path( +fn resolve_symbol( handler: &Handler, engines: &Engines, module: &Module, mod_path: &ModulePath, symbol: &Ident, self_type: Option, -) -> Result<(ResolvedDeclaration, Vec), ErrorEmitted> { +) -> Result { let mut current_module = module; // This block tries to resolve associated types let mut current_mod_path = vec![]; @@ -383,7 +383,7 @@ fn resolve_symbol_and_mod_path( None, self_type, )?; - return Ok((decl, current_mod_path)); + return Ok(decl); } module @@ -393,7 +393,7 @@ fn resolve_symbol_and_mod_path( .current_lexical_scope() .items .resolve_symbol(handler, engines, symbol)?; - Ok((decl, mod_path.to_vec())) + Ok(decl) }) }