fix doc comment (#6183)

This commit is contained in:
kevaundray
2023-04-10 15:23:49 +01:00
committed by GitHub
parent a97e82c6e2
commit 2d1dbb17af

View File

@@ -379,8 +379,8 @@ impl<'a> FunctionBuilder<'a> {
} }
/// Declares the type of a variable, so that it can be used later (by calling /// Declares the type of a variable, so that it can be used later (by calling
/// [`FunctionBuilder::use_var`]). This function will return an error if it /// [`FunctionBuilder::use_var`]). This function will return an error if the variable
/// was not possible to use the variable. /// has been previously declared.
pub fn try_declare_var(&mut self, var: Variable, ty: Type) -> Result<(), DeclareVariableError> { pub fn try_declare_var(&mut self, var: Variable, ty: Type) -> Result<(), DeclareVariableError> {
if self.func_ctx.types[var] != types::INVALID { if self.func_ctx.types[var] != types::INVALID {
return Err(DeclareVariableError::DeclaredMultipleTimes(var)); return Err(DeclareVariableError::DeclaredMultipleTimes(var));