gcc/rust/ChangeLog:
* ast/rust-expr.h
(MetaItemPathLit::get_locus): Remove copy construction.
* backend/rust-constexpr.cc
(eval_constant_expression): Likewise.
(is_valid_constexpr_fn): Likewise.
* util/rust-token-converter.cc
(convert): Likewise.
Signed-off-by: Owen Avery <powerboat9.gamer@gmail.com>
// we have no idea use which of them, just simply return UNKNOWN_LOCATION
// now.
// Maybe we will figure out when we really need the location in the future.
- Location get_locus () const override { return Location (UNKNOWN_LOCATION); }
+ Location get_locus () const override { return UNKNOWN_LOCATION; }
void accept_vis (ASTVisitor &vis) override;
if (++ctx->global->constexpr_ops_count >= constexpr_ops_limit)
{
rust_error_at (
- Location (loc),
+ loc,
"%<constexpr%> evaluation operation count exceeds limit of "
"%wd (use %<-fconstexpr-ops-limit=%> to increase the limit)",
constexpr_ops_limit);
// error ("invalid type for parameter %d of %<constexpr%> "
// "function %q+#D",
// DECL_PARM_INDEX (parm), fun);
- Location locus = Location (DECL_SOURCE_LOCATION (fun));
+ Location locus = DECL_SOURCE_LOCATION (fun);
rust_error_at (
locus, "invalid type for parameter %d of %<constexpr%> function",
DECL_PARM_INDEX (parm));
static Location
convert (ProcMacro::Span span)
{
- return Location (span.start);
+ return span.start;
}
static void