diff options
Diffstat (limited to 'gcc/rust/backend')
-rw-r--r-- | gcc/rust/backend/rust-tree.cc | 12 | ||||
-rw-r--r-- | gcc/rust/backend/rust-tree.h | 6 |
2 files changed, 10 insertions, 8 deletions
diff --git a/gcc/rust/backend/rust-tree.cc b/gcc/rust/backend/rust-tree.cc index 6cba04b..2302ffb 100644 --- a/gcc/rust/backend/rust-tree.cc +++ b/gcc/rust/backend/rust-tree.cc @@ -3848,16 +3848,18 @@ strip_top_quals (tree t) /* Print an error message for invalid use of an incomplete type. VALUE is the expression that was used (or 0 if that isn't known) and TYPE is the type that was invalid. DIAG_KIND indicates the - type of diagnostic (see diagnostic.def). */ + type of diagnostic (see diagnostics/kinds.def). */ void cxx_incomplete_type_diagnostic (location_t loc, const_tree value, - const_tree type, diagnostic_t diag_kind) + const_tree type, + enum diagnostics::kind diag_kind) { // bool is_decl = false, complained = false; - gcc_assert (diag_kind == DK_WARNING || diag_kind == DK_PEDWARN - || diag_kind == DK_ERROR); + gcc_assert (diag_kind == diagnostics::kind::warning + || diag_kind == diagnostics::kind::pedwarn + || diag_kind == diagnostics::kind::error); /* Avoid duplicate error message. */ if (TREE_CODE (type) == ERROR_MARK) @@ -5131,7 +5133,7 @@ complete_type_or_maybe_complain (tree type, tree value, tsubst_flags_t complain) else if (!COMPLETE_TYPE_P (type)) { if (complain & tf_error) - cxx_incomplete_type_diagnostic (value, type, DK_ERROR); + cxx_incomplete_type_diagnostic (value, type, diagnostics::kind::error); note_failed_type_completion_for_satisfaction (type); return NULL_TREE; } diff --git a/gcc/rust/backend/rust-tree.h b/gcc/rust/backend/rust-tree.h index bb99684..3630b0e 100644 --- a/gcc/rust/backend/rust-tree.h +++ b/gcc/rust/backend/rust-tree.h @@ -3137,7 +3137,7 @@ extern bool reject_gcc_builtin (const_tree, location_t = UNKNOWN_LOCATION); extern tree resolve_nondeduced_context (tree, tsubst_flags_t); extern void cxx_incomplete_type_diagnostic (location_t, const_tree, const_tree, - diagnostic_t); + enum diagnostics::kind); extern void cxx_incomplete_type_error (location_t, const_tree, const_tree); @@ -3430,7 +3430,7 @@ null_node_p (const_tree expr) inline void cxx_incomplete_type_diagnostic (const_tree value, const_tree type, - diagnostic_t diag_kind) + enum diagnostics::kind diag_kind) { cxx_incomplete_type_diagnostic (rs_expr_loc_or_input_loc (value), value, type, diag_kind); @@ -3439,7 +3439,7 @@ cxx_incomplete_type_diagnostic (const_tree value, const_tree type, inline void cxx_incomplete_type_error (const_tree value, const_tree type) { - cxx_incomplete_type_diagnostic (value, type, DK_ERROR); + cxx_incomplete_type_diagnostic (value, type, diagnostics::kind::error); } extern location_t |