diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-02-05 13:16:38 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-02-06 15:16:23 +0000 |
commit | c4be77f7e0f6b35c019940200f94c7a7b30fff84 (patch) | |
tree | be0673177880aba5edc02b13632ad93e052e0aa2 /gcc/rust/resolve/rust-ast-resolve.cc | |
parent | 9abf0733814c5e4131b96afb1c0abad68f4cf4ef (diff) | |
download | gcc-c4be77f7e0f6b35c019940200f94c7a7b30fff84.zip gcc-c4be77f7e0f6b35c019940200f94c7a7b30fff84.tar.gz gcc-c4be77f7e0f6b35c019940200f94c7a7b30fff84.tar.bz2 |
Enforce Duplicate definition rules
Rust does not allow functions/methods/constants/static definitions to
shadow otherwise you end up with unuseable items.
Diffstat (limited to 'gcc/rust/resolve/rust-ast-resolve.cc')
-rw-r--r-- | gcc/rust/resolve/rust-ast-resolve.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/gcc/rust/resolve/rust-ast-resolve.cc b/gcc/rust/resolve/rust-ast-resolve.cc index c6d7148..fd49720 100644 --- a/gcc/rust/resolve/rust-ast-resolve.cc +++ b/gcc/rust/resolve/rust-ast-resolve.cc @@ -110,7 +110,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 *> & |