diff options
Diffstat (limited to 'gcc/rust/backend/rust-constexpr.cc')
-rw-r--r-- | gcc/rust/backend/rust-constexpr.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/rust/backend/rust-constexpr.cc b/gcc/rust/backend/rust-constexpr.cc index 87b1a84..f2e3e51 100644 --- a/gcc/rust/backend/rust-constexpr.cc +++ b/gcc/rust/backend/rust-constexpr.cc @@ -4539,10 +4539,14 @@ is_valid_constexpr_fn (tree fun, bool complain) ret = false; if (complain) { - auto_diagnostic_group d; - error ("invalid type for parameter %d of %<constexpr%> " - "function %q+#D", - DECL_PARM_INDEX (parm), fun); + // auto_diagnostic_group d; + // error ("invalid type for parameter %d of %<constexpr%> " + // "function %q+#D", + // DECL_PARM_INDEX (parm), fun); + Location locus = Location (DECL_SOURCE_LOCATION (fun)); + rust_error_at ( + locus, "invalid type for parameter %d of %<constexpr%> function", + DECL_PARM_INDEX (parm)); } } |