diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-06-05 16:40:13 +0100 |
---|---|---|
committer | Philip Herron <philip.herron@embecosm.com> | 2021-06-05 16:40:13 +0100 |
commit | f1526062d9c16d3224d350967788dec9e4e2bbee (patch) | |
tree | aa26273a573d9308a63f0a753ab7c06fe21b19b2 /gcc/rust/resolve/rust-ast-resolve.cc | |
parent | 1b3d621f215c8dfe39f43b0c25f72a29aea89908 (diff) | |
download | gcc-f1526062d9c16d3224d350967788dec9e4e2bbee.zip gcc-f1526062d9c16d3224d350967788dec9e4e2bbee.tar.gz gcc-f1526062d9c16d3224d350967788dec9e4e2bbee.tar.bz2 |
Add initial name resolution for traits and trait impls
We need to add name resolution for traits and trait impls. We cannot start
working with trait obligations untill we can actually implment a basic trait first.
Addresses: #395
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve.cc | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc index 41c6938..f97c97b 100644 --- a/gcc/rust/resolve/rust-ast-resolve.cc +++ b/gcc/rust/resolve/rust-ast-resolve.cc @@ -41,6 +41,9 @@ } \ while (0) +extern bool +saw_errors (void); + namespace Rust { namespace Resolver { @@ -322,6 +325,9 @@ NameResolution::go (AST::Crate &crate) for (auto it = crate.items.begin (); it != crate.items.end (); it++) ResolveTopLevel::go (it->get ()); + if (saw_errors ()) + return; + // next we can drill down into the items and their scopes for (auto it = crate.items.begin (); it != crate.items.end (); it++) ResolveItem::go (it->get ()); |