aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPhilip Herron <philip.herron@embecosm.com>2020-12-03 15:04:46 +0000
committerPhilip Herron <herron.philip@googlemail.com>2020-12-03 17:25:05 +0000
commit03fc0e389fae2576a7f217fb0afb7cb0f18689f8 (patch)
tree05527a5b3f6ac0024d2df452b84c2633a82f9792 /gcc
parent0394164f3db67a5b7631e30f66d280771017b225 (diff)
downloadgcc-03fc0e389fae2576a7f217fb0afb7cb0f18689f8.zip
gcc-03fc0e389fae2576a7f217fb0afb7cb0f18689f8.tar.gz
gcc-03fc0e389fae2576a7f217fb0afb7cb0f18689f8.tar.bz2
We cannot lookup types to ensure they are known as AST::Type differs
to how struct AST Types. We need to move to HIR to avoid this issue via name resolution.
Diffstat (limited to 'gcc')
-rw-r--r--gcc/rust/analysis/rust-type-resolution.cc28
1 files changed, 14 insertions, 14 deletions
diff --git a/gcc/rust/analysis/rust-type-resolution.cc b/gcc/rust/analysis/rust-type-resolution.cc
index 541acd0..8558847 100644
--- a/gcc/rust/analysis/rust-type-resolution.cc
+++ b/gcc/rust/analysis/rust-type-resolution.cc
@@ -1181,13 +1181,13 @@ TypeResolution::visit (AST::LetStmt &stmt)
auto typeString = typeComparisonBuffer.back ();
typeComparisonBuffer.pop_back ();
- AST::Type *val = NULL;
- if (!scope.LookupType (typeString, &val))
- {
- rust_error_at (stmt.locus, "LetStmt has unknown type: %s",
- stmt.type->as_string ().c_str ());
- return;
- }
+ // AST::Type *val = NULL;
+ // if (!scope.LookupType (typeString, &val))
+ // {
+ // rust_error_at (stmt.locus, "LetStmt has unknown type: %s",
+ // stmt.type->as_string ().c_str ());
+ // return;
+ // }
}
else if (inferedType != nullptr)
{
@@ -1201,13 +1201,13 @@ TypeResolution::visit (AST::LetStmt &stmt)
auto typeString = typeComparisonBuffer.back ();
typeComparisonBuffer.pop_back ();
- AST::Type *val = NULL;
- if (!scope.LookupType (typeString, &val))
- {
- rust_error_at (stmt.locus, "Inferred unknown type: %s",
- inferedType->as_string ().c_str ());
- return;
- }
+ // AST::Type *val = NULL;
+ // if (!scope.LookupType (typeString, &val))
+ // {
+ // rust_error_at (stmt.locus, "Inferred unknown type: %s",
+ // inferedType->as_string ().c_str ());
+ // return;
+ // }
}
else
{