Skip to content

Commit b27c4a4

Browse files
committed
No need to declare Type as inferedType when it is already defined
In the case where there is no init_expression for a variable declaration and the type was defined on the name we dont need to then assign that the variable was infered.
1 parent ed45224 commit b27c4a4

File tree

1 file changed

+0
-7
lines changed

1 file changed

+0
-7
lines changed

gcc/rust/analysis/rust-type-resolution.cc

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1048,13 +1048,6 @@ TypeResolution::visit (AST::LetStmt &stmt)
10481048
return;
10491049
}
10501050
}
1051-
else if (stmt.has_type () && !stmt.has_init_expr ())
1052-
{
1053-
inferedType = stmt.type.get ();
1054-
}
1055-
1056-
// TODO check we know what the type is in the scope requires the builtins to
1057-
// be defined at the constructor
10581051

10591052
// ensure the decl has the type set for compilation later on
10601053
if (!stmt.has_type ())

0 commit comments

Comments
 (0)