Skip to content

Commit

Permalink
fmt
Browse files Browse the repository at this point in the history
  • Loading branch information
mhasel committed Oct 17, 2024
1 parent bf2b90c commit a13293b
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions src/validation/variable.rs
Original file line number Diff line number Diff line change
Expand Up @@ -289,16 +289,14 @@ fn validate_variable<T: AnnotationMap>(
};

let Some(rhs_ty) = context.annotations.get_type(node, context.index) else {
let type_name = init
.target_type_name
.as_ref()
.map(Clone::clone)
.unwrap_or_default();
validator.push_diagnostic(Diagnostic::unknown_type(&type_name, node.get_location()));
let type_name = init.target_type_name.clone().unwrap_or_default();
validator
.push_diagnostic(Diagnostic::unknown_type(&type_name, node.get_location()));
return;
};

if context.index.find_elementary_pointer_type(rhs_ty.get_type_information()).is_void() {
if context.index.find_elementary_pointer_type(rhs_ty.get_type_information()).is_void()
{
// we could not find the type in the index, this will be caught elsewhere.
return;
};
Expand Down

0 comments on commit a13293b

Please sign in to comment.