diff options
author | Philip Herron <philip.herron@embecosm.com> | 2021-01-08 17:18:00 +0000 |
---|---|---|
committer | Philip Herron <herron.philip@googlemail.com> | 2021-01-10 15:59:22 +0000 |
commit | 9a3ad294e0af5ed45b53c340382a7806fb150bdf (patch) | |
tree | 81458d62a2191b38be775026f2f8583d3ca7c2ee /gcc/rust/util/rust-hir-map.cc | |
parent | 0f42a240e53e932de0ae4799d54fe0bd15d06047 (diff) | |
download | gcc-9a3ad294e0af5ed45b53c340382a7806fb150bdf.zip gcc-9a3ad294e0af5ed45b53c340382a7806fb150bdf.tar.gz gcc-9a3ad294e0af5ed45b53c340382a7806fb150bdf.tar.bz2 |
Add in a check for unused decls within ribs.
This lead to cleanup of the name resolver as the usage of mappings means
that in a given rib if there are no references to a decl NodeId that
means it was not used.
To get on par with the offical rust compiler it should be allowed to have
a reference where the name was assigned but not used but this might be a seperate pass.
Diffstat (limited to 'gcc/rust/util/rust-hir-map.cc')
-rw-r--r-- | gcc/rust/util/rust-hir-map.cc | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/gcc/rust/util/rust-hir-map.cc b/gcc/rust/util/rust-hir-map.cc index 238689c..0fea501 100644 --- a/gcc/rust/util/rust-hir-map.cc +++ b/gcc/rust/util/rust-hir-map.cc @@ -331,8 +331,6 @@ Mappings::insert_hir_param (CrateNum crateNum, HirId id, { rust_assert (lookup_hir_stmt (crateNum, id) == nullptr); - printf ("inserting param with node id %u hir id: %u\n", - param->get_mappings ()->get_nodeid (), id); hirParamMappings[crateNum][id] = param; nodeIdToHirMappings[crateNum][param->get_mappings ()->get_nodeid ()] = id; } |