gcc/rust/ChangeLog:
* checks/errors/borrowck/rust-bir-builder-internal.h: Replace nodiscard.
* checks/errors/borrowck/rust-bir-place.h: Replace nodiscard.
Signed-off-by: Jakub Dupak <dev@jakubdupak.com>
protected: // HIR resolution helpers
template <typename T>
- [[nodiscard]] TyTy::BaseType *lookup_type (T &hir_node) const
+ WARN_UNUSED_RESULT TyTy::BaseType *lookup_type (T &hir_node) const
{
return lookup_type (hir_node.get_mappings ().get_hirid ());
}
- [[nodiscard]] TyTy::BaseType *lookup_type (HirId hirid) const
+ WARN_UNUSED_RESULT TyTy::BaseType *lookup_type (HirId hirid) const
{
TyTy::BaseType *type = nullptr;
bool ok = ctx.tyctx.lookup_type (hirid, &type);
0);
}
- [[nodiscard]] PlaceId lookup_or_add_path (Place::Kind kind,
- TyTy::BaseType *tyty,
- PlaceId parent, size_t id = 0)
+ WARN_UNUSED_RESULT PlaceId lookup_or_add_path (Place::Kind kind,
+ TyTy::BaseType *tyty,
+ PlaceId parent, size_t id = 0)
{
PlaceId current = 0;
if (parent < places.size ())