aboutsummaryrefslogtreecommitdiff
path: root/gcc/rust/resolve/rust-ast-resolve.cc
diff options
context:
space:
mode:
authorSimplyTheOther <simplytheother@gmail.com>2021-02-07 12:40:19 +0800
committerSimplyTheOther <simplytheother@gmail.com>2021-02-07 12:40:19 +0800
commit94be91d6159101caa7c560b188bd6c02d8d86d17 (patch)
treeb3c32de54db1a850079f79d3dfb4c4000dec9d90 /gcc/rust/resolve/rust-ast-resolve.cc
parent27eef5b7a065e8ea05ac575c4b364bb5dbc44e46 (diff)
parentdb7134353447921136a321b8fd78cea78f2c344e (diff)
downloadgcc-94be91d6159101caa7c560b188bd6c02d8d86d17.zip
gcc-94be91d6159101caa7c560b188bd6c02d8d86d17.tar.gz
gcc-94be91d6159101caa7c560b188bd6c02d8d86d17.tar.bz2
Merge branch 'master' of https://github.com/redbrain/gccrs
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
-rw-r--r--gcc/rust/resolve/rust-ast-resolve.cc10
1 files changed, 2 insertions, 8 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc
index 6731f13..d514132 100644
--- a/gcc/rust/resolve/rust-ast-resolve.cc
+++ b/gcc/rust/resolve/rust-ast-resolve.cc
@@ -22,7 +22,6 @@
#include "rust-ast-resolve-toplevel.h"
#include "rust-ast-resolve-item.h"
#include "rust-ast-resolve-expr.h"
-#include "rust-ast-resolve-unused.h"
#define MKBUILTIN_TYPE(_X, _R, _TY) \
do \
@@ -110,7 +109,8 @@ Resolver::insert_builtin_types (Rib *r)
auto builtins = get_builtin_types ();
for (auto &builtin : builtins)
r->insert_name (builtin->as_string (), builtin->get_node_id (),
- Linemap::predeclared_location ());
+ Linemap::predeclared_location (), false,
+ [] (std::string, NodeId, Location) -> void {});
}
std::vector<AST::Type *> &
@@ -283,9 +283,6 @@ NameResolution::go (AST::Crate &crate)
// 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 ());
-
- ScanUnused::Scan (resolver->get_name_scope ().peek ());
- ScanUnused::Scan (resolver->get_type_scope ().peek ());
}
// rust-ast-resolve-expr.h
@@ -307,9 +304,6 @@ ResolveExpr::visit (AST::BlockExpr &expr)
if (expr.has_tail_expr ())
ResolveExpr::go (expr.get_tail_expr ().get (), expr.get_node_id ());
- ScanUnused::Scan (resolver->get_name_scope ().peek ());
- ScanUnused::Scan (resolver->get_type_scope ().peek ());
-
resolver->get_name_scope ().pop ();
resolver->get_type_scope ().pop ();
}