We might have some duplicated name in some pattern and we should
therefore not assert the non duplication of identifiers.
gcc/rust/ChangeLog:
* resolve/rust-late-name-resolver-2.0.cc (Late::visit): Remove
assertion and explicitely tells why we ignore the insertion result.
Signed-off-by: Pierre-Emmanuel Patry <pierre-emmanuel.patry@embecosm.com>
// do we insert in labels or in values
// but values does not allow shadowing... since functions cannot shadow
// do we insert functions in labels as well?
- auto ok
- = ctx.values.insert (identifier.get_ident (), identifier.get_node_id ());
- rust_assert (ok);
+ // We do want to ignore duplicated data because some situations rely on it.
+ std::ignore
+ = ctx.values.insert (identifier.get_ident (), identifier.get_node_id ());
}
void