diff options
author | Philip Herron <philip.herron@embecosm.com> | 2020-12-03 15:04:46 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2020-12-03 17:25:05 +0000 |
commit | 03fc0e389fae2576a7f217fb0afb7cb0f18689f8 (patch) | |
tree | 05527a5b3f6ac0024d2df452b84c2633a82f9792 /gcc | |
parent | 0394164f3db67a5b7631e30f66d280771017b225 (diff) | |
download | gcc-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.cc | 28 |
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 { |