From fe509d27eef681bc6f3a92c1573f8ab301dd3450 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Tue, 22 Oct 2024 23:14:56 +0000 Subject: [PATCH] Move diagnostic kind name to the end of the diagnostic. Also surround it in square brackets rather than parentheses. This matches the format used by Clang and GCC, and means diagnostics will still match the naive `file:line:col: error: ` regex used by some IDE tools. Also tighten up regex to only match on STDERR lines that list a file name. --- .../testdata/alias/fail_bool_value.carbon | 2 +- .../check/testdata/alias/fail_builtins.carbon | 4 +- .../testdata/alias/fail_control_flow.carbon | 6 +- .../alias/no_prelude/export_name.carbon | 2 +- .../fail_aliased_name_in_diag.carbon | 2 +- .../no_prelude/fail_local_in_namespace.carbon | 6 +- .../alias/no_prelude/fail_modifiers.carbon | 18 +-- .../no_prelude/fail_name_conflict.carbon | 8 +- .../alias/no_prelude/fail_not_constant.carbon | 2 +- .../alias/no_prelude/fail_params.carbon | 4 +- .../testdata/alias/no_prelude/import.carbon | 4 +- .../alias/no_prelude/import_access.carbon | 4 +- .../testdata/array/fail_bound_negative.carbon | 2 +- .../testdata/array/fail_bound_overflow.carbon | 8 +- .../array/fail_incomplete_element.carbon | 4 +- .../testdata/array/fail_invalid_type.carbon | 4 +- .../testdata/array/fail_out_of_bound.carbon | 2 +- .../fail_out_of_bound_non_literal.carbon | 2 +- .../testdata/array/fail_type_mismatch.carbon | 12 +- .../array/fail_undefined_bound.carbon | 2 +- .../testdata/as/adapter_conversion.carbon | 6 +- .../testdata/as/fail_no_conversion.carbon | 4 +- .../check/testdata/as/fail_not_type.carbon | 4 +- .../check/testdata/basics/fail_bad_run.carbon | 4 +- .../testdata/basics/fail_bad_run_2.carbon | 2 +- .../basics/fail_non_type_as_type.carbon | 4 +- .../fail_numeric_literal_overflow.carbon | 10 +- .../basics/fail_qualifier_unsupported.carbon | 2 +- .../basics/no_prelude/fail_name_lookup.carbon | 2 +- .../testdata/basics/type_literals.carbon | 26 ++--- .../check/testdata/builtins/float/add.carbon | 6 +- .../check/testdata/builtins/float/div.carbon | 6 +- .../check/testdata/builtins/float/eq.carbon | 2 +- .../testdata/builtins/float/make_type.carbon | 4 +- .../check/testdata/builtins/float/mul.carbon | 6 +- .../testdata/builtins/float/negate.carbon | 18 +-- .../check/testdata/builtins/float/neq.carbon | 2 +- .../check/testdata/builtins/float/sub.carbon | 6 +- .../check/testdata/builtins/int/eq.carbon | 2 +- .../testdata/builtins/int/left_shift.carbon | 10 +- .../builtins/int/make_type_signed.carbon | 6 +- .../builtins/int/make_type_unsigned.carbon | 6 +- .../testdata/builtins/int/right_shift.carbon | 6 +- .../check/testdata/builtins/int/sadd.carbon | 18 +-- .../check/testdata/builtins/int/sdiv.carbon | 6 +- .../check/testdata/builtins/int/smod.carbon | 6 +- .../check/testdata/builtins/int/smul.carbon | 2 +- .../testdata/builtins/int/snegate.carbon | 30 ++--- .../check/testdata/builtins/int/ssub.carbon | 2 +- .../check/testdata/builtins/int/uadd.carbon | 16 +-- .../check/testdata/builtins/int/udiv.carbon | 4 +- .../check/testdata/builtins/int/umod.carbon | 4 +- .../testdata/builtins/int/unegate.carbon | 28 ++--- .../testdata/class/access_modifers.carbon | 28 ++--- toolchain/check/testdata/class/adapt.carbon | 2 +- .../class/cross_package_import.carbon | 26 ++--- .../check/testdata/class/extend_adapt.carbon | 12 +- .../check/testdata/class/fail_abstract.carbon | 26 ++--- .../testdata/class/fail_adapt_bad_decl.carbon | 24 ++-- .../testdata/class/fail_adapt_bad_type.carbon | 4 +- .../class/fail_adapt_modifiers.carbon | 14 +-- .../class/fail_adapt_with_base.carbon | 4 +- .../class/fail_adapt_with_subobjects.carbon | 16 +-- .../testdata/class/fail_addr_not_self.carbon | 4 +- .../testdata/class/fail_addr_self.carbon | 6 +- .../class/fail_base_as_declared_name.carbon | 4 +- .../testdata/class/fail_base_bad_type.carbon | 50 ++++---- .../class/fail_base_method_define.carbon | 4 +- .../testdata/class/fail_base_misplaced.carbon | 6 +- .../testdata/class/fail_base_modifiers.carbon | 14 +-- .../testdata/class/fail_base_no_extend.carbon | 2 +- .../testdata/class/fail_base_repeated.carbon | 8 +- .../testdata/class/fail_base_unbound.carbon | 2 +- .../class/fail_compound_type_mismatch.carbon | 4 +- .../class/fail_convert_to_invalid.carbon | 2 +- .../class/fail_derived_to_base.carbon | 8 +- .../testdata/class/fail_extend_cycle.carbon | 6 +- .../class/fail_field_modifiers.carbon | 8 +- .../testdata/class/fail_generic_method.carbon | 8 +- .../testdata/class/fail_import_misuses.carbon | 12 +- .../testdata/class/fail_incomplete.carbon | 54 ++++----- .../check/testdata/class/fail_init.carbon | 6 +- .../class/fail_init_as_inplace.carbon | 2 +- .../class/fail_memaccess_category.carbon | 8 +- .../testdata/class/fail_member_of_let.carbon | 4 +- .../check/testdata/class/fail_method.carbon | 12 +- .../class/fail_method_modifiers.carbon | 16 +-- .../class/fail_method_redefinition.carbon | 4 +- .../testdata/class/fail_modifiers.carbon | 36 +++--- .../class/fail_out_of_line_decl.carbon | 2 +- .../class/fail_redeclaration_scope.carbon | 2 +- .../testdata/class/fail_redefinition.carbon | 10 +- .../check/testdata/class/fail_scope.carbon | 2 +- .../check/testdata/class/fail_self.carbon | 14 +-- .../testdata/class/fail_self_param.carbon | 2 +- .../class/fail_self_type_member.carbon | 4 +- .../class/fail_todo_local_class.carbon | 4 +- .../testdata/class/fail_unbound_field.carbon | 4 +- .../testdata/class/fail_unknown_member.carbon | 2 +- .../check/testdata/class/generic/call.carbon | 14 +-- .../testdata/class/generic/import.carbon | 12 +- .../class/generic/member_access.carbon | 4 +- .../class/generic/member_inline.carbon | 2 +- .../class/generic/member_out_of_line.carbon | 16 +-- .../testdata/class/generic/redeclare.carbon | 20 ++-- .../testdata/class/inheritance_access.carbon | 24 ++-- .../check/testdata/class/init_adapt.carbon | 16 +-- .../testdata/class/no_prelude/extern.carbon | 94 +++++++-------- .../class/no_prelude/extern_library.carbon | 2 +- .../class/no_prelude/generic_vs_params.carbon | 4 +- .../class/no_prelude/implicit_import.carbon | 18 +-- .../class/no_prelude/import_access.carbon | 12 +- .../no_definition_in_impl_file.carbon | 4 +- .../class/no_prelude/syntactic_merge.carbon | 26 ++--- toolchain/check/testdata/class/self.carbon | 8 +- .../class/syntactic_merge_literal.carbon | 6 +- .../testdata/class/virtual_modifiers.carbon | 2 +- .../check/testdata/const/collapse.carbon | 2 +- .../check/testdata/const/fail_collapse.carbon | 6 +- toolchain/check/testdata/deduce/array.carbon | 12 +- .../check/testdata/deduce/int_float.carbon | 2 +- toolchain/check/testdata/deduce/tuple.carbon | 4 +- .../testdata/deduce/type_operator.carbon | 4 +- .../check/testdata/eval/fail_aggregate.carbon | 2 +- .../check/testdata/eval/fail_symbolic.carbon | 2 +- .../function/builtin/fail_redefined.carbon | 12 +- .../function/builtin/fail_unknown.carbon | 2 +- .../function/call/fail_not_callable.carbon | 2 +- .../function/call/fail_param_count.carbon | 24 ++-- .../function/call/fail_param_type.carbon | 6 +- .../call/fail_return_type_mismatch.carbon | 4 +- .../fail_explicit_self_param.carbon | 2 +- .../fail_runtime_implicit_param.carbon | 2 +- .../declaration/fail_param_in_type.carbon | 2 +- .../declaration/fail_param_redecl.carbon | 4 +- .../function/declaration/import.carbon | 110 +++++++++--------- .../declaration/no_prelude/extern.carbon | 12 +- .../no_prelude/extern_library.carbon | 36 +++--- .../extern_library_for_default.carbon | 6 +- .../extern_library_from_default.carbon | 6 +- .../fail_import_incomplete_return.carbon | 32 ++--- .../no_prelude/fail_modifiers.carbon | 38 +++--- .../fail_pattern_in_signature.carbon | 4 +- .../declaration/no_prelude/fail_redecl.carbon | 20 ++-- .../no_prelude/fail_todo_no_params.carbon | 8 +- .../no_prelude/implicit_import.carbon | 14 +-- .../no_definition_in_impl_file.carbon | 4 +- .../function/definition/import.carbon | 30 ++--- .../function/definition/import_access.carbon | 12 +- .../definition/no_prelude/extern.carbon | 22 ++-- .../no_prelude/extern_library.carbon | 10 +- .../fail_decl_param_mismatch.carbon | 22 ++-- .../definition/no_prelude/fail_redef.carbon | 4 +- .../no_prelude/implicit_import.carbon | 30 ++--- .../no_prelude/syntactic_merge.carbon | 22 ++-- .../testdata/function/generic/deduce.carbon | 16 +-- .../generic/fail_todo_param_in_type.carbon | 2 +- .../fail_type_param_mismatch.carbon | 2 +- .../function/generic/redeclare.carbon | 24 ++-- .../function/generic/resolve_used.carbon | 2 +- .../function/generic/undefined.carbon | 4 +- .../if/fail_reachable_fallthrough.carbon | 6 +- toolchain/check/testdata/if/fail_scope.carbon | 2 +- .../if_expr/fail_not_in_function.carbon | 12 +- .../if_expr/fail_partial_constant.carbon | 6 +- .../testdata/impl/fail_call_invalid.carbon | 2 +- .../impl/fail_extend_impl_forall.carbon | 2 +- .../impl/fail_extend_impl_scope.carbon | 2 +- .../impl/fail_extend_impl_type_as.carbon | 10 +- .../impl/fail_extend_non_interface.carbon | 2 +- ..._extend_partially_defined_interface.carbon | 4 +- .../fail_extend_undefined_interface.carbon | 4 +- .../testdata/impl/fail_impl_as_scope.carbon | 2 +- .../impl/fail_impl_bad_assoc_const.carbon | 2 +- .../impl/fail_impl_bad_assoc_fn.carbon | 60 +++++----- .../impl/fail_impl_bad_interface.carbon | 6 +- .../testdata/impl/fail_redefinition.carbon | 4 +- .../impl/fail_todo_impl_assoc_const.carbon | 6 +- .../lookup/fail_alias_impl_not_found.carbon | 4 +- .../lookup/fail_todo_undefined_impl.carbon | 2 +- .../check/testdata/impl/lookup/generic.carbon | 4 +- .../impl/no_prelude/fail_alias.carbon | 4 +- .../impl/no_prelude/fail_impl_bad_type.carbon | 2 +- .../no_prelude/generic_redeclaration.carbon | 4 +- .../impl/no_prelude/import_generic.carbon | 6 +- .../impl/no_prelude/interface_args.carbon | 4 +- .../no_definition_in_impl_file.carbon | 4 +- .../index/fail_array_large_index.carbon | 4 +- .../index/fail_array_non_int_indexing.carbon | 4 +- .../fail_array_out_of_bound_access.carbon | 2 +- .../testdata/index/fail_expr_category.carbon | 8 +- .../testdata/index/fail_invalid_base.carbon | 8 +- .../testdata/index/fail_name_not_found.carbon | 2 +- .../index/fail_negative_indexing.carbon | 2 +- .../index/fail_non_tuple_access.carbon | 2 +- .../fail_assoc_const_bad_default.carbon | 4 +- .../fail_todo_assoc_const_default.carbon | 4 +- .../fail_todo_define_default_fn_inline.carbon | 4 +- ..._todo_define_default_fn_out_of_line.carbon | 12 +- .../fail_add_member_outside_definition.carbon | 6 +- .../fail_assoc_const_not_binding.carbon | 2 +- .../fail_assoc_const_not_constant.carbon | 4 +- .../fail_assoc_const_template.carbon | 2 +- .../fail_definition_imported.carbon | 6 +- .../no_prelude/fail_duplicate.carbon | 16 +-- .../fail_generic_redeclaration.carbon | 12 +- .../no_prelude/fail_lookup_undefined.carbon | 16 +-- .../no_prelude/fail_member_lookup.carbon | 4 +- .../no_prelude/fail_modifiers.carbon | 8 +- .../no_prelude/fail_redeclare_member.carbon | 4 +- .../no_prelude/fail_todo_facet_lookup.carbon | 4 +- .../fail_todo_generic_default_fn.carbon | 4 +- .../no_prelude/fail_todo_modifiers.carbon | 4 +- .../interface/no_prelude/generic.carbon | 4 +- .../no_prelude/generic_vs_params.carbon | 4 +- .../interface/no_prelude/import_access.carbon | 14 +-- .../no_prelude/syntactic_merge.carbon | 40 +++---- .../testdata/let/compile_time_bindings.carbon | 26 ++--- .../testdata/let/fail_duplicate_decl.carbon | 4 +- .../check/testdata/let/fail_generic.carbon | 8 +- .../testdata/let/fail_generic_import.carbon | 4 +- .../testdata/let/fail_missing_value.carbon | 4 +- .../check/testdata/let/fail_modifiers.carbon | 32 ++--- .../testdata/let/fail_use_in_init.carbon | 2 +- .../check/testdata/let/generic_import.carbon | 6 +- .../let/no_prelude/import_access.carbon | 4 +- .../fail_conflict_after_merge.carbon | 12 +- ...l_conflict_imported_namespace_first.carbon | 6 +- ..._conflict_imported_namespace_nested.carbon | 10 +- ..._conflict_imported_namespace_second.carbon | 12 +- ...conflict_in_imports_namespace_first.carbon | 8 +- ...onflict_in_imports_namespace_second.carbon | 8 +- .../namespace/fail_decl_in_alias.carbon | 4 +- .../testdata/namespace/fail_duplicate.carbon | 4 +- .../testdata/namespace/fail_modifiers.carbon | 22 ++-- .../testdata/namespace/fail_params.carbon | 10 +- .../namespace/fail_unresolved_scope.carbon | 2 +- .../fail_and_or_not_in_function.carbon | 12 +- .../fail_and_or_partial_constant.carbon | 8 +- .../builtin/fail_assignment_to_error.carbon | 4 +- .../fail_assignment_to_non_assignable.carbon | 16 +-- .../fail_redundant_compound_access.carbon | 4 +- .../builtin/fail_type_mismatch.carbon | 4 +- .../fail_type_mismatch_assignment.carbon | 4 +- .../builtin/fail_type_mismatch_once.carbon | 4 +- .../builtin/fail_unimplemented_op.carbon | 2 +- .../testdata/operators/overloaded/eq.carbon | 12 +- .../overloaded/fail_assign_non_ref.carbon | 8 +- .../operators/overloaded/fail_no_impl.carbon | 8 +- .../overloaded/fail_no_impl_for_arg.carbon | 12 +- .../operators/overloaded/ordered.carbon | 8 +- .../package_expr/fail_not_found.carbon | 2 +- .../packages/fail_api_not_found.carbon | 6 +- .../fail_conflict_no_namespaces.carbon | 8 +- .../check/testdata/packages/fail_cycle.carbon | 10 +- .../packages/fail_duplicate_api.carbon | 8 +- .../testdata/packages/fail_extension.carbon | 26 ++--- .../packages/fail_import_default.carbon | 8 +- .../packages/fail_import_invalid.carbon | 18 +-- .../packages/fail_import_repeat.carbon | 16 +-- .../packages/fail_import_type_error.carbon | 8 +- .../fail_name_with_import_failure.carbon | 2 +- .../packages/fail_package_main.carbon | 8 +- .../no_prelude/cross_package_export.carbon | 22 ++-- .../no_prelude/cross_package_import.carbon | 46 ++++---- .../packages/no_prelude/export_import.carbon | 4 +- .../packages/no_prelude/export_mixed.carbon | 2 +- .../packages/no_prelude/export_name.carbon | 26 ++--- .../no_prelude/fail_export_name_member.carbon | 6 +- .../no_prelude/fail_export_name_params.carbon | 2 +- .../packages/no_prelude/fail_modifiers.carbon | 30 ++--- .../implicit_imports_entities.carbon | 16 +-- .../no_prelude/missing_prelude.carbon | 6 +- .../pointer/fail_address_of_error.carbon | 6 +- .../pointer/fail_address_of_value.carbon | 28 ++--- .../testdata/pointer/fail_deref_error.carbon | 4 +- .../pointer/fail_deref_function.carbon | 4 +- .../pointer/fail_deref_namespace.carbon | 4 +- .../pointer/fail_deref_not_pointer.carbon | 12 +- .../testdata/pointer/fail_deref_type.carbon | 6 +- .../pointer/fail_type_mismatch.carbon | 4 +- .../testdata/return/fail_call_in_type.carbon | 2 +- .../testdata/return/fail_error_in_type.carbon | 2 +- .../testdata/return/fail_let_in_type.carbon | 10 +- .../return/fail_missing_return.carbon | 2 +- .../fail_missing_return_empty_tuple.carbon | 2 +- .../fail_return_var_no_returned_var.carbon | 2 +- .../fail_return_with_returned_var.carbon | 8 +- .../fail_returned_var_no_return_type.carbon | 4 +- .../return/fail_returned_var_shadow.carbon | 8 +- .../return/fail_returned_var_type.carbon | 4 +- .../testdata/return/fail_type_mismatch.carbon | 4 +- .../return/fail_value_disallowed.carbon | 4 +- .../testdata/return/fail_value_missing.carbon | 4 +- .../testdata/return/fail_var_in_type.carbon | 2 +- .../struct/fail_access_into_invalid.carbon | 2 +- .../testdata/struct/fail_assign_empty.carbon | 2 +- .../struct/fail_assign_to_empty.carbon | 2 +- .../struct/fail_duplicate_name.carbon | 20 ++-- .../struct/fail_field_name_mismatch.carbon | 4 +- .../struct/fail_field_type_mismatch.carbon | 2 +- .../testdata/struct/fail_keyword_name.carbon | 6 +- .../struct/fail_member_access_type.carbon | 2 +- .../struct/fail_member_of_function.carbon | 2 +- .../struct/fail_non_member_access.carbon | 2 +- .../struct/fail_too_few_values.carbon | 2 +- .../testdata/struct/fail_type_assign.carbon | 4 +- .../testdata/struct/fail_value_as_type.carbon | 4 +- toolchain/check/testdata/struct/import.carbon | 10 +- .../no_prelude/fail_assign_nested.carbon | 2 +- .../no_prelude/fail_nested_incomplete.carbon | 4 +- .../tuple/access/fail_access_error.carbon | 2 +- .../tuple/access/fail_empty_access.carbon | 2 +- .../tuple/access/fail_large_index.carbon | 4 +- .../access/fail_negative_indexing.carbon | 2 +- .../access/fail_non_deterministic_type.carbon | 2 +- .../tuple/access/fail_non_int_indexing.carbon | 4 +- .../tuple/access/fail_non_tuple_access.carbon | 4 +- .../access/fail_out_of_bound_access.carbon | 2 +- .../fail_out_of_bound_not_literal.carbon | 2 +- .../testdata/tuple/fail_assign_nested.carbon | 2 +- .../tuple/fail_element_type_mismatch.carbon | 4 +- .../tuple/fail_nested_incomplete.carbon | 4 +- .../tuple/fail_too_few_element.carbon | 2 +- .../testdata/tuple/fail_type_assign.carbon | 4 +- .../testdata/tuple/fail_value_as_type.carbon | 4 +- toolchain/check/testdata/tuple/import.carbon | 10 +- .../tuple/no_prelude/fail_assign_empty.carbon | 2 +- .../no_prelude/fail_assign_to_empty.carbon | 2 +- .../testdata/var/fail_not_copyable.carbon | 4 +- .../var/fail_storage_is_literal.carbon | 4 +- .../var/fail_todo_control_flow_init.carbon | 20 ++-- .../var/no_prelude/export_name.carbon | 6 +- .../var/no_prelude/fail_duplicate_decl.carbon | 4 +- .../var/no_prelude/fail_generic.carbon | 2 +- .../no_prelude/fail_init_type_mismatch.carbon | 2 +- .../var/no_prelude/fail_init_with_self.carbon | 2 +- .../fail_lookup_outside_scope.carbon | 2 +- .../var/no_prelude/fail_modifiers.carbon | 14 +-- .../no_prelude/fail_namespace_conflict.carbon | 8 +- .../var/no_prelude/import_access.carbon | 4 +- .../testdata/where_expr/constraints.carbon | 36 +++--- .../testdata/where_expr/designator.carbon | 14 +-- .../testdata/where_expr/fail_not_facet.carbon | 2 +- .../testdata/while/fail_bad_condition.carbon | 4 +- .../testdata/while/fail_break_continue.carbon | 8 +- toolchain/diagnostics/diagnostic_consumer.cpp | 5 +- .../diagnostics/emitted_diagnostics_test.cpp | 2 +- .../driver/testdata/fail_missing_file.carbon | 2 +- .../fail_bad_comment_introducers.carbon | 10 +- ...introducers_mid_block_indent_change.carbon | 6 +- .../testdata/fail_bad_raw_identifier.carbon | 16 +-- .../fail_block_string_second_line.carbon | 2 +- .../testdata/fail_mismatched_brackets.carbon | 6 +- .../fail_mismatched_brackets_2.carbon | 2 +- toolchain/lex/testdata/fail_multifile.carbon | 4 +- .../testdata/fail_trailing_comments.carbon | 6 +- .../lex/testdata/numeric_literals.carbon | 8 +- toolchain/lex/testdata/string_literals.carbon | Bin 3718 -> 3722 bytes .../basics/fail_before_lowering.carbon | 4 +- .../parse/testdata/alias/fail_syntax.carbon | 22 ++-- .../array/fail_require_close_bracket.carbon | 4 +- .../testdata/array/fail_require_semi.carbon | 2 +- .../parse/testdata/array/fail_syntax.carbon | 26 ++--- .../basics/fail_bracket_recovery.carbon | 8 +- .../basics/fail_invalid_designators.carbon | 4 +- .../basics/fail_modifiers_before_semi.carbon | 2 +- .../basics/fail_no_intro_with_semi.carbon | 2 +- .../basics/fail_no_intro_without_semi.carbon | 2 +- .../basics/fail_paren_match_regression.carbon | 6 +- ...il_alternative_with_implicit_params.carbon | 2 +- ...fail_invalid_alternative_identifier.carbon | 4 +- .../choice/fail_invalid_braces.carbon | 4 +- .../choice/fail_missing_definition.carbon | 2 +- ...il_missing_definition_parameterized.carbon | 2 +- .../fail_qualified_alternative_name.carbon | 2 +- toolchain/parse/testdata/class/adapt.carbon | 10 +- .../parse/testdata/class/fail_base.carbon | 8 +- .../testdata/class/fail_base_misplaced.carbon | 2 +- .../testdata/class/fail_modifiers.carbon | 6 +- .../for/fail_colon_instead_of_in.carbon | 2 +- .../testdata/for/fail_missing_cond.carbon | 8 +- .../parse/testdata/for/fail_missing_in.carbon | 2 +- .../testdata/for/fail_missing_var.carbon | 2 +- .../testdata/for/fail_returned_var.carbon | 2 +- .../testdata/for/fail_square_brackets.carbon | 8 +- .../function/declaration/extern.carbon | 6 +- .../fail_identifier_instead_of_sig.carbon | 2 +- .../fail_missing_implicit_close.carbon | 4 +- .../declaration/fail_missing_name.carbon | 2 +- .../declaration/fail_no_sig_or_semi.carbon | 2 +- .../declaration/fail_only_fn_and_semi.carbon | 2 +- .../fail_repeated_fn_and_semi.carbon | 2 +- ...skip_indented_newline_until_outdent.carbon | 2 +- ...ail_skip_indented_newline_with_semi.carbon | 2 +- ..._skip_indented_newline_without_semi.carbon | 2 +- .../fail_skip_to_newline_without_semi.carbon | 2 +- .../fail_skip_without_semi_to_curly.carbon | 2 +- .../fail_with_identifier_as_param.carbon | 2 +- ...hout_name_and_many_tokens_in_params.carbon | 2 +- .../function/definition/fail_builtin.carbon | 6 +- .../fail_identifier_in_statements.carbon | 2 +- .../deduced_params/fail_no_parens.carbon | 8 +- .../testdata/generics/impl/fail_impl.carbon | 32 ++--- .../impl/fail_out_of_line_member.carbon | 4 +- .../interface/fail_missing_name.carbon | 2 +- .../interface/fail_missing_open_curly.carbon | 4 +- .../interface/fail_self_param_syntax.carbon | 4 +- .../named_constraint/fail_incomplete.carbon | 4 +- .../testdata/if/fail_else_unbraced.carbon | 8 +- .../parse/testdata/if/fail_errors.carbon | 10 +- .../testdata/if/fail_missing_cond.carbon | 2 +- .../testdata/if/fail_square_brackets.carbon | 6 +- .../parse/testdata/if/fail_unbraced.carbon | 6 +- .../if_expr/fail_condition_missing.carbon | 2 +- .../if_expr/fail_else_expr_missing.carbon | 2 +- .../testdata/if_expr/fail_else_missing.carbon | 2 +- .../if_expr/fail_then_expr_missing.carbon | 2 +- .../testdata/if_expr/fail_then_missing.carbon | 2 +- .../testdata/if_expr/fail_top_level_if.carbon | 6 +- .../testdata/index/fail_empty_expr.carbon | 2 +- .../testdata/index/fail_malformed_expr.carbon | 2 +- .../parse/testdata/let/fail_bad_name.carbon | 2 +- .../parse/testdata/let/fail_empty.carbon | 2 +- .../testdata/let/fail_missing_name.carbon | 4 +- .../testdata/let/fail_missing_type.carbon | 2 +- .../parse/testdata/let/fail_no_semi.carbon | 4 +- .../match/fail_cases_after_default.carbon | 6 +- .../match/fail_missing_case_arrow.carbon | 4 +- .../match/fail_missing_case_pattern.carbon | 2 +- .../fail_missing_case_statements_block.carbon | 2 +- .../testdata/match/fail_missing_cases.carbon | 2 +- .../match/fail_missing_cases_block.carbon | 2 +- .../match/fail_missing_default_arrow.carbon | 2 +- ...il_missing_default_statements_block.carbon | 2 +- .../fail_missing_guard_close_paren.carbon | 4 +- .../fail_missing_guard_open_paren.carbon | 4 +- .../match/fail_missing_matched_expr.carbon | 2 +- ...il_unexpected_tokens_in_cases_block.carbon | 12 +- .../member_access/fail_keyword.carbon | 12 +- .../testdata/namespace/fail_arrow.carbon | 2 +- .../testdata/namespace/fail_incomplete.carbon | 12 +- .../namespace/fail_incomplete_name.carbon | 2 +- .../testdata/namespace/fail_modifiers.carbon | 4 +- .../testdata/namespace/fail_no_name.carbon | 2 +- .../operators/fail_chained_assign.carbon | 2 +- .../fail_infix_uneven_space_after.carbon | 2 +- .../fail_infix_uneven_space_before.carbon | 2 +- .../operators/fail_invalid_infix.carbon | 8 +- .../operators/fail_postfix_space.carbon | 2 +- .../fail_postfix_space_before_comma.carbon | 2 +- .../fail_postfix_space_in_call.carbon | 2 +- .../fail_postfix_space_surrounding.carbon | 2 +- .../operators/fail_postincrement.carbon | 4 +- .../operators/fail_precedence_and_or.carbon | 2 +- .../operators/fail_precedence_as.carbon | 14 +-- .../operators/fail_precedence_assign.carbon | 10 +- .../operators/fail_precedence_or_and.carbon | 2 +- .../operators/fail_precedence_where.carbon | 18 +-- .../operators/fail_prefix_repeat.carbon | 2 +- .../operators/fail_prefix_space.carbon | 2 +- ...ail_prefix_uneven_space_with_assign.carbon | 2 +- .../testdata/operators/fail_star_minus.carbon | 2 +- .../testdata/operators/fail_star_star.carbon | 2 +- .../operators/fail_star_star_no_space.carbon | 2 +- .../testdata/operators/fail_variety.carbon | 10 +- .../testdata/package_expr/fail_in_name.carbon | 6 +- .../parse/testdata/packages/export.carbon | 22 ++-- .../testdata/packages/import/export.carbon | 10 +- .../packages/import/fail_after_decl.carbon | 4 +- .../import/fail_after_decl_repeated.carbon | 12 +- .../packages/import/fail_extra_string.carbon | 2 +- .../import/fail_library_is_identifier.carbon | 2 +- .../import/fail_name_is_keyword.carbon | 2 +- .../packages/import/fail_no_name.carbon | 2 +- .../packages/import/fail_no_semi.carbon | 2 +- .../import/fail_omit_library_keyword.carbon | 2 +- .../testdata/packages/import/fail_type.carbon | 2 +- .../packages/library/fail_invalid_name.carbon | 12 +- .../packages/library/fail_semi_before.carbon | 4 +- .../packages/library/fail_too_late.carbon | 4 +- .../packages/package/fail_after_decl.carbon | 4 +- .../packages/package/fail_after_import.carbon | 4 +- .../package/fail_after_package.carbon | 4 +- .../packages/package/fail_extra_string.carbon | 2 +- .../package/fail_library_is_identifier.carbon | 2 +- .../package/fail_library_skips_name.carbon | 2 +- .../package/fail_name_is_keyword.carbon | 2 +- .../packages/package/fail_no_name.carbon | 2 +- .../packages/package/fail_no_semi.carbon | 2 +- .../package/fail_omit_library_keyword.carbon | 2 +- .../packages/package/fail_semi_before.carbon | 4 +- .../package/fail_trailing_impl.carbon | 2 +- .../pointer/fail_pointer_type_in_expr.carbon | 2 +- ...e_instead_of_compound_member_access.carbon | 16 +-- .../testdata/return/fail_expr_no_semi.carbon | 2 +- .../parse/testdata/return/fail_no_semi.carbon | 4 +- .../return/fail_returned_no_var.carbon | 2 +- .../testdata/return/fail_var_no_semi.carbon | 2 +- .../testdata/struct/fail_comma_only.carbon | 2 +- .../struct/fail_comma_repeat_in_type.carbon | 2 +- .../struct/fail_comma_repeat_in_value.carbon | 2 +- .../struct/fail_extra_token_in_type.carbon | 2 +- .../struct/fail_extra_token_in_value.carbon | 2 +- .../struct/fail_identifier_colon.carbon | 2 +- .../struct/fail_identifier_equals.carbon | 2 +- .../struct/fail_identifier_only.carbon | 2 +- .../fail_invalid_struct_designator.carbon | 2 +- .../testdata/struct/fail_missing_type.carbon | 2 +- .../testdata/struct/fail_missing_value.carbon | 2 +- .../struct/fail_mix_type_and_value.carbon | 2 +- .../struct/fail_mix_value_and_type.carbon | 2 +- .../struct/fail_mix_with_unknown.carbon | 8 +- .../struct/fail_no_colon_or_equals.carbon | 2 +- .../testdata/struct/fail_period_only.carbon | 2 +- .../testdata/struct/fail_period_paren.carbon | 2 +- .../struct/fail_period_string_colon.carbon | 2 +- .../struct/fail_period_string_equals.carbon | 2 +- .../struct/fail_type_no_designator.carbon | 2 +- .../parse/testdata/var/fail_bad_name.carbon | 2 +- .../parse/testdata/var/fail_empty.carbon | 2 +- .../parse/testdata/var/fail_no_semi.carbon | 4 +- .../testdata/where_expr/designators.carbon | 12 +- .../testdata/where_expr/fail_rewrite.carbon | 14 +-- .../testdata/where_expr/where_and.carbon | 6 +- .../testdata/while/fail_missing_cond.carbon | 2 +- .../parse/testdata/while/fail_no_semi.carbon | 4 +- .../parse/testdata/while/fail_unbraced.carbon | 2 +- 528 files changed, 1929 insertions(+), 1928 deletions(-) diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index b8eb93c7181f..5d6837b568be 100644 --- a/toolchain/check/testdata/alias/fail_bool_value.carbon +++ b/toolchain/check/testdata/alias/fail_bool_value.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/fail_bool_value.carbon -// CHECK:STDERR: fail_bool_value.carbon:[[@LINE+3]]:11: error(AliasRequiresNameRef): alias initializer must be a name reference +// CHECK:STDERR: fail_bool_value.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias a = false; // CHECK:STDERR: ^~~~~ alias a = false; diff --git a/toolchain/check/testdata/alias/fail_builtins.carbon b/toolchain/check/testdata/alias/fail_builtins.carbon index 8183e3b92b66..47ec8278b482 100644 --- a/toolchain/check/testdata/alias/fail_builtins.carbon +++ b/toolchain/check/testdata/alias/fail_builtins.carbon @@ -8,13 +8,13 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/fail_builtins.carbon -// CHECK:STDERR: fail_builtins.carbon:[[@LINE+4]]:11: error(AliasRequiresNameRef): alias initializer must be a name reference +// CHECK:STDERR: fail_builtins.carbon:[[@LINE+4]]:11: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias a = i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: alias a = i32; -// CHECK:STDERR: fail_builtins.carbon:[[@LINE+3]]:11: error(AliasRequiresNameRef): alias initializer must be a name reference +// CHECK:STDERR: fail_builtins.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias b = bool; // CHECK:STDERR: ^~~~ alias b = bool; diff --git a/toolchain/check/testdata/alias/fail_control_flow.carbon b/toolchain/check/testdata/alias/fail_control_flow.carbon index 4d26153abeff..a8fab92e5672 100644 --- a/toolchain/check/testdata/alias/fail_control_flow.carbon +++ b/toolchain/check/testdata/alias/fail_control_flow.carbon @@ -8,15 +8,15 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/fail_control_flow.carbon -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+11]]:11: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+11]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+7]]:11: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+7]]:11: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+3]]:11: error(AliasRequiresNameRef): alias initializer must be a name reference +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ alias a = true or false; diff --git a/toolchain/check/testdata/alias/no_prelude/export_name.carbon b/toolchain/check/testdata/alias/no_prelude/export_name.carbon index a02e590161a3..fd01a5afabbb 100644 --- a/toolchain/check/testdata/alias/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/alias/no_prelude/export_name.carbon @@ -53,7 +53,7 @@ library "[[@TEST_NAME]]"; import library "export"; -// CHECK:STDERR: fail_orig_name_not_in_export.carbon:[[@LINE+3]]:8: error(NameNotFound): name `C` not found +// CHECK:STDERR: fail_orig_name_not_in_export.carbon:[[@LINE+3]]:8: error: name `C` not found [NameNotFound] // CHECK:STDERR: var c: C = {}; // CHECK:STDERR: ^ var c: C = {}; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon index 5c9166215757..210acbfe4050 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_aliased_name_in_diag.carbon @@ -14,7 +14,7 @@ class D {} alias c = C; var d: D = {}; -// CHECK:STDERR: fail_aliased_name_in_diag.carbon:[[@LINE+3]]:1: error(CoreNotFound): package `Core` implicitly referenced here, but not found +// CHECK:STDERR: fail_aliased_name_in_diag.carbon:[[@LINE+3]]:1: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: let c_var: c = d; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ let c_var: c = d; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon index 36193cc0e877..3ecd16bace64 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_local_in_namespace.carbon @@ -11,16 +11,16 @@ namespace NS; fn F() -> {} { - // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+8]]:9: error(NameNotFound): name `NS` not found + // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+8]]:9: error: name `NS` not found [NameNotFound] // CHECK:STDERR: alias NS.a = {}; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+4]]:16: error(AliasRequiresNameRef): alias initializer must be a name reference + // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+4]]:16: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias NS.a = {}; // CHECK:STDERR: ^~ // CHECK:STDERR: alias NS.a = {}; - // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+3]]:10: error(NameNotFound): name `a` not found + // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+3]]:10: error: name `a` not found [NameNotFound] // CHECK:STDERR: return NS.a; // CHECK:STDERR: ^~~~ return NS.a; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon index 698d8dc46079..8dfcc2101c50 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_modifiers.carbon @@ -10,40 +10,40 @@ class Class {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:1: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `alias` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:1: error: `abstract` not allowed on `alias` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:10: error(ModifierNotAllowedWith): `base` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:10: error: `base` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:15: error(ModifierNotAllowedWith): `default` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:15: error: `default` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:23: error(ModifierNotAllowedWith): `final` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:23: error: `final` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract base default final alias A = Class; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `impl` not allowed on `alias` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `impl` not allowed on `alias` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: impl alias B = Class; // CHECK:STDERR: ^~~~ // CHECK:STDERR: impl alias B = Class; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierNotAllowedOnDeclaration): `extern` not allowed on `alias` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `extern` not allowed on `alias` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: extern alias C = Class; // CHECK:STDERR: ^~~~~~ extern alias C = Class; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon index 9bef098fbf41..22b7ccb842f1 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_name_conflict.carbon @@ -11,20 +11,20 @@ class C {} alias a = C; -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE+7]]:5: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE+7]]:5: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: var a: C = {}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:7: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:7: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: alias a = C; // CHECK:STDERR: ^ // CHECK:STDERR: var a: C = {}; var b: C = {}; -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE+6]]:7: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE+6]]:7: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: alias b = C; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:5: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:5: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: var b: C = {}; // CHECK:STDERR: ^ alias b = C; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon index 368df1473560..1c08fcd2f510 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_not_constant.carbon @@ -11,7 +11,7 @@ fn F() { var a: () = (); var b: ()* = &a; - // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+3]]:13: error(AliasRequiresNameRef): alias initializer must be a name reference + // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+3]]:13: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias c = *b; // CHECK:STDERR: ^~ alias c = *b; diff --git a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon index dbef06301893..f7402fb1257b 100644 --- a/toolchain/check/testdata/alias/no_prelude/fail_params.carbon +++ b/toolchain/check/testdata/alias/no_prelude/fail_params.carbon @@ -8,11 +8,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/alias/no_prelude/fail_params.carbon -// CHECK:STDERR: fail_params.carbon:[[@LINE+7]]:8: error(UnexpectedDeclNameParams): `alias` declaration cannot have parameters +// CHECK:STDERR: fail_params.carbon:[[@LINE+7]]:8: error: `alias` declaration cannot have parameters [UnexpectedDeclNameParams] // CHECK:STDERR: alias A(T:! type) = T*; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_params.carbon:[[@LINE+3]]:21: error(AliasRequiresNameRef): alias initializer must be a name reference +// CHECK:STDERR: fail_params.carbon:[[@LINE+3]]:21: error: alias initializer must be a name reference [AliasRequiresNameRef] // CHECK:STDERR: alias A(T:! type) = T*; // CHECK:STDERR: ^~ alias A(T:! type) = T*; diff --git a/toolchain/check/testdata/alias/no_prelude/import.carbon b/toolchain/check/testdata/alias/no_prelude/import.carbon index 2b3e58144edf..f6db011da527 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -58,8 +58,8 @@ var b: () = a_alias; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_var3.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: var2.carbon:8:5: error(SemanticsTodo): semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` +// CHECK:STDERR: fail_var3.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: var2.carbon:8:5: error: semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` [SemanticsTodo] // CHECK:STDERR: var b: () = a_alias; // CHECK:STDERR: ^ import library "var2"; diff --git a/toolchain/check/testdata/alias/no_prelude/import_access.carbon b/toolchain/check/testdata/alias/no_prelude/import_access.carbon index 13484d753af2..2df9dec89709 100644 --- a/toolchain/check/testdata/alias/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import_access.carbon @@ -35,7 +35,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:11: error(NameNotFound): name `A` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:11: error: name `A` not found [NameNotFound] // CHECK:STDERR: var inst: A = {}; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -47,7 +47,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:11: error(NameNotFound): name `A` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:11: error: name `A` not found [NameNotFound] // CHECK:STDERR: var inst: Test.A = {}; // CHECK:STDERR: ^~~~~~ var inst: Test.A = {}; diff --git a/toolchain/check/testdata/array/fail_bound_negative.carbon b/toolchain/check/testdata/array/fail_bound_negative.carbon index 515644753ff0..863c1dcc151f 100644 --- a/toolchain/check/testdata/array/fail_bound_negative.carbon +++ b/toolchain/check/testdata/array/fail_bound_negative.carbon @@ -10,7 +10,7 @@ fn Negate(n: i32) -> i32 = "int.snegate"; -// CHECK:STDERR: fail_bound_negative.carbon:[[@LINE+3]]:14: error(ArrayBoundNegative): array bound of -1 is negative +// CHECK:STDERR: fail_bound_negative.carbon:[[@LINE+3]]:14: error: array bound of -1 is negative [ArrayBoundNegative] // CHECK:STDERR: var a: [i32; Negate(1)]; // CHECK:STDERR: ^~~~~~~ var a: [i32; Negate(1)]; diff --git a/toolchain/check/testdata/array/fail_bound_overflow.carbon b/toolchain/check/testdata/array/fail_bound_overflow.carbon index 3fef580b13d0..c86974125597 100644 --- a/toolchain/check/testdata/array/fail_bound_overflow.carbon +++ b/toolchain/check/testdata/array/fail_bound_overflow.carbon @@ -11,20 +11,20 @@ // TODO: Once we preserve the full value of integer literals in SemIR, check // that we reject the array bound being too large. -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+4]]:14: error(IntLiteralTooLargeForI32): integer literal with value 39999999999999999993 does not fit in i32 +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+4]]:14: error: integer literal with value 39999999999999999993 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: var a: [i32; 39999999999999999993]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: [i32; 39999999999999999993]; -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+10]]:9: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+10]]:9: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var b: [1; 39999999999999999993]; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var b: [1; 39999999999999999993]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+3]]:12: error(IntLiteralTooLargeForI32): integer literal with value 39999999999999999993 does not fit in i32 +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+3]]:12: error: integer literal with value 39999999999999999993 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: var b: [1; 39999999999999999993]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ var b: [1; 39999999999999999993]; diff --git a/toolchain/check/testdata/array/fail_incomplete_element.carbon b/toolchain/check/testdata/array/fail_incomplete_element.carbon index 299a46199c2a..78947d0ca791 100644 --- a/toolchain/check/testdata/array/fail_incomplete_element.carbon +++ b/toolchain/check/testdata/array/fail_incomplete_element.carbon @@ -10,10 +10,10 @@ class Incomplete; -// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+6]]:8: error(IncompleteTypeInVarDecl): variable has incomplete type `[Incomplete; 1]` +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+6]]:8: error: variable has incomplete type `[Incomplete; 1]` [IncompleteTypeInVarDecl] // CHECK:STDERR: var a: [Incomplete; 1]; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ var a: [Incomplete; 1]; diff --git a/toolchain/check/testdata/array/fail_invalid_type.carbon b/toolchain/check/testdata/array/fail_invalid_type.carbon index 7e3f6e1c5c02..6ff05354be0b 100644 --- a/toolchain/check/testdata/array/fail_invalid_type.carbon +++ b/toolchain/check/testdata/array/fail_invalid_type.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_invalid_type.carbon -// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+6]]:9: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+6]]:9: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var a: [1; 1]; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var a: [1; 1]; // CHECK:STDERR: ^ var a: [1; 1]; diff --git a/toolchain/check/testdata/array/fail_out_of_bound.carbon b/toolchain/check/testdata/array/fail_out_of_bound.carbon index b8ff16e4c4dd..58f699eb74d7 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_out_of_bound.carbon -// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:19: error(ArrayInitFromLiteralArgCountMismatch): cannot initialize array of 1 element from 3 initializers +// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:19: error: cannot initialize array of 1 element from 3 initializers [ArrayInitFromLiteralArgCountMismatch] // CHECK:STDERR: var a: [i32; 1] = (1, 2, 3); // CHECK:STDERR: ^~~~~~~~~ var a: [i32; 1] = (1, 2, 3); diff --git a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon index 1080b4c835ee..c603cfa1b5b5 100644 --- a/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon +++ b/toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_out_of_bound_non_literal.carbon var a: [i32; 3] = (1, 2, 3); -// CHECK:STDERR: fail_out_of_bound_non_literal.carbon:[[@LINE+3]]:16: error(ArrayIndexOutOfBounds): array index `3` is past the end of type `[i32; 3]` +// CHECK:STDERR: fail_out_of_bound_non_literal.carbon:[[@LINE+3]]:16: error: array index `3` is past the end of type `[i32; 3]` [ArrayIndexOutOfBounds] // CHECK:STDERR: var b: i32 = a[{.index = 3}.index]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ var b: i32 = a[{.index = 3}.index]; diff --git a/toolchain/check/testdata/array/fail_type_mismatch.carbon b/toolchain/check/testdata/array/fail_type_mismatch.carbon index c34d2755ee16..233e1c01a8f6 100644 --- a/toolchain/check/testdata/array/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/array/fail_type_mismatch.carbon @@ -8,33 +8,33 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_type_mismatch.carbon -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error(ImplicitAsConversionFailure): cannot implicitly convert from `String` to `i32` +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World"); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note(MissingImplInMemberAccessNote): type `String` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World"); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World"); var t1: (i32, String, String); -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error(ImplicitAsConversionFailure): cannot implicitly convert from `String` to `i32` +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var b: [i32; 3] = t1; // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note(MissingImplInMemberAccessNote): type `String` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: note: type `String` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var b: [i32; 3] = t1; // CHECK:STDERR: ^~ // CHECK:STDERR: var b: [i32; 3] = t1; -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: error(ArrayInitFromLiteralArgCountMismatch): cannot initialize array of 3 elements from 2 initializers +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: error: cannot initialize array of 3 elements from 2 initializers [ArrayInitFromLiteralArgCountMismatch] // CHECK:STDERR: var c: [i32; 3] = (1, 2); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: var c: [i32; 3] = (1, 2); var t2: (i32, i32); -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:19: error(ArrayInitFromExprArgCountMismatch): cannot initialize array of 3 elements from tuple with 2 elements +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:19: error: cannot initialize array of 3 elements from tuple with 2 elements [ArrayInitFromExprArgCountMismatch] // CHECK:STDERR: var d: [i32; 3] = t2; // CHECK:STDERR: ^~ var d: [i32; 3] = t2; diff --git a/toolchain/check/testdata/array/fail_undefined_bound.carbon b/toolchain/check/testdata/array/fail_undefined_bound.carbon index f65670d51ad0..e7c869a072f6 100644 --- a/toolchain/check/testdata/array/fail_undefined_bound.carbon +++ b/toolchain/check/testdata/array/fail_undefined_bound.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/array/fail_undefined_bound.carbon -// CHECK:STDERR: fail_undefined_bound.carbon:[[@LINE+3]]:8: error(SemanticsTodo): semantics TODO: `HandleArrayExprWithoutBounds` +// CHECK:STDERR: fail_undefined_bound.carbon:[[@LINE+3]]:8: error: semantics TODO: `HandleArrayExprWithoutBounds` [SemanticsTodo] // CHECK:STDERR: var a: [i32; ]; // CHECK:STDERR: ^~~~~~~ var a: [i32; ]; diff --git a/toolchain/check/testdata/as/adapter_conversion.carbon b/toolchain/check/testdata/as/adapter_conversion.carbon index 3a80e66a4c5e..48990ae25b0c 100644 --- a/toolchain/check/testdata/as/adapter_conversion.carbon +++ b/toolchain/check/testdata/as/adapter_conversion.carbon @@ -76,7 +76,7 @@ let b_value: B = ({.x = 1, .y = 2} as A) as B; // a copy to perform initialization. It's not clear whether that is the right // behavior. -// CHECK:STDERR: fail_init_class.carbon:[[@LINE+4]]:17: error(CopyOfUncopyableType): cannot copy value of type `B` +// CHECK:STDERR: fail_init_class.carbon:[[@LINE+4]]:17: error: cannot copy value of type `B` [CopyOfUncopyableType] // CHECK:STDERR: var b_init: B = ({.x = 1, .y = 2} as A) as B; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -97,10 +97,10 @@ class B { // We do not try to implicitly convert from the first operand of `as` to the // adapted type of the second operand. -// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+6]]:12: error(ExplicitAsConversionFailure): cannot convert from `{.x: i32}` to `B` with `as` +// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+6]]:12: error: cannot convert from `{.x: i32}` to `B` with `as` [ExplicitAsConversionFailure] // CHECK:STDERR: var b: B = {.x = 1} as B; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+3]]:12: note(MissingImplInMemberAccessNote): type `{.x: i32}` does not implement interface `As` +// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+3]]:12: note: type `{.x: i32}` does not implement interface `As` [MissingImplInMemberAccessNote] // CHECK:STDERR: var b: B = {.x = 1} as B; // CHECK:STDERR: ^~~~~~~~~~~~~ var b: B = {.x = 1} as B; diff --git a/toolchain/check/testdata/as/fail_no_conversion.carbon b/toolchain/check/testdata/as/fail_no_conversion.carbon index f36c01b1e010..dfe31913aaae 100644 --- a/toolchain/check/testdata/as/fail_no_conversion.carbon +++ b/toolchain/check/testdata/as/fail_no_conversion.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/as/fail_no_conversion.carbon -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:21: error(ExplicitAsConversionFailure): cannot convert from `i32` to `(i32, i32)` with `as` +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:21: error: cannot convert from `i32` to `(i32, i32)` with `as` [ExplicitAsConversionFailure] // CHECK:STDERR: let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+3]]:21: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `As` +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+3]]:21: note: type `i32` does not implement interface `As` [MissingImplInMemberAccessNote] // CHECK:STDERR: let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~ let n: (i32, i32) = 1 as (i32, i32); diff --git a/toolchain/check/testdata/as/fail_not_type.carbon b/toolchain/check/testdata/as/fail_not_type.carbon index 14697aedcf8d..5870c90dc031 100644 --- a/toolchain/check/testdata/as/fail_not_type.carbon +++ b/toolchain/check/testdata/as/fail_not_type.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/as/fail_not_type.carbon -// CHECK:STDERR: fail_not_type.carbon:[[@LINE+6]]:19: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+6]]:19: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: let n: i32 = 1 as 2; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_not_type.carbon:[[@LINE+3]]:19: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+3]]:19: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: let n: i32 = 1 as 2; // CHECK:STDERR: ^ let n: i32 = 1 as 2; diff --git a/toolchain/check/testdata/basics/fail_bad_run.carbon b/toolchain/check/testdata/basics/fail_bad_run.carbon index 72b05bac5e9c..6502971cdafc 100644 --- a/toolchain/check/testdata/basics/fail_bad_run.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run.carbon @@ -8,11 +8,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/fail_bad_run.carbon -// CHECK:STDERR: fail_bad_run.carbon:[[@LINE+7]]:1: error(InvalidMainRunSignature): invalid signature for `Main.Run` function; expected `fn ()` or `fn () -> i32` +// CHECK:STDERR: fail_bad_run.carbon:[[@LINE+7]]:1: error: invalid signature for `Main.Run` function; expected `fn ()` or `fn () -> i32` [InvalidMainRunSignature] // CHECK:STDERR: fn Run() -> String {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_run.carbon:[[@LINE+3]]:21: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_bad_run.carbon:[[@LINE+3]]:21: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: fn Run() -> String {} // CHECK:STDERR: ^ fn Run() -> String {} diff --git a/toolchain/check/testdata/basics/fail_bad_run_2.carbon b/toolchain/check/testdata/basics/fail_bad_run_2.carbon index 78ff97f877c6..eded8895c31b 100644 --- a/toolchain/check/testdata/basics/fail_bad_run_2.carbon +++ b/toolchain/check/testdata/basics/fail_bad_run_2.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/fail_bad_run_2.carbon -// CHECK:STDERR: fail_bad_run_2.carbon:[[@LINE+3]]:1: error(InvalidMainRunSignature): invalid signature for `Main.Run` function; expected `fn ()` or `fn () -> i32` +// CHECK:STDERR: fail_bad_run_2.carbon:[[@LINE+3]]:1: error: invalid signature for `Main.Run` function; expected `fn ()` or `fn () -> i32` [InvalidMainRunSignature] // CHECK:STDERR: fn Run(n: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~ fn Run(n: i32) {} diff --git a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon index b75a9a3fed34..690d7b1c0b69 100644 --- a/toolchain/check/testdata/basics/fail_non_type_as_type.carbon +++ b/toolchain/check/testdata/basics/fail_non_type_as_type.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/fail_non_type_as_type.carbon -// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+6]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:1: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:1: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ var x: type = 42; diff --git a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon index 8e042dee47c0..4094b4d7b677 100644 --- a/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon +++ b/toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon @@ -8,31 +8,31 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/fail_numeric_literal_overflow.carbon -// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error(IntLiteralTooLargeForI32): integer literal with value 39999999999999999993 does not fit in i32 +// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error: integer literal with value 39999999999999999993 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: let a: i32 = 39999999999999999993; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let a: i32 = 39999999999999999993; -// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error(IntLiteralTooLargeForI32): integer literal with value 2147483648 does not fit in i32 +// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error: integer literal with value 2147483648 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: let b: i32 = 2_147_483_648; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: let b: i32 = 2_147_483_648; -// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error(IntLiteralTooLargeForI32): integer literal with value 2147483648 does not fit in i32 +// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error: integer literal with value 2147483648 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: let c: i32 = 0x8000_0000; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: let c: i32 = 0x8000_0000; -// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error(RealMantissaTooLargeForI64): real mantissa with value 399999999999999999930 does not fit in i64 +// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+4]]:14: error: real mantissa with value 399999999999999999930 does not fit in i64 [RealMantissaTooLargeForI64] // CHECK:STDERR: let d: f64 = 39999999999999999993.0e3; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let d: f64 = 39999999999999999993.0e3; -// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+3]]:14: error(RealExponentTooLargeForI64): real exponent with value 39999999999999999992 does not fit in i64 +// CHECK:STDERR: fail_numeric_literal_overflow.carbon:[[@LINE+3]]:14: error: real exponent with value 39999999999999999992 does not fit in i64 [RealExponentTooLargeForI64] // CHECK:STDERR: let e: f64 = 5.0e39999999999999999993; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ let e: f64 = 5.0e39999999999999999993; diff --git a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon index e41362c39a08..9725ae22fd18 100644 --- a/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon +++ b/toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/fail_qualifier_unsupported.carbon var x: i32; -// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:14: error(QualifiedExprUnsupported): type `i32` does not support qualified expressions +// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:14: error: type `i32` does not support qualified expressions [QualifiedExprUnsupported] // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^~~ var y: i32 = x.b; diff --git a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon index 460b1d639f57..177f9b15824c 100644 --- a/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon +++ b/toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/basics/no_prelude/fail_name_lookup.carbon fn Main() { - // CHECK:STDERR: fail_name_lookup.carbon:[[@LINE+3]]:3: error(NameNotFound): name `x` not found + // CHECK:STDERR: fail_name_lookup.carbon:[[@LINE+3]]:3: error: name `x` not found [NameNotFound] // CHECK:STDERR: x; // CHECK:STDERR: ^ x; diff --git a/toolchain/check/testdata/basics/type_literals.carbon b/toolchain/check/testdata/basics/type_literals.carbon index e5135a6c2f5b..7b5a1642bfc1 100644 --- a/toolchain/check/testdata/basics/type_literals.carbon +++ b/toolchain/check/testdata/basics/type_literals.carbon @@ -18,28 +18,28 @@ var test_i64: i64; // --- fail_iN_bad_width.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:14: error(NameNotFound): name `i0` not found +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:14: error: name `i0` not found [NameNotFound] // CHECK:STDERR: var test_i0: i0; // CHECK:STDERR: ^~ // CHECK:STDERR: var test_i0: i0; -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:14: error(IntWidthNotMultipleOf8): bit width of integer type literal must be a multiple of 8; use `Core.Int(1)` instead +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:14: error: bit width of integer type literal must be a multiple of 8; use `Core.Int(1)` instead [IntWidthNotMultipleOf8] // CHECK:STDERR: var test_i1: i1; // CHECK:STDERR: ^~ // CHECK:STDERR: var test_i1: i1; -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:15: error(IntWidthNotMultipleOf8): bit width of integer type literal must be a multiple of 8; use `Core.Int(15)` instead +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.Int(15)` instead [IntWidthNotMultipleOf8] // CHECK:STDERR: var test_i15: i15; // CHECK:STDERR: ^~~ // CHECK:STDERR: var test_i15: i15; -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:23: error(IntWidthTooLarge): integer type width of 1000000000 is greater than the maximum supported width of 8388608 +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var test_i1000000000: i1000000000; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: var test_i1000000000: i1000000000; // TODO: This diagnostic is not very good. -// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:33: error(IntLiteralTooLargeForI32): integer literal with value 10000000000000000000 does not fit in i32 +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:33: error: integer literal with value 10000000000000000000 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: var test_i10000000000000000000: i10000000000000000000; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -55,28 +55,28 @@ var test_u64: u64; // --- fail_uN_bad_width.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:14: error(NameNotFound): name `u0` not found +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:14: error: name `u0` not found [NameNotFound] // CHECK:STDERR: var test_u0: u0; // CHECK:STDERR: ^~ // CHECK:STDERR: var test_u0: u0; -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:14: error(IntWidthNotMultipleOf8): bit width of integer type literal must be a multiple of 8; use `Core.UInt(1)` instead +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:14: error: bit width of integer type literal must be a multiple of 8; use `Core.UInt(1)` instead [IntWidthNotMultipleOf8] // CHECK:STDERR: var test_u1: u1; // CHECK:STDERR: ^~ // CHECK:STDERR: var test_u1: u1; -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:15: error(IntWidthNotMultipleOf8): bit width of integer type literal must be a multiple of 8; use `Core.UInt(15)` instead +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:15: error: bit width of integer type literal must be a multiple of 8; use `Core.UInt(15)` instead [IntWidthNotMultipleOf8] // CHECK:STDERR: var test_u15: u15; // CHECK:STDERR: ^~~ // CHECK:STDERR: var test_u15: u15; -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:23: error(IntWidthTooLarge): integer type width of 1000000000 is greater than the maximum supported width of 8388608 +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:23: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var test_u1000000000: u1000000000; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: var test_u1000000000: u1000000000; // TODO: This diagnostic is not very good. -// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:33: error(IntLiteralTooLargeForI32): integer literal with value 10000000000000000000 does not fit in i32 +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:33: error: integer literal with value 10000000000000000000 does not fit in i32 [IntLiteralTooLargeForI32] // CHECK:STDERR: var test_u10000000000000000000: u10000000000000000000; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -85,12 +85,12 @@ var test_u10000000000000000000: u10000000000000000000; // --- fail_fN_bad_width.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_fN_bad_width.carbon:[[@LINE+4]]:14: error(NameNotFound): name `f0` not found +// CHECK:STDERR: fail_fN_bad_width.carbon:[[@LINE+4]]:14: error: name `f0` not found [NameNotFound] // CHECK:STDERR: var test_f0: f0; // CHECK:STDERR: ^~ // CHECK:STDERR: var test_f0: f0; -// CHECK:STDERR: fail_fN_bad_width.carbon:[[@LINE+4]]:14: error(SemanticsTodo): semantics TODO: `Currently only f64 is allowed` +// CHECK:STDERR: fail_fN_bad_width.carbon:[[@LINE+4]]:14: error: semantics TODO: `Currently only f64 is allowed` [SemanticsTodo] // CHECK:STDERR: var test_f1: f1; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -104,7 +104,7 @@ var test_f1000000000000: f1000000000000; library "[[@TEST_NAME]]"; // TODO: Some or all of these should eventually work. -// CHECK:STDERR: fail_fN_todo_unsupported.carbon:[[@LINE+3]]:15: error(SemanticsTodo): semantics TODO: `Currently only f64 is allowed` +// CHECK:STDERR: fail_fN_todo_unsupported.carbon:[[@LINE+3]]:15: error: semantics TODO: `Currently only f64 is allowed` [SemanticsTodo] // CHECK:STDERR: var test_f16: f16; // CHECK:STDERR: ^~~ var test_f16: f16; diff --git a/toolchain/check/testdata/builtins/float/add.carbon b/toolchain/check/testdata/builtins/float/add.carbon index 812393b04a09..2c8f7959bebd 100644 --- a/toolchain/check/testdata/builtins/float/add.carbon +++ b/toolchain/check/testdata/builtins/float/add.carbon @@ -22,17 +22,17 @@ var x: f64 = Add(2.2, 2.3); package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.add" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.add" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.add"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.add"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.add" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.add" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.add"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.add"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.add" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.add" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: f64, b: f64) -> bool = "float.add"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn BadReturnType(a: f64, b: f64) -> bool = "float.add"; diff --git a/toolchain/check/testdata/builtins/float/div.carbon b/toolchain/check/testdata/builtins/float/div.carbon index 42550e39ba23..f7b1d64dd786 100644 --- a/toolchain/check/testdata/builtins/float/div.carbon +++ b/toolchain/check/testdata/builtins/float/div.carbon @@ -24,17 +24,17 @@ let c: f64 = Div(0.0, 0.0); package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.div" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.div" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.div"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.div"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.div" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.div" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.div"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.div"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.div" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.div" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: f64, b: f64) -> bool = "float.div"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn BadReturnType(a: f64, b: f64) -> bool = "float.div"; diff --git a/toolchain/check/testdata/builtins/float/eq.carbon b/toolchain/check/testdata/builtins/float/eq.carbon index eb01a691bda5..070abf520040 100644 --- a/toolchain/check/testdata/builtins/float/eq.carbon +++ b/toolchain/check/testdata/builtins/float/eq.carbon @@ -28,7 +28,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.eq" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.eq" [InvalidBuiltinSignature] // CHECK:STDERR: fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn WrongResult(a: f64, b: f64) -> f64 = "float.eq"; diff --git a/toolchain/check/testdata/builtins/float/make_type.carbon b/toolchain/check/testdata/builtins/float/make_type.carbon index b35d3a78c6b3..9213aab61d93 100644 --- a/toolchain/check/testdata/builtins/float/make_type.carbon +++ b/toolchain/check/testdata/builtins/float/make_type.carbon @@ -32,14 +32,14 @@ library "[[@TEST_NAME]]"; import library "types"; -// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+4]]:20: error(CompileTimeFloatBitWidth): bit width must be 64 +// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+4]]:20: error: bit width must be 64 [CompileTimeFloatBitWidth] // CHECK:STDERR: var invalid_float: Float(32); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: var invalid_float: Float(32); var dyn_size: i32 = 64; -// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+3]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var dyn: Float(dyn_size); // CHECK:STDERR: ^~~~~~~~~~~~~~~ var dyn: Float(dyn_size); diff --git a/toolchain/check/testdata/builtins/float/mul.carbon b/toolchain/check/testdata/builtins/float/mul.carbon index 8b0321a2ef6e..b26569a47408 100644 --- a/toolchain/check/testdata/builtins/float/mul.carbon +++ b/toolchain/check/testdata/builtins/float/mul.carbon @@ -22,17 +22,17 @@ var x: f64 = Mul(2.0, 0.5); package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.mul" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.mul" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.mul"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.mul"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.mul" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.mul" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.mul"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.mul"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.mul" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.mul" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: f64, b: f64) -> bool = "float.mul"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn BadReturnType(a: f64, b: f64) -> bool = "float.mul"; diff --git a/toolchain/check/testdata/builtins/float/negate.carbon b/toolchain/check/testdata/builtins/float/negate.carbon index e6ac9ef652a0..987531feabe3 100644 --- a/toolchain/check/testdata/builtins/float/negate.carbon +++ b/toolchain/check/testdata/builtins/float/negate.carbon @@ -22,17 +22,17 @@ let a: f64 = Negate(1.5); package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.negate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew() -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew() -> f64 = "float.negate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.negate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: f64, b: f64) -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: f64, b: f64) -> f64 = "float.negate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.negate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: f64) -> bool = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -40,10 +40,10 @@ fn BadReturnType(a: f64) -> bool = "float.negate"; fn JustRight(a: f64) -> f64 = "float.negate"; fn RuntimeCallTooFew(a: f64) -> f64 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 0 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -51,10 +51,10 @@ fn RuntimeCallTooFew(a: f64) -> f64 { } fn RuntimeCallTooMany(a: f64, b: f64, c: f64) -> f64 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 3 arguments passed to function expecting 2 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: f64, b: f64) -> f64 = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -62,10 +62,10 @@ fn RuntimeCallTooMany(a: f64, b: f64, c: f64) -> f64 { } fn RuntimeCallBadReturnType(a: f64, b: f64) -> bool { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: f64) -> bool = "float.negate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return BadReturnType(a, b); diff --git a/toolchain/check/testdata/builtins/float/neq.carbon b/toolchain/check/testdata/builtins/float/neq.carbon index 312191695fa2..9d8fce17ab0a 100644 --- a/toolchain/check/testdata/builtins/float/neq.carbon +++ b/toolchain/check/testdata/builtins/float/neq.carbon @@ -28,7 +28,7 @@ fn RuntimeCall(a: f64, b: f64) -> bool { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.neq" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.neq" [InvalidBuiltinSignature] // CHECK:STDERR: fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn WrongResult(a: f64, b: f64) -> f64 = "float.neq"; diff --git a/toolchain/check/testdata/builtins/float/sub.carbon b/toolchain/check/testdata/builtins/float/sub.carbon index 4c7e44cef378..96ef3baeedbc 100644 --- a/toolchain/check/testdata/builtins/float/sub.carbon +++ b/toolchain/check/testdata/builtins/float/sub.carbon @@ -22,17 +22,17 @@ var x: f64 = Sub(2.0, 0.5); package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.sub" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.sub" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.sub"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: f64) -> f64 = "float.sub"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.sub" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.sub" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.sub"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: f64, b: f64, c: f64) -> f64 = "float.sub"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "float.sub" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.sub" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: f64, b: f64) -> bool = "float.sub"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn BadReturnType(a: f64, b: f64) -> bool = "float.sub"; diff --git a/toolchain/check/testdata/builtins/int/eq.carbon b/toolchain/check/testdata/builtins/int/eq.carbon index 40d515a836f7..1488cfcd2b48 100644 --- a/toolchain/check/testdata/builtins/int/eq.carbon +++ b/toolchain/check/testdata/builtins/int/eq.carbon @@ -28,7 +28,7 @@ fn RuntimeCall(a: i32, b: i32) -> bool { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.eq" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "int.eq" [InvalidBuiltinSignature] // CHECK:STDERR: fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn WrongResult(a: i32, b: i32) -> i32 = "int.eq"; diff --git a/toolchain/check/testdata/builtins/int/left_shift.carbon b/toolchain/check/testdata/builtins/int/left_shift.carbon index af7ef572a814..d6df08183371 100644 --- a/toolchain/check/testdata/builtins/int/left_shift.carbon +++ b/toolchain/check/testdata/builtins/int/left_shift.carbon @@ -30,12 +30,12 @@ fn Negate(a: i32) -> i32 = "int.snegate"; // Shift greater than size is disallowed. let size_1: i32 = LeftShift(1, 31); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 << 32 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_2: i32 = LeftShift(1, 32); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: let size_2: i32 = LeftShift(1, 32); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 << 33 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 << 33 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_3: i32 = LeftShift(1, 33); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -43,7 +43,7 @@ let size_3: i32 = LeftShift(1, 33); // Overflow is allowed if the shift distance is in bounds. let overflow_1: i32 = LeftShift(1000, 31); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:23: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1000 << 32 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:23: error: shift distance not in range [0, 32) in 1000 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let overflow_2: i32 = LeftShift(1000, 32); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -51,14 +51,14 @@ let overflow_2: i32 = LeftShift(1000, 32); // Oversize shifts aren't allowed even if there's no overflow. let no_overflow_1: i32 = LeftShift(0, 31); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:26: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 0 << 32 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:26: error: shift distance not in range [0, 32) in 0 << 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let no_overflow_2: i32 = LeftShift(0, 32); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: let no_overflow_2: i32 = LeftShift(0, 32); // Negative shifts aren't allowed either. -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 << -1 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error: shift distance not in range [0, 32) in 1 << -1 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let negative: i32 = LeftShift(1, Negate(1)); // CHECK:STDERR: ^~~~~~~~~~ let negative: i32 = LeftShift(1, Negate(1)); diff --git a/toolchain/check/testdata/builtins/int/make_type_signed.carbon b/toolchain/check/testdata/builtins/int/make_type_signed.carbon index 69a86e9ed5c3..caee84c6df12 100644 --- a/toolchain/check/testdata/builtins/int/make_type_signed.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_signed.carbon @@ -38,7 +38,7 @@ library "[[@TEST_NAME]]"; import library "types"; -// CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error(IntWidthNotPositive): integer type width of 0 is not positive +// CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: Int(0); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -52,7 +52,7 @@ import library "types"; fn Negate(n: i32) -> i32 = "int.snegate"; -// CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error(IntWidthNotPositive): integer type width of -1 is not positive +// CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error: integer type width of -1 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: Int(Negate(1)); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -64,7 +64,7 @@ library "[[@TEST_NAME]]"; import library "types"; -// CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error(IntWidthTooLarge): integer type width of 1000000000 is greater than the maximum supported width of 8388608 +// CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var m: Int(1000000000); // CHECK:STDERR: ^~~~ var m: Int(1000000000); diff --git a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon index 8692dc169081..ee0b89cb40f8 100644 --- a/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon +++ b/toolchain/check/testdata/builtins/int/make_type_unsigned.carbon @@ -38,7 +38,7 @@ library "[[@TEST_NAME]]"; import library "types"; -// CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error(IntWidthNotPositive): integer type width of 0 is not positive +// CHECK:STDERR: fail_zero_size.carbon:[[@LINE+4]]:8: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: UInt(0); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -52,7 +52,7 @@ import library "types"; fn Negate(n: i32) -> i32 = "int.snegate"; -// CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error(IntWidthNotPositive): integer type width of -1 is not positive +// CHECK:STDERR: fail_negative_size.carbon:[[@LINE+4]]:8: error: integer type width of -1 is not positive [IntWidthNotPositive] // CHECK:STDERR: var n: UInt(Negate(1)); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -64,7 +64,7 @@ library "[[@TEST_NAME]]"; import library "types"; -// CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error(IntWidthTooLarge): integer type width of 1000000000 is greater than the maximum supported width of 8388608 +// CHECK:STDERR: fail_oversized.carbon:[[@LINE+3]]:8: error: integer type width of 1000000000 is greater than the maximum supported width of 8388608 [IntWidthTooLarge] // CHECK:STDERR: var m: UInt(1000000000); // CHECK:STDERR: ^~~~~ var m: UInt(1000000000); diff --git a/toolchain/check/testdata/builtins/int/right_shift.carbon b/toolchain/check/testdata/builtins/int/right_shift.carbon index 89f5c2123680..20930fa02fb5 100644 --- a/toolchain/check/testdata/builtins/int/right_shift.carbon +++ b/toolchain/check/testdata/builtins/int/right_shift.carbon @@ -47,19 +47,19 @@ fn Negate(a: i32) -> i32 = "int.snegate"; // Shift greater than size is disallowed. let size_1: i32 = RightShift(1, 31); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 >> 32 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 >> 32 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_2: i32 = RightShift(1, 32); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: let size_2: i32 = RightShift(1, 32); -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 >> 33 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+4]]:19: error: shift distance not in range [0, 32) in 1 >> 33 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let size_3: i32 = RightShift(1, 33); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: let size_3: i32 = RightShift(1, 33); // Negative shifts aren't allowed either. -// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error(CompileTimeShiftOutOfRange): shift distance not in range [0, 32) in 1 >> -1 +// CHECK:STDERR: fail_bad_shift.carbon:[[@LINE+3]]:21: error: shift distance not in range [0, 32) in 1 >> -1 [CompileTimeShiftOutOfRange] // CHECK:STDERR: let negative: i32 = RightShift(1, Negate(1)); // CHECK:STDERR: ^~~~~~~~~~~ let negative: i32 = RightShift(1, Negate(1)); diff --git a/toolchain/check/testdata/builtins/int/sadd.carbon b/toolchain/check/testdata/builtins/int/sadd.carbon index 3a29405c8a2c..e11acd8e9bbe 100644 --- a/toolchain/check/testdata/builtins/int/sadd.carbon +++ b/toolchain/check/testdata/builtins/int/sadd.carbon @@ -23,43 +23,43 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.sadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: i32) -> i32 = "int.sadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.sadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: i32, b: i32, c: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: i32, b: i32, c: i32) -> i32 = "int.sadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.sadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: i32, b: i32) -> bool = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn BadReturnType(a: i32, b: i32) -> bool = "int.sadd"; fn JustRight(a: i32, b: i32) -> i32 = "int.sadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew(1)]; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew(1)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error(CallArgCountMismatch): 3 arguments passed to function expecting 2 arguments +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note(InCallToEntity): calling function declared here +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -84,7 +84,7 @@ package FailOverflow; fn Add(a: i32, b: i32) -> i32 = "int.sadd"; let a: i32 = Add(0x7FFFFFFF, 0); -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error(CompileTimeIntegerOverflow): integer overflow in calculation 2147483647 + 1 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 2147483647 + 1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let b: i32 = Add(0x7FFFFFFF, 1); // CHECK:STDERR: ^~~~ let b: i32 = Add(0x7FFFFFFF, 1); diff --git a/toolchain/check/testdata/builtins/int/sdiv.carbon b/toolchain/check/testdata/builtins/int/sdiv.carbon index a223dd4c6c95..990f1bde3fbc 100644 --- a/toolchain/check/testdata/builtins/int/sdiv.carbon +++ b/toolchain/check/testdata/builtins/int/sdiv.carbon @@ -34,7 +34,7 @@ let a: i32 = Div(Negate(0x7FFF_FFFF), Negate(1)); let b: i32 = Div(Sub(Negate(0x7FFF_FFFF), 1), 1); // -0x8000_0000 / -1 overflows. -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error(CompileTimeIntegerOverflow): integer overflow in calculation -2147483648 / -1 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 / -1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Div(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -46,13 +46,13 @@ package FailDivByZero; fn Div(a: i32, b: i32) -> i32 = "int.sdiv"; -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Div(1, 0); // CHECK:STDERR: ^~~~ // CHECK:STDERR: let a: i32 = Div(1, 0); -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Div(0, 0); // CHECK:STDERR: ^~~~ let b: i32 = Div(0, 0); diff --git a/toolchain/check/testdata/builtins/int/smod.carbon b/toolchain/check/testdata/builtins/int/smod.carbon index 81e8bab0ae68..423da4854ed7 100644 --- a/toolchain/check/testdata/builtins/int/smod.carbon +++ b/toolchain/check/testdata/builtins/int/smod.carbon @@ -35,7 +35,7 @@ let b: i32 = Mod(Sub(Negate(0x7FFF_FFFF), 1), 1); // -0x8000_0000 / -1 overflows, so -0x8000_0000 % -1 is disallowed, even though // its result is representable. -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error(CompileTimeIntegerOverflow): integer overflow in calculation -2147483648 % -1 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 % -1 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Mod(Sub(Negate(0x7FFF_FFFF), 1), Negate(1)); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -49,13 +49,13 @@ fn Mod(a: i32, b: i32) -> i32 = "int.smod"; // Remainder of division by zero is not defined. -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Mod(1, 0); // CHECK:STDERR: ^~~~ // CHECK:STDERR: let a: i32 = Mod(1, 0); -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Mod(0, 0); // CHECK:STDERR: ^~~~ let b: i32 = Mod(0, 0); diff --git a/toolchain/check/testdata/builtins/int/smul.carbon b/toolchain/check/testdata/builtins/int/smul.carbon index 45fe82ecdc23..0ded0a50c9f3 100644 --- a/toolchain/check/testdata/builtins/int/smul.carbon +++ b/toolchain/check/testdata/builtins/int/smul.carbon @@ -26,7 +26,7 @@ package FailOverflow; fn Mul(a: i32, b: i32) -> i32 = "int.smul"; let a: i32 = Mul(0x7FFF, 0x10000); -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error(CompileTimeIntegerOverflow): integer overflow in calculation 32768 * 65536 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 32768 * 65536 [CompileTimeIntegerOverflow] // CHECK:STDERR: let b: i32 = Mul(0x8000, 0x10000); // CHECK:STDERR: ^~~~ let b: i32 = Mul(0x8000, 0x10000); diff --git a/toolchain/check/testdata/builtins/int/snegate.carbon b/toolchain/check/testdata/builtins/int/snegate.carbon index 383e64d779aa..bcb58551a2c5 100644 --- a/toolchain/check/testdata/builtins/int/snegate.carbon +++ b/toolchain/check/testdata/builtins/int/snegate.carbon @@ -25,53 +25,53 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.snegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew() -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew() -> i32 = "int.snegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.snegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.snegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.snegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.snegate"; fn JustRight(a: i32) -> i32 = "int.snegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew()]; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew()]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note(InCallToEntity): calling function declared here +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32) -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; fn RuntimeCallTooFew(a: i32) -> i32 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 0 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -79,10 +79,10 @@ fn RuntimeCallTooFew(a: i32) -> i32 { } fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 3 arguments passed to function expecting 2 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -90,10 +90,10 @@ fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { } fn RuntimeCallBadReturnType(a: i32, b: i32) -> bool { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.snegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -111,7 +111,7 @@ fn Sub(a: i32, b: i32) -> i32 = "int.ssub"; let a: i32 = Negate(Negate(0x7FFFFFFF)); // -(-INT_MAX - 1) is too large for i32. -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error(CompileTimeIntegerNegateOverflow): integer overflow in negation of -2147483648 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in negation of -2147483648 [CompileTimeIntegerNegateOverflow] // CHECK:STDERR: let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); // CHECK:STDERR: ^~~~~~~ let b: i32 = Negate(Sub(Negate(0x7FFFFFFF), 1)); diff --git a/toolchain/check/testdata/builtins/int/ssub.carbon b/toolchain/check/testdata/builtins/int/ssub.carbon index be1c0e34ae78..94a050f760cf 100644 --- a/toolchain/check/testdata/builtins/int/ssub.carbon +++ b/toolchain/check/testdata/builtins/int/ssub.carbon @@ -27,7 +27,7 @@ fn Sub(a: i32, b: i32) -> i32 = "int.ssub"; let a: i32 = Sub(0, 0x7FFFFFFF); let b: i32 = Sub(Sub(0, 0x7FFFFFFF), 1); -// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error(CompileTimeIntegerOverflow): integer overflow in calculation -2147483647 - 2 +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation -2147483647 - 2 [CompileTimeIntegerOverflow] // CHECK:STDERR: let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); // CHECK:STDERR: ^~~~ let c: i32 = Sub(Sub(0, 0x7FFFFFFF), 2); diff --git a/toolchain/check/testdata/builtins/int/uadd.carbon b/toolchain/check/testdata/builtins/int/uadd.carbon index ad32c3445b99..d655651671f7 100644 --- a/toolchain/check/testdata/builtins/int/uadd.carbon +++ b/toolchain/check/testdata/builtins/int/uadd.carbon @@ -23,43 +23,43 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.uadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew(a: i32) -> i32 = "int.uadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew(a: i32) -> i32 = "int.uadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.uadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: i32, b: i32, c: i32) -> i32 = "int.uadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: i32, b: i32, c: i32) -> i32 = "int.uadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.uadd" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: i32, b: i32) -> bool = "int.uadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn BadReturnType(a: i32, b: i32) -> bool = "int.uadd"; fn JustRight(a: i32, b: i32) -> i32 = "int.uadd"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew(1)]; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew(1)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2, 3)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1, 2)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:21: error(CallArgCountMismatch): 3 arguments passed to function expecting 2 arguments +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:21: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note(InCallToEntity): calling function declared here +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32, b: i32) -> i32 = "int.uadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var bad_call: [i32; JustRight(1, 2, 3)]; diff --git a/toolchain/check/testdata/builtins/int/udiv.carbon b/toolchain/check/testdata/builtins/int/udiv.carbon index b9077bf5180f..0042800edfcd 100644 --- a/toolchain/check/testdata/builtins/int/udiv.carbon +++ b/toolchain/check/testdata/builtins/int/udiv.carbon @@ -42,13 +42,13 @@ package FailDivByZero; fn Div(a: i32, b: i32) -> i32 = "int.udiv"; -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Div(1, 0); // CHECK:STDERR: ^~~~ // CHECK:STDERR: let a: i32 = Div(1, 0); -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Div(0, 0); // CHECK:STDERR: ^~~~ let b: i32 = Div(0, 0); diff --git a/toolchain/check/testdata/builtins/int/umod.carbon b/toolchain/check/testdata/builtins/int/umod.carbon index 4c5dba67699c..e85f4eaf13b3 100644 --- a/toolchain/check/testdata/builtins/int/umod.carbon +++ b/toolchain/check/testdata/builtins/int/umod.carbon @@ -44,13 +44,13 @@ fn Mod(a: i32, b: i32) -> i32 = "int.umod"; // Remainder of division by zero is not defined. -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let a: i32 = Mod(1, 0); // CHECK:STDERR: ^~~~ // CHECK:STDERR: let a: i32 = Mod(1, 0); -// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error(CompileTimeDivisionByZero): division by zero +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero [CompileTimeDivisionByZero] // CHECK:STDERR: let b: i32 = Mod(0, 0); // CHECK:STDERR: ^~~~ let b: i32 = Mod(0, 0); diff --git a/toolchain/check/testdata/builtins/int/unegate.carbon b/toolchain/check/testdata/builtins/int/unegate.carbon index 8450ed9bc30f..e2e04e0226b1 100644 --- a/toolchain/check/testdata/builtins/int/unegate.carbon +++ b/toolchain/check/testdata/builtins/int/unegate.carbon @@ -25,53 +25,53 @@ fn RuntimeCall(a: i32, b: i32) -> i32 { package FailBadDecl; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.unegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooFew() -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooFew() -> i32 = "int.unegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.unegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.unegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error(InvalidBuiltinSignature): invalid signature for builtin function "int.unegate" +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" [InvalidBuiltinSignature] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.unegate"; fn JustRight(a: i32) -> i32 = "int.unegate"; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_few: [i32; TooFew()]; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var too_few: [i32; TooFew()]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var too_many: [i32; TooMany(1, 2)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: var bad_return_type: [i32; BadReturnType(1)]; -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note(InCallToEntity): calling function declared here +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn JustRight(a: i32) -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; fn RuntimeCallTooFew(a: i32) -> i32 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 0 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooFew() -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -79,10 +79,10 @@ fn RuntimeCallTooFew(a: i32) -> i32 { } fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 3 arguments passed to function expecting 2 arguments + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn TooMany(a: i32, b: i32) -> i32 = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -90,10 +90,10 @@ fn RuntimeCallTooMany(a: i32, b: i32, c: i32) -> i32 { } fn RuntimeCallBadReturnType(a: i32, b: i32) -> bool { - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn BadReturnType(a: i32) -> bool = "int.unegate"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return BadReturnType(a, b); diff --git a/toolchain/check/testdata/class/access_modifers.carbon b/toolchain/check/testdata/class/access_modifers.carbon index e29044ba8add..21482269b42a 100644 --- a/toolchain/check/testdata/class/access_modifers.carbon +++ b/toolchain/check/testdata/class/access_modifers.carbon @@ -27,35 +27,35 @@ class Circle { fn Run() { let circle: Circle = Circle.Make(); - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:21: error(ClassInvalidMemberAccess): cannot access private member `radius` of type `Circle` + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:21: error: cannot access private member `radius` of type `Circle` [ClassInvalidMemberAccess] // CHECK:STDERR: let radius: i32 = circle.radius; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-17]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-17]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private var radius: i32; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: let radius: i32 = circle.radius; - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error(ClassInvalidMemberAccess): cannot access private member `radius` of type `Circle` + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error: cannot access private member `radius` of type `Circle` [ClassInvalidMemberAccess] // CHECK:STDERR: circle.radius = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-25]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-25]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private var radius: i32; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: circle.radius = 5; - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error(ClassInvalidMemberAccess): cannot access private member `SOME_INTERNAL_CONSTANT` of type `Circle` + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error: cannot access private member `SOME_INTERNAL_CONSTANT` of type `Circle` [ClassInvalidMemberAccess] // CHECK:STDERR: circle.SOME_INTERNAL_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-32]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-32]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private let SOME_INTERNAL_CONSTANT: i32 = 5; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: circle.SOME_INTERNAL_CONSTANT; - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error(ClassInvalidMemberAccess): cannot access private member `SomeInternalFunction` of type `Circle` + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: error: cannot access private member `SomeInternalFunction` of type `Circle` [ClassInvalidMemberAccess] // CHECK:STDERR: circle.SomeInternalFunction(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-39]]:3: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-39]]:3: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private fn SomeInternalFunction() -> i32 { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -71,10 +71,10 @@ class A { } fn Run() { - // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE+7]]:16: error(ClassInvalidMemberAccess): cannot access protected member `x` of type `A` + // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE+7]]:16: error: cannot access protected member `x` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: let x: i32 = A.x; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE-7]]:17: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE-7]]:17: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: protected var x: i32; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -120,18 +120,18 @@ class A { private let y: i32 = 5; } -// CHECK:STDERR: fail_global_access.carbon:[[@LINE+7]]:14: error(ClassInvalidMemberAccess): cannot access protected member `x` of type `A` +// CHECK:STDERR: fail_global_access.carbon:[[@LINE+7]]:14: error: cannot access protected member `x` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: let x: i32 = A.x; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_global_access.carbon:[[@LINE-7]]:17: note(ClassMemberDeclaration): declared here +// CHECK:STDERR: fail_global_access.carbon:[[@LINE-7]]:17: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: protected let x: i32 = 5; // CHECK:STDERR: ^ // CHECK:STDERR: let x: i32 = A.x; -// CHECK:STDERR: fail_global_access.carbon:[[@LINE+6]]:14: error(ClassInvalidMemberAccess): cannot access private member `y` of type `A` +// CHECK:STDERR: fail_global_access.carbon:[[@LINE+6]]:14: error: cannot access private member `y` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: let y: i32 = A.y; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_global_access.carbon:[[@LINE-14]]:15: note(ClassMemberDeclaration): declared here +// CHECK:STDERR: fail_global_access.carbon:[[@LINE-14]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private let y: i32 = 5; // CHECK:STDERR: ^ let y: i32 = A.y; diff --git a/toolchain/check/testdata/class/adapt.carbon b/toolchain/check/testdata/class/adapt.carbon index 1a6f4b72afd8..9f97958e81cb 100644 --- a/toolchain/check/testdata/class/adapt.carbon +++ b/toolchain/check/testdata/class/adapt.carbon @@ -39,7 +39,7 @@ class AdaptNotExtend { fn F(a: AdaptNotExtend) { // `Adapted` is not extended, so lookup for `F` finds nothing. - // CHECK:STDERR: fail_not_extend.carbon:[[@LINE+3]]:3: error(NameNotFound): name `F` not found + // CHECK:STDERR: fail_not_extend.carbon:[[@LINE+3]]:3: error: name `F` not found [NameNotFound] // CHECK:STDERR: a.F(); // CHECK:STDERR: ^~~ a.F(); diff --git a/toolchain/check/testdata/class/cross_package_import.carbon b/toolchain/check/testdata/class/cross_package_import.carbon index 87f2a7574fb4..9d58e26bf4e1 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -48,11 +48,11 @@ library "[[@TEST_NAME]]"; import Other library "other_extern"; -// CHECK:STDERR: fail_extern.carbon:[[@LINE+8]]:8: error(IncompleteTypeInVarDecl): variable has incomplete type `C` +// CHECK:STDERR: fail_extern.carbon:[[@LINE+8]]:8: error: variable has incomplete type `C` [IncompleteTypeInVarDecl] // CHECK:STDERR: var c: Other.C = {}; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: other_extern.carbon:4:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_extern.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: other_extern.carbon:4:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -62,18 +62,18 @@ var c: Other.C = {}; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: other_extern.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: other_extern.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: other_define.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: other_define.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ import Other library "other_define"; import Other library "other_extern"; -// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+4]]:8: note(InNameLookup): in name lookup for `C` +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+4]]:8: note: in name lookup for `C` [InNameLookup] // CHECK:STDERR: var c: Other.C = {}; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -83,18 +83,18 @@ var c: Other.C = {}; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: other_conflict.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: other_conflict.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn C() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: other_define.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: other_define.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ import Other library "other_define"; import Other library "other_conflict"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+3]]:8: note(InNameLookup): in name lookup for `C` +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+3]]:8: note: in name lookup for `C` [InNameLookup] // CHECK:STDERR: var c: Other.C = {}; // CHECK:STDERR: ^~~~~~~ var c: Other.C = {}; diff --git a/toolchain/check/testdata/class/extend_adapt.carbon b/toolchain/check/testdata/class/extend_adapt.carbon index 9ba6b704c84d..eede94dde61f 100644 --- a/toolchain/check/testdata/class/extend_adapt.carbon +++ b/toolchain/check/testdata/class/extend_adapt.carbon @@ -48,13 +48,13 @@ class SomeClassAdapter { } fn F(a: SomeClassAdapter) { - // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+10]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `SomeClassAdapter` to `SomeClass` + // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+10]]:3: error: cannot implicitly convert from `SomeClassAdapter` to `SomeClass` [ImplicitAsConversionFailure] // CHECK:STDERR: a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: note(MissingImplInMemberAccessNote): type `SomeClassAdapter` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: note: type `SomeClassAdapter` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE-14]]:8: note(InCallToFunctionSelf): initializing `self` parameter of method declared here + // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE-14]]:8: note: initializing `self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn F[self: Self](); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -75,10 +75,10 @@ class SomeClassAdapter { } fn F(a: SomeClassAdapter) -> i32 { - // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+7]]:10: error(ImplicitAsConversionFailure): cannot implicitly convert from `SomeClassAdapter` to `SomeClass` + // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+7]]:10: error: cannot implicitly convert from `SomeClassAdapter` to `SomeClass` [ImplicitAsConversionFailure] // CHECK:STDERR: return a.b; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: note(MissingImplInMemberAccessNote): type `SomeClassAdapter` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: note: type `SomeClassAdapter` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return a.b; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -90,7 +90,7 @@ fn F(a: SomeClassAdapter) -> i32 { library "[[@TEST_NAME]]"; class StructAdapter { - // CHECK:STDERR: fail_todo_adapt_non_class.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `extending non-class type` + // CHECK:STDERR: fail_todo_adapt_non_class.carbon:[[@LINE+3]]:3: error: semantics TODO: `extending non-class type` [SemanticsTodo] // CHECK:STDERR: extend adapt {.a: i32, .b: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ extend adapt {.a: i32, .b: i32}; diff --git a/toolchain/check/testdata/class/fail_abstract.carbon b/toolchain/check/testdata/class/fail_abstract.carbon index c4883d61307d..dc261a2d067a 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -16,10 +16,10 @@ abstract class Abstract { } class Contains { - // CHECK:STDERR: fail_abstract_field.carbon:[[@LINE+7]]:10: error(AbstractTypeInVarDecl): field has abstract type `Abstract` + // CHECK:STDERR: fail_abstract_field.carbon:[[@LINE+7]]:10: error: field has abstract type `Abstract` [AbstractTypeInVarDecl] // CHECK:STDERR: var a: Abstract; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_abstract_field.carbon:[[@LINE-7]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_abstract_field.carbon:[[@LINE-7]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -34,10 +34,10 @@ abstract class Abstract { } fn Var() { - // CHECK:STDERR: fail_abstract_var.carbon:[[@LINE+7]]:10: error(AbstractTypeInVarDecl): variable has abstract type `Abstract` + // CHECK:STDERR: fail_abstract_var.carbon:[[@LINE+7]]:10: error: variable has abstract type `Abstract` [AbstractTypeInVarDecl] // CHECK:STDERR: var v: Abstract; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_abstract_var.carbon:[[@LINE-7]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_abstract_var.carbon:[[@LINE-7]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -64,10 +64,10 @@ abstract class Abstract { class Adapter { // TODO(#4387): This should probably be valid - // CHECK:STDERR: fail_abstract_adapter.carbon:[[@LINE+7]]:3: error(AbstractTypeInAdaptDecl): adapted type `Abstract` is an abstract type + // CHECK:STDERR: fail_abstract_adapter.carbon:[[@LINE+7]]:3: error: adapted type `Abstract` is an abstract type [AbstractTypeInAdaptDecl] // CHECK:STDERR: adapt Abstract; // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_abstract_adapter.carbon:[[@LINE-8]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_abstract_adapter.carbon:[[@LINE-8]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -102,10 +102,10 @@ class Derived { fn Make() -> Derived { // TODO: This should be valid, and should construct an instance of `partial Abstract` as the base. - // CHECK:STDERR: fail_todo_return_nonabstract_derived.carbon:[[@LINE+7]]:10: error(AbstractTypeInInit): initialization of abstract type `Abstract` + // CHECK:STDERR: fail_todo_return_nonabstract_derived.carbon:[[@LINE+7]]:10: error: initialization of abstract type `Abstract` [AbstractTypeInInit] // CHECK:STDERR: return {.base = {.a = 1}, .d = 7}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_return_nonabstract_derived.carbon:[[@LINE-14]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_todo_return_nonabstract_derived.carbon:[[@LINE-14]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -127,10 +127,10 @@ class Derived { fn Return(a: Abstract) -> Abstract { // FIXME: Seems like this would be better off failing with "function returns abstract type" here instead of this \/ - // CHECK:STDERR: fail_return_abstract.carbon:[[@LINE+7]]:3: error(AbstractTypeInInit): initialization of abstract type `Abstract` + // CHECK:STDERR: fail_return_abstract.carbon:[[@LINE+7]]:3: error: initialization of abstract type `Abstract` [AbstractTypeInInit] // CHECK:STDERR: return a; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_return_abstract.carbon:[[@LINE-14]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_return_abstract.carbon:[[@LINE-14]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -176,13 +176,13 @@ abstract class Abstract { fn ReturnAbstract() -> Abstract; fn CallReturnAbstract() { - // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE+9]]:3: error(AbstractTypeInFunctionReturnType): function returns abstract type `Abstract` + // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE+9]]:3: error: function returns abstract type `Abstract` [AbstractTypeInFunctionReturnType] // CHECK:STDERR: ReturnAbstract(); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE-9]]:1: note(ClassAbstractHere): class was declared abstract here + // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE-9]]:1: note: class was declared abstract here [ClassAbstractHere] // CHECK:STDERR: abstract class Abstract { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE-9]]:21: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_call_abstract_return.carbon:[[@LINE-9]]:21: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnAbstract() -> Abstract; // CHECK:STDERR: ^~~~~~~~~~~ ReturnAbstract(); diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index 6357c5d44b27..023e24462d17 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon @@ -13,17 +13,17 @@ library "[[@TEST_NAME]]"; class Bad { - // CHECK:STDERR: fail_not_type.carbon:[[@LINE+7]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` + // CHECK:STDERR: fail_not_type.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: adapt 100; // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: adapt 100; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: adapt 100; } -// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:18: error(NameNotFound): name `F` not found +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:18: error: name `F` not found [NameNotFound] // CHECK:STDERR: fn Use(b: Bad) { b.F(); } // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -34,10 +34,10 @@ fn Use(b: Bad) { b.F(); } library "[[@TEST_NAME]]"; class Bad { - // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+7]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` + // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: extend adapt 100; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: extend adapt 100; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -53,10 +53,10 @@ library "[[@TEST_NAME]]"; class MultipleAdapts { adapt (); - // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error(AdaptDeclRepeated): multiple `adapt` declarations in class + // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error: multiple `adapt` declarations in class [AdaptDeclRepeated] // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: note(ClassSpecificDeclPrevious): previous `adapt` declaration is here + // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: note: previous `adapt` declaration is here [ClassSpecificDeclPrevious] // CHECK:STDERR: adapt (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -65,10 +65,10 @@ class MultipleAdapts { class MultipleAdaptsSameType { adapt (); - // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error(AdaptDeclRepeated): multiple `adapt` declarations in class + // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error: multiple `adapt` declarations in class [AdaptDeclRepeated] // CHECK:STDERR: adapt (); // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: note(ClassSpecificDeclPrevious): previous `adapt` declaration is here + // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: note: previous `adapt` declaration is here [ClassSpecificDeclPrevious] // CHECK:STDERR: adapt (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -79,14 +79,14 @@ class MultipleAdaptsSameType { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:1: error(ClassSpecificDeclOutsideClass): `adapt` declaration outside class +// CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:1: error: `adapt` declaration outside class [ClassSpecificDeclOutsideClass] // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: adapt {}; interface I { - // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:3: error(ClassSpecificDeclOutsideClass): `adapt` declaration outside class + // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:3: error: `adapt` declaration outside class [ClassSpecificDeclOutsideClass] // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -95,7 +95,7 @@ interface I { class C { interface I { - // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+3]]:5: error(ClassSpecificDeclOutsideClass): `adapt` declaration outside class + // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+3]]:5: error: `adapt` declaration outside class [ClassSpecificDeclOutsideClass] // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ adapt {}; diff --git a/toolchain/check/testdata/class/fail_adapt_bad_type.carbon b/toolchain/check/testdata/class/fail_adapt_bad_type.carbon index 285fcff741ca..deac8d1c0c8e 100644 --- a/toolchain/check/testdata/class/fail_adapt_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_adapt_bad_type.carbon @@ -15,10 +15,10 @@ library "[[@TEST_NAME]]"; class Incomplete; class AdaptIncomplete { - // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE+6]]:3: error(IncompleteTypeInAdaptDecl): adapted type `Incomplete` is an incomplete type + // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE+6]]:3: error: adapted type `Incomplete` is an incomplete type [IncompleteTypeInAdaptDecl] // CHECK:STDERR: adapt Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE-6]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE-6]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ adapt Incomplete; diff --git a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon index 1564dc341fb3..0e91378d0731 100644 --- a/toolchain/check/testdata/class/fail_adapt_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_adapt_modifiers.carbon @@ -11,7 +11,7 @@ class B {} class C1 { - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `adapt` declaration + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `private` not allowed on `adapt` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private adapt B; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -19,7 +19,7 @@ class C1 { } class C2 { - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `adapt` declaration + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `abstract` not allowed on `adapt` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: abstract adapt B; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -27,7 +27,7 @@ class C2 { } class C3 { - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `default` not allowed on `adapt` declaration + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `adapt` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: default adapt B; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -35,10 +35,10 @@ class C3 { } class C4 { - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+7]]:10: error(ModifierRepeated): `extend` repeated on declaration + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+7]]:10: error: `extend` repeated on declaration [ModifierRepeated] // CHECK:STDERR: extend extend adapt B; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: note(ModifierPrevious): `extend` previously appeared here + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: note: `extend` previously appeared here [ModifierPrevious] // CHECK:STDERR: extend extend adapt B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -46,10 +46,10 @@ class C4 { } class C5 { - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+6]]:10: error(ModifierNotAllowedWith): `base` not allowed on declaration with `extend` + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+6]]:10: error: `base` not allowed on declaration with `extend` [ModifierNotAllowedWith] // CHECK:STDERR: extend base adapt B; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+3]]:3: note(ModifierPrevious): `extend` previously appeared here + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+3]]:3: note: `extend` previously appeared here [ModifierPrevious] // CHECK:STDERR: extend base adapt B; // CHECK:STDERR: ^~~~~~ extend base adapt B; diff --git a/toolchain/check/testdata/class/fail_adapt_with_base.carbon b/toolchain/check/testdata/class/fail_adapt_with_base.carbon index adc7b84288c2..b86c5676165d 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_base.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_base.carbon @@ -10,10 +10,10 @@ class Simple {}; base class AdaptWithVirtual { virtual fn F(); - // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+6]]:3: error(AdaptWithVirtual): adapter with virtual function + // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+6]]:3: error: adapter with virtual function [AdaptWithVirtual] // CHECK:STDERR: adapt Simple; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE-4]]:3: note(AdaptWithVirtualHere): first virtual function declaration is here + // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE-4]]:3: note: first virtual function declaration is here [AdaptWithVirtualHere] // CHECK:STDERR: virtual fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~ adapt Simple; diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index 4f775974e475..1463f0c02b9a 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -15,11 +15,11 @@ library "[[@TEST_NAME]]"; base class Base {} class AdaptWithBase { - // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+3]]:3: error(AdaptWithBase): adapter with base class + // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+3]]:3: error: adapter with base class [AdaptWithBase] // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; - // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+4]]:3: note(AdaptWithBaseHere): `base` declaration is here + // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+4]]:3: note: `base` declaration is here [AdaptWithBaseHere] // CHECK:STDERR: extend base: Base; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,11 +31,11 @@ class AdaptWithBase { library "[[@TEST_NAME]]"; class AdaptWithField { - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error(AdaptWithFields): adapter with fields + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error: adapter with fields [AdaptWithFields] // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+4]]:7: note(AdaptWithFieldHere): first field declaration is here + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+4]]:7: note: first field declaration is here [AdaptWithFieldHere] // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -43,11 +43,11 @@ class AdaptWithField { } class AdaptWithFields { - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error(AdaptWithFields): adapter with fields + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error: adapter with fields [AdaptWithFields] // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+4]]:7: note(AdaptWithFieldHere): first field declaration is here + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+4]]:7: note: first field declaration is here [AdaptWithFieldHere] // CHECK:STDERR: var a: i32; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -65,10 +65,10 @@ base class Base {} class AdaptWithBaseAndFields { extend base: Base; var n: i32; - // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE+6]]:3: error(AdaptWithBase): adapter with base class + // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE+6]]:3: error: adapter with base class [AdaptWithBase] // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE-5]]:3: note(AdaptWithBaseHere): `base` declaration is here + // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE-5]]:3: note: `base` declaration is here [AdaptWithBaseHere] // CHECK:STDERR: extend base: Base; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ adapt {}; diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index ddad5dc037cf..bece79498d2b 100644 --- a/toolchain/check/testdata/class/fail_addr_not_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_not_self.carbon @@ -9,13 +9,13 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_addr_not_self.carbon class Class { - // CHECK:STDERR: fail_addr_not_self.carbon:[[@LINE+4]]:8: error(AddrOnNonSelfParam): `addr` can only be applied to a `self` parameter + // CHECK:STDERR: fail_addr_not_self.carbon:[[@LINE+4]]:8: error: `addr` can only be applied to a `self` parameter [AddrOnNonSelfParam] // CHECK:STDERR: fn F[addr a:! Class*](); // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn F[addr a:! Class*](); - // CHECK:STDERR: fail_addr_not_self.carbon:[[@LINE+3]]:8: error(AddrOnNonSelfParam): `addr` can only be applied to a `self` parameter + // CHECK:STDERR: fail_addr_not_self.carbon:[[@LINE+3]]:8: error: `addr` can only be applied to a `self` parameter [AddrOnNonSelfParam] // CHECK:STDERR: fn G(addr b: Class*); // CHECK:STDERR: ^~~~ fn G(addr b: Class*); diff --git a/toolchain/check/testdata/class/fail_addr_self.carbon b/toolchain/check/testdata/class/fail_addr_self.carbon index a3c24463137f..3b9173747d5e 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -10,7 +10,7 @@ class Class { fn F[addr self: Class*](); - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+4]]:8: error(AddrOnNonPointerType): `addr` can only be applied to a binding with a pointer type + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+4]]:8: error: `addr` can only be applied to a binding with a pointer type [AddrOnNonPointerType] // CHECK:STDERR: fn G[addr self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -18,10 +18,10 @@ class Class { } fn F(c: Class, p: Class*) { - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+6]]:3: error(AddrSelfIsNonRef): `addr self` method cannot be invoked on a value + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+6]]:3: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef] // CHECK:STDERR: c.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-12]]:8: note(InCallToFunctionSelf): initializing `addr self` parameter of method declared here + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-12]]:8: note: initializing `addr self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn F[addr self: Class*](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ c.F(); diff --git a/toolchain/check/testdata/class/fail_base_as_declared_name.carbon b/toolchain/check/testdata/class/fail_base_as_declared_name.carbon index d276cb47eca3..301cce52e191 100644 --- a/toolchain/check/testdata/class/fail_base_as_declared_name.carbon +++ b/toolchain/check/testdata/class/fail_base_as_declared_name.carbon @@ -10,11 +10,11 @@ namespace N; -// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+7]]:6: error(ExpectedDeclNameAfterPeriod): `.` should be followed by a name +// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+7]]:6: error: `.` should be followed by a name [ExpectedDeclNameAfterPeriod] // CHECK:STDERR: fn N.base() {} // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+3]]:6: error(SemanticsTodo): semantics TODO: `HandleInvalidParse` +// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+3]]:6: error: semantics TODO: `HandleInvalidParse` [SemanticsTodo] // CHECK:STDERR: fn N.base() {} // CHECK:STDERR: ^~~~ fn N.base() {} diff --git a/toolchain/check/testdata/class/fail_base_bad_type.carbon b/toolchain/check/testdata/class/fail_base_bad_type.carbon index a76d1100a6cf..92f290f21f8a 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -11,11 +11,11 @@ // --- fail_derive_from_error.carbon class DeriveFromError { - // CHECK:STDERR: fail_derive_from_error.carbon:[[@LINE+6]]:16: error(NameNotFound): name `error` not found + // CHECK:STDERR: fail_derive_from_error.carbon:[[@LINE+6]]:16: error: name `error` not found [NameNotFound] // CHECK:STDERR: extend base: error; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_derive_from_non_type.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` + // CHECK:STDERR: fail_derive_from_non_type.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: extend base: error; } @@ -26,14 +26,14 @@ fn AccessMemberWithInvalidBaseError(p: DeriveFromError*) -> i32 { return (*p).n; // --- fail_derive_from_non_type.carbon class DeriveFromNonType { - // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+9]]:16: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` + // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+9]]:16: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: extend base: 32; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+6]]:16: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_derive_from_non_type.carbon:[[@LINE+6]]:16: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: extend base: 32; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_derive_from_i32.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` + // CHECK:STDERR: fail_derive_from_i32.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: extend base: 32; } @@ -43,7 +43,7 @@ fn AccessMemberWithInvalidBasNonType(p: DeriveFromNonType*) -> i32 { return (*p) // --- fail_derive_from_i32.carbon class DeriveFromi32 { - // CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:16: error(BaseIsFinal): deriving from final type `i32`; base type must be an `abstract` or `base` class + // CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+4]]:16: error: deriving from final type `i32`; base type must be an `abstract` or `base` class [BaseIsFinal] // CHECK:STDERR: extend base: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -52,14 +52,14 @@ class DeriveFromi32 { // It's not really important whether this conversion produces an error or not, // but it shouldn't crash. -// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+9]]:53: error(ImplicitAsConversionFailure): cannot implicitly convert from `DeriveFromi32*` to `i32*` +// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+9]]:53: error: cannot implicitly convert from `DeriveFromi32*` to `i32*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+6]]:53: note(MissingImplInMemberAccessNote): type `DeriveFromi32*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derive_from_i32.carbon:[[@LINE+6]]:53: note: type `DeriveFromi32*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_derive_from_tuple.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` +// CHECK:STDERR: fail_derive_from_tuple.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } @@ -70,21 +70,21 @@ fn AccessMemberWithInvalidBasei32(p: DeriveFromi32*) -> i32 { return (*p).n; } base class Base {} class DeriveFromTuple { - // CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+4]]:16: error(BaseIsFinal): deriving from final type `(Base,)`; base type must be an `abstract` or `base` class + // CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+4]]:16: error: deriving from final type `(Base,)`; base type must be an `abstract` or `base` class [BaseIsFinal] // CHECK:STDERR: extend base: (Base,); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: extend base: (Base,); } -// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+9]]:61: error(ImplicitAsConversionFailure): cannot implicitly convert from `DeriveFromTuple*` to `(Base,)*` +// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+9]]:61: error: cannot implicitly convert from `DeriveFromTuple*` to `(Base,)*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+6]]:61: note(MissingImplInMemberAccessNote): type `DeriveFromTuple*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derive_from_tuple.carbon:[[@LINE+6]]:61: note: type `DeriveFromTuple*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_derive_from_struct.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` +// CHECK:STDERR: fail_derive_from_struct.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; } @@ -95,21 +95,21 @@ fn AccessMemberWithInvalidBaseTuple(p: DeriveFromTuple*) -> i32 { return (*p).n; // TODO: Should we allow this? // We do allow `{.base = {.a: i32, .b: i32}}`. class DeriveFromStruct { - // CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+4]]:16: error(BaseIsFinal): deriving from final type `{.a: i32, .b: i32}`; base type must be an `abstract` or `base` class + // CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+4]]:16: error: deriving from final type `{.a: i32, .b: i32}`; base type must be an `abstract` or `base` class [BaseIsFinal] // CHECK:STDERR: extend base: {.a: i32, .b: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: {.a: i32, .b: i32}; } -// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+9]]:74: error(ImplicitAsConversionFailure): cannot implicitly convert from `DeriveFromStruct*` to `{.a: i32, .b: i32}*` +// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+9]]:74: error: cannot implicitly convert from `DeriveFromStruct*` to `{.a: i32, .b: i32}*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+6]]:74: note(MissingImplInMemberAccessNote): type `DeriveFromStruct*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derive_from_struct.carbon:[[@LINE+6]]:74: note: type `DeriveFromStruct*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_derive_from_incomplete.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` +// CHECK:STDERR: fail_derive_from_incomplete.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; } @@ -118,31 +118,31 @@ fn AccessMemberWithInvalidBaseStruct(p: DeriveFromStruct*) -> i32 { return (*p). // --- fail_derive_from_incomplete.carbon -// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+4]]:1: error(ModifierOnlyAllowedOnDefinition): `base` not allowed on `class` forward declaration, only definition +// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+4]]:1: error: `base` not allowed on `class` forward declaration, only definition [ModifierOnlyAllowedOnDefinition] // CHECK:STDERR: base class Incomplete; // CHECK:STDERR: ^~~~ // CHECK:STDERR: base class Incomplete; class DeriveFromIncomplete { - // CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+7]]:16: error(IncompleteTypeInBaseDecl): base `Incomplete` is an incomplete type + // CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+7]]:16: error: base `Incomplete` is an incomplete type [IncompleteTypeInBaseDecl] // CHECK:STDERR: extend base: Incomplete; // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE-6]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE-6]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: base class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: Incomplete; } -// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+9]]:74: error(ImplicitAsConversionFailure): cannot implicitly convert from `DeriveFromIncomplete*` to `Incomplete*` +// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+9]]:74: error: cannot implicitly convert from `DeriveFromIncomplete*` to `Incomplete*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+6]]:74: note(MissingImplInMemberAccessNote): type `DeriveFromIncomplete*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derive_from_incomplete.carbon:[[@LINE+6]]:74: note: type `DeriveFromIncomplete*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_derive_from_final.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_derive_from_error.carbon` +// CHECK:STDERR: fail_derive_from_final.carbon: error: `Main//default` previously provided by `fail_derive_from_error.carbon` [DuplicateMainApi] // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; } @@ -155,7 +155,7 @@ class Final { } class DeriveFromFinal { - // CHECK:STDERR: fail_derive_from_final.carbon:[[@LINE+4]]:16: error(BaseIsFinal): deriving from final type `Final`; base type must be an `abstract` or `base` class + // CHECK:STDERR: fail_derive_from_final.carbon:[[@LINE+4]]:16: error: deriving from final type `Final`; base type must be an `abstract` or `base` class [BaseIsFinal] // CHECK:STDERR: extend base: Final; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -172,7 +172,7 @@ fn AccessMemberWithInvalidBaseFinal_WithMember(p: DeriveFromFinal*) -> i32 { } fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { - // CHECK:STDERR: fail_derive_from_final.carbon:[[@LINE+3]]:10: error(NameNotFound): name `b` not found + // CHECK:STDERR: fail_derive_from_final.carbon:[[@LINE+3]]:10: error: name `b` not found [NameNotFound] // CHECK:STDERR: return (*p).b; // CHECK:STDERR: ^~~~~~ return (*p).b; diff --git a/toolchain/check/testdata/class/fail_base_method_define.carbon b/toolchain/check/testdata/class/fail_base_method_define.carbon index 80a5f13043fa..4d39d8566c18 100644 --- a/toolchain/check/testdata/class/fail_base_method_define.carbon +++ b/toolchain/check/testdata/class/fail_base_method_define.carbon @@ -20,13 +20,13 @@ class D { extend base: B; } -// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+4]]:6: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity +// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+4]]:6: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity] // CHECK:STDERR: fn D.F() {} // CHECK:STDERR: ^ // CHECK:STDERR: fn D.F() {} -// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+3]]:6: error(NameNotFound): name `C` not found +// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+3]]:6: error: name `C` not found [NameNotFound] // CHECK:STDERR: fn D.C.F() {} // CHECK:STDERR: ^ fn D.C.F() {} diff --git a/toolchain/check/testdata/class/fail_base_misplaced.carbon b/toolchain/check/testdata/class/fail_base_misplaced.carbon index 5bcc672a1710..35495155f1ee 100644 --- a/toolchain/check/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/check/testdata/class/fail_base_misplaced.carbon @@ -10,18 +10,18 @@ base class B {} -// CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+4]]:1: error(ClassSpecificDeclOutsideClass): `base` declaration outside class +// CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+4]]:1: error: `base` declaration outside class [ClassSpecificDeclOutsideClass] // CHECK:STDERR: extend base: B; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: B; fn F() { - // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+7]]:3: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+7]]:3: error: expected expression [ExpectedExpr] // CHECK:STDERR: extend base: B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `HandleInvalidParse` + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error: semantics TODO: `HandleInvalidParse` [SemanticsTodo] // CHECK:STDERR: extend base: B; // CHECK:STDERR: ^~~~~~ extend base: B; diff --git a/toolchain/check/testdata/class/fail_base_modifiers.carbon b/toolchain/check/testdata/class/fail_base_modifiers.carbon index 522d61c6b838..c3a1516118a4 100644 --- a/toolchain/check/testdata/class/fail_base_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_base_modifiers.carbon @@ -11,7 +11,7 @@ base class B {} class C1 { - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `base` declaration + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error: `private` not allowed on `base` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private extend base: B; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -19,11 +19,11 @@ class C1 { } class C2 { - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+8]]:3: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `base` declaration + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+8]]:3: error: `abstract` not allowed on `base` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: abstract base: B; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error(BaseMissingExtend): missing `extend` before `base` declaration + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error: missing `extend` before `base` declaration [BaseMissingExtend] // CHECK:STDERR: abstract base: B; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,10 +31,10 @@ class C2 { } class C3 { - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+7]]:10: error(ModifierNotAllowedWith): `default` not allowed on declaration with `extend` + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+7]]:10: error: `default` not allowed on declaration with `extend` [ModifierNotAllowedWith] // CHECK:STDERR: extend default base: B; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: note(ModifierPrevious): `extend` previously appeared here + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: note: `extend` previously appeared here [ModifierPrevious] // CHECK:STDERR: extend default base: B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -42,10 +42,10 @@ class C3 { } class C4 { - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+6]]:10: error(ModifierRepeated): `extend` repeated on declaration + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+6]]:10: error: `extend` repeated on declaration [ModifierRepeated] // CHECK:STDERR: extend extend base: B; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+3]]:3: note(ModifierPrevious): `extend` previously appeared here + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+3]]:3: note: `extend` previously appeared here [ModifierPrevious] // CHECK:STDERR: extend extend base: B; // CHECK:STDERR: ^~~~~~ extend extend base: B; diff --git a/toolchain/check/testdata/class/fail_base_no_extend.carbon b/toolchain/check/testdata/class/fail_base_no_extend.carbon index 5a2a343547c5..65094b337430 100644 --- a/toolchain/check/testdata/class/fail_base_no_extend.carbon +++ b/toolchain/check/testdata/class/fail_base_no_extend.carbon @@ -11,7 +11,7 @@ base class B {} class C { - // CHECK:STDERR: fail_base_no_extend.carbon:[[@LINE+3]]:3: error(BaseMissingExtend): missing `extend` before `base` declaration + // CHECK:STDERR: fail_base_no_extend.carbon:[[@LINE+3]]:3: error: missing `extend` before `base` declaration [BaseMissingExtend] // CHECK:STDERR: base: B; // CHECK:STDERR: ^~~~~~~~ base: B; diff --git a/toolchain/check/testdata/class/fail_base_repeated.carbon b/toolchain/check/testdata/class/fail_base_repeated.carbon index 5c581adba69e..6ec9d805c320 100644 --- a/toolchain/check/testdata/class/fail_base_repeated.carbon +++ b/toolchain/check/testdata/class/fail_base_repeated.carbon @@ -13,10 +13,10 @@ base class B2 {} class C { extend base: B1; - // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE+7]]:3: error(BaseDeclRepeated): multiple `base` declarations in class; multiple inheritance is not permitted + // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE+7]]:3: error: multiple `base` declarations in class; multiple inheritance is not permitted [BaseDeclRepeated] // CHECK:STDERR: extend base: B2; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: note(ClassSpecificDeclPrevious): previous `base` declaration is here + // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: note: previous `base` declaration is here [ClassSpecificDeclPrevious] // CHECK:STDERR: extend base: B1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -26,10 +26,10 @@ class C { class D { // TODO: Consider adding a custom diagnostic for this case. extend base: B1; - // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE+6]]:3: error(BaseDeclRepeated): multiple `base` declarations in class; multiple inheritance is not permitted + // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE+6]]:3: error: multiple `base` declarations in class; multiple inheritance is not permitted [BaseDeclRepeated] // CHECK:STDERR: extend base: B1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: note(ClassSpecificDeclPrevious): previous `base` declaration is here + // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: note: previous `base` declaration is here [ClassSpecificDeclPrevious] // CHECK:STDERR: extend base: B1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ extend base: B1; diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index 6abb3e3abb4e..654dd7500ad0 100644 --- a/toolchain/check/testdata/class/fail_base_unbound.carbon +++ b/toolchain/check/testdata/class/fail_base_unbound.carbon @@ -14,7 +14,7 @@ class C { extend base: B; } -// CHECK:STDERR: fail_base_unbound.carbon:[[@LINE+3]]:12: error(UseOfNonExprAsValue): expression cannot be used as a value +// CHECK:STDERR: fail_base_unbound.carbon:[[@LINE+3]]:12: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: let b: B = C.base; // CHECK:STDERR: ^~~~~~ let b: B = C.base; diff --git a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon index 82708a674e89..c1ec08775a6f 100644 --- a/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon +++ b/toolchain/check/testdata/class/fail_compound_type_mismatch.carbon @@ -17,10 +17,10 @@ class B { } fn AccessBInA(a: A) -> i32 { - // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+6]]:10: error(ImplicitAsConversionFailure): cannot implicitly convert from `A` to `B` + // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+6]]:10: error: cannot implicitly convert from `A` to `B` [ImplicitAsConversionFailure] // CHECK:STDERR: return a.(B.b); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+3]]:10: note(MissingImplInMemberAccessNote): type `A` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+3]]:10: note: type `A` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return a.(B.b); // CHECK:STDERR: ^~~~~~~ return a.(B.b); diff --git a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon index 226e6161c36e..924f521a0f87 100644 --- a/toolchain/check/testdata/class/fail_convert_to_invalid.carbon +++ b/toolchain/check/testdata/class/fail_convert_to_invalid.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_convert_to_invalid.carbon class C { - // CHECK:STDERR: fail_convert_to_invalid.carbon:[[@LINE+3]]:10: error(NameNotFound): name `NoSuchType` not found + // CHECK:STDERR: fail_convert_to_invalid.carbon:[[@LINE+3]]:10: error: name `NoSuchType` not found [NameNotFound] // CHECK:STDERR: var a: NoSuchType; // CHECK:STDERR: ^~~~~~~~~~ var a: NoSuchType; diff --git a/toolchain/check/testdata/class/fail_derived_to_base.carbon b/toolchain/check/testdata/class/fail_derived_to_base.carbon index b3bcebebe961..9cac6877e45f 100644 --- a/toolchain/check/testdata/class/fail_derived_to_base.carbon +++ b/toolchain/check/testdata/class/fail_derived_to_base.carbon @@ -21,10 +21,10 @@ class B2 { var b: i32; } -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+7]]:38: error(ImplicitAsConversionFailure): cannot implicitly convert from `B2*` to `A1*` +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+7]]:38: error: cannot implicitly convert from `B2*` to `A1*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertUnrelated(p: B2*) -> A1* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: note(MissingImplInMemberAccessNote): type `B2*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: note: type `B2*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertUnrelated(p: B2*) -> A1* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -32,10 +32,10 @@ fn ConvertUnrelated(p: B2*) -> A1* { return p; } class Incomplete; -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+6]]:47: error(ImplicitAsConversionFailure): cannot implicitly convert from `Incomplete*` to `A2*` +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+6]]:47: error: cannot implicitly convert from `Incomplete*` to `A2*` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:47: note(MissingImplInMemberAccessNote): type `Incomplete*` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:47: note: type `Incomplete*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDERR: ^~~~~~~~~ fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } diff --git a/toolchain/check/testdata/class/fail_extend_cycle.carbon b/toolchain/check/testdata/class/fail_extend_cycle.carbon index fd4c9d94c71c..8f4e78ea8504 100644 --- a/toolchain/check/testdata/class/fail_extend_cycle.carbon +++ b/toolchain/check/testdata/class/fail_extend_cycle.carbon @@ -16,16 +16,16 @@ base class B { extend base: A; } -// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `class A` +// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+7]]:1: error: redefinition of `class A` [RedeclRedef] // CHECK:STDERR: base class A { // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE-11]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE-11]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: base class A { // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: base class A { extend base: A; - // CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+3]]:10: error(NameNotFound): name `C` not found + // CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+3]]:10: error: name `C` not found [NameNotFound] // CHECK:STDERR: var c: C; // CHECK:STDERR: ^ var c: C; diff --git a/toolchain/check/testdata/class/fail_field_modifiers.carbon b/toolchain/check/testdata/class/fail_field_modifiers.carbon index bf7769686e9b..487e5e773b47 100644 --- a/toolchain/check/testdata/class/fail_field_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_field_modifiers.carbon @@ -10,25 +10,25 @@ class Class { - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `default` not allowed on `var` declaration + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `var` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: default var j: i32; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default var j: i32; - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error(ModifierNotAllowedOnDeclaration): `final` not allowed on `var` declaration + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `final` not allowed on `var` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: final var k: i32; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: final var k: i32; - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error(ModifierRequiresInterface): `default` not allowed; requires interface scope + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default let l: i32 = 0; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default let l: i32 = 0; - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+3]]:3: error(ModifierRequiresInterface): `final` not allowed; requires interface scope + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+3]]:3: error: `final` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: final let m: i32 = 1; // CHECK:STDERR: ^~~~~ final let m: i32 = 1; diff --git a/toolchain/check/testdata/class/fail_generic_method.carbon b/toolchain/check/testdata/class/fail_generic_method.carbon index c77a87b64598..f1798a90f8ea 100644 --- a/toolchain/check/testdata/class/fail_generic_method.carbon +++ b/toolchain/check/testdata/class/fail_generic_method.carbon @@ -15,18 +15,18 @@ class Class(T:! type) { // TODO: The follow-on errors here aren't great. Investigate whether we can // enter the scope anyway if the parameters don't match. -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+14]]:10: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+14]]:10: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class Class(T:! type) { // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+7]]:27: error(NameNotFound): name `Self` not found +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+7]]:27: error: name `Self` not found [NameNotFound] // CHECK:STDERR: fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+3]]:36: error(NameNotFound): name `T` not found +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+3]]:36: error: name `T` not found [NameNotFound] // CHECK:STDERR: fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDERR: ^ fn Class(N:! i32).F[self: Self](n: T) {} diff --git a/toolchain/check/testdata/class/fail_import_misuses.carbon b/toolchain/check/testdata/class/fail_import_misuses.carbon index 4797f8c20b74..66d7bb809536 100644 --- a/toolchain/check/testdata/class/fail_import_misuses.carbon +++ b/toolchain/check/testdata/class/fail_import_misuses.carbon @@ -23,22 +23,22 @@ library "[[@TEST_NAME]]"; import library "a"; -// CHECK:STDERR: fail_b.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `class Empty` is redundant +// CHECK:STDERR: fail_b.carbon:[[@LINE+8]]:1: error: redeclaration of `class Empty` is redundant [RedeclRedundant] // CHECK:STDERR: class Empty { // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: a.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: a.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class Empty { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: class Empty { } -// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:8: error(IncompleteTypeInVarDecl): variable has incomplete type `Incomplete` +// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:8: error: variable has incomplete type `Incomplete` [IncompleteTypeInVarDecl] // CHECK:STDERR: var a: Incomplete; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-16]]:1(InImport): in import -// CHECK:STDERR: a.carbon:7:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_b.carbon:[[@LINE-16]]:1: in import [InImport] +// CHECK:STDERR: a.carbon:7:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ var a: Incomplete; diff --git a/toolchain/check/testdata/class/fail_incomplete.carbon b/toolchain/check/testdata/class/fail_incomplete.carbon index df928579db62..a828a9d1c524 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -14,49 +14,49 @@ library "[[@TEST_NAME]]"; class Class; -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:4: error(QualifiedDeclInIncompleteClassScope): cannot declare a member of incomplete class `Class` +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:4: error: cannot declare a member of incomplete class `Class` [QualifiedDeclInIncompleteClassScope] // CHECK:STDERR: fn Class.Function() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-5]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn Class.Function() {} fn CallClassFunction() { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:3: error(QualifiedExprInIncompleteClassScope): member access into incomplete class `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:3: error: member access into incomplete class `Class` [QualifiedExprInIncompleteClassScope] // CHECK:STDERR: Class.Function(); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-15]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-15]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: Class.Function(); } -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:17: error(IncompleteTypeInVarDecl): variable has incomplete type `Class` +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:17: error: variable has incomplete type `Class` [IncompleteTypeInVarDecl] // CHECK:STDERR: var global_var: Class; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-25]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-25]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: var global_var: Class; -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:24: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `Class` +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:24: error: function returns incomplete type `Class` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: fn ConvertFromStruct() -> Class { return {}; } // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-34]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-34]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn ConvertFromStruct() -> Class { return {}; } fn G(p: Class*) -> i32 { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:10: error(IncompleteTypeInMemberAccess): member access into object of incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:10: error: member access into object of incomplete type `Class` [IncompleteTypeInMemberAccess] // CHECK:STDERR: return p->n; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-44]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-44]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -64,20 +64,20 @@ fn G(p: Class*) -> i32 { } fn MemberAccess(p: Class*) -> i32 { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:11: error(IncompleteTypeInMemberAccess): member access into object of incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:11: error: member access into object of incomplete type `Class` [IncompleteTypeInMemberAccess] // CHECK:STDERR: return (*p).n; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-55]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-55]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: return (*p).n; } -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:20: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `Class` +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:20: error: function returns incomplete type `Class` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: fn Copy(p: Class*) -> Class { // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-65]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-65]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -86,10 +86,10 @@ fn Copy(p: Class*) -> Class { } fn Let(p: Class*) { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:10: error(IncompleteTypeInLetDecl): `let` binding has incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+7]]:10: error: `let` binding has incomplete type `Class` [IncompleteTypeInLetDecl] // CHECK:STDERR: let c: Class = *p; // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-77]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-77]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -101,25 +101,25 @@ fn TakeIncomplete(c: Class); fn ReturnIncomplete() -> Class; fn CallTakeIncomplete(p: Class*) { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:18: error(IncompleteTypeInValueConversion): forming value of incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:18: error: forming value of incomplete type `Class` [IncompleteTypeInValueConversion] // CHECK:STDERR: TakeIncomplete(*p); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-92]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-92]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-11]]:19: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-11]]:19: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn TakeIncomplete(c: Class); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: TakeIncomplete(*p); - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:18: error(IncompleteTypeInValueConversion): forming value of incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:18: error: forming value of incomplete type `Class` [IncompleteTypeInValueConversion] // CHECK:STDERR: TakeIncomplete({}); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-104]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-104]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-23]]:19: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-23]]:19: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn TakeIncomplete(c: Class); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -127,13 +127,13 @@ fn CallTakeIncomplete(p: Class*) { } fn CallReturnIncomplete() { - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:3: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `Class` + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE+10]]:3: error: function returns incomplete type `Class` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: ReturnIncomplete(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-118]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-118]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-35]]:23: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_forward_decl.carbon:[[@LINE-35]]:23: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnIncomplete() -> Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -145,10 +145,10 @@ fn CallReturnIncomplete() { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_in_definition.carbon:[[@LINE+6]]:10: error(IncompleteTypeInVarDecl): field has incomplete type `C` + // CHECK:STDERR: fail_in_definition.carbon:[[@LINE+6]]:10: error: field has incomplete type `C` [IncompleteTypeInVarDecl] // CHECK:STDERR: var c: C; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_in_definition.carbon:[[@LINE-4]]:1: note(ClassIncompleteWithinDefinition): class is incomplete within its definition + // CHECK:STDERR: fail_in_definition.carbon:[[@LINE-4]]:1: note: class is incomplete within its definition [ClassIncompleteWithinDefinition] // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ var c: C; diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index fa3e47094817..bf241bd79646 100644 --- a/toolchain/check/testdata/class/fail_init.carbon +++ b/toolchain/check/testdata/class/fail_init.carbon @@ -14,17 +14,17 @@ class Class { } fn F() { - // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: error(StructInitElementCountMismatch): cannot initialize class with 2 fields from struct with 1 field + // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: error: cannot initialize class with 2 fields from struct with 1 field [StructInitElementCountMismatch] // CHECK:STDERR: {.a = 1} as Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: {.a = 1} as Class; - // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: error(StructInitMissingFieldInLiteral): missing value for field `b` in struct initialization + // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: error: missing value for field `b` in struct initialization [StructInitMissingFieldInLiteral] // CHECK:STDERR: {.a = 1, .c = 2} as Class; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: {.a = 1, .c = 2} as Class; - // CHECK:STDERR: fail_init.carbon:[[@LINE+3]]:3: error(StructInitElementCountMismatch): cannot initialize class with 2 fields from struct with 3 fields + // CHECK:STDERR: fail_init.carbon:[[@LINE+3]]:3: error: cannot initialize class with 2 fields from struct with 3 fields [StructInitElementCountMismatch] // CHECK:STDERR: {.a = 1, .b = 2, .c = 3} as Class; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ {.a = 1, .b = 2, .c = 3} as Class; diff --git a/toolchain/check/testdata/class/fail_init_as_inplace.carbon b/toolchain/check/testdata/class/fail_init_as_inplace.carbon index 2d9f1e660783..363e7be0d13c 100644 --- a/toolchain/check/testdata/class/fail_init_as_inplace.carbon +++ b/toolchain/check/testdata/class/fail_init_as_inplace.carbon @@ -19,7 +19,7 @@ fn F() { // TODO: This case should presumably work: `{...} as Class` should be an // initializing expression, not a value expression. // - // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+3]]:18: error(CopyOfUncopyableType): cannot copy value of type `Class` + // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+3]]:18: error: cannot copy value of type `Class` [CopyOfUncopyableType] // CHECK:STDERR: var c: Class = {.a = 1, .b = 2} as Class; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ var c: Class = {.a = 1, .b = 2} as Class; diff --git a/toolchain/check/testdata/class/fail_memaccess_category.carbon b/toolchain/check/testdata/class/fail_memaccess_category.carbon index bf6be0a39a56..3b1304089697 100644 --- a/toolchain/check/testdata/class/fail_memaccess_category.carbon +++ b/toolchain/check/testdata/class/fail_memaccess_category.carbon @@ -18,10 +18,10 @@ class B { fn F(s: {.a: A}, b: B) { // `s` has only a value representation, so this must be invalid. - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+7]]:4: error(AddrSelfIsNonRef): `addr self` method cannot be invoked on a value + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+7]]:4: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef] // CHECK:STDERR: s.a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-12]]:8: note(InCallToFunctionSelf): initializing `addr self` parameter of method declared here + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-12]]:8: note: initializing `addr self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn F[addr self: A*](); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -29,10 +29,10 @@ fn F(s: {.a: A}, b: B) { // `b` has an object representation for `A`, but this is still invalid for // consistency. - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+6]]:4: error(AddrSelfIsNonRef): `addr self` method cannot be invoked on a value + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+6]]:4: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef] // CHECK:STDERR: b.a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-23]]:8: note(InCallToFunctionSelf): initializing `addr self` parameter of method declared here + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-23]]:8: note: initializing `addr self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn F[addr self: A*](); // CHECK:STDERR: ^~~~~~~~~~~~~ b.a.F(); diff --git a/toolchain/check/testdata/class/fail_member_of_let.carbon b/toolchain/check/testdata/class/fail_member_of_let.carbon index ed7e04a525b3..de1d34901dab 100644 --- a/toolchain/check/testdata/class/fail_member_of_let.carbon +++ b/toolchain/check/testdata/class/fail_member_of_let.carbon @@ -17,10 +17,10 @@ let T: type = Class; // The class name is required to be written in the same way as in the class // declaration. An expression that evaluates to the class name is not accepted. -// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE+6]]:4: error(QualifiedNameInNonScope): name qualifiers are only allowed for entities that provide a scope +// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE+6]]:4: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope] // CHECK:STDERR: fn T.F() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE-7]]:5: note(QualifiedNameNonScopeEntity): referenced non-scope entity declared here +// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE-7]]:5: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity] // CHECK:STDERR: let T: type = Class; // CHECK:STDERR: ^ fn T.F() {} diff --git a/toolchain/check/testdata/class/fail_method.carbon b/toolchain/check/testdata/class/fail_method.carbon index e1b0d3f5ed8d..5f5aee046d9c 100644 --- a/toolchain/check/testdata/class/fail_method.carbon +++ b/toolchain/check/testdata/class/fail_method.carbon @@ -20,27 +20,27 @@ fn F(c: Class) { c.WithSelf(); Class.NoSelf(); - // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error(MissingObjectInMethodCall): missing object argument in method call + // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: missing object argument in method call [MissingObjectInMethodCall] // CHECK:STDERR: Class.WithSelf(); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-13]]:3: note(InCallToFunction): calling function declared here + // CHECK:STDERR: fail_method.carbon:[[@LINE-13]]:3: note: calling function declared here [InCallToFunction] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Class.WithSelf(); - // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 1 argument passed to function expecting 0 arguments + // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Class.WithSelf(c); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Class.WithSelf(c); - // CHECK:STDERR: fail_method.carbon:[[@LINE+6]]:3: error(MissingObjectInMethodCall): missing object argument in method call + // CHECK:STDERR: fail_method.carbon:[[@LINE+6]]:3: error: missing object argument in method call [MissingObjectInMethodCall] // CHECK:STDERR: A(); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-30]]:3: note(InCallToFunction): calling function declared here + // CHECK:STDERR: fail_method.carbon:[[@LINE-30]]:3: note: calling function declared here [InCallToFunction] // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ A(); diff --git a/toolchain/check/testdata/class/fail_method_modifiers.carbon b/toolchain/check/testdata/class/fail_method_modifiers.carbon index c3fb1aa08ae5..8401d6497571 100644 --- a/toolchain/check/testdata/class/fail_method_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_method_modifiers.carbon @@ -10,19 +10,19 @@ class FinalClass { - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error(ModifierAbstractNotAllowed): `abstract` not allowed; requires `abstract` class scope + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error: `abstract` not allowed; requires `abstract` class scope [ModifierAbstractNotAllowed] // CHECK:STDERR: abstract fn Abstract[self: Self](); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: note(ModifierNotInContext): containing definition here + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: note: containing definition here [ModifierNotInContext] // CHECK:STDERR: class FinalClass { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: abstract fn Abstract[self: Self](); - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error(ModifierVirtualNotAllowed): `virtual` not allowed; requires `abstract` or `base` class scope + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error: `virtual` not allowed; requires `abstract` or `base` class scope [ModifierVirtualNotAllowed] // CHECK:STDERR: virtual fn Virtual[self: Self](); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-14]]:1: note(ModifierNotInContext): containing definition here + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-14]]:1: note: containing definition here [ModifierNotInContext] // CHECK:STDERR: class FinalClass { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,13 +31,13 @@ class FinalClass { abstract class AbstractClass { - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error(ModifierRequiresInterface): `default` not allowed; requires interface scope + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default fn Default[self: Self](); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default fn Default[self: Self](); - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error(ModifierRequiresInterface): `final` not allowed; requires interface scope + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error: `final` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: final fn Final[self: Self](); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -46,10 +46,10 @@ abstract class AbstractClass { base class BaseClass { - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+6]]:3: error(ModifierAbstractNotAllowed): `abstract` not allowed; requires `abstract` class scope + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+6]]:3: error: `abstract` not allowed; requires `abstract` class scope [ModifierAbstractNotAllowed] // CHECK:STDERR: abstract fn Abstract[self: Self](); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: note(ModifierNotInContext): containing definition here + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: note: containing definition here [ModifierNotInContext] // CHECK:STDERR: base class BaseClass { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ abstract fn Abstract[self: Self](); diff --git a/toolchain/check/testdata/class/fail_method_redefinition.carbon b/toolchain/check/testdata/class/fail_method_redefinition.carbon index 47015a0e0e62..d5bc9770d394 100644 --- a/toolchain/check/testdata/class/fail_method_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_method_redefinition.carbon @@ -10,10 +10,10 @@ class Class { fn F() {} - // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE+6]]:3: error(RedeclRedef): redefinition of `fn F` + // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE+6]]:3: error: redefinition of `fn F` [RedeclRedef] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE-4]]:3: note(RedeclPrevDef): previously defined here + // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE-4]]:3: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ fn F() {} diff --git a/toolchain/check/testdata/class/fail_modifiers.carbon b/toolchain/check/testdata/class/fail_modifiers.carbon index 3db37cedf6f7..1414099a8784 100644 --- a/toolchain/check/testdata/class/fail_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_modifiers.carbon @@ -8,89 +8,89 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierRepeated): `private` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `private` repeated on declaration [ModifierRepeated] // CHECK:STDERR: private private class DuplicatePrivate; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `private` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `private` previously appeared here [ModifierPrevious] // CHECK:STDERR: private private class DuplicatePrivate; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private private class DuplicatePrivate; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierOnlyAllowedOnDefinition): `abstract` not allowed on `class` forward declaration, only definition +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `abstract` not allowed on `class` forward declaration, only definition [ModifierOnlyAllowedOnDefinition] // CHECK:STDERR: abstract class AbstractDecl; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract class AbstractDecl; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierNotAllowedWith): `protected` not allowed on declaration with `private` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` not allowed on declaration with `private` [ModifierNotAllowedWith] // CHECK:STDERR: private protected class TwoAccess; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `private` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `private` previously appeared here [ModifierPrevious] // CHECK:STDERR: private protected class TwoAccess; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private protected class TwoAccess; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierOnlyAllowedOnDefinition): `base` not allowed on `class` forward declaration, only definition +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `base` not allowed on `class` forward declaration, only definition [ModifierOnlyAllowedOnDefinition] // CHECK:STDERR: base class BaseDecl; // CHECK:STDERR: ^~~~ // CHECK:STDERR: base class BaseDecl; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error(ModifierRepeated): `abstract` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `abstract` repeated on declaration [ModifierRepeated] // CHECK:STDERR: abstract abstract class TwoAbstract { } // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract abstract class TwoAbstract { } // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract abstract class TwoAbstract { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+15]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+15]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:11: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `class` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:11: error: `virtual` not allowed on `class` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:19: error(ModifierNotAllowedWith): `base` not allowed on declaration with `virtual` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:19: error: `base` not allowed on declaration with `virtual` [ModifierNotAllowedWith] // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:11: note(ModifierPrevious): `virtual` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:11: note: `virtual` previously appeared here [ModifierPrevious] // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: protected virtual base class Virtual {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error(ModifierMustAppearBefore): `protected` must appear before `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `protected` must appear before `abstract` [ModifierMustAppearBefore] // CHECK:STDERR: abstract protected class WrongOrder { } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract protected class WrongOrder { } // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract protected class WrongOrder { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error(ModifierNotAllowedWith): `base` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `base` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: abstract base class AbstractAndBase {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract base class AbstractAndBase {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract base class AbstractAndBase {} abstract class AbstractWithDefinition { - // CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:19: error(DefinedAbstractFunction): definition of `abstract` function + // CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:19: error: definition of `abstract` function [DefinedAbstractFunction] // CHECK:STDERR: abstract fn F() {} // CHECK:STDERR: ^ // CHECK:STDERR: abstract fn F() {} abstract fn G(); } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:31: error(DefinedAbstractFunction): definition of `abstract` function +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:31: error: definition of `abstract` function [DefinedAbstractFunction] // CHECK:STDERR: fn AbstractWithDefinition.G() { // CHECK:STDERR: ^ fn AbstractWithDefinition.G() { diff --git a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon index 2823844bac2b..80e64a4cd232 100644 --- a/toolchain/check/testdata/class/fail_out_of_line_decl.carbon +++ b/toolchain/check/testdata/class/fail_out_of_line_decl.carbon @@ -10,7 +10,7 @@ class C {} -// CHECK:STDERR: fail_out_of_line_decl.carbon:[[@LINE+3]]:6: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity +// CHECK:STDERR: fail_out_of_line_decl.carbon:[[@LINE+3]]:6: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity] // CHECK:STDERR: fn C.F() {} // CHECK:STDERR: ^ fn C.F() {} diff --git a/toolchain/check/testdata/class/fail_redeclaration_scope.carbon b/toolchain/check/testdata/class/fail_redeclaration_scope.carbon index f06dad93b9e0..eefc699a9ddd 100644 --- a/toolchain/check/testdata/class/fail_redeclaration_scope.carbon +++ b/toolchain/check/testdata/class/fail_redeclaration_scope.carbon @@ -19,7 +19,7 @@ class X { class A { class B; } class Y { - // CHECK:STDERR: fail_redeclaration_scope.carbon:[[@LINE+3]]:9: error(NameNotFound): name `A` not found + // CHECK:STDERR: fail_redeclaration_scope.carbon:[[@LINE+3]]:9: error: name `A` not found [NameNotFound] // CHECK:STDERR: class A.B {} // CHECK:STDERR: ^ class A.B {} diff --git a/toolchain/check/testdata/class/fail_redefinition.carbon b/toolchain/check/testdata/class/fail_redefinition.carbon index a97fd0afd19f..29647e15b2e0 100644 --- a/toolchain/check/testdata/class/fail_redefinition.carbon +++ b/toolchain/check/testdata/class/fail_redefinition.carbon @@ -14,10 +14,10 @@ class Class { fn I() {} } -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `class Class` +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+7]]:1: error: redefinition of `class Class` [RedeclRedef] // CHECK:STDERR: class Class { // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-9]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-9]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: class Class { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -28,16 +28,16 @@ class Class { } fn Class.F() {} -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+4]]:10: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+4]]:10: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity] // CHECK:STDERR: fn Class.G() {} // CHECK:STDERR: ^ // CHECK:STDERR: fn Class.G() {} fn Class.H() {} -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error(RedeclRedef): redefinition of `fn I` +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error: redefinition of `fn I` [RedeclRedef] // CHECK:STDERR: fn Class.I() {} // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-26]]:3: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-26]]:3: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn I() {} // CHECK:STDERR: ^~~~~~~~ fn Class.I() {} diff --git a/toolchain/check/testdata/class/fail_scope.carbon b/toolchain/check/testdata/class/fail_scope.carbon index 3367056659f6..782a5ad24a1a 100644 --- a/toolchain/check/testdata/class/fail_scope.carbon +++ b/toolchain/check/testdata/class/fail_scope.carbon @@ -15,7 +15,7 @@ class Class { } fn G() -> i32 { - // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error(NameNotFound): name `F` not found + // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error: name `F` not found [NameNotFound] // CHECK:STDERR: return F(); // CHECK:STDERR: ^ return F(); diff --git a/toolchain/check/testdata/class/fail_self.carbon b/toolchain/check/testdata/class/fail_self.carbon index be471276d24a..c4661cb4347a 100644 --- a/toolchain/check/testdata/class/fail_self.carbon +++ b/toolchain/check/testdata/class/fail_self.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_self.carbon class Class { - // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:8: error(SelfOutsideImplicitParamList): `self` can only be declared in an implicit parameter list + // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:8: error: `self` can only be declared in an implicit parameter list [SelfOutsideImplicitParamList] // CHECK:STDERR: fn F(self: Self); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -18,7 +18,7 @@ class Class { fn G() -> Self; } -// CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:12: error(SelfOutsideImplicitParamList): `self` can only be declared in an implicit parameter list +// CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:12: error: `self` can only be declared in an implicit parameter list [SelfOutsideImplicitParamList] // CHECK:STDERR: fn Class.F(self: Self) { // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -26,12 +26,12 @@ fn Class.F(self: Self) { } fn Class.G() -> Self { - // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:7: error(SelfOutsideImplicitParamList): `self` can only be declared in an implicit parameter list + // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:7: error: `self` can only be declared in an implicit parameter list [SelfOutsideImplicitParamList] // CHECK:STDERR: var self: Self; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: var self: Self; - // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: error(CopyOfUncopyableType): cannot copy value of type `Class` + // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: error: cannot copy value of type `Class` [CopyOfUncopyableType] // CHECK:STDERR: return self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -43,13 +43,13 @@ class WrongSelf { } fn CallWrongSelf(ws: WrongSelf) { - // CHECK:STDERR: fail_self.carbon:[[@LINE+9]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `WrongSelf` to `Class` + // CHECK:STDERR: fail_self.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `WrongSelf` to `Class` [ImplicitAsConversionFailure] // CHECK:STDERR: ws.F(); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_self.carbon:[[@LINE+6]]:3: note(MissingImplInMemberAccessNote): type `WrongSelf` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_self.carbon:[[@LINE+6]]:3: note: type `WrongSelf` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: ws.F(); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_self.carbon:[[@LINE-10]]:8: note(InCallToFunctionSelf): initializing `self` parameter of method declared here + // CHECK:STDERR: fail_self.carbon:[[@LINE-10]]:8: note: initializing `self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn F[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~ ws.F(); diff --git a/toolchain/check/testdata/class/fail_self_param.carbon b/toolchain/check/testdata/class/fail_self_param.carbon index 6e930f302bd8..0a5423f0b6fa 100644 --- a/toolchain/check/testdata/class/fail_self_param.carbon +++ b/toolchain/check/testdata/class/fail_self_param.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/fail_self_param.carbon -// CHECK:STDERR: fail_self_param.carbon:[[@LINE+3]]:9: error(SelfParameterNotAllowed): `self` parameter only allowed on functions +// CHECK:STDERR: fail_self_param.carbon:[[@LINE+3]]:9: error: `self` parameter only allowed on functions [SelfParameterNotAllowed] // CHECK:STDERR: class C[self:! type](x:! self) {} // CHECK:STDERR: ^~~~~~~~~~~ class C[self:! type](x:! self) {} diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index 15d183b5b85b..1af5e8683a5f 100644 --- a/toolchain/check/testdata/class/fail_self_type_member.carbon +++ b/toolchain/check/testdata/class/fail_self_type_member.carbon @@ -14,11 +14,11 @@ class Class { fn F() -> bool { var c1: Class = {.b = true}; - // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+7]]:17: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+7]]:17: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var c2: Class.Self = c1; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+3]]:17: error(SemanticsTodo): semantics TODO: `Error recovery from keyword name.` + // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+3]]:17: error: semantics TODO: `Error recovery from keyword name.` [SemanticsTodo] // CHECK:STDERR: var c2: Class.Self = c1; // CHECK:STDERR: ^~~~ var c2: Class.Self = c1; diff --git a/toolchain/check/testdata/class/fail_todo_local_class.carbon b/toolchain/check/testdata/class/fail_todo_local_class.carbon index 8e9755a4da82..3f578f3fcc0f 100644 --- a/toolchain/check/testdata/class/fail_todo_local_class.carbon +++ b/toolchain/check/testdata/class/fail_todo_local_class.carbon @@ -11,11 +11,11 @@ // TODO: Support parsing classes at function scope. class A { fn F() { - // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+7]]:5: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+7]]:5: error: expected expression [ExpectedExpr] // CHECK:STDERR: class B { // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+3]]:5: error(SemanticsTodo): semantics TODO: `HandleInvalidParse` + // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+3]]:5: error: semantics TODO: `HandleInvalidParse` [SemanticsTodo] // CHECK:STDERR: class B { // CHECK:STDERR: ^~~~~ class B { diff --git a/toolchain/check/testdata/class/fail_unbound_field.carbon b/toolchain/check/testdata/class/fail_unbound_field.carbon index fdc93059256b..2d708358e7a4 100644 --- a/toolchain/check/testdata/class/fail_unbound_field.carbon +++ b/toolchain/check/testdata/class/fail_unbound_field.carbon @@ -11,7 +11,7 @@ class Class { var field: i32; fn F() -> i32 { - // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+4]]:12: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+4]]:12: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: return field; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -20,7 +20,7 @@ class Class { } fn G() -> i32 { - // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+3]]:10: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+3]]:10: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: return Class.field; // CHECK:STDERR: ^~~~~~~~~~~ return Class.field; diff --git a/toolchain/check/testdata/class/fail_unknown_member.carbon b/toolchain/check/testdata/class/fail_unknown_member.carbon index a702cb635f88..614bf29be26c 100644 --- a/toolchain/check/testdata/class/fail_unknown_member.carbon +++ b/toolchain/check/testdata/class/fail_unknown_member.carbon @@ -14,7 +14,7 @@ class Class { fn G(c: Class) -> i32 { // TODO: Mention the scope in which we looked for the name. - // CHECK:STDERR: fail_unknown_member.carbon:[[@LINE+3]]:10: error(NameNotFound): name `something` not found + // CHECK:STDERR: fail_unknown_member.carbon:[[@LINE+3]]:10: error: name `something` not found [NameNotFound] // CHECK:STDERR: return c.something; // CHECK:STDERR: ^~~~~~~~~~~ return c.something; diff --git a/toolchain/check/testdata/class/generic/call.carbon b/toolchain/check/testdata/class/generic/call.carbon index dddc21d27040..d4cfd309cadf 100644 --- a/toolchain/check/testdata/class/generic/call.carbon +++ b/toolchain/check/testdata/class/generic/call.carbon @@ -25,10 +25,10 @@ library "[[@TEST_NAME]]"; class Class(T:! type, N:! i32) {} -// CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error(CallArgCountMismatch): 1 argument passed to generic class expecting 2 arguments +// CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error: 1 argument passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note(InCallToEntity): calling generic class declared here +// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -40,10 +40,10 @@ library "[[@TEST_NAME]]"; class Class(T:! type, N:! i32) {} -// CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error(CallArgCountMismatch): 3 arguments passed to generic class expecting 2 arguments +// CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error: 3 arguments passed to generic class expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: var a: Class(i32*, 1, 2); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note(InCallToEntity): calling generic class declared here +// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note: calling generic class declared here [InCallToEntity] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -55,13 +55,13 @@ library "[[@TEST_NAME]]"; class Class(T:! type, N:! i32) {} -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+9]]:8: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+9]]:8: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: class Class(T:! type, N:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var a: Class(5, i32*); diff --git a/toolchain/check/testdata/class/generic/import.carbon b/toolchain/check/testdata/class/generic/import.carbon index fead98dca450..cd6c41958113 100644 --- a/toolchain/check/testdata/class/generic/import.carbon +++ b/toolchain/check/testdata/class/generic/import.carbon @@ -55,10 +55,10 @@ import library "foo"; fn Use() { // TODO: Include the generic arguments in the formatted type name. - // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+7]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `CompleteClass` to `CompleteClass` + // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `CompleteClass` to `CompleteClass` [ImplicitAsConversionFailure] // CHECK:STDERR: var v: CompleteClass(i32*) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note(MissingImplInMemberAccessNote): type `CompleteClass` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: note: type `CompleteClass` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var v: CompleteClass(i32*) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -69,16 +69,16 @@ fn Use() { impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+8]]:13: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+8]]:13: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: class Class(U:! type) { // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: foo.carbon:4:13: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: foo.carbon:4:13: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class Class(T:! type); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: class Class(U:! type) { - // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: error(NameNotFound): name `T` not found + // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: error: name `T` not found [NameNotFound] // CHECK:STDERR: var x: T; // CHECK:STDERR: ^ var x: T; diff --git a/toolchain/check/testdata/class/generic/member_access.carbon b/toolchain/check/testdata/class/generic/member_access.carbon index d806791f87d2..b6823663b1f2 100644 --- a/toolchain/check/testdata/class/generic/member_access.carbon +++ b/toolchain/check/testdata/class/generic/member_access.carbon @@ -39,10 +39,10 @@ class Class(T:! type) { } fn StaticMemberFunctionCall(T:! type) -> Class(T) { - // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `Class` to `Class` + // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `Class` to `Class` [ImplicitAsConversionFailure] // CHECK:STDERR: return Class(T).Make(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `Class` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+3]]:3: note: type `Class` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return Class(T).Make(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ return Class(T).Make(); diff --git a/toolchain/check/testdata/class/generic/member_inline.carbon b/toolchain/check/testdata/class/generic/member_inline.carbon index cc0a0886141c..755ed32edb52 100644 --- a/toolchain/check/testdata/class/generic/member_inline.carbon +++ b/toolchain/check/testdata/class/generic/member_inline.carbon @@ -30,7 +30,7 @@ library "fail_member_inline.carbon"; class C(T:! type) { fn F() { - // CHECK:STDERR: fail_member_inline.carbon:[[@LINE+3]]:5: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_member_inline.carbon:[[@LINE+3]]:5: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: data; // CHECK:STDERR: ^~~~ data; diff --git a/toolchain/check/testdata/class/generic/member_out_of_line.carbon b/toolchain/check/testdata/class/generic/member_out_of_line.carbon index 6fce3bd7b46b..15278494ccc5 100644 --- a/toolchain/check/testdata/class/generic/member_out_of_line.carbon +++ b/toolchain/check/testdata/class/generic/member_out_of_line.carbon @@ -46,10 +46,10 @@ class NotGeneric { fn F(); } -// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE+7]]:4: error(RedeclParamListDiffers): redeclaration differs because of parameter list +// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter list [RedeclParamListDiffers] // CHECK:STDERR: fn NotGeneric(T:! type).F() {} // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE-7]]:1: note(RedeclParamListPrevious): previously declared without parameter list +// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE-7]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: class NotGeneric { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -63,10 +63,10 @@ class Generic(T:! type) { fn TooFew(); } -// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE+7]]:4: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 0 +// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter count of 0 [RedeclParamCountDiffers] // CHECK:STDERR: fn Generic().TooFew() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE-7]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 1 +// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE-7]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] // CHECK:STDERR: class Generic(T:! type) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -80,10 +80,10 @@ class Generic(T:! type) { fn TooMany(); } -// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE+7]]:4: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 2 +// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE+7]]:4: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers] // CHECK:STDERR: fn Generic(T:! type, U:! type).TooMany() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE-7]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 1 +// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE-7]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] // CHECK:STDERR: class Generic(T:! type) { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -97,10 +97,10 @@ class Generic(T:! type) { fn WrongType(); } -// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+6]]:12: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+6]]:12: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn Generic(T:! ()).WrongType() {} // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:15: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class Generic(T:! type) { // CHECK:STDERR: ^~~~~~~~ fn Generic(T:! ()).WrongType() {} diff --git a/toolchain/check/testdata/class/generic/redeclare.carbon b/toolchain/check/testdata/class/generic/redeclare.carbon index 402a6fb0f54e..21181bdf5298 100644 --- a/toolchain/check/testdata/class/generic/redeclare.carbon +++ b/toolchain/check/testdata/class/generic/redeclare.carbon @@ -22,10 +22,10 @@ class Generic(T:! type) { library "[[@TEST_NAME]]"; class A; -// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of parameter list +// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers] // CHECK:STDERR: class A(T:! type) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared without parameter list +// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: class A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -36,10 +36,10 @@ class A(T:! type) {} library "[[@TEST_NAME]]"; class B(N:! i32); -// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of implicit parameter list +// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers] // CHECK:STDERR: class B[T:! type](N:! T) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared without implicit parameter list +// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: note: previously declared without implicit parameter list [RedeclParamListPrevious] // CHECK:STDERR: class B(N:! i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -50,10 +50,10 @@ class B[T:! type](N:! T) {} library "[[@TEST_NAME]]"; class C(T:! type); -// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE+7]]:1: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 2 +// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 2 [RedeclParamCountDiffers] // CHECK:STDERR: class C(T:! type, U:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 1 +// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] // CHECK:STDERR: class C(T:! type); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -64,10 +64,10 @@ class C(T:! type, U:! i32) {} library "[[@TEST_NAME]]"; class D(T:! type); -// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: class D(T:! i32) {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class D(T:! type); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -78,10 +78,10 @@ class D(T:! i32) {} library "[[@TEST_NAME]]"; class E(T:! type); -// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+6]]:9: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+6]]:9: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: class E(U:! type) {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class E(T:! type); // CHECK:STDERR: ^~~~~~~~ class E(U:! type) {} diff --git a/toolchain/check/testdata/class/inheritance_access.carbon b/toolchain/check/testdata/class/inheritance_access.carbon index 066384d217d0..8a33d0cbdb5d 100644 --- a/toolchain/check/testdata/class/inheritance_access.carbon +++ b/toolchain/check/testdata/class/inheritance_access.carbon @@ -79,10 +79,10 @@ class Square { extend base: Shape; fn GetPosition[self: Self]() -> i32 { - // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE+7]]:12: error(ClassInvalidMemberAccess): cannot access private member `y` of type `Shape` + // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE+7]]:12: error: cannot access private member `y` of type `Shape` [ClassInvalidMemberAccess] // CHECK:STDERR: return self.y; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE-10]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE-10]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private var y: i32; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -118,10 +118,10 @@ base class B { class C { extend base: B; - // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE+7]]:12: error(ClassInvalidMemberAccess): cannot access private member `F` of type `B` + // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE+7]]:12: error: cannot access private member `F` of type `B` [ClassInvalidMemberAccess] // CHECK:STDERR: fn G() { Self.F(); } // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE-8]]:3: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE-8]]:3: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -158,19 +158,19 @@ class B { private var internal: Internal; fn G() -> i32 { - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:5: error(ClassInvalidMemberAccess): cannot access private member `SOME_PRIVATE_CONSTANT` of type `A` + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:5: error: cannot access private member `SOME_PRIVATE_CONSTANT` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: A.SOME_PRIVATE_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-14]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-14]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private let SOME_PRIVATE_CONSTANT: i32 = 5; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: A.SOME_PRIVATE_CONSTANT; - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:12: error(ClassInvalidMemberAccess): cannot access protected member `SOME_PROTECTED_CONSTANT` of type `A` + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:12: error: cannot access protected member `SOME_PROTECTED_CONSTANT` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: return A.SOME_PROTECTED_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-24]]:17: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-24]]:17: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: protected let SOME_PROTECTED_CONSTANT: i32 = 5; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -178,10 +178,10 @@ class B { } fn SomeFunc[self: Self]() -> i32{ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:12: error(ClassInvalidMemberAccess): cannot access protected member `INTERNAL_CONSTANT` of type `Internal` + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE+7]]:12: error: cannot access protected member `INTERNAL_CONSTANT` of type `Internal` [ClassInvalidMemberAccess] // CHECK:STDERR: return self.internal.INTERNAL_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-30]]:17: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-30]]:17: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: protected let INTERNAL_CONSTANT: i32 = 5; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -200,10 +200,10 @@ base class A { class B { extend base: A; fn F[self: Self]() { - // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE+6]]:11: error(ClassInvalidMemberAccess): cannot access private member `x` of type `A` + // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE+6]]:11: error: cannot access private member `x` of type `A` [ClassInvalidMemberAccess] // CHECK:STDERR: self.(A.x); // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE-9]]:15: note(ClassMemberDeclaration): declared here + // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE-9]]:15: note: declared here [ClassMemberDeclaration] // CHECK:STDERR: private var x: i32; // CHECK:STDERR: ^~~~~~ self.(A.x); diff --git a/toolchain/check/testdata/class/init_adapt.carbon b/toolchain/check/testdata/class/init_adapt.carbon index 1b471a524a7c..bbefffe79362 100644 --- a/toolchain/check/testdata/class/init_adapt.carbon +++ b/toolchain/check/testdata/class/init_adapt.carbon @@ -52,19 +52,19 @@ let a: C = {.a = 1, .b = 2}; // Cannot implicitly convert between a type and an adapter for the type. -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `C` to `AdaptC` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `C` to `AdaptC` [ImplicitAsConversionFailure] // CHECK:STDERR: let b: AdaptC = a; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note(MissingImplInMemberAccessNote): type `C` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `C` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: let b: AdaptC = a; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let b: AdaptC = a; -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `AdaptC` to `C` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `AdaptC` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: let c: C = b; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note(MissingImplInMemberAccessNote): type `` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: let c: C = b; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -74,19 +74,19 @@ fn MakeC() -> C; fn MakeAdaptC() -> AdaptC; -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `C` to `AdaptC` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `C` to `AdaptC` [ImplicitAsConversionFailure] // CHECK:STDERR: var d: AdaptC = MakeC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note(MissingImplInMemberAccessNote): type `C` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: note: type `C` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var d: AdaptC = MakeC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var d: AdaptC = MakeC(); -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+6]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `AdaptC` to `C` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `AdaptC` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: var e: C = MakeAdaptC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+3]]:1: note(MissingImplInMemberAccessNote): type `AdaptC` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+3]]:1: note: type `AdaptC` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var e: C = MakeAdaptC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ var e: C = MakeAdaptC(); diff --git a/toolchain/check/testdata/class/no_prelude/extern.carbon b/toolchain/check/testdata/class/no_prelude/extern.carbon index 66a6bb0f2db9..891ae2115c2f 100644 --- a/toolchain/check/testdata/class/no_prelude/extern.carbon +++ b/toolchain/check/testdata/class/no_prelude/extern.carbon @@ -45,10 +45,10 @@ class C {} library "[[@TEST_NAME]]"; extern class C; -// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE+7]]:4: error(QualifiedDeclInIncompleteClassScope): cannot declare a member of incomplete class `C` +// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE+7]]:4: error: cannot declare a member of incomplete class `C` [QualifiedDeclInIncompleteClassScope] // CHECK:STDERR: fn C.F(); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE-4]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE-4]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -65,10 +65,10 @@ extern class C {} library "[[@TEST_NAME]]"; extern class C; -// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `class C` is redundant +// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE+7]]:1: error: redeclaration of `class C` is redundant [RedeclRedundant] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -79,10 +79,10 @@ extern class C; library "[[@TEST_NAME]]"; extern class C; -// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `class C` is redundant +// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE+7]]:1: error: redeclaration of `class C` is redundant [RedeclRedundant] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -93,7 +93,7 @@ class C; library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_extern_member_class.carbon:[[@LINE+4]]:3: error(ModifierExternNotAllowed): `extern` not allowed; requires file or namespace scope + // CHECK:STDERR: fail_extern_member_class.carbon:[[@LINE+4]]:3: error: `extern` not allowed; requires file or namespace scope [ModifierExternNotAllowed] // CHECK:STDERR: extern class D; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -105,10 +105,10 @@ class C { library "[[@TEST_NAME]]"; extern class C; -// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `class C` must match use of `extern` +// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE+7]]:1: error: redeclarations of `class C` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -119,10 +119,10 @@ class C {} library "[[@TEST_NAME]]"; class C; -// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `class C` is redundant +// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE+7]]:1: error: redeclaration of `class C` is redundant [RedeclRedundant] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -132,12 +132,12 @@ extern class C; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: decl.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: decl.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -148,12 +148,12 @@ import library "decl"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -164,12 +164,12 @@ import library "extern_decl"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: def.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: def.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -180,21 +180,21 @@ import library "def"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+18]]:1(InImport): in import -// CHECK:STDERR: decl.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+18]]:1: in import [InImport] +// CHECK:STDERR: decl.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+14]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+14]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: def.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: def.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -206,12 +206,12 @@ import library "def"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: extern_decl_copy.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: extern_decl_copy.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -224,11 +224,11 @@ library "[[@TEST_NAME]]"; import library "extern_decl"; -// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `class C` is redundant +// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE+8]]:1: error: redeclaration of `class C` is redundant [RedeclRedundant] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_decl.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_decl.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -240,11 +240,11 @@ library "[[@TEST_NAME]]"; import library "decl"; -// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `class C` must match use of `extern` +// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE+8]]:1: error: redeclarations of `class C` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: decl.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: decl.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -256,11 +256,11 @@ library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `class C` must match use of `extern` +// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE+8]]:1: error: redeclarations of `class C` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: def.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: def.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -272,11 +272,11 @@ library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `class C` must match use of `extern` +// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE+7]]:1: error: redeclarations of `class C` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: def.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: def.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ extern class C; diff --git a/toolchain/check/testdata/class/no_prelude/extern_library.carbon b/toolchain/check/testdata/class/no_prelude/extern_library.carbon index 3f877e0d554b..38b12724e8de 100644 --- a/toolchain/check/testdata/class/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/class/no_prelude/extern_library.carbon @@ -10,7 +10,7 @@ // --- fail_todo.carbon -// CHECK:STDERR: fail_todo.carbon:[[@LINE+3]]:1: error(SemanticsTodo): semantics TODO: `extern library` +// CHECK:STDERR: fail_todo.carbon:[[@LINE+3]]:1: error: semantics TODO: `extern library` [SemanticsTodo] // CHECK:STDERR: extern library "foo" class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ extern library "foo" class C; diff --git a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon index 4a035dcbec14..6dd2a4c2aaa5 100644 --- a/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/class/no_prelude/generic_vs_params.carbon @@ -33,7 +33,7 @@ var e: C(X).GenericAndParams(X) = {}; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:9: error(GenericParamMustBeConstant): parameters of generic types must be constant +// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:9: error: parameters of generic types must be constant [GenericParamMustBeConstant] // CHECK:STDERR: class A[T: type]() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -43,7 +43,7 @@ class A[T: type]() {} library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:9: error(GenericParamMustBeConstant): parameters of generic types must be constant +// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:9: error: parameters of generic types must be constant [GenericParamMustBeConstant] // CHECK:STDERR: class A(T: type) {} // CHECK:STDERR: ^~~~~~~ class A(T: type) {} diff --git a/toolchain/check/testdata/class/no_prelude/implicit_import.carbon b/toolchain/check/testdata/class/no_prelude/implicit_import.carbon index 540ef0c52a84..0715b8025228 100644 --- a/toolchain/check/testdata/class/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/class/no_prelude/implicit_import.carbon @@ -30,11 +30,11 @@ class C {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `class C` is redundant +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+8]]:1: error: redeclaration of `class C` is redundant [RedeclRedundant] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: redecl_after_def.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: redecl_after_def.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -50,11 +50,11 @@ class C {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+8]]:1: error(RedeclRedef): redefinition of `class C` +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+8]]:1: error: redefinition of `class C` [RedeclRedef] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: redef_after_def.carbon:4:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: redef_after_def.carbon:4:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -71,11 +71,11 @@ alias B = C; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class B {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: def_alias.carbon:5:7: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: def_alias.carbon:5:7: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: alias B = C; // CHECK:STDERR: ^ class B {} diff --git a/toolchain/check/testdata/class/no_prelude/import_access.carbon b/toolchain/check/testdata/class/no_prelude/import_access.carbon index 20106a448a1a..2ba626269e14 100644 --- a/toolchain/check/testdata/class/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/class/no_prelude/import_access.carbon @@ -48,7 +48,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:8: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:8: error: name `Def` not found [NameNotFound] // CHECK:STDERR: var c: Def = {}; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -60,7 +60,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:8: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:8: error: name `Def` not found [NameNotFound] // CHECK:STDERR: var c: Test.Def = {}; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -78,7 +78,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward_with_def"; -// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:8: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:8: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: var c: ForwardWithDef = {}; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -90,7 +90,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward_with_def"; -// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:8: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:8: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: var c: Test.ForwardWithDef = {}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -110,7 +110,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward"; -// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: fn F(c: Forward*) {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -122,7 +122,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward"; -// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: fn F(c: Test.Forward*) {} // CHECK:STDERR: ^~~~~~~~~~~~ fn F(c: Test.Forward*) {} diff --git a/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon index 7ed4810b22f1..e8fd9bded336 100644 --- a/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/class/no_prelude/no_definition_in_impl_file.carbon @@ -52,7 +52,7 @@ class C; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -66,7 +66,7 @@ library "[[@TEST_NAME]]"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: class D; // CHECK:STDERR: ^~~~~~~~ class D; diff --git a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon index f50c0b3b0dc1..236f1a389d8e 100644 --- a/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/class/no_prelude/syntactic_merge.carbon @@ -37,10 +37,10 @@ library "[[@TEST_NAME]]"; class C {} class Foo(a:! C); -// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:15: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: class Foo(a:! (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: class Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -80,10 +80,10 @@ class C {} alias D = C; class Foo(a:! C); -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:11: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:11: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: class Foo(b:! D) {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: class Foo(a:! C); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -97,10 +97,10 @@ class C {} alias D = C; class Foo(a:! C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:15: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: class Foo(a:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: class Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -114,10 +114,10 @@ class C {} alias D = C; class Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:15: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: class Foo[a:! D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: class Foo[a:! C](); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -146,14 +146,14 @@ library "[[@TEST_NAME]]"; class C {} class Foo(a:! const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:15: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+11]]:15: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: class Foo(a:! const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: class Foo(a:! const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: class Foo(a:! const C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -169,10 +169,10 @@ base class Base { fn F[addr self: Self*](); } -// CHECK:STDERR: fail_self_type.carbon:[[@LINE+6]]:22: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_self_type.carbon:[[@LINE+6]]:22: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Base.F[addr self: Base*]() { // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_self_type.carbon:[[@LINE-6]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_self_type.carbon:[[@LINE-6]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn F[addr self: Self*](); // CHECK:STDERR: ^~~~ fn Base.F[addr self: Base*]() { diff --git a/toolchain/check/testdata/class/self.carbon b/toolchain/check/testdata/class/self.carbon index b0f525ac0370..0bf3fdc8b007 100644 --- a/toolchain/check/testdata/class/self.carbon +++ b/toolchain/check/testdata/class/self.carbon @@ -32,17 +32,17 @@ fn Class.G[addr self: Self*]() -> i32 { library "[[@TEST_NAME]]"; class Class { - // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+13]]:25: error(IncompleteTypeInConversion): invalid use of incomplete type `Class` + // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+13]]:25: error: invalid use of incomplete type `Class` [IncompleteTypeInConversion] // CHECK:STDERR: fn F[self: Self]() -> self; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE-4]]:1: note(ClassIncompleteWithinDefinition): class is incomplete within its definition + // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE-4]]:1: note: class is incomplete within its definition [ClassIncompleteWithinDefinition] // CHECK:STDERR: class Class { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+6]]:25: error(ImplicitAsConversionFailure): cannot implicitly convert from `Class` to `type` + // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+6]]:25: error: cannot implicitly convert from `Class` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: fn F[self: Self]() -> self; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+3]]:25: note(MissingImplInMemberAccessNote): type `` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_return_self_value.carbon:[[@LINE+3]]:25: note: type `` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn F[self: Self]() -> self; // CHECK:STDERR: ^~~~ fn F[self: Self]() -> self; diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index aed712deb0cb..721896714002 100644 --- a/toolchain/check/testdata/class/syntactic_merge_literal.carbon +++ b/toolchain/check/testdata/class/syntactic_merge_literal.carbon @@ -7,7 +7,7 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/class/syntactic_merge_literal.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/class/syntactic_merge_literal.carbon -// CHECK:STDERR: fail_int_mismatch.carbon: error(DuplicateMainApi): `Main//default` previously provided by `int_match.carbon` +// CHECK:STDERR: fail_int_mismatch.carbon: error: `Main//default` previously provided by `int_match.carbon` [DuplicateMainApi] // CHECK:STDERR: // --- int_match.carbon @@ -20,10 +20,10 @@ class D(b:! C(1_000)) {} class C(a:! i32) {} class D(b:! C(1000)); -// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE+6]]:15: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE+6]]:15: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: class D(b:! C(1_000)) {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:15: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:15: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: class D(b:! C(1000)); // CHECK:STDERR: ^~~~ class D(b:! C(1_000)) {} diff --git a/toolchain/check/testdata/class/virtual_modifiers.carbon b/toolchain/check/testdata/class/virtual_modifiers.carbon index d897fd6fd4dd..90bb99063f73 100644 --- a/toolchain/check/testdata/class/virtual_modifiers.carbon +++ b/toolchain/check/testdata/class/virtual_modifiers.carbon @@ -45,7 +45,7 @@ import Modifiers; fn F() { // TODO: The vptr shouldn't be counted for programmer-facing behavior. - // CHECK:STDERR: fail_todo_init.carbon:[[@LINE+3]]:27: error(StructInitElementCountMismatch): cannot initialize class with 1 field from struct with 0 fields + // CHECK:STDERR: fail_todo_init.carbon:[[@LINE+3]]:27: error: cannot initialize class with 1 field from struct with 0 fields [StructInitElementCountMismatch] // CHECK:STDERR: var v: Modifiers.Base = {}; // CHECK:STDERR: ^~ var v: Modifiers.Base = {}; diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 9ffaa5bdbb2f..426a9b9e2be6 100644 --- a/toolchain/check/testdata/const/collapse.carbon +++ b/toolchain/check/testdata/const/collapse.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/const/collapse.carbon // OK, `const (const i32)` is the same type as `const i32`. -// CHECK:STDERR: collapse.carbon:[[@LINE+3]]:25: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect +// CHECK:STDERR: collapse.carbon:[[@LINE+3]]:25: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: fn F(p: const i32**) -> const (const i32)** { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ fn F(p: const i32**) -> const (const i32)** { diff --git a/toolchain/check/testdata/const/fail_collapse.carbon b/toolchain/check/testdata/const/fail_collapse.carbon index 2db778dbd413..042c8081430c 100644 --- a/toolchain/check/testdata/const/fail_collapse.carbon +++ b/toolchain/check/testdata/const/fail_collapse.carbon @@ -8,15 +8,15 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/const/fail_collapse.carbon -// CHECK:STDERR: fail_collapse.carbon:[[@LINE+4]]:9: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect +// CHECK:STDERR: fail_collapse.carbon:[[@LINE+4]]:9: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: fn G(p: const (const i32)**) -> i32** { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn G(p: const (const i32)**) -> i32** { - // CHECK:STDERR: fail_collapse.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `const i32**` to `i32**` + // CHECK:STDERR: fail_collapse.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `const i32**` to `i32**` [ImplicitAsConversionFailure] // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `const i32**` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:3: note: type `const i32**` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ return p; diff --git a/toolchain/check/testdata/deduce/array.carbon b/toolchain/check/testdata/deduce/array.carbon index d7a468f25f70..85d94f298d43 100644 --- a/toolchain/check/testdata/deduce/array.carbon +++ b/toolchain/check/testdata/deduce/array.carbon @@ -27,7 +27,7 @@ library "[[@TEST_NAME]]"; class C {} -// CHECK:STDERR: fail_todo_bound_only.carbon:[[@LINE+4]]:22: error(SemanticsTodo): semantics TODO: `symbolic array bound` +// CHECK:STDERR: fail_todo_bound_only.carbon:[[@LINE+4]]:22: error: semantics TODO: `symbolic array bound` [SemanticsTodo] // CHECK:STDERR: fn F[N:! i32](a: [C; N]) -> i32 { return N; } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -44,7 +44,7 @@ library "[[@TEST_NAME]]"; class C {} -// CHECK:STDERR: fail_todo_type_and_bound.carbon:[[@LINE+4]]:32: error(SemanticsTodo): semantics TODO: `symbolic array bound` +// CHECK:STDERR: fail_todo_type_and_bound.carbon:[[@LINE+4]]:32: error: semantics TODO: `symbolic array bound` [SemanticsTodo] // CHECK:STDERR: fn F[T:! type, N:! i32](a: [T; N]) -> T; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -66,13 +66,13 @@ fn F[T:! type](a: [T; 2]) -> T { return a[0]; } fn G() -> C { // TODO: We succeed at deducing T here but fail to convert. Is this the right behavior? var a: [C; 3] = ({}, {}, {}); - // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+10]]:12: error(ImplicitAsConversionFailure): cannot implicitly convert from `[C; 3]` to `[C; 2]` + // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+10]]:12: error: cannot implicitly convert from `[C; 3]` to `[C; 2]` [ImplicitAsConversionFailure] // CHECK:STDERR: return F(a); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+7]]:12: note(MissingImplInMemberAccessNote): type `[C; 3]` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE+7]]:12: note: type `[C; 3]` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return F(a); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE-11]]:16: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_bound_mismatch.carbon:[[@LINE-11]]:16: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn F[T:! type](a: [T; 2]) -> T { return a[0]; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -86,7 +86,7 @@ library "[[@TEST_NAME]]"; class C {} class D {} -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:22: error(SemanticsTodo): semantics TODO: `symbolic array bound` +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:22: error: semantics TODO: `symbolic array bound` [SemanticsTodo] // CHECK:STDERR: fn F[N:! i32](a: [C; N]) -> i32 { return N; } // CHECK:STDERR: ^ fn F[N:! i32](a: [C; N]) -> i32 { return N; } diff --git a/toolchain/check/testdata/deduce/int_float.carbon b/toolchain/check/testdata/deduce/int_float.carbon index 60deb00498eb..c88150c0e3cf 100644 --- a/toolchain/check/testdata/deduce/int_float.carbon +++ b/toolchain/check/testdata/deduce/int_float.carbon @@ -25,7 +25,7 @@ fn G(a: i64) -> i32 { library "[[@TEST_NAME]]"; // TODO: This should pass once we accept symbolic widths for Core.Float. -// CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:18: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_todo_float.carbon:[[@LINE+3]]:18: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F[N:! i32](n: Core.Float(N)) -> i32 { // CHECK:STDERR: ^~~~~~~~~~~~~ fn F[N:! i32](n: Core.Float(N)) -> i32 { diff --git a/toolchain/check/testdata/deduce/tuple.carbon b/toolchain/check/testdata/deduce/tuple.carbon index d76213120bf4..c63df9124bbc 100644 --- a/toolchain/check/testdata/deduce/tuple.carbon +++ b/toolchain/check/testdata/deduce/tuple.carbon @@ -43,10 +43,10 @@ class D {} fn F[T:! type](pair: (T, T)) -> T; fn G(pair: (C, D)) -> D { - // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE+6]]:10: error(DeductionInconsistent): inconsistent deductions for value of generic parameter `T` + // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE+6]]:10: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: return F(pair); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F[T:! type](pair: (T, T)) -> T; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return F(pair); diff --git a/toolchain/check/testdata/deduce/type_operator.carbon b/toolchain/check/testdata/deduce/type_operator.carbon index b3429174b463..f6279b62e139 100644 --- a/toolchain/check/testdata/deduce/type_operator.carbon +++ b/toolchain/check/testdata/deduce/type_operator.carbon @@ -53,10 +53,10 @@ class C {} fn F[T:! type](p: const T*) -> T { return F(p); } fn G(p: C*) -> const C { - // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE+6]]:10: error(DeductionIncomplete): cannot deduce value for generic parameter `T` + // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE+6]]:10: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: return F(p); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_const_from_nonconst.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F[T:! type](p: const T*) -> T { return F(p); } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return F(p); diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 72736c690530..31fb134f48e2 100644 --- a/toolchain/check/testdata/eval/fail_aggregate.carbon +++ b/toolchain/check/testdata/eval/fail_aggregate.carbon @@ -10,7 +10,7 @@ // TODO: This creates an array temporary, which we don't yet support evaluating. -// CHECK:STDERR: fail_aggregate.carbon:[[@LINE+3]]:43: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_aggregate.carbon:[[@LINE+3]]:43: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var array_index: [i32; 1] = (0,) as [i32; ((5, 7, 1, 9) as [i32; 4])[2]]; diff --git a/toolchain/check/testdata/eval/fail_symbolic.carbon b/toolchain/check/testdata/eval/fail_symbolic.carbon index c7a416fbeb07..64f41e15a118 100644 --- a/toolchain/check/testdata/eval/fail_symbolic.carbon +++ b/toolchain/check/testdata/eval/fail_symbolic.carbon @@ -10,7 +10,7 @@ // TODO: This should work. fn G(N:! i32) { - // CHECK:STDERR: fail_symbolic.carbon:[[@LINE+3]]:16: error(SemanticsTodo): semantics TODO: `symbolic array bound` + // CHECK:STDERR: fail_symbolic.carbon:[[@LINE+3]]:16: error: semantics TODO: `symbolic array bound` [SemanticsTodo] // CHECK:STDERR: var k: [i32; N]; // CHECK:STDERR: ^ var k: [i32; N]; diff --git a/toolchain/check/testdata/function/builtin/fail_redefined.carbon b/toolchain/check/testdata/function/builtin/fail_redefined.carbon index e1dca895fe80..546f019ce113 100644 --- a/toolchain/check/testdata/function/builtin/fail_redefined.carbon +++ b/toolchain/check/testdata/function/builtin/fail_redefined.carbon @@ -9,30 +9,30 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/fail_redefined.carbon fn A(n: i32, m: i32) -> i32 = "int.sadd"; -// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `fn A` +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `fn A` [RedeclRedef] // CHECK:STDERR: fn A(n: i32, m: i32) -> i32 { return n; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn A(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn A(n: i32, m: i32) -> i32 { return n; } fn B(n: i32, m: i32) -> i32 { return n; } -// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `fn B` +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `fn B` [RedeclRedef] // CHECK:STDERR: fn B(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn B(n: i32, m: i32) -> i32 { return n; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn B(n: i32, m: i32) -> i32 = "int.sadd"; fn C(n: i32, m: i32) -> i32 = "int.sadd"; -// CHECK:STDERR: fail_redefined.carbon:[[@LINE+6]]:1: error(RedeclRedef): redefinition of `fn C` +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+6]]:1: error: redefinition of `fn C` [RedeclRedef] // CHECK:STDERR: fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn C(n: i32, m: i32) -> i32 = "int.sadd"; diff --git a/toolchain/check/testdata/function/builtin/fail_unknown.carbon b/toolchain/check/testdata/function/builtin/fail_unknown.carbon index 7b82f0699845..8d588dfe61a1 100644 --- a/toolchain/check/testdata/function/builtin/fail_unknown.carbon +++ b/toolchain/check/testdata/function/builtin/fail_unknown.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/builtin/fail_unknown.carbon -// CHECK:STDERR: fail_unknown.carbon:[[@LINE+3]]:23: error(UnknownBuiltinFunctionName): unknown builtin function name "unknown.builtin.name" +// CHECK:STDERR: fail_unknown.carbon:[[@LINE+3]]:23: error: unknown builtin function name "unknown.builtin.name" [UnknownBuiltinFunctionName] // CHECK:STDERR: fn UnknownBuiltin() = "unknown.builtin.name"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ fn UnknownBuiltin() = "unknown.builtin.name"; diff --git a/toolchain/check/testdata/function/call/fail_not_callable.carbon b/toolchain/check/testdata/function/call/fail_not_callable.carbon index 799cbe13780c..1613268ec0d0 100644 --- a/toolchain/check/testdata/function/call/fail_not_callable.carbon +++ b/toolchain/check/testdata/function/call/fail_not_callable.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/call/fail_not_callable.carbon fn Run() { - // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:16: error(CallToNonCallable): value of type `String` is not callable + // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:16: error: value of type `String` is not callable [CallToNonCallable] // CHECK:STDERR: var x: i32 = "hello"(); // CHECK:STDERR: ^~~~~~~~ var x: i32 = "hello"(); diff --git a/toolchain/check/testdata/function/call/fail_param_count.carbon b/toolchain/check/testdata/function/call/fail_param_count.carbon index 63ee2deebb1f..bdac85737931 100644 --- a/toolchain/check/testdata/function/call/fail_param_count.carbon +++ b/toolchain/check/testdata/function/call/fail_param_count.carbon @@ -13,52 +13,52 @@ fn Run1(a: i32) {} fn Run2(a: i32, b: i32) {} fn Main() { - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 1 argument passed to function expecting 0 arguments + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 1 argument passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Run0(1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: Run0(1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 2 arguments passed to function expecting 0 arguments + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 arguments passed to function expecting 0 arguments [CallArgCountMismatch] // CHECK:STDERR: Run0(0, 1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: Run0(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 0 arguments passed to function expecting 1 argument + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: Run1(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run1(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 2 arguments passed to function expecting 1 argument + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 arguments passed to function expecting 1 argument [CallArgCountMismatch] // CHECK:STDERR: Run1(0, 1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run1(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error(CallArgCountMismatch): 0 arguments passed to function expecting 2 arguments + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 arguments passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: Run2(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run2(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: error(CallArgCountMismatch): 1 argument passed to function expecting 2 arguments + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: Run2(0); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ Run2(0); diff --git a/toolchain/check/testdata/function/call/fail_param_type.carbon b/toolchain/check/testdata/function/call/fail_param_type.carbon index 145d661c0614..78c2956f57ed 100644 --- a/toolchain/check/testdata/function/call/fail_param_type.carbon +++ b/toolchain/check/testdata/function/call/fail_param_type.carbon @@ -11,13 +11,13 @@ fn G(a: i32) {} fn F() { - // CHECK:STDERR: fail_param_type.carbon:[[@LINE+9]]:5: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` + // CHECK:STDERR: fail_param_type.carbon:[[@LINE+9]]:5: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: G(1.0); // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:5: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:5: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: G(1.0); // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:6: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:6: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn G(a: i32) {} // CHECK:STDERR: ^~~~~~ G(1.0); diff --git a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon index f97cdf702169..2304116b4449 100644 --- a/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon +++ b/toolchain/check/testdata/function/call/fail_return_type_mismatch.carbon @@ -11,10 +11,10 @@ fn Foo() -> f64 { return 1.0; } fn Run() { - // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` + // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: i32 = Foo(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: i32 = Foo(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ var x: i32 = Foo(); diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon index 5b317aa2764d..1a78d7ce6972 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/call/no_prelude/fail_explicit_self_param.carbon -// CHECK:STDERR: fail_explicit_self_param.carbon:[[@LINE+3]]:6: error(SelfOutsideImplicitParamList): `self` can only be declared in an implicit parameter list +// CHECK:STDERR: fail_explicit_self_param.carbon:[[@LINE+3]]:6: error: `self` can only be declared in an implicit parameter list [SelfOutsideImplicitParamList] // CHECK:STDERR: fn F(self: ()); // CHECK:STDERR: ^~~~~~~~ fn F(self: ()); diff --git a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon index cf1465a23f9e..0b5ca7c9f18e 100644 --- a/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon +++ b/toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/call/no_prelude/fail_runtime_implicit_param.carbon -// CHECK:STDERR: fail_runtime_implicit_param.carbon:[[@LINE+3]]:6: error(ImplictParamMustBeConstant): implicit parameters of functions must be constant or `self` +// CHECK:STDERR: fail_runtime_implicit_param.carbon:[[@LINE+3]]:6: error: implicit parameters of functions must be constant or `self` [ImplictParamMustBeConstant] // CHECK:STDERR: fn F[s: ()](); // CHECK:STDERR: ^~~~~ fn F[s: ()](); diff --git a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon index 4e55ce4305e8..e611eefc5da0 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_in_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/fail_param_in_type.carbon -// CHECK:STDERR: fail_param_in_type.carbon:[[@LINE+3]]:23: error(InvalidArrayExpr): array bound is not a constant +// CHECK:STDERR: fail_param_in_type.carbon:[[@LINE+3]]:23: error: array bound is not a constant [InvalidArrayExpr] // CHECK:STDERR: fn F(n: i32, a: [i32; n]*); // CHECK:STDERR: ^ fn F(n: i32, a: [i32; n]*); diff --git a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon index 051ec7c149ce..75b221501bac 100644 --- a/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/fail_param_redecl.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/fail_param_redecl.carbon -// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+6]]:14: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+6]]:14: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn F(n: i32, n: i32); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+3]]:6: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+3]]:6: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn F(n: i32, n: i32); // CHECK:STDERR: ^ fn F(n: i32, n: i32); diff --git a/toolchain/check/testdata/function/declaration/import.carbon b/toolchain/check/testdata/function/declaration/import.carbon index 908cbaca3c1a..54978b6526ed 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -58,47 +58,47 @@ library "[[@TEST_NAME]]"; import library "api"; -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: api.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: extern fn A(); -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn B` must match use of `extern` +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error: redeclarations of `fn B` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-14]]:1(InImport): in import -// CHECK:STDERR: api.carbon:5:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-14]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:5:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extern fn B(b: i32) -> i32; -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn C` must match use of `extern` +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error: redeclarations of `fn C` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-23]]:1(InImport): in import -// CHECK:STDERR: api.carbon:6:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-23]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:6:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32}; -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `fn D` is redundant +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error: redeclaration of `fn D` is redundant [RedeclRedundant] // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-32]]:1(InImport): in import -// CHECK:STDERR: api.carbon:7:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-32]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:7:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: extern fn D(); -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn E` must match use of `extern` +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+8]]:1: error: redeclarations of `fn E` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-41]]:1(InImport): in import -// CHECK:STDERR: api.carbon:10:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-41]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:10:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -132,48 +132,48 @@ var e: () = NS.E(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_merge.carbon:[[@LINE+45]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge.carbon:[[@LINE+45]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "redecl_extern_api" fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+41]]:1(InImport): in import -// CHECK:STDERR: api.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge.carbon:[[@LINE+41]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+36]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:5:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge.carbon:[[@LINE+36]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:5:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "redecl_extern_api" fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+32]]:1(InImport): in import -// CHECK:STDERR: api.carbon:5:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge.carbon:[[@LINE+32]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:5:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+27]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:6:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge.carbon:[[@LINE+27]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:6:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "redecl_extern_api" fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+23]]:1(InImport): in import -// CHECK:STDERR: api.carbon:6:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge.carbon:[[@LINE+23]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:6:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+18]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:7:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge.carbon:[[@LINE+18]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:7:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "redecl_extern_api" fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+14]]:1(InImport): in import -// CHECK:STDERR: api.carbon:7:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge.carbon:[[@LINE+14]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:7:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:10:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:10:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "redecl_extern_api" fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: api.carbon:10:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:10:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -190,48 +190,48 @@ var e: () = NS.E(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+44]]:1(InImport): in import -// CHECK:STDERR: api.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+44]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+40]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+40]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "redecl_extern_api" fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+35]]:1(InImport): in import -// CHECK:STDERR: api.carbon:5:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+35]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:5:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+31]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:5:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+31]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:5:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "redecl_extern_api" fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+26]]:1(InImport): in import -// CHECK:STDERR: api.carbon:6:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+26]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:6:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+22]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:6:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+22]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:6:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "redecl_extern_api" fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+17]]:1(InImport): in import -// CHECK:STDERR: api.carbon:7:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+17]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:7:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+13]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:7:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+13]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:7:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "redecl_extern_api" fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: api.carbon:10:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: api.carbon:10:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: extern_api.carbon:10:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: extern_api.carbon:10:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "redecl_extern_api" fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ import library "extern_api"; diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon index b48f334be449..0861b1373fd2 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern.carbon @@ -25,10 +25,10 @@ var x: () = F(); library "[[@TEST_NAME]]"; extern fn F(); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn F` is redundant +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant [RedeclRedundant] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -39,10 +39,10 @@ extern fn F(); library "[[@TEST_NAME]]"; extern fn F(); -// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn F` is redundant +// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant [RedeclRedundant] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -53,12 +53,12 @@ fn F(); library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+4]]:3: error(ModifierExternNotAllowed): `extern` not allowed; requires file or namespace scope + // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+4]]:3: error: `extern` not allowed; requires file or namespace scope [ModifierExternNotAllowed] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: extern fn F(); - // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+3]]:3: error(ModifierExternNotAllowed): `extern` not allowed; requires file or namespace scope + // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+3]]:3: error: `extern` not allowed; requires file or namespace scope [ModifierExternNotAllowed] // CHECK:STDERR: extern fn G[self: Self](); // CHECK:STDERR: ^~~~~~ extern fn G[self: Self](); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon index 17161f8db170..cfb17c24df2f 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon @@ -28,11 +28,11 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE+8]]:1: error(ExternLibraryIncorrect): declaration in library "extern_library_nonowner" doesn't match `extern library` declaration +// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE+8]]:1: error: declaration in library "extern_library_nonowner" doesn't match `extern library` declaration [ExternLibraryIncorrect] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_library.carbon:4:1: note(ExternLibraryExpected): previously declared with `extern library` here +// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_library.carbon:4:1: note: previously declared with `extern library` here [ExternLibraryExpected] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -44,11 +44,11 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE+8]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_library.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_library.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -60,11 +60,11 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE+8]]:1: error(ExternLibraryIncorrect): declaration in library "extern_library_redecl" doesn't match `extern library` declaration +// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE+8]]:1: error: declaration in library "extern_library_redecl" doesn't match `extern library` declaration [ExternLibraryIncorrect] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_library.carbon:4:1: note(ExternLibraryExpected): previously declared with `extern library` here +// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_library.carbon:4:1: note: previously declared with `extern library` here [ExternLibraryExpected] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -80,12 +80,12 @@ extern library "extern_library_owner" fn F(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: extern_library_copy.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: extern_library_copy.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: extern_library.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: extern_library.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -104,7 +104,7 @@ library "[[@TEST_NAME]]"; import library "extern_library_mismatch" -// CHECK:STDERR: fail_extern_library_mismatch_owner.carbon:[[@LINE+4]]:1: error(ExpectedDeclSemi): `import` declarations must end with a `;` +// CHECK:STDERR: fail_extern_library_mismatch_owner.carbon:[[@LINE+4]]:1: error: `import` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -114,7 +114,7 @@ extern fn F(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_self_library.carbon:[[@LINE+4]]:1: error(ExternLibraryIsCurrentLibrary): `extern library` cannot specify the current library +// CHECK:STDERR: fail_extern_self_library.carbon:[[@LINE+4]]:1: error: `extern library` cannot specify the current library [ExternLibraryIsCurrentLibrary] // CHECK:STDERR: extern library "extern_self_library" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -132,11 +132,11 @@ library "[[@TEST_NAME]]"; import library "extern_of_import"; -// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE+7]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern library "extern_of_import" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_of_import.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_of_import.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ extern library "extern_of_import" fn F(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon index cf467fbcab2c..27b31aa78c5f 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_for_default.carbon @@ -28,11 +28,11 @@ package Foo library "[[@TEST_NAME]]"; import library default; -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+7]]:1: error(ExternLibraryIncorrect): declaration in library "wrong_library" doesn't match `extern library` declaration +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+7]]:1: error: declaration in library "wrong_library" doesn't match `extern library` declaration [ExternLibraryIncorrect] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: default.carbon:4:1: note(ExternLibraryExpected): previously declared with `extern library` here +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: default.carbon:4:1: note: previously declared with `extern library` here [ExternLibraryExpected] // CHECK:STDERR: extern library "expected" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ extern fn F(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon index 25b11c66d6af..12aa108a029f 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library_from_default.carbon @@ -26,11 +26,11 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+7]]:1: error(ExternLibraryIncorrect): declaration in library "wrong_library" doesn't match `extern library` declaration +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+7]]:1: error: declaration in library "wrong_library" doesn't match `extern library` declaration [ExternLibraryIncorrect] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern_library.carbon:4:1: note(ExternLibraryExpected): previously declared with `extern library` here +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern_library.carbon:4:1: note: previously declared with `extern library` here [ExternLibraryExpected] // CHECK:STDERR: extern library default fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ extern fn F(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon index f8c0b9caccc0..c11fd0f15526 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_import_incomplete_return.carbon @@ -21,24 +21,24 @@ fn ReturnDUnused() -> D; fn ReturnDUsed() -> D; fn Call() { - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `C` + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error: function returns incomplete type `C` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: ReturnCUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-12]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-12]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-11]]:18: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-11]]:18: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnCUsed() -> C; // CHECK:STDERR: ^~~~ // CHECK:STDERR: ReturnCUsed(); - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `D` + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error: function returns incomplete type `D` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: ReturnDUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-22]]:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-22]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class D; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-20]]:18: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-20]]:18: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnDUsed() -> D; // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -54,28 +54,28 @@ library "[[@TEST_NAME]]"; import library "incomplete_return"; fn CallFAndGIncomplete() { - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+12]]:3: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `C` + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+12]]:3: error: function returns incomplete type `C` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: ReturnCUnused(); // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-6]]:1(InImport): in import - // CHECK:STDERR: fail_incomplete_return.carbon:4:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-6]]:1: in import [InImport] + // CHECK:STDERR: fail_incomplete_return.carbon:4:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-10]]:1(InImport): in import - // CHECK:STDERR: fail_incomplete_return.carbon:7:20: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-10]]:1: in import [InImport] + // CHECK:STDERR: fail_incomplete_return.carbon:7:20: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnCUnused() -> C; // CHECK:STDERR: ^~~~ // CHECK:STDERR: ReturnCUnused(); - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+11]]:3: error(IncompleteTypeInFunctionReturnType): function returns incomplete type `C` + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+11]]:3: error: function returns incomplete type `C` [IncompleteTypeInFunctionReturnType] // CHECK:STDERR: ReturnCUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-19]]:1(InImport): in import - // CHECK:STDERR: fail_incomplete_return.carbon:4:1: note(ClassForwardDeclaredHere): class was forward declared here + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-19]]:1: in import [InImport] + // CHECK:STDERR: fail_incomplete_return.carbon:4:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-23]]:1(InImport): in import - // CHECK:STDERR: fail_incomplete_return.carbon:8:18: note(IncompleteReturnTypeHere): return type declared here + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-23]]:1: in import [InImport] + // CHECK:STDERR: fail_incomplete_return.carbon:8:18: note: return type declared here [IncompleteReturnTypeHere] // CHECK:STDERR: fn ReturnCUsed() -> C; // CHECK:STDERR: ^~~~ ReturnCUsed(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon index ac5d3be35208..998084dcf004 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon @@ -8,84 +8,84 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/no_prelude/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierRequiresInterface): `default` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierMustAppearBefore): `protected` must appear before `default` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` must appear before `default` [ModifierMustAppearBefore] // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `default` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `default` previously appeared here [ModifierPrevious] // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default protected fn WrongOrder(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierRequiresClass): `virtual` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `virtual` not allowed; requires class scope [ModifierRequiresClass] // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierRepeated): `virtual` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `virtual` repeated on declaration [ModifierRepeated] // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `virtual` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `virtual` previously appeared here [ModifierPrevious] // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierNotAllowedWith): `protected` not allowed on declaration with `private` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` not allowed on declaration with `private` [ModifierNotAllowedWith] // CHECK:STDERR: private protected fn TwoAccess(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `private` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `private` previously appeared here [ModifierPrevious] // CHECK:STDERR: private protected fn TwoAccess(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private protected fn TwoAccess(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierRequiresClass): `abstract` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `abstract` not allowed; requires class scope [ModifierRequiresClass] // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error(ModifierNotAllowedWith): `virtual` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `virtual` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `base` not allowed on `fn` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `base` not allowed on `fn` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: base fn InvalidModifier(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: base fn InvalidModifier(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: error(ModifierRequiresInterface): `default` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:9: error(ModifierNotAllowedWith): `final` not allowed on declaration with `default` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:9: error: `final` not allowed on declaration with `default` [ModifierNotAllowedWith] // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: note(ModifierPrevious): `default` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: note: `default` previously appeared here [ModifierPrevious] // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:15: error(ModifierNotAllowedWith): `virtual` not allowed on declaration with `default` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:15: error: `virtual` not allowed on declaration with `default` [ModifierNotAllowedWith] // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `default` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `default` previously appeared here [ModifierPrevious] // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:8: error(ModifierMustAppearBefore): `private` must appear before `extern` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:8: error: `private` must appear before `extern` [ModifierMustAppearBefore] // CHECK:STDERR: extern private fn ExternOrderAndConflict() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: note(ModifierPrevious): `extern` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: note: `extern` previously appeared here [ModifierPrevious] // CHECK:STDERR: extern private fn ExternOrderAndConflict() {} // CHECK:STDERR: ^~~~~~ extern private fn ExternOrderAndConflict() {} diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon index 4af5eb5a6185..c3f32d0239ff 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon @@ -8,11 +8,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/no_prelude/fail_pattern_in_signature.carbon -// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+7]]:6: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+7]]:6: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn F((a: {}, b: {}), c: {}); // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+3]]:6: error(SemanticsTodo): semantics TODO: `Error recovery from keyword name.` +// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+3]]:6: error: semantics TODO: `Error recovery from keyword name.` [SemanticsTodo] // CHECK:STDERR: fn F((a: {}, b: {}), c: {}); // CHECK:STDERR: ^ fn F((a: {}, b: {}), c: {}); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon index 548e6832ca97..a400f8301642 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon @@ -9,50 +9,50 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/declaration/no_prelude/fail_redecl.carbon fn A(); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn A` is redundant +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn A` is redundant [RedeclRedundant] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn A(); fn B(x: ()); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn B` is redundant +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn B` is redundant [RedeclRedundant] // CHECK:STDERR: fn B(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn B(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn B(x: ()); fn C(); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 1 +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 1 [RedeclParamCountDiffers] // CHECK:STDERR: fn C(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 0 +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 0 [RedeclParamCountPrevious] // CHECK:STDERR: fn C(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn C(x: ()); fn D() {} -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn D` is redundant +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn D` is redundant [RedeclRedundant] // CHECK:STDERR: fn D(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn D() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn D(); fn E() {} -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+6]]:1: error(RedeclRedef): redefinition of `fn E` +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+6]]:1: error: redefinition of `fn E` [RedeclRedef] // CHECK:STDERR: fn E() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn E() {} // CHECK:STDERR: ^~~~~~~~ fn E() {} diff --git a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon index d17ea5562d2e..4376d205c240 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/fail_todo_no_params.carbon @@ -11,7 +11,7 @@ // --- fail_no_body.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_no_body.carbon:[[@LINE+4]]:1: error(SemanticsTodo): semantics TODO: `function with positional parameters` +// CHECK:STDERR: fail_no_body.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` [SemanticsTodo] // CHECK:STDERR: fn A; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -20,7 +20,7 @@ fn A; // --- fail_todo_brace_body.carbon library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_brace_body.carbon:[[@LINE+4]]:1: error(SemanticsTodo): semantics TODO: `function with positional parameters` +// CHECK:STDERR: fail_todo_brace_body.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` [SemanticsTodo] // CHECK:STDERR: fn A { // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -31,11 +31,11 @@ fn A { // TODO: We don't have parsing support for this yet. library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_arrow_body.carbon:[[@LINE+7]]:1: error(SemanticsTodo): semantics TODO: `function with positional parameters` +// CHECK:STDERR: fail_todo_arrow_body.carbon:[[@LINE+7]]:1: error: semantics TODO: `function with positional parameters` [SemanticsTodo] // CHECK:STDERR: fn A => 0; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_arrow_body.carbon:[[@LINE+3]]:6: error(ExpectedDeclSemiOrDefinition): `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_todo_arrow_body.carbon:[[@LINE+3]]:6: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: fn A => 0; // CHECK:STDERR: ^~ fn A => 0; diff --git a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon index 426530d2e2ab..3900e4402496 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon @@ -30,15 +30,15 @@ extern fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+12]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+12]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: extern_api.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: extern_api.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+4]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+4]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -54,11 +54,11 @@ fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+7]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: extern_impl.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: extern_impl.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ extern fn A(); diff --git a/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon index d9815d6b8663..681a26db906c 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/no_definition_in_impl_file.carbon @@ -52,7 +52,7 @@ fn C(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: fn C(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -66,7 +66,7 @@ library "[[@TEST_NAME]]"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: fn D(); // CHECK:STDERR: ^~~~~~~ fn D(); diff --git a/toolchain/check/testdata/function/definition/import.carbon b/toolchain/check/testdata/function/definition/import.carbon index 1b1d6fee16c8..07ec49e2a5b7 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -47,20 +47,20 @@ library "[[@TEST_NAME]]"; import library "fns"; -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `fn A` is redundant +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+8]]:1: error: redeclaration of `fn A` is redundant [RedeclRedundant] // CHECK:STDERR: fn A() {}; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: fns.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: fns.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn A() {}; -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `fn B` is redundant +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+8]]:1: error: redeclaration of `fn B` is redundant [RedeclRedundant] // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-14]]:1(InImport): in import -// CHECK:STDERR: fns.carbon:5:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-14]]:1: in import [InImport] +// CHECK:STDERR: fns.carbon:5:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn B(b: i32) -> i32 { return b; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -72,21 +72,21 @@ library "[[@TEST_NAME]]"; import library "extern"; -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+8]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: extern.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: extern.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn A(); -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+8]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-15]]:1(InImport): in import -// CHECK:STDERR: extern.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-15]]:1: in import [InImport] +// CHECK:STDERR: extern.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -98,11 +98,11 @@ library "[[@TEST_NAME]]"; import library "fns"; -// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn D` must match use of `extern` +// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE+7]]:1: error: redeclarations of `fn D` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: fns.carbon:7:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: fns.carbon:7:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn D(); // CHECK:STDERR: ^~~~~~~ extern fn D(); diff --git a/toolchain/check/testdata/function/definition/import_access.carbon b/toolchain/check/testdata/function/definition/import_access.carbon index 74d8abaae99d..96d945a97979 100644 --- a/toolchain/check/testdata/function/definition/import_access.carbon +++ b/toolchain/check/testdata/function/definition/import_access.carbon @@ -48,7 +48,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:13: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:13: error: name `Def` not found [NameNotFound] // CHECK:STDERR: var f: () = Def(); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -60,7 +60,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:13: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:13: error: name `Def` not found [NameNotFound] // CHECK:STDERR: var f: () = Test.Def(); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -78,7 +78,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward_with_def"; -// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:13: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:13: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: var f: () = ForwardWithDef(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -90,7 +90,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward_with_def"; -// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:13: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:13: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: var f: () = Test.ForwardWithDef(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -110,7 +110,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward"; -// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:13: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:13: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: var f: () = Forward(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -122,7 +122,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward"; -// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:13: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:13: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: var f: () = Test.Forward(); // CHECK:STDERR: ^~~~~~~~~~~~ var f: () = Test.Forward(); diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon index ce0e549c3978..14f7478d9300 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern.carbon @@ -38,10 +38,10 @@ extern fn F() {} library "[[@TEST_NAME]]"; extern fn F(); -// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE+7]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -52,10 +52,10 @@ fn F() {} library "[[@TEST_NAME]]"; fn F(); -// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE+7]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -66,18 +66,18 @@ extern fn F() {} library "[[@TEST_NAME]]"; extern fn F(); -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn F` is redundant +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant [RedeclRedundant] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn F(); -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-12]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-12]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -88,10 +88,10 @@ fn F() {} library "[[@TEST_NAME]]"; fn F() {} -// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE+7]]:1: error(RedeclRedundant): redeclaration of `fn F` is redundant +// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant [RedeclRedundant] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE-4]]:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE-4]]:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -105,7 +105,7 @@ library "[[@TEST_NAME]]"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_in_impl.impl.carbon:[[@LINE+3]]:1: error(ExternRequiresDeclInApiFile): `extern` entities must have a declaration in the API file +// CHECK:STDERR: fail_in_impl.impl.carbon:[[@LINE+3]]:1: error: `extern` entities must have a declaration in the API file [ExternRequiresDeclInApiFile] // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ extern fn F() {} diff --git a/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon b/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon index 4671391ac891..9bc1540fd170 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon @@ -54,11 +54,11 @@ extern fn F(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn F` must match use of `extern` +// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE+8]]:1: error: redeclarations of `fn F` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: two_file_impl_mismatch.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: two_file_impl_mismatch.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -80,7 +80,7 @@ import library "indirect_two_file_extern"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_indirect_two_file.impl.carbon:[[@LINE+4]]:1: error(ExternRequiresDeclInApiFile): `extern` entities must have a declaration in the API file +// CHECK:STDERR: fail_indirect_two_file.impl.carbon:[[@LINE+4]]:1: error: `extern` entities must have a declaration in the API file [ExternRequiresDeclInApiFile] // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -102,7 +102,7 @@ impl library "[[@TEST_NAME]]"; import library "in_impl_extern"; -// CHECK:STDERR: fail_in_impl.impl.carbon:[[@LINE+3]]:1: error(ExternRequiresDeclInApiFile): `extern` entities must have a declaration in the API file +// CHECK:STDERR: fail_in_impl.impl.carbon:[[@LINE+3]]:1: error: `extern` entities must have a declaration in the API file [ExternRequiresDeclInApiFile] // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ extern fn F() {} diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon index bef15a90da3b..00067a1d7cf8 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon @@ -9,57 +9,57 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/definition/no_prelude/fail_decl_param_mismatch.carbon fn F(); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 1 +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 1 [RedeclParamCountDiffers] // CHECK:STDERR: fn F(x: ()) {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 0 +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 0 [RedeclParamCountPrevious] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn F(x: ()) {} fn G(x: ()); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 0 +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter count of 0 [RedeclParamCountDiffers] // CHECK:STDERR: fn G() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note(RedeclParamCountPrevious): previously declared with parameter count of 1 +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] // CHECK:STDERR: fn G(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn G() {} fn H(x: ()); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+4]]:9: error(CoreNotFound): package `Core` implicitly referenced here, but not found +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+4]]:9: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: fn H(x: bool) {} // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn H(x: bool) {} fn I(); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `()` +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error: function redeclaration differs because return type is `()` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn I() -> () { return (); } // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note(FunctionRedeclReturnTypePreviousNoReturn): previously declared with no return type +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note: previously declared with no return type [FunctionRedeclReturnTypePreviousNoReturn] // CHECK:STDERR: fn I(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn I() -> () { return (); } fn J() -> (); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error(FunctionRedeclReturnTypeDiffersNoReturn): function redeclaration differs because no return type is provided +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: error: function redeclaration differs because no return type is provided [FunctionRedeclReturnTypeDiffersNoReturn] // CHECK:STDERR: fn J() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note(FunctionRedeclReturnTypePrevious): previously declared with return type `()` +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note: previously declared with return type `()` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: fn J() -> (); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fn J() {} fn K() -> (); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+6]]:1: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `{}` +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+6]]:1: error: function redeclaration differs because return type is `{}` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn K() -> {} { return {}; } // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note(FunctionRedeclReturnTypePrevious): previously declared with return type `()` +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: note: previously declared with return type `()` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: fn K() -> (); // CHECK:STDERR: ^~~~~~~~~~~~~ fn K() -> {} { return {}; } diff --git a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon index 052ad95e30a5..89f45e148021 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/definition/no_prelude/fail_redef.carbon fn F() {} -// CHECK:STDERR: fail_redef.carbon:[[@LINE+6]]:1: error(RedeclRedef): redefinition of `fn F` +// CHECK:STDERR: fail_redef.carbon:[[@LINE+6]]:1: error: redefinition of `fn F` [RedeclRedef] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redef.carbon:[[@LINE-4]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redef.carbon:[[@LINE-4]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ fn F() {} diff --git a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon index 991f585a341e..0514be2da9ad 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon @@ -30,11 +30,11 @@ extern fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+8]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: extern_api.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: extern_api.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -50,11 +50,11 @@ fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+8]]:1: error(RedeclExternMismatch): redeclarations of `fn A` must match use of `extern` +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+8]]:1: error: redeclarations of `fn A` must match use of `extern` [RedeclExternMismatch] // CHECK:STDERR: extern fn A() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: extern_impl.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: extern_impl.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -70,11 +70,11 @@ fn A() {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `fn A` is redundant +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+8]]:1: error: redeclaration of `fn A` is redundant [RedeclRedundant] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: redecl_after_def.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: redecl_after_def.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -90,11 +90,11 @@ fn A() {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+8]]:1: error(RedeclRedef): redefinition of `fn A` +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+8]]:1: error: redefinition of `fn A` [RedeclRedef] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: redef_after_def.carbon:4:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: redef_after_def.carbon:4:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -111,11 +111,11 @@ alias B = A; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn B() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: def_alias.carbon:5:7: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: def_alias.carbon:5:7: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: alias B = A; // CHECK:STDERR: ^ fn B() {} diff --git a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon index 7d8fc316cb35..195efd99ca3c 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/syntactic_merge.carbon @@ -37,10 +37,10 @@ library "[[@TEST_NAME]]"; class C {} fn Foo(a: C); -// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:11: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:11: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:11: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -80,10 +80,10 @@ class C {} alias D = C; fn Foo(a: C); -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:8: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:8: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn Foo(b: D) {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:8: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -97,10 +97,10 @@ class C {} alias D = C; fn Foo(a: C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:11: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:11: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:11: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -114,10 +114,10 @@ class C {} alias D = C; fn Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:12: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:12: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo[a:! D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:12: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:12: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo[a:! C](); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -156,14 +156,14 @@ library "[[@TEST_NAME]]"; class C {} fn Foo(a: const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:11: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:11: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:17: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:17: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:17: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:17: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: fn Foo(a: const C); // CHECK:STDERR: ^ fn Foo(a: const (const C)) {} diff --git a/toolchain/check/testdata/function/generic/deduce.carbon b/toolchain/check/testdata/function/generic/deduce.carbon index 32dffa37ece5..5dfe5a74c4bb 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -33,10 +33,10 @@ fn CallExplicitGenericParamConst(T:! type) { } fn CallExplicitGenericParamNonConst(T: type) { - // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE+7]]:3: error(CompTimeArgumentNotConstant): argument for generic parameter is not a compile-time constant + // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE+7]]:3: error: argument for generic parameter is not a compile-time constant [CompTimeArgumentNotConstant] // CHECK:STDERR: ExplicitGenericParam(T); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE-10]]:25: note(InitializingGenericParam): initializing generic parameter `T` declared here + // CHECK:STDERR: fail_deduce_explicit_non_constant.carbon:[[@LINE-10]]:25: note: initializing generic parameter `T` declared here [InitializingGenericParam] // CHECK:STDERR: fn ExplicitGenericParam(T:! type) -> T* { return ExplicitGenericParam(T); } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -84,10 +84,10 @@ library "[[@TEST_NAME]]"; fn StructParam[T:! type](x: {.a: T, .b: i32}) {} fn CallStructParam() { - // CHECK:STDERR: fail_todo_deduce_nested_struct.carbon:[[@LINE+7]]:3: error(DeductionIncomplete): cannot deduce value for generic parameter `T` + // CHECK:STDERR: fail_todo_deduce_nested_struct.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` [DeductionIncomplete] // CHECK:STDERR: StructParam({.a = 1, .b = 2}); // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_deduce_nested_struct.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_todo_deduce_nested_struct.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn StructParam[T:! type](x: {.a: T, .b: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -103,10 +103,10 @@ library "[[@TEST_NAME]]"; fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; fn CallImplicitNotDeducible() { - // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE+7]]:3: error(DeductionIncomplete): cannot deduce value for generic parameter `U` + // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `U` [DeductionIncomplete] // CHECK:STDERR: ImplicitNotDeducible(42); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -120,10 +120,10 @@ library "[[@TEST_NAME]]"; fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; fn CallImplicitNotDeducible() { - // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE+6]]:3: error(DeductionInconsistent): inconsistent deductions for value of generic parameter `T` + // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE+6]]:3: error: inconsistent deductions for value of generic parameter `T` [DeductionInconsistent] // CHECK:STDERR: ImplicitNotDeducible(42, {.x = 12}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn ImplicitNotDeducible[T:! type](x: T, y: T) -> T; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ImplicitNotDeducible(42, {.x = 12}); diff --git a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon index b3372fbdfe36..439422b28271 100644 --- a/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon +++ b/toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/function/generic/fail_todo_param_in_type.carbon -// CHECK:STDERR: fail_todo_param_in_type.carbon:[[@LINE+3]]:24: error(SemanticsTodo): semantics TODO: `symbolic array bound` +// CHECK:STDERR: fail_todo_param_in_type.carbon:[[@LINE+3]]:24: error: semantics TODO: `symbolic array bound` [SemanticsTodo] // CHECK:STDERR: fn F(N:! i32, a: [i32; N]*); // CHECK:STDERR: ^ fn F(N:! i32, a: [i32; N]*); diff --git a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon index 6878a9a908d5..bbf8ff1aaf89 100644 --- a/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon +++ b/toolchain/check/testdata/function/generic/no_prelude/fail_type_param_mismatch.carbon @@ -10,7 +10,7 @@ fn F(T:! type, U:! type) { var p: T*; - // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+3]]:3: error(CoreNotFound): package `Core` implicitly referenced here, but not found + // CHECK:STDERR: fail_type_param_mismatch.carbon:[[@LINE+3]]:3: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: let n: U = *p; // CHECK:STDERR: ^~~~~~~~~~~~~~ let n: U = *p; diff --git a/toolchain/check/testdata/function/generic/redeclare.carbon b/toolchain/check/testdata/function/generic/redeclare.carbon index 571bf2cdea57..7e8b6bad7f9a 100644 --- a/toolchain/check/testdata/function/generic/redeclare.carbon +++ b/toolchain/check/testdata/function/generic/redeclare.carbon @@ -24,18 +24,18 @@ library "[[@TEST_NAME]]"; fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:1: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `U*` +// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:1: error: function redeclaration differs because return type is `U*` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn F(T:! type, U:! type) -> U* { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-5]]:1: note(FunctionRedeclReturnTypePrevious): previously declared with return type `T*` +// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-5]]:1: note: previously declared with return type `T*` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn F(T:! type, U:! type) -> U* { - // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 2 arguments + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -48,18 +48,18 @@ library "[[@TEST_NAME]]"; fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:6: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:6: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F(U:! type, T:! type) -> T* { // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:6: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn F(U:! type, T:! type) -> T* { - // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 2 arguments + // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -72,18 +72,18 @@ library "[[@TEST_NAME]]"; fn F(T:! type, U:! type) -> T*; -// CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:6: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:6: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F(U:! type, T:! type) -> U* { // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:6: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:6: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn F(U:! type, T:! type) -> U* { - // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: error(CallArgCountMismatch): 1 argument passed to function expecting 2 arguments + // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: error: 1 argument passed to function expecting 2 arguments [CallArgCountMismatch] // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: note(InCallToEntity): calling function declared here + // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: note: calling function declared here [InCallToEntity] // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return F(T); diff --git a/toolchain/check/testdata/function/generic/resolve_used.carbon b/toolchain/check/testdata/function/generic/resolve_used.carbon index b4fd7d3a2e9f..b258f8533cb3 100644 --- a/toolchain/check/testdata/function/generic/resolve_used.carbon +++ b/toolchain/check/testdata/function/generic/resolve_used.carbon @@ -17,7 +17,7 @@ fn ErrorIfNIsZero(N:! i32) { // ensuring we produce an error when doing so. Notionally this error is // produced as a result of instantiating the `Core.Int` template, although // that's not how we currently model `Core.Int`. - // CHECK:STDERR: fail_call_monomorphization_error.carbon:[[@LINE+3]]:10: error(IntWidthNotPositive): integer type width of 0 is not positive + // CHECK:STDERR: fail_call_monomorphization_error.carbon:[[@LINE+3]]:10: error: integer type width of 0 is not positive [IntWidthNotPositive] // CHECK:STDERR: var v: Core.Int(N); // CHECK:STDERR: ^~~~~~~~~ var v: Core.Int(N); diff --git a/toolchain/check/testdata/function/generic/undefined.carbon b/toolchain/check/testdata/function/generic/undefined.carbon index 650774f9c69b..d37b9fe31414 100644 --- a/toolchain/check/testdata/function/generic/undefined.carbon +++ b/toolchain/check/testdata/function/generic/undefined.carbon @@ -41,10 +41,10 @@ library "[[@TEST_NAME]]"; fn Undefined[T:! type](x: T) -> T; fn CallUndefined() -> i32 { - // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE+6]]:10: error(MissingGenericFunctionDefinition): use of undefined generic function + // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE+6]]:10: error: use of undefined generic function [MissingGenericFunctionDefinition] // CHECK:STDERR: return Undefined(0); // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE-6]]:1: note(MissingGenericFunctionDefinitionHere): generic function declared here + // CHECK:STDERR: fail_call_undefined.carbon:[[@LINE-6]]:1: note: generic function declared here [MissingGenericFunctionDefinitionHere] // CHECK:STDERR: fn Undefined[T:! type](x: T) -> T; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return Undefined(0); diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index ce41c17660fd..680607c3b9cb 100644 --- a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon +++ b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon @@ -13,7 +13,7 @@ fn If1(b: bool) -> i32 { return 1; } else { } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+4]]:1: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+4]]:1: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -24,7 +24,7 @@ fn If2(b: bool) -> i32 { } else { return 2; } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+4]]:1: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+4]]:1: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -34,7 +34,7 @@ fn If3(b: bool) -> i32 { if (b) { return 1; } -// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_reachable_fallthrough.carbon:[[@LINE+3]]:1: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 20cafe98d714..82e8371f5e59 100644 --- a/toolchain/check/testdata/if/fail_scope.carbon +++ b/toolchain/check/testdata/if/fail_scope.carbon @@ -13,7 +13,7 @@ fn VarScope(b: bool) -> i32 { var n: i32 = 2; return n; } - // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error(NameNotFound): name `n` not found + // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error: name `n` not found [NameNotFound] // CHECK:STDERR: return n; // CHECK:STDERR: ^ return n; diff --git a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon index 9153ee023c0e..85491cb9c0b8 100644 --- a/toolchain/check/testdata/if_expr/fail_not_in_function.carbon +++ b/toolchain/check/testdata/if_expr/fail_not_in_function.carbon @@ -8,30 +8,30 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/if_expr/fail_not_in_function.carbon -// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+12]]:14: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+8]]:14: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+4]]:22: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+4]]:22: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: let x: i32 = if true then 1 else 0; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: let x: i32 = if true then 1 else 0; class C { - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+11]]:10: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` + // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+11]]:10: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var n: if true then i32 else f64; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+7]]:10: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` + // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+7]]:10: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var n: if true then i32 else f64; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+3]]:18: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` + // CHECK:STDERR: fail_not_in_function.carbon:[[@LINE+3]]:18: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var n: if true then i32 else f64; // CHECK:STDERR: ^~~~~~~~ var n: if true then i32 else f64; diff --git a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon index 5e502bbd3027..d8f67eccecec 100644 --- a/toolchain/check/testdata/if_expr/fail_partial_constant.carbon +++ b/toolchain/check/testdata/if_expr/fail_partial_constant.carbon @@ -16,7 +16,7 @@ fn ConditionIsNonConstant(b: bool) { // We choose to not accept this even if both arms evaluate to the same // constant value, because it notionally involves evaluating a non-constant // condition. - // CHECK:STDERR: fail_non_constant_condition.carbon:[[@LINE+4]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_non_constant_condition.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var v: if b then i32 else i32 = 1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -28,12 +28,12 @@ fn ConditionIsNonConstant(b: bool) { package NonConstantResult; fn ChosenBranchIsNonConstant(t: type) { - // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var v: if true then t else i32 = 1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var v: if true then t else i32 = 1; - // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+3]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var w: if false then i32 else t = 1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ var w: if false then i32 else t = 1; diff --git a/toolchain/check/testdata/impl/fail_call_invalid.carbon b/toolchain/check/testdata/impl/fail_call_invalid.carbon index fc7ed4bae542..7e28d6d3114b 100644 --- a/toolchain/check/testdata/impl/fail_call_invalid.carbon +++ b/toolchain/check/testdata/impl/fail_call_invalid.carbon @@ -13,7 +13,7 @@ interface Simple { } impl i32 as Simple { - // CHECK:STDERR: fail_call_invalid.carbon:[[@LINE+3]]:14: error(NameNotFound): name `Undeclared` not found + // CHECK:STDERR: fail_call_invalid.carbon:[[@LINE+3]]:14: error: name `Undeclared` not found [NameNotFound] // CHECK:STDERR: fn G[self: Undeclared](); // CHECK:STDERR: ^~~~~~~~~~ fn G[self: Undeclared](); diff --git a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon index 0bba438f72c1..ff33f7489edf 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_forall.carbon @@ -13,7 +13,7 @@ interface GenericInterface(T:! type) { } class C { - // CHECK:STDERR: fail_extend_impl_forall.carbon:[[@LINE+3]]:3: error(ExtendImplForall): cannot `extend` a parameterized `impl` + // CHECK:STDERR: fail_extend_impl_forall.carbon:[[@LINE+3]]:3: error: cannot `extend` a parameterized `impl` [ExtendImplForall] // CHECK:STDERR: extend impl forall [T:! type] as GenericInterface(T) { // CHECK:STDERR: ^~~~~~ extend impl forall [T:! type] as GenericInterface(T) { diff --git a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon index 453353292f8f..df33c8f631bd 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_scope.carbon @@ -10,7 +10,7 @@ interface I {} -// CHECK:STDERR: fail_extend_impl_scope.carbon:[[@LINE+3]]:1: error(ExtendImplOutsideClass): `extend impl` can only be used in a class +// CHECK:STDERR: fail_extend_impl_scope.carbon:[[@LINE+3]]:1: error: `extend impl` can only be used in a class [ExtendImplOutsideClass] // CHECK:STDERR: extend impl i32 as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ extend impl i32 as I {} diff --git a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon index 3a7774a92b7e..cafc7fb4cde4 100644 --- a/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon +++ b/toolchain/check/testdata/impl/fail_extend_impl_type_as.carbon @@ -11,7 +11,7 @@ interface I {} class C { - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:3: error(ExtendImplSelfAs): cannot `extend` an `impl` with an explicit self type + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:3: error: cannot `extend` an `impl` with an explicit self type [ExtendImplSelfAs] // CHECK:STDERR: extend impl i32 as I {} // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -19,10 +19,10 @@ class C { } class D { - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+7]]:3: error(ExtendImplSelfAs): cannot `extend` an `impl` with an explicit self type + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+7]]:3: error: cannot `extend` an `impl` with an explicit self type [ExtendImplSelfAs] // CHECK:STDERR: extend impl D as I; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:15: note(ExtendImplSelfAsDefault): remove the explicit `Self` type here + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:15: note: remove the explicit `Self` type here [ExtendImplSelfAsDefault] // CHECK:STDERR: extend impl D as I; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -30,10 +30,10 @@ class D { } class E { - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+6]]:3: error(ExtendImplSelfAs): cannot `extend` an `impl` with an explicit self type + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+6]]:3: error: cannot `extend` an `impl` with an explicit self type [ExtendImplSelfAs] // CHECK:STDERR: extend impl Self as I {} // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+3]]:15: note(ExtendImplSelfAsDefault): remove the explicit `Self` type here + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+3]]:15: note: remove the explicit `Self` type here [ExtendImplSelfAsDefault] // CHECK:STDERR: extend impl Self as I {} // CHECK:STDERR: ^~~~ extend impl Self as I {} diff --git a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon index c787d2dea43d..c44e0b814a3e 100644 --- a/toolchain/check/testdata/impl/fail_extend_non_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_non_interface.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_extend_non_interface.carbon class C { - // CHECK:STDERR: fail_extend_non_interface.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `extending non-interface constraint` + // CHECK:STDERR: fail_extend_non_interface.carbon:[[@LINE+3]]:3: error: semantics TODO: `extending non-interface constraint` [SemanticsTodo] // CHECK:STDERR: extend impl as i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ extend impl as i32; diff --git a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon index c52e54067849..6ff9ec5f9787 100644 --- a/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_partially_defined_interface.carbon @@ -10,10 +10,10 @@ interface I { class C { - // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE+6]]:5: error(ExtendUndefinedInterface): `extend impl` requires a definition for interface `I` + // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE+6]]:5: error: `extend impl` requires a definition for interface `I` [ExtendUndefinedInterface] // CHECK:STDERR: extend impl as I; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE-5]]:1: note(InterfaceUndefinedWithinDefinition): interface is currently being defined + // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE-5]]:1: note: interface is currently being defined [InterfaceUndefinedWithinDefinition] // CHECK:STDERR: interface I { // CHECK:STDERR: ^~~~~~~~~~~~~ extend impl as I; diff --git a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon index f797ed43d104..9fbd8770159c 100644 --- a/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon +++ b/toolchain/check/testdata/impl/fail_extend_undefined_interface.carbon @@ -11,10 +11,10 @@ interface I; class C { - // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE+6]]:3: error(ExtendUndefinedInterface): `extend impl` requires a definition for interface `I` + // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE+6]]:3: error: `extend impl` requires a definition for interface `I` [ExtendUndefinedInterface] // CHECK:STDERR: extend impl as I; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE-6]]:1: note(InterfaceForwardDeclaredHere): interface was forward declared here + // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE-6]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere] // CHECK:STDERR: interface I; // CHECK:STDERR: ^~~~~~~~~~~~ extend impl as I; diff --git a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon index 68022bcecc19..47ca6f34f7ec 100644 --- a/toolchain/check/testdata/impl/fail_impl_as_scope.carbon +++ b/toolchain/check/testdata/impl/fail_impl_as_scope.carbon @@ -12,7 +12,7 @@ interface Simple { fn F(); } -// CHECK:STDERR: fail_impl_as_scope.carbon:[[@LINE+3]]:6: error(ImplAsOutsideClass): `impl as` can only be used in a class +// CHECK:STDERR: fail_impl_as_scope.carbon:[[@LINE+3]]:6: error: `impl as` can only be used in a class [ImplAsOutsideClass] // CHECK:STDERR: impl as Simple { // CHECK:STDERR: ^~ impl as Simple { diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon index 60bc7391c239..cd12300587c0 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_const.carbon @@ -10,7 +10,7 @@ interface I { let T:! type; } -// CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE+3]]:1: error(SemanticsTodo): semantics TODO: `impl of interface with associated constant` +// CHECK:STDERR: fail_impl_bad_assoc_const.carbon:[[@LINE+3]]:1: error: semantics TODO: `impl of interface with associated constant` [SemanticsTodo] // CHECK:STDERR: impl bool as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~ impl bool as I {} diff --git a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon index f7e06ad76931..32c79e707588 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_assoc_fn.carbon @@ -11,10 +11,10 @@ interface I { fn F(); } class NoF { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:3: error(ImplMissingFunction): missing implementation of F in impl of interface I + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:3: error: missing implementation of F in impl of interface I [ImplMissingFunction] // CHECK:STDERR: impl as I {} // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-6]]:15: note(ImplAssociatedFunctionHere): associated function F declared here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-6]]:15: note: associated function F declared here [ImplAssociatedFunctionHere] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -23,10 +23,10 @@ class NoF { class FNotFunction { impl as I { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(ImplFunctionWithNonFunction): associated function F implemented by non-function + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: associated function F implemented by non-function [ImplFunctionWithNonFunction] // CHECK:STDERR: class F; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-18]]:15: note(ImplAssociatedFunctionHere): associated function F declared here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-18]]:15: note: associated function F declared here [ImplAssociatedFunctionHere] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -39,10 +39,10 @@ fn PossiblyF(); // TODO: Should this be permitted? class FAlias { impl as I { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:11: error(ImplFunctionWithNonFunction): associated function F implemented by non-function + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:11: error: associated function F implemented by non-function [ImplFunctionWithNonFunction] // CHECK:STDERR: alias F = PossiblyF; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-34]]:15: note(ImplAssociatedFunctionHere): associated function F declared here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-34]]:15: note: associated function F declared here [ImplAssociatedFunctionHere] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -52,10 +52,10 @@ class FAlias { class FExtraParam { impl as I { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of parameter count of 1 [RedeclParamCountDiffers] // CHECK:STDERR: fn F(b: bool); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-47]]:15: note(RedeclParamCountPrevious): previously declared with parameter count of 0 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-47]]:15: note: previously declared with parameter count of 0 [RedeclParamCountPrevious] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -65,10 +65,10 @@ class FExtraParam { class FExtraImplicitParam { impl as I { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(RedeclParamListDiffers): redeclaration differs because of implicit parameter list + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of implicit parameter list [RedeclParamListDiffers] // CHECK:STDERR: fn F[self: Self](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-60]]:15: note(RedeclParamListPrevious): previously declared without implicit parameter list + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-60]]:15: note: previously declared without implicit parameter list [RedeclParamListPrevious] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -79,10 +79,10 @@ class FExtraImplicitParam { // TODO: Should this be permitted? class FExtraReturnType { impl as I { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `bool` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `bool` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn F() -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-74]]:15: note(FunctionRedeclReturnTypePreviousNoReturn): previously declared with no return type + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-74]]:15: note: previously declared with no return type [FunctionRedeclReturnTypePreviousNoReturn] // CHECK:STDERR: interface I { fn F(); } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -94,10 +94,10 @@ interface J { fn F[self: bool](b: bool) -> bool; } class FMissingParam { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(RedeclParamCountDiffers): redeclaration differs because of parameter count of 0 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of parameter count of 0 [RedeclParamCountDiffers] // CHECK:STDERR: fn F[self: bool]() -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-7]]:15: note(RedeclParamCountPrevious): previously declared with parameter count of 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-7]]:15: note: previously declared with parameter count of 1 [RedeclParamCountPrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -107,10 +107,10 @@ class FMissingParam { class FMissingImplicitParam { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(RedeclParamListDiffers): redeclaration differs because of missing implicit parameter list + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: redeclaration differs because of missing implicit parameter list [RedeclParamListDiffers] // CHECK:STDERR: fn F(b: bool) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-20]]:15: note(RedeclParamListPrevious): previously declared with implicit parameter list + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-20]]:15: note: previously declared with implicit parameter list [RedeclParamListPrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -120,10 +120,10 @@ class FMissingImplicitParam { class FMissingReturnType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(FunctionRedeclReturnTypeDiffersNoReturn): function redeclaration differs because no return type is provided + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because no return type is provided [FunctionRedeclReturnTypeDiffersNoReturn] // CHECK:STDERR: fn F[self: bool](b: bool); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-33]]:15: note(FunctionRedeclReturnTypePrevious): previously declared with return type `bool` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-33]]:15: note: previously declared with return type `bool` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -133,10 +133,10 @@ class FMissingReturnType { class FDifferentParamType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error(RedeclParamDiffers): redeclaration differs at parameter 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F[self: bool](b: Self) -> bool; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note(RedeclParamPrevious): previous declaration's corresponding parameter here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -146,10 +146,10 @@ class FDifferentParamType { class FDifferentImplicitParamType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error(RedeclParamDiffers): redeclaration differs at implicit parameter 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at implicit parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F[self: Self](b: bool) -> bool; // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: note(RedeclParamPrevious): previous declaration's corresponding implicit parameter here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: note: previous declaration's corresponding implicit parameter here [RedeclParamPrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -159,10 +159,10 @@ class FDifferentImplicitParamType { class FDifferentReturnType { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `FDifferentReturnType` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:5: error: function redeclaration differs because return type is `FDifferentReturnType` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn F[self: bool](b: bool) -> Self; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-72]]:15: note(FunctionRedeclReturnTypePrevious): previously declared with return type `bool` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-72]]:15: note: previously declared with return type `bool` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -173,10 +173,10 @@ class FDifferentReturnType { // TODO: This should probably be permitted. class FDifferentParamName { impl as J { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error(RedeclParamDiffers): redeclaration differs at parameter 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F[self: bool](not_b: bool) -> bool; // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-86]]:32: note(RedeclParamPrevious): previous declaration's corresponding parameter here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-86]]:32: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: interface J { fn F[self: bool](b: bool) -> bool; } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -190,10 +190,10 @@ interface SelfNested { class SelfNestedBadParam { impl as SelfNested { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error(RedeclParamDiffers): redeclaration differs at parameter 1 + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: fn F(x: (SelfNestedBadParam*, {.x: i32, .y: i32})) -> [SelfNestedBadParam; 4]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:8: note(RedeclParamPrevious): previous declaration's corresponding parameter here + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:8: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> [Self; 4]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -203,10 +203,10 @@ class SelfNestedBadParam { class SelfNestedBadReturnType { impl as SelfNested { - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+6]]:5: error(FunctionRedeclReturnTypeDiffers): function redeclaration differs because return type is `[SelfNestedBadParam; 4]` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+6]]:5: error: function redeclaration differs because return type is `[SelfNestedBadParam; 4]` [FunctionRedeclReturnTypeDiffers] // CHECK:STDERR: fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> [SelfNestedBadParam; 4]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-21]]:3: note(FunctionRedeclReturnTypePrevious): previously declared with return type `[SelfNestedBadReturnType; 4]` + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-21]]:3: note: previously declared with return type `[SelfNestedBadReturnType; 4]` [FunctionRedeclReturnTypePrevious] // CHECK:STDERR: fn F(x: (Self*, {.x: Self, .y: i32})) -> [Self; 4]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn F(x: (SelfNestedBadReturnType*, {.x: SelfNestedBadReturnType, .y: i32})) -> [SelfNestedBadParam; 4]; diff --git a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon index db4a4cfba1d0..a5fac43c768d 100644 --- a/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon +++ b/toolchain/check/testdata/impl/fail_impl_bad_interface.carbon @@ -8,14 +8,14 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/impl/fail_impl_bad_interface.carbon -// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+10]]:1: error(SemanticsTodo): semantics TODO: `impl as non-interface` +// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+10]]:1: error: semantics TODO: `impl as non-interface` [SemanticsTodo] // CHECK:STDERR: impl i32 as false {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+6]]:13: error(ImplicitAsConversionFailure): cannot implicitly convert from `bool` to `type` +// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+6]]:13: error: cannot implicitly convert from `bool` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: impl i32 as false {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+3]]:13: note(MissingImplInMemberAccessNote): type `bool` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+3]]:13: note: type `bool` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: impl i32 as false {} // CHECK:STDERR: ^~~~~ impl i32 as false {} diff --git a/toolchain/check/testdata/impl/fail_redefinition.carbon b/toolchain/check/testdata/impl/fail_redefinition.carbon index 8a18d05c0318..8b983543c711 100644 --- a/toolchain/check/testdata/impl/fail_redefinition.carbon +++ b/toolchain/check/testdata/impl/fail_redefinition.carbon @@ -12,10 +12,10 @@ interface I {} impl i32 as I {} -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error(ImplRedefinition): redefinition of `impl i32 as I` +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error: redefinition of `impl i32 as I` [ImplRedefinition] // CHECK:STDERR: impl i32 as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-5]]:1: note(ImplPreviousDefinition): previous definition was here +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-5]]:1: note: previous definition was here [ImplPreviousDefinition] // CHECK:STDERR: impl i32 as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ impl i32 as I {} diff --git a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon index 39f06510d40d..25fbe29edf47 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -10,14 +10,14 @@ interface I { let T:! type; } -// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+10]]:1: error(SemanticsTodo): semantics TODO: `impl of interface with associated constant` +// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+10]]:1: error: semantics TODO: `impl of interface with associated constant` [SemanticsTodo] // CHECK:STDERR: impl bool as I where .T = bool {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+6]]:27: error(ImplicitAsConversionFailure): cannot implicitly convert from `type` to `` +// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+6]]:27: error: cannot implicitly convert from `type` to `` [ImplicitAsConversionFailure] // CHECK:STDERR: impl bool as I where .T = bool {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+3]]:27: note(MissingImplInMemberAccessNote): type `type` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+3]]:27: note: type `type` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: impl bool as I where .T = bool {} // CHECK:STDERR: ^~~~ impl bool as I where .T = bool {} diff --git a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon index a41a3835fa74..81070fd32a47 100644 --- a/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_alias_impl_not_found.carbon @@ -17,12 +17,12 @@ class C { } fn F(c: C) { - // CHECK:STDERR: fail_alias_impl_not_found.carbon:[[@LINE+4]]:3: error(MissingImplInMemberAccess): cannot access member of interface `I` in type `C` that does not implement that interface + // CHECK:STDERR: fail_alias_impl_not_found.carbon:[[@LINE+4]]:3: error: cannot access member of interface `I` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: C.F(); // CHECK:STDERR: ^~~ // CHECK:STDERR: C.F(); - // CHECK:STDERR: fail_alias_impl_not_found.carbon:[[@LINE+3]]:3: error(MissingImplInMemberAccess): cannot access member of interface `I` in type `C` that does not implement that interface + // CHECK:STDERR: fail_alias_impl_not_found.carbon:[[@LINE+3]]:3: error: cannot access member of interface `I` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: c.F(); // CHECK:STDERR: ^~~ c.F(); diff --git a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon index fd128c947563..fb67e233f9a4 100644 --- a/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon +++ b/toolchain/check/testdata/impl/lookup/fail_todo_undefined_impl.carbon @@ -18,7 +18,7 @@ class C { fn F() -> i32 { // TODO: This should produce a more useful error message. - // CHECK:STDERR: fail_todo_undefined_impl.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `I` in type `C` that does not implement that interface + // CHECK:STDERR: fail_todo_undefined_impl.carbon:[[@LINE+3]]:10: error: cannot access member of interface `I` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return C.F(); // CHECK:STDERR: ^~~ return C.F(); diff --git a/toolchain/check/testdata/impl/lookup/generic.carbon b/toolchain/check/testdata/impl/lookup/generic.carbon index daf2b65acf27..ab6f478286ad 100644 --- a/toolchain/check/testdata/impl/lookup/generic.carbon +++ b/toolchain/check/testdata/impl/lookup/generic.carbon @@ -90,7 +90,7 @@ impl forall [T:! type, U:! type] T as HasF { fn G(x: {}) { // TODO: It'd be nice to include a note here saying that deduction failed because // we couldn't deduce a value for 'U'. - // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:3: error(MissingImplInMemberAccess): cannot access member of interface `HasF` in type `{}` that does not implement that interface + // CHECK:STDERR: fail_incomplete_deduction.carbon:[[@LINE+4]]:3: error: cannot access member of interface `HasF` in type `{}` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: x.(HasF.F)(); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -115,7 +115,7 @@ class B {} fn G(x: A) { // TODO: It'd be nice to include a note here saying that deduction failed because // we deduced two different values for `T`. - // CHECK:STDERR: fail_inconsistent_deduction.carbon:[[@LINE+3]]:3: error(MissingImplInMemberAccess): cannot access member of interface `HasF` in type `A` that does not implement that interface + // CHECK:STDERR: fail_inconsistent_deduction.carbon:[[@LINE+3]]:3: error: cannot access member of interface `HasF` in type `A` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: x.(HasF(B).F)(); // CHECK:STDERR: ^~~~~~~~~~~~~ x.(HasF(B).F)(); diff --git a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon index 428df64d7357..d359c2da3684 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_alias.carbon @@ -16,10 +16,10 @@ alias AC = C; impl AC as AI {} -// CHECK:STDERR: fail_alias.carbon:[[@LINE+6]]:1: error(ImplRedefinition): redefinition of `impl AC as AI` +// CHECK:STDERR: fail_alias.carbon:[[@LINE+6]]:1: error: redefinition of `impl AC as AI` [ImplRedefinition] // CHECK:STDERR: impl AC as AI {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-5]]:1: note(ImplPreviousDefinition): previous definition was here +// CHECK:STDERR: fail_alias.carbon:[[@LINE-5]]:1: note: previous definition was here [ImplPreviousDefinition] // CHECK:STDERR: impl AC as AI {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ impl AC as AI {} diff --git a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon index b42f324e7d64..e0fa37c51126 100644 --- a/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon +++ b/toolchain/check/testdata/impl/no_prelude/fail_impl_bad_type.carbon @@ -10,7 +10,7 @@ interface I {} -// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+3]]:6: error(CoreNotFound): package `Core` implicitly referenced here, but not found +// CHECK:STDERR: fail_impl_bad_type.carbon:[[@LINE+3]]:6: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: impl true as I {} // CHECK:STDERR: ^~~~ impl true as I {} diff --git a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon index c184bce28afb..faeebde5992b 100644 --- a/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon +++ b/toolchain/check/testdata/impl/no_prelude/generic_redeclaration.carbon @@ -39,10 +39,10 @@ interface I {} interface J {} impl forall [T:! I] T as J {} -// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE+6]]:1: error(ImplRedefinition): redefinition of `impl T as J` +// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE+6]]:1: error: redefinition of `impl T as J` [ImplRedefinition] // CHECK:STDERR: impl forall [T:! I] T as J {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE-4]]:1: note(ImplPreviousDefinition): previous definition was here +// CHECK:STDERR: fail_same_self_and_interface_redefined.carbon:[[@LINE-4]]:1: note: previous definition was here [ImplPreviousDefinition] // CHECK:STDERR: impl forall [T:! I] T as J {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ impl forall [T:! I] T as J {} diff --git a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon index 6289eabc3ffb..fc3f9e389a73 100644 --- a/toolchain/check/testdata/impl/no_prelude/import_generic.carbon +++ b/toolchain/check/testdata/impl/no_prelude/import_generic.carbon @@ -28,11 +28,11 @@ impl forall [T:! type] C as I(T) {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+7]]:1: error(ImplRedefinition): redefinition of `impl C as I` +// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE+7]]:1: error: redefinition of `impl C as I` [ImplRedefinition] // CHECK:STDERR: impl forall [T:! type] C as I(T*) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: import_generic.carbon:8:1: note(ImplPreviousDefinition): previous definition was here +// CHECK:STDERR: fail_import_generic.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: import_generic.carbon:8:1: note: previous definition was here [ImplPreviousDefinition] // CHECK:STDERR: impl forall [T:! type] C as I(T*) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ impl forall [T:! type] C as I(T*) {} diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 71f4d759f02c..c11d7a107834 100644 --- a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon +++ b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon @@ -36,7 +36,7 @@ fn G(a: A) { a.(Action(B).Op)(); } impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_action.impl.carbon:[[@LINE+4]]:14: error(MissingImplInMemberAccess): cannot access member of interface `Action` in type `A` that does not implement that interface +// CHECK:STDERR: fail_action.impl.carbon:[[@LINE+4]]:14: error: cannot access member of interface `Action` in type `A` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: fn G(a: A) { a.(Action(C).Op)(); } // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -72,7 +72,7 @@ impl library "[[@TEST_NAME]]"; class C {} fn MakeC(a: A) -> C { - // CHECK:STDERR: fail_factory.impl.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Factory` in type `A` that does not implement that interface + // CHECK:STDERR: fail_factory.impl.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Factory` in type `A` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a.(Factory(C).Make)(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ return a.(Factory(C).Make)(); diff --git a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon index 25046ddb2c29..dc8faeab5871 100644 --- a/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon +++ b/toolchain/check/testdata/impl/no_prelude/no_definition_in_impl_file.carbon @@ -58,7 +58,7 @@ impl () as C; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_in_api_decl_in_impl.impl.carbon:[[@LINE+4]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: impl () as C; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -74,7 +74,7 @@ impl library "[[@TEST_NAME]]"; interface D {}; -// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error(MissingDefinitionInImpl): no definition found for declaration in impl file +// CHECK:STDERR: fail_decl_only_in_impl.impl.carbon:[[@LINE+3]]:1: error: no definition found for declaration in impl file [MissingDefinitionInImpl] // CHECK:STDERR: impl () as D; // CHECK:STDERR: ^~~~~~~~~~~~~ impl () as D; diff --git a/toolchain/check/testdata/index/fail_array_large_index.carbon b/toolchain/check/testdata/index/fail_array_large_index.carbon index a93b99f4306b..f6a791b96ea5 100644 --- a/toolchain/check/testdata/index/fail_array_large_index.carbon +++ b/toolchain/check/testdata/index/fail_array_large_index.carbon @@ -10,13 +10,13 @@ var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+4]]:16: error(ArrayIndexOutOfBounds): array index `1` is past the end of type `[i32; 1]` +// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+4]]:16: error: array index `1` is past the end of type `[i32; 1]` [ArrayIndexOutOfBounds] // CHECK:STDERR: var b: i32 = a[1]; // CHECK:STDERR: ^ // CHECK:STDERR: var b: i32 = a[1]; -// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+3]]:16: error(ArrayIndexOutOfBounds): array index `2147483647` is past the end of type `[i32; 1]` +// CHECK:STDERR: fail_array_large_index.carbon:[[@LINE+3]]:16: error: array index `2147483647` is past the end of type `[i32; 1]` [ArrayIndexOutOfBounds] // CHECK:STDERR: var c: i32 = a[0x7FFF_FFFF]; // CHECK:STDERR: ^~~~~~~~~~~ var c: i32 = a[0x7FFF_FFFF]; diff --git a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon index 423d0d203de5..eff2ab8b57ad 100644 --- a/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon +++ b/toolchain/check/testdata/index/fail_array_non_int_indexing.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_array_non_int_indexing.carbon var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+6]]:16: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` +// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+6]]:16: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var b: i32 = a[2.6]; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var b: i32 = a[2.6]; // CHECK:STDERR: ^~~ var b: i32 = a[2.6]; diff --git a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon index db129d2d31b5..683a157f1c1f 100644 --- a/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon +++ b/toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_array_out_of_bound_access.carbon var a: [i32; 1] = (12,); -// CHECK:STDERR: fail_array_out_of_bound_access.carbon:[[@LINE+3]]:16: error(ArrayIndexOutOfBounds): array index `1` is past the end of type `[i32; 1]` +// CHECK:STDERR: fail_array_out_of_bound_access.carbon:[[@LINE+3]]:16: error: array index `1` is past the end of type `[i32; 1]` [ArrayIndexOutOfBounds] // CHECK:STDERR: var b: i32 = a[1]; // CHECK:STDERR: ^ var b: i32 = a[1]; diff --git a/toolchain/check/testdata/index/fail_expr_category.carbon b/toolchain/check/testdata/index/fail_expr_category.carbon index 9f58ac5ea37d..2e6e218fb891 100644 --- a/toolchain/check/testdata/index/fail_expr_category.carbon +++ b/toolchain/check/testdata/index/fail_expr_category.carbon @@ -12,12 +12,12 @@ fn F() -> [i32; 3]; fn G(b: [i32; 3]) { // Indexing an array value gives a value. - // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:18: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:18: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: var pb: i32* = &b[0]; // CHECK:STDERR: ^ // CHECK:STDERR: var pb: i32* = &b[0]; - // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: b[0] = 4; // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -25,12 +25,12 @@ fn G(b: [i32; 3]) { // Indexing an ephemeral reference (materialized from an initializing // expression) gives a value. - // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:18: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:18: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: var pf: i32* = &F()[0]; // CHECK:STDERR: ^ // CHECK:STDERR: var pf: i32* = &F()[0]; - // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+3]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+3]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: F()[0] = 4; // CHECK:STDERR: ^~~~~~ F()[0] = 4; diff --git a/toolchain/check/testdata/index/fail_invalid_base.carbon b/toolchain/check/testdata/index/fail_invalid_base.carbon index a028f1256387..dbabfeaecf3a 100644 --- a/toolchain/check/testdata/index/fail_invalid_base.carbon +++ b/toolchain/check/testdata/index/fail_invalid_base.carbon @@ -9,26 +9,26 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_invalid_base.carbon namespace N; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error(UseOfNonExprAsValue): expression cannot be used as a value +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: var a: i32 = N[0]; // CHECK:STDERR: ^ // CHECK:STDERR: var a: i32 = N[0]; fn F(); -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error(UseOfNonExprAsValue): expression cannot be used as a value +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: var b: i32 = F[1]; // CHECK:STDERR: ^ // CHECK:STDERR: var b: i32 = F[1]; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error(TypeNotIndexable): type `{.a: i32, .b: i32}` does not support indexing +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error: type `{.a: i32, .b: i32}` does not support indexing [TypeNotIndexable] // CHECK:STDERR: var c: i32 = {.a = 1, .b = 2}[0]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var c: i32 = {.a = 1, .b = 2}[0]; -// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:14: error(TypeNotIndexable): type `type` does not support indexing +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:14: error: type `type` does not support indexing [TypeNotIndexable] // CHECK:STDERR: var d: i32 = {.a: i32, .b: i32}[0]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ var d: i32 = {.a: i32, .b: i32}[0]; diff --git a/toolchain/check/testdata/index/fail_name_not_found.carbon b/toolchain/check/testdata/index/fail_name_not_found.carbon index ea632d7513b2..414073625dd4 100644 --- a/toolchain/check/testdata/index/fail_name_not_found.carbon +++ b/toolchain/check/testdata/index/fail_name_not_found.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_name_not_found.carbon fn Main() { - // CHECK:STDERR: fail_name_not_found.carbon:[[@LINE+3]]:16: error(NameNotFound): name `a` not found + // CHECK:STDERR: fail_name_not_found.carbon:[[@LINE+3]]:16: error: name `a` not found [NameNotFound] // CHECK:STDERR: var b: i32 = a[0]; // CHECK:STDERR: ^ var b: i32 = a[0]; diff --git a/toolchain/check/testdata/index/fail_negative_indexing.carbon b/toolchain/check/testdata/index/fail_negative_indexing.carbon index f09d0a6be08b..14c6301770f3 100644 --- a/toolchain/check/testdata/index/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/index/fail_negative_indexing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_negative_indexing.carbon var c: [i32; 2] = (42, 42); -// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:16: error(MissingImplInMemberAccess): cannot access member of interface `Negate` in type `i32` that does not implement that interface +// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:16: error: cannot access member of interface `Negate` in type `i32` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: var d: i32 = c[-10]; // CHECK:STDERR: ^~~ var d: i32 = c[-10]; diff --git a/toolchain/check/testdata/index/fail_non_tuple_access.carbon b/toolchain/check/testdata/index/fail_non_tuple_access.carbon index 8e336e5be8cc..7a3045982876 100644 --- a/toolchain/check/testdata/index/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/index/fail_non_tuple_access.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/index/fail_non_tuple_access.carbon fn Main() { - // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:3: error(TypeNotIndexable): type `i32` does not support indexing + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:3: error: type `i32` does not support indexing [TypeNotIndexable] // CHECK:STDERR: 0[1]; // CHECK:STDERR: ^~~~ 0[1]; diff --git a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon index bb3d86ad945f..496ee6efa114 100644 --- a/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon +++ b/toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_assoc_const_bad_default.carbon interface I { - // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` + // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: let T:! type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: let T:! type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ let T:! type = 42; diff --git a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon index a0382e454d97..f64e85b36b16 100644 --- a/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon +++ b/toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_todo_assoc_const_default.carbon interface I { - // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default let T:! type = (i32, i32); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default let T:! type = (i32, i32); - // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default let N:! i32 = 42; // CHECK:STDERR: ^~~~~~~ default let N:! i32 = 42; diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon index f349fb318d55..b510fd20bcfc 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon @@ -9,13 +9,13 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/fail_todo_define_default_fn_inline.carbon interface Interface { - // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn F() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default fn F() {} - // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~ default fn G(a: i32, b: i32) -> i32 = "int.sadd"; diff --git a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon index f7ec781ce45a..3ce6d4c9ac62 100644 --- a/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon +++ b/toolchain/check/testdata/interface/fail_todo_define_default_fn_out_of_line.carbon @@ -11,32 +11,32 @@ // --- fail_todo_define_default_fn_out_of_line.carbon interface Interface { - // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default fn F(); - // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn G(a: i32, b: i32) -> i32; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default fn G(a: i32, b: i32) -> i32; } -// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn Interface.F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: default fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: fn Interface.F() {} -// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-15]]:3: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-15]]:3: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: default fn G(a: i32, b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ fn Interface.G(a: i32, b: i32) -> i32 = "int.sadd"; diff --git a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon index a3683454440b..29bb3b4e8ca6 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_add_member_outside_definition.carbon @@ -10,7 +10,7 @@ interface Interface { } -// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:14: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity +// CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:14: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity] // CHECK:STDERR: fn Interface.F() {} // CHECK:STDERR: ^ // CHECK:STDERR: @@ -19,13 +19,13 @@ fn Interface.F() {} // Nesting interfaces like this is not valid, but make sure we don't crash. interface Outer { interface Inner { - // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:8: error(NameNotFound): name `Outer` not found + // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:8: error: name `Outer` not found [NameNotFound] // CHECK:STDERR: fn Outer.F(); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fn Outer.F(); } - // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+3]]:12: error(QualifiedDeclOutsideScopeEntity): out-of-line declaration requires a declaration in scoped entity + // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+3]]:12: error: out-of-line declaration requires a declaration in scoped entity [QualifiedDeclOutsideScopeEntity] // CHECK:STDERR: fn Inner.F(); // CHECK:STDERR: ^ fn Inner.F(); diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon index a274cb24fc6b..6ac77e6b1397 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_binding.carbon interface I { - // CHECK:STDERR: fail_assoc_const_not_binding.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `tuple pattern in let/var` + // CHECK:STDERR: fail_assoc_const_not_binding.carbon:[[@LINE+3]]:3: error: semantics TODO: `tuple pattern in let/var` [SemanticsTodo] // CHECK:STDERR: let (T:! type, U:! type); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ let (T:! type, U:! type); diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon index 605683cd38ed..06c4e2ecff62 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon @@ -9,11 +9,11 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_not_constant.carbon interface I { - // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+7]]:7: error(ExpectedSymbolicBindingInAssociatedConstant): pattern in associated constant declaration must be a single `:!` binding + // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+7]]:7: error: pattern in associated constant declaration must be a single `:!` binding [ExpectedSymbolicBindingInAssociatedConstant] // CHECK:STDERR: let a: i32; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error(CoreNotFound): package `Core` implicitly referenced here, but not found + // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: let a: i32; // CHECK:STDERR: ^~~ let a: i32; diff --git a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon index 5a14ce749399..53747cad4d4c 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_assoc_const_template.carbon interface I { - // CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+3]]:7: error(SemanticsTodo): semantics TODO: `HandleTemplate` + // CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+3]]:7: error: semantics TODO: `HandleTemplate` [SemanticsTodo] // CHECK:STDERR: let template T:! type; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ let template T:! type; diff --git a/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon b/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon index 2f7d8da459df..f6e35e479424 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon @@ -19,11 +19,11 @@ interface I; library "[[@TEST_NAME]]"; import library "a"; -// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface I {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: a.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: a.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: interface I; // CHECK:STDERR: ^~~~~~~~~~~~ interface I {} diff --git a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon index 3883cccbefa2..044488a804ec 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_duplicate.carbon @@ -14,10 +14,10 @@ library "[[@TEST_NAME]]"; interface Interface { } -// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `interface Interface` +// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` [RedeclRedef] // CHECK:STDERR: interface Interface { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: interface Interface { } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,10 +31,10 @@ library "[[@TEST_NAME]]"; interface Interface {} -// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE+7]]:1: error(RedeclRedef): redefinition of `interface Interface` +// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` [RedeclRedef] // CHECK:STDERR: interface Interface { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: interface Interface {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -48,10 +48,10 @@ library "[[@TEST_NAME]]"; fn Function(); -// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface Function; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn Function(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -61,10 +61,10 @@ interface Function; class Class; -// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface Class { } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ interface Class { } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon index 5df130ddea42..18259d8c9cbd 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon @@ -9,30 +9,30 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_generic_redeclaration.carbon interface NotGeneric; -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of parameter list +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list [RedeclParamListDiffers] // CHECK:STDERR: interface NotGeneric(T:! type) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared without parameter list +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: interface NotGeneric; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: interface NotGeneric(T:! type) {} interface Generic(T:! type); -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error(RedeclParamListDiffers): redeclaration differs because of missing parameter list +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of missing parameter list [RedeclParamListDiffers] // CHECK:STDERR: interface Generic {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared with parameter list +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: note: previously declared with parameter list [RedeclParamListPrevious] // CHECK:STDERR: interface Generic(T:! type); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: interface Generic {} interface DifferentParams(T:! type); -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: interface DifferentParams(T:! ()) {} // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: interface DifferentParams(T:! type); // CHECK:STDERR: ^~~~~~~~ interface DifferentParams(T:! ()) {} diff --git a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon index 64401231b8ee..e3d97ad26e89 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_lookup_undefined.carbon @@ -10,20 +10,20 @@ interface Undefined; -// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:4: error(QualifiedDeclInUndefinedInterfaceScope): cannot declare a member of undefined interface `Undefined` +// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:4: error: cannot declare a member of undefined interface `Undefined` [QualifiedDeclInUndefinedInterfaceScope] // CHECK:STDERR: fn Undefined.F(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: note(InterfaceForwardDeclaredHere): interface was forward declared here +// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere] // CHECK:STDERR: interface Undefined; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn Undefined.F(); fn Test() { - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: error(QualifiedExprInUndefinedInterfaceScope): member access into undefined interface `Undefined` + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: error: member access into undefined interface `Undefined` [QualifiedExprInUndefinedInterfaceScope] // CHECK:STDERR: Undefined.G(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: note(InterfaceForwardDeclaredHere): interface was forward declared here + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: note: interface was forward declared here [InterfaceForwardDeclaredHere] // CHECK:STDERR: interface Undefined; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,19 +31,19 @@ fn Test() { } interface BeingDefined { - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+11]]:13: error(QualifiedExprInUndefinedInterfaceScope): member access into undefined interface `BeingDefined` + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+11]]:13: error: member access into undefined interface `BeingDefined` [QualifiedExprInUndefinedInterfaceScope] // CHECK:STDERR: fn H() -> BeingDefined.T; // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: note(InterfaceUndefinedWithinDefinition): interface is currently being defined + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: note: interface is currently being defined [InterfaceUndefinedWithinDefinition] // CHECK:STDERR: interface BeingDefined { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: error(NameNotFound): name `T` not found + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: error: name `T` not found [NameNotFound] // CHECK:STDERR: fn H() -> BeingDefined.T; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn H() -> BeingDefined.T; - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: error(NameNotFound): name `BeingDefined` not found + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: error: name `BeingDefined` not found [NameNotFound] // CHECK:STDERR: fn BeingDefined.I(); // CHECK:STDERR: ^~~~~~~~~~~~ fn BeingDefined.I(); diff --git a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon index f7f678553d31..71662d986f94 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_member_lookup.carbon @@ -15,13 +15,13 @@ interface Interface { } fn F() { - // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: error(CallToNonCallable): value of type ` in Interface>` is not callable + // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+4]]:3: error: value of type ` in Interface>` is not callable [CallToNonCallable] // CHECK:STDERR: Interface.F(); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: Interface.F(); - // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error(CoreNotFound): package `Core` implicitly referenced here, but not found + // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: var v: Interface.T; // CHECK:STDERR: ^~~~~~~~~~~ var v: Interface.T; diff --git a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon index 5fb3680553a4..e23fd762b29e 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon @@ -8,27 +8,27 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `interface` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `abstract` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: abstract interface Abstract { // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract interface Abstract { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `default` not allowed on `interface` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `default` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: default interface Default; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default interface Default; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `interface` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `interface` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: virtual interface Virtual { // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: virtual interface Virtual { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected interface Protected; // CHECK:STDERR: ^~~~~~~~~ protected interface Protected; diff --git a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon index d01e43aefa56..51c79d6785d3 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_redeclare_member.carbon @@ -10,10 +10,10 @@ interface Interface { fn F(); - // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE+6]]:3: error(NameDeclDuplicate): duplicate name being declared in the same scope + // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE+6]]:3: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: note(NameDeclPrevious): name is previously declared here + // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ fn F(); diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon index f78bb592797e..e57e1aaee8ec 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_facet_lookup.carbon @@ -11,7 +11,7 @@ interface Interface { fn F(); } fn CallStatic(T:! Interface) { - // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: error(CallToNonCallable): value of type ` in Interface>` is not callable + // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+4]]:3: error: value of type ` in Interface>` is not callable [CallToNonCallable] // CHECK:STDERR: T.F(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -19,7 +19,7 @@ fn CallStatic(T:! Interface) { } fn CallFacet(T:! Interface, x: T) { - // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+3]]:3: error(QualifiedExprUnsupported): type `T` does not support qualified expressions + // CHECK:STDERR: fail_todo_facet_lookup.carbon:[[@LINE+3]]:3: error: type `T` does not support qualified expressions [QualifiedExprUnsupported] // CHECK:STDERR: x.F(); // CHECK:STDERR: ^~~ x.F(); diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon index 7a8c6ce06e45..d207fb75dd82 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_generic_default_fn.carbon @@ -13,10 +13,10 @@ interface I(T:! type) { fn F[self: Self]() -> Self; } -// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+6]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE+6]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn I(T:! type).F[self: Self]() -> Self { return self; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn F[self: Self]() -> Self; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ fn I(T:! type).F[self: Self]() -> Self { return self; } diff --git a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon index 338c75f6bf60..25fd8608b51e 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/interface/no_prelude/fail_todo_modifiers.carbon interface Modifiers { - // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: final fn Final() { } // CHECK:STDERR: ^~~~~ // CHECK:STDERR: final fn Final() { } - // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: error(SemanticsTodo): semantics TODO: `interface modifier` + // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` [SemanticsTodo] // CHECK:STDERR: default fn Default() { } // CHECK:STDERR: ^~~~~~~ default fn Default() { } diff --git a/toolchain/check/testdata/interface/no_prelude/generic.carbon b/toolchain/check/testdata/interface/no_prelude/generic.carbon index f55743d7b1e1..65ccd60bff65 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic.carbon @@ -49,10 +49,10 @@ class B {} fn F(T:! Generic(A)); fn G(T:! Generic(B)) { // TODO: Include generic arguments in the type name. - // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error(CoreNotFound): package `Core` implicitly referenced here, but not found + // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE+6]]:3: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn F(T:! Generic(A)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ F(T); diff --git a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon index bfb2eac6f52a..4e10f605a0c3 100644 --- a/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon +++ b/toolchain/check/testdata/interface/no_prelude/generic_vs_params.carbon @@ -32,7 +32,7 @@ impl X as C(X).GenericAndParams(X) {} library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error(GenericParamMustBeConstant): parameters of generic types must be constant +// CHECK:STDERR: fail_non_generic_implicit_params.carbon:[[@LINE+4]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant] // CHECK:STDERR: interface A[T: type]() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -42,7 +42,7 @@ interface A[T: type]() {} library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:13: error(GenericParamMustBeConstant): parameters of generic types must be constant +// CHECK:STDERR: fail_non_generic_params.carbon:[[@LINE+3]]:13: error: parameters of generic types must be constant [GenericParamMustBeConstant] // CHECK:STDERR: interface A(T: type) {} // CHECK:STDERR: ^~~~~~~ interface A(T: type) {} diff --git a/toolchain/check/testdata/interface/no_prelude/import_access.carbon b/toolchain/check/testdata/interface/no_prelude/import_access.carbon index a7ac1f61ee4f..949f09fda9c1 100644 --- a/toolchain/check/testdata/interface/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/interface/no_prelude/import_access.carbon @@ -49,7 +49,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:9: error: name `Def` not found [NameNotFound] // CHECK:STDERR: fn F(i: Def) {} // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -61,7 +61,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Def` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:9: error: name `Def` not found [NameNotFound] // CHECK:STDERR: fn F(i: Test.Def) {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -79,7 +79,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward_with_def"; -// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: fn F(i: ForwardWithDef) {} // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -91,7 +91,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward_with_def"; -// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:9: error(NameNotFound): name `ForwardWithDef` not found +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found [NameNotFound] // CHECK:STDERR: fn F(i: Test.ForwardWithDef) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -101,7 +101,7 @@ fn F(i: Test.ForwardWithDef) {} impl package Test library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_forward.impl.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_todo_forward.impl.carbon:[[@LINE+4]]:9: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: fn F(i: Forward*) {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -115,7 +115,7 @@ package Test library "[[@TEST_NAME]]"; import library "forward"; -// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: fn F(i: Forward*) {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -127,7 +127,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "forward"; -// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error(NameNotFound): name `Forward` not found +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error: name `Forward` not found [NameNotFound] // CHECK:STDERR: fn F(i: Forward*) {} // CHECK:STDERR: ^~~~~~~ fn F(i: Forward*) {} diff --git a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon index af9af796a6ab..f668c88a4d4a 100644 --- a/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon +++ b/toolchain/check/testdata/interface/no_prelude/syntactic_merge.carbon @@ -37,10 +37,10 @@ library "[[@TEST_NAME]]"; class C {} interface Foo(a:! C); -// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: interface Foo(a:! (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -69,20 +69,20 @@ interface Bar(a:! D); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface Foo(a:! C) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: two_file.carbon:7:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: two_file.carbon:7:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: interface Foo(a:! C) {} -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface Bar(a:! D) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:6(InImport): in import -// CHECK:STDERR: two_file.carbon:8:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-14]]:6: in import [InImport] +// CHECK:STDERR: two_file.carbon:8:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: interface Bar(a:! D); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -96,10 +96,10 @@ class C {} alias D = C; interface Foo(a:! C); -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error(RedeclParamDiffers): redeclaration differs at parameter 1 +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration differs at parameter 1 [RedeclParamDiffers] // CHECK:STDERR: interface Foo(b:! D) {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note(RedeclParamPrevious): previous declaration's corresponding parameter here +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: note: previous declaration's corresponding parameter here [RedeclParamPrevious] // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -113,10 +113,10 @@ class C {} alias D = C; interface Foo(a:! C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: interface Foo(a:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -130,10 +130,10 @@ class C {} alias D = C; interface Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: interface Foo[a:! D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: interface Foo[a:! C](); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -156,11 +156,11 @@ alias D = C; // TODO: This fails because importing interfaces doesn't work well. It should // fail due to `C` versus `D`, but may succeed if importing interfaces is fixed // before syntax matching on imports is supported. -// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: interface Foo(a:! D) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6(InImport): in import -// CHECK:STDERR: alias_two_file.carbon:6:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6: in import [InImport] +// CHECK:STDERR: alias_two_file.carbon:6:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -173,14 +173,14 @@ library "[[@TEST_NAME]]"; class C {} interface Foo(a:! const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:19: warning(RepeatedConst): `const` applied repeatedly to the same type has no additional effect +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:19: warning: `const` applied repeatedly to the same type has no additional effect [RepeatedConst] // CHECK:STDERR: interface Foo(a:! const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: error(RedeclParamSyntaxDiffers): redeclaration syntax differs here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: error: redeclaration syntax differs here [RedeclParamSyntaxDiffers] // CHECK:STDERR: interface Foo(a:! const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note(RedeclParamSyntaxPrevious): comparing with previous declaration here +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: note: comparing with previous declaration here [RedeclParamSyntaxPrevious] // CHECK:STDERR: interface Foo(a:! const C); // CHECK:STDERR: ^ interface Foo(a:! const (const C)) {} diff --git a/toolchain/check/testdata/let/compile_time_bindings.carbon b/toolchain/check/testdata/let/compile_time_bindings.carbon index 43935d753507..9ce7d8838bee 100644 --- a/toolchain/check/testdata/let/compile_time_bindings.carbon +++ b/toolchain/check/testdata/let/compile_time_bindings.carbon @@ -18,7 +18,7 @@ library "[[@TEST_NAME]]"; class C { fn F() -> () { return x; } - // CHECK:STDERR: fail_let_after.carbon:[[@LINE+4]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_let_after.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let x:! () = (); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -30,7 +30,7 @@ class C { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_let_before.carbon:[[@LINE+4]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_let_before.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let x:! () = (); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -43,7 +43,7 @@ class C { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let a:! () = (); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -56,7 +56,7 @@ class C { var c1: ((), ()) = c; var d1: ((), (), ()) = d; } - // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_multiple_lets.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let d:! ((), (), ()) = ((), (), ()); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -69,11 +69,11 @@ library "[[@TEST_NAME]]"; class C { fn F() -> () { return x; } - // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+8]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+8]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let x:! (); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+4]]:13: error(ExpectedInitializerAfterLet): expected `=`; `let` declaration must have an initializer + // CHECK:STDERR: fail_invalid_let_after.carbon:[[@LINE+4]]:13: error: expected `=`; `let` declaration must have an initializer [ExpectedInitializerAfterLet] // CHECK:STDERR: let x:! (); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -107,10 +107,10 @@ library "[[@TEST_NAME]]"; interface I { let T:! type = i32; - // CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+7]]:13: error(ImplicitAsConversionFailure): cannot implicitly convert from `` to `type` + // CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+7]]:13: error: cannot implicitly convert from `` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+4]]:13: note(MissingImplInMemberAccessNote): type `` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_return_in_interface.carbon:[[@LINE+4]]:13: note: type `` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -122,12 +122,12 @@ interface I { library "[[@TEST_NAME]]"; class I { - // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let T:! type = i32; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: let T:! type = i32; - // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:13: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_return_in_class.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -138,12 +138,12 @@ class I { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:5: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` +// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let T:! type = i32; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: let T:! type = i32; -// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:11: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_return_in_package_scope.carbon:[[@LINE+4]]:11: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn F() -> T; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -156,7 +156,7 @@ library "[[@TEST_NAME]]"; interface Empty {} impl i32 as Empty { - // CHECK:STDERR: fail_use_in_impl.carbon:[[@LINE+3]]:7: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` + // CHECK:STDERR: fail_use_in_impl.carbon:[[@LINE+3]]:7: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let Zero:! i32 = 0; // CHECK:STDERR: ^~~~~~~~~~ let Zero:! i32 = 0; diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index af62635b8f08..2bf3f48a198c 100644 --- a/toolchain/check/testdata/let/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/let/fail_duplicate_decl.carbon @@ -10,10 +10,10 @@ fn F() { let a: i32 = 1; - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: error(NameDeclDuplicate): duplicate name being declared in the same scope + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: let a: i32 = 2; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: note(NameDeclPrevious): name is previously declared here + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: let a: i32 = 1; // CHECK:STDERR: ^ let a: i32 = 2; diff --git a/toolchain/check/testdata/let/fail_generic.carbon b/toolchain/check/testdata/let/fail_generic.carbon index 284c64bfb9d4..43173b367b14 100644 --- a/toolchain/check/testdata/let/fail_generic.carbon +++ b/toolchain/check/testdata/let/fail_generic.carbon @@ -11,18 +11,18 @@ // TODO: Should this be valid? fn F(a: i32) -> i32 { let T:! type = i32; - // CHECK:STDERR: fail_generic.carbon:[[@LINE+7]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `T` + // CHECK:STDERR: fail_generic.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `i32` to `T` [ImplicitAsConversionFailure] // CHECK:STDERR: let x: T = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:3: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:3: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: let x: T = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: let x: T = 5; - // CHECK:STDERR: fail_generic.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `T` to `i32` + // CHECK:STDERR: fail_generic.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `T` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: return x; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:3: note: type `` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return x; // CHECK:STDERR: ^~~~~~~~~ return x; diff --git a/toolchain/check/testdata/let/fail_generic_import.carbon b/toolchain/check/testdata/let/fail_generic_import.carbon index 265f22534571..a0be9ac438b6 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -12,7 +12,7 @@ package Implicit; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let T:! type = i32; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -23,7 +23,7 @@ let T:! type = i32; impl package Implicit; // TODO: Should this be valid? -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:8: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:8: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: let a: T = 0; // CHECK:STDERR: ^ let a: T = 0; diff --git a/toolchain/check/testdata/let/fail_missing_value.carbon b/toolchain/check/testdata/let/fail_missing_value.carbon index 5ef03a1dd8da..d68101164945 100644 --- a/toolchain/check/testdata/let/fail_missing_value.carbon +++ b/toolchain/check/testdata/let/fail_missing_value.carbon @@ -8,14 +8,14 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/let/fail_missing_value.carbon -// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+4]]:11: error(ExpectedInitializerAfterLet): expected `=`; `let` declaration must have an initializer +// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+4]]:11: error: expected `=`; `let` declaration must have an initializer [ExpectedInitializerAfterLet] // CHECK:STDERR: let n: i32; // CHECK:STDERR: ^ // CHECK:STDERR: let n: i32; fn F() { - // CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:13: error(ExpectedInitializerAfterLet): expected `=`; `let` declaration must have an initializer + // CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:13: error: expected `=`; `let` declaration must have an initializer [ExpectedInitializerAfterLet] // CHECK:STDERR: let n: i32; // CHECK:STDERR: ^ let n: i32; diff --git a/toolchain/check/testdata/let/fail_modifiers.carbon b/toolchain/check/testdata/let/fail_modifiers.carbon index 4f448eac3e74..fdd18044c478 100644 --- a/toolchain/check/testdata/let/fail_modifiers.carbon +++ b/toolchain/check/testdata/let/fail_modifiers.carbon @@ -8,77 +8,77 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/let/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected let b: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected let b: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierRequiresInterface): `default` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default let c: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default let c: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierRequiresInterface): `final` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `final` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: final let d: i32 = 1; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: final let d: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `let` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `let` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: virtual let e: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: virtual let e: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierRequiresInterface): `default` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default final let f: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierNotAllowedWith): `final` not allowed on declaration with `default` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `final` not allowed on declaration with `default` [ModifierNotAllowedWith] // CHECK:STDERR: default final let f: i32 = 1; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `default` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `default` previously appeared here [ModifierPrevious] // CHECK:STDERR: default final let f: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default final let f: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierRequiresInterface): `default` not allowed; requires interface scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed; requires interface scope [ModifierRequiresInterface] // CHECK:STDERR: default default let g: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierRepeated): `default` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `default` repeated on declaration [ModifierRepeated] // CHECK:STDERR: default default let g: i32 = 1; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `default` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `default` previously appeared here [ModifierPrevious] // CHECK:STDERR: default default let g: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default default let g: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected private let h: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error(ModifierNotAllowedWith): `private` not allowed on declaration with `protected` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error: `private` not allowed on declaration with `protected` [ModifierNotAllowedWith] // CHECK:STDERR: protected private let h: i32 = 1; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `protected` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `protected` previously appeared here [ModifierPrevious] // CHECK:STDERR: protected private let h: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected private let h: i32 = 1; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+10]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+10]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected protected let i: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:11: error(ModifierRepeated): `protected` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:11: error: `protected` repeated on declaration [ModifierRepeated] // CHECK:STDERR: protected protected let i: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: note(ModifierPrevious): `protected` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: note: `protected` previously appeared here [ModifierPrevious] // CHECK:STDERR: protected protected let i: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ protected protected let i: i32 = 1; diff --git a/toolchain/check/testdata/let/fail_use_in_init.carbon b/toolchain/check/testdata/let/fail_use_in_init.carbon index 0eda57a86fab..bf8313b1f208 100644 --- a/toolchain/check/testdata/let/fail_use_in_init.carbon +++ b/toolchain/check/testdata/let/fail_use_in_init.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/let/fail_use_in_init.carbon fn F() { - // CHECK:STDERR: fail_use_in_init.carbon:[[@LINE+3]]:16: error(NameNotFound): name `a` not found + // CHECK:STDERR: fail_use_in_init.carbon:[[@LINE+3]]:16: error: name `a` not found [NameNotFound] // CHECK:STDERR: let a: i32 = a; // CHECK:STDERR: ^ let a: i32 = a; diff --git a/toolchain/check/testdata/let/generic_import.carbon b/toolchain/check/testdata/let/generic_import.carbon index 703d5d9df520..67a127b6beeb 100644 --- a/toolchain/check/testdata/let/generic_import.carbon +++ b/toolchain/check/testdata/let/generic_import.carbon @@ -12,7 +12,7 @@ package Implicit; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let T:! type = i32; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -22,12 +22,12 @@ let T:! type = i32; impl package Implicit; -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+4]]:8: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+4]]:8: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var a: T*; // CHECK:STDERR: ^~ // CHECK:STDERR: var a: T*; -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:8: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:8: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var b: T = *a; // CHECK:STDERR: ^ var b: T = *a; diff --git a/toolchain/check/testdata/let/no_prelude/import_access.carbon b/toolchain/check/testdata/let/no_prelude/import_access.carbon index adb973ed2cf4..6c5553da8f9f 100644 --- a/toolchain/check/testdata/let/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/let/no_prelude/import_access.carbon @@ -34,7 +34,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error(NameNotFound): name `v` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error: name `v` not found [NameNotFound] // CHECK:STDERR: let v2: () = v; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -46,7 +46,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error(NameNotFound): name `v` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error: name `v` not found [NameNotFound] // CHECK:STDERR: let v2: () = Test.v; // CHECK:STDERR: ^~~~~~ let v2: () = Test.v; diff --git a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon index d4cf154be7f3..67cce27602e8 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon @@ -24,11 +24,11 @@ import library "namespace"; // imported declaration. namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-9]]:1(InImport): in import -// CHECK:STDERR: namespace.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-9]]:1: in import [InImport] +// CHECK:STDERR: namespace.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -38,11 +38,11 @@ fn NS(); // we don't move it. namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-23]]:1(InImport): in import -// CHECK:STDERR: namespace.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-23]]:1: in import [InImport] +// CHECK:STDERR: namespace.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ fn NS(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon index d355f3059748..f35a81488139 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon @@ -20,11 +20,11 @@ package Example; import library "namespace"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: namespace.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: namespace.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ fn NS(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon index 1f469fe3b484..375316e7dbf1 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon @@ -16,19 +16,19 @@ namespace Nested; // --- fail_conflict.carbon import Other; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-4]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-4]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: import Other; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: namespace Other; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:10: error(QualifiedDeclOutsidePackage): imported packages cannot be used for declarations +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:10: error: imported packages cannot be used for declarations [QualifiedDeclOutsidePackage] // CHECK:STDERR: fn Other.Nested.F(); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-12]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:3:1: note(QualifiedDeclOutsidePackageSource): package imported here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-12]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:3:1: note: package imported here [QualifiedDeclOutsidePackageSource] // CHECK:STDERR: namespace Nested; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ fn Other.Nested.F(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon index d842d4638fbb..95d486bc2339 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon @@ -20,21 +20,21 @@ package Example; import library "fn"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:4: error(QualifiedNameInNonScope): name qualifiers are only allowed for entities that provide a scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:4: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope] // CHECK:STDERR: fn NS.Foo(); // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-15]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:4:1: note(QualifiedNameNonScopeEntity): referenced non-scope entity declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-15]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:4:1: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity] // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ fn NS.Foo(); diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon index 4f113c825521..4d1e94bf0d63 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_first.carbon @@ -25,12 +25,12 @@ fn NS() {} package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn NS() {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: namespace.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: namespace.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ import library "namespace"; diff --git a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon index 5e3ce84ec992..f2a7b2e20a2b 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_in_imports_namespace_second.carbon @@ -25,12 +25,12 @@ fn NS.Foo() {} package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: namespace.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: namespace.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn NS() {} // CHECK:STDERR: ^~~~~~~~~ import library "fn"; diff --git a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon index 35ba7b6c324e..1f896f0780bb 100644 --- a/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon +++ b/toolchain/check/testdata/namespace/fail_decl_in_alias.carbon @@ -13,10 +13,10 @@ namespace NS; alias ns = NS; // Aliases can't be used when declaring names. -// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE+6]]:4: error(QualifiedNameInNonScope): name qualifiers are only allowed for entities that provide a scope +// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE+6]]:4: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope] // CHECK:STDERR: fn ns.A() -> i32 { return 0; } // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE-6]]:7: note(QualifiedNameNonScopeEntity): referenced non-scope entity declared here +// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE-6]]:7: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity] // CHECK:STDERR: alias ns = NS; // CHECK:STDERR: ^~ fn ns.A() -> i32 { return 0; } diff --git a/toolchain/check/testdata/namespace/fail_duplicate.carbon b/toolchain/check/testdata/namespace/fail_duplicate.carbon index 1c649483bf3d..0a0391f45114 100644 --- a/toolchain/check/testdata/namespace/fail_duplicate.carbon +++ b/toolchain/check/testdata/namespace/fail_duplicate.carbon @@ -13,10 +13,10 @@ namespace Foo; fn Foo.Baz() { } -// CHECK:STDERR: fail_duplicate.carbon:[[@LINE+6]]:1: error(RedeclRedef): redefinition of `fn Baz` +// CHECK:STDERR: fail_duplicate.carbon:[[@LINE+6]]:1: error: redefinition of `fn Baz` [RedeclRedef] // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_duplicate.carbon:[[@LINE-6]]:1: note(RedeclPrevDef): previously defined here +// CHECK:STDERR: fail_duplicate.carbon:[[@LINE-6]]:1: note: previously defined here [RedeclPrevDef] // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^~~~~~~~~~~~~~ fn Foo.Baz() { diff --git a/toolchain/check/testdata/namespace/fail_modifiers.carbon b/toolchain/check/testdata/namespace/fail_modifiers.carbon index 4039f18b5a4d..b276bdc10e81 100644 --- a/toolchain/check/testdata/namespace/fail_modifiers.carbon +++ b/toolchain/check/testdata/namespace/fail_modifiers.carbon @@ -8,48 +8,48 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/namespace/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+33]]:1: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `namespace` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+33]]:1: error: `private` not allowed on `namespace` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+29]]:9: error(ModifierNotAllowedOnDeclaration): `extern` not allowed on `namespace` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+29]]:9: error: `extern` not allowed on `namespace` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:16: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `namespace` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:16: error: `abstract` not allowed on `namespace` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:25: error(ModifierNotAllowedWith): `base` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:25: error: `base` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:16: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:16: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:30: error(ModifierNotAllowedWith): `default` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:30: error: `default` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:16: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:16: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:38: error(ModifierNotAllowedWith): `final` not allowed on declaration with `abstract` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:38: error: `final` not allowed on declaration with `abstract` [ModifierNotAllowedWith] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:16: note(ModifierPrevious): `abstract` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:16: note: `abstract` previously appeared here [ModifierPrevious] // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: private extern abstract base default final namespace A; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `impl` not allowed on `namespace` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `impl` not allowed on `namespace` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: impl namespace B; // CHECK:STDERR: ^~~~ // CHECK:STDERR: impl namespace B; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierNotAllowedOnDeclaration): `extern` not allowed on `namespace` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `extern` not allowed on `namespace` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: extern namespace C; // CHECK:STDERR: ^~~~~~ extern namespace C; diff --git a/toolchain/check/testdata/namespace/fail_params.carbon b/toolchain/check/testdata/namespace/fail_params.carbon index de574b1bca5f..c328eb55f185 100644 --- a/toolchain/check/testdata/namespace/fail_params.carbon +++ b/toolchain/check/testdata/namespace/fail_params.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/namespace/fail_params.carbon -// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error(UnexpectedDeclNameParams): `namespace` declaration cannot have parameters +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters [UnexpectedDeclNameParams] // CHECK:STDERR: namespace A(); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -17,23 +17,23 @@ namespace A(); // Parameters are ignored for error recovery. fn A.F() {} -// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error(UnexpectedDeclNameParams): `namespace` declaration cannot have parameters +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters [UnexpectedDeclNameParams] // CHECK:STDERR: namespace B(n: i32); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: namespace B(n: i32); -// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error(UnexpectedDeclNameParams): `namespace` declaration cannot have parameters +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters [UnexpectedDeclNameParams] // CHECK:STDERR: namespace C[T:! type](x: T); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: namespace C[T:! type](x: T); namespace D; -// CHECK:STDERR: fail_params.carbon:[[@LINE+6]]:4: error(RedeclParamListDiffers): redeclaration differs because of parameter list +// CHECK:STDERR: fail_params.carbon:[[@LINE+6]]:4: error: redeclaration differs because of parameter list [RedeclParamListDiffers] // CHECK:STDERR: fn D(T:! type).F() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_params.carbon:[[@LINE-4]]:1: note(RedeclParamListPrevious): previously declared without parameter list +// CHECK:STDERR: fail_params.carbon:[[@LINE-4]]:1: note: previously declared without parameter list [RedeclParamListPrevious] // CHECK:STDERR: namespace D; // CHECK:STDERR: ^~~~~~~~~~~~ fn D(T:! type).F() {} diff --git a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon index c754662d65f3..e975f653f330 100644 --- a/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon +++ b/toolchain/check/testdata/namespace/fail_unresolved_scope.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/namespace/fail_unresolved_scope.carbon -// CHECK:STDERR: fail_unresolved_scope.carbon:[[@LINE+3]]:4: error(NameNotFound): name `Foo` not found +// CHECK:STDERR: fail_unresolved_scope.carbon:[[@LINE+3]]:4: error: name `Foo` not found [NameNotFound] // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^~~ fn Foo.Baz() { diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon index e14fe0ba5a55..fecd0b32c2e0 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_not_in_function.carbon @@ -14,29 +14,29 @@ fn F(b: bool) -> type { } // TODO: Short-circuit operators should be permitted outside functions. -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+12]]:11: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+12]]:11: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var and_: F(true and true); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:13: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+8]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var and_: F(true and true); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+4]]:13: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+4]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var and_: F(true and true); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var and_: F(true and true); -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+11]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+11]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var or_: F(true or true); // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+7]]:12: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+7]]:12: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var or_: F(true or true); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+3]]:12: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+3]]:12: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var or_: F(true or true); // CHECK:STDERR: ^~~~~~~~~~~~ var or_: F(true or true); diff --git a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon index 84091a1f534a..3484a2dfea11 100644 --- a/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_and_or_partial_constant.carbon @@ -13,12 +13,12 @@ package FailNonConstantResult; fn PartialConstant(x: bool) { - // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var a: if true and x then bool else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: if true and x then bool else (); - // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var b: if false or x then bool else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -32,12 +32,12 @@ package FailDespiteKnownResult; fn KnownValueButNonConstantCondition(x: bool) { // We choose not to give these cases constant values, even though we could, // because they notionally involve evaluating a non-constant condition. - // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+4]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var c: if x and false then bool else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var c: if x and false then bool else (); - // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+3]]:10: error(TypeExprEvaluationFailure): cannot evaluate type expression + // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: var d: if x or true then bool else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var d: if x or true then bool else (); diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon index b6739c0beec5..482b6ff75d84 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/operators/builtin/fail_assignment_to_error.carbon fn Main() { - // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+4]]:3: error(NameNotFound): name `undeclared` not found + // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+4]]:3: error: name `undeclared` not found [NameNotFound] // CHECK:STDERR: undeclared = 42; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: undeclared = 42; - // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+3]]:4: error(NameNotFound): name `also_undeclared` not found + // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+3]]:4: error: name `also_undeclared` not found [NameNotFound] // CHECK:STDERR: *also_undeclared = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~ *also_undeclared = 42; diff --git a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon index 8827670c2e02..efe7cdcdcbc1 100644 --- a/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_assignment_to_non_assignable.carbon @@ -11,38 +11,38 @@ fn F() -> i32; fn Main() { - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: 1 = 2; // CHECK:STDERR: ^ // CHECK:STDERR: 1 = 2; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: F() = 1; // CHECK:STDERR: ^~~ // CHECK:STDERR: F() = 1; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: (1, 2) = (3, 4); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: (1, 2) = (3, 4); var n: i32 = 0; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: (n, n) = (1, 2); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: (n, n) = (1, 2); - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: i32 = i32*; // CHECK:STDERR: ^~~ // CHECK:STDERR: i32 = i32*; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: {.x = 1, .y = 2} = {.x = 3, .y = 4}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: {.x = 1, .y = 2} = {.x = 3, .y = 4}; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: (if true then 1 else 2) = 3; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -50,7 +50,7 @@ fn Main() { // Under #911, if expressions are never reference expressions. var a: i32; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+3]]:3: error(AssignmentToNonAssignable): expression is not assignable + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+3]]:3: error: expression is not assignable [AssignmentToNonAssignable] // CHECK:STDERR: (if true then a else a) = 10; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ (if true then a else a) = 10; diff --git a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon index 9a210dbebaa6..3ee1d7c5089c 100644 --- a/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_redundant_compound_access.carbon @@ -12,12 +12,12 @@ fn F() -> i32 { return 0; } fn Main() { var a: i32 = 3; - // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+4]]:7: error(CompoundMemberAccessDoesNotUseBase): member name of type `i32` in compound member access is not an instance member or an interface member + // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+4]]:7: error: member name of type `i32` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase] // CHECK:STDERR: a = a.(a); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: a = a.(a); - // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+3]]:7: error(CompoundMemberAccessDoesNotUseBase): member name of type `` in compound member access is not an instance member or an interface member + // CHECK:STDERR: fail_redundant_compound_access.carbon:[[@LINE+3]]:7: error: member name of type `` in compound member access is not an instance member or an interface member [CompoundMemberAccessDoesNotUseBase] // CHECK:STDERR: a = a.(F)(); // CHECK:STDERR: ^~~~~ a = a.(F)(); diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon index 9bc56a7c28f5..f8700904046b 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/operators/builtin/fail_type_mismatch.carbon fn Main() { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:17: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `bool` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:17: error: cannot implicitly convert from `i32` to `bool` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: bool = not 12; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:17: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:17: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: bool = not 12; // CHECK:STDERR: ^~~~~~ var x: bool = not 12; diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon index 6029a64b70bb..f83bbb7a123e 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_assignment.carbon @@ -10,10 +10,10 @@ fn Main() { var a: i32 = 3; - // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` + // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: a = 5.6; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:3: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: a = 5.6; // CHECK:STDERR: ^~~~~~~ a = 5.6; diff --git a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon index e35e76518a9d..9ae7ef74e8b3 100644 --- a/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_type_mismatch_once.carbon @@ -11,11 +11,11 @@ fn Main() -> i32 { // The following line has two mismatches, but after the first, it shouldn't // keep erroring. - // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+7]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Add` in type `i32` that does not implement that interface + // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+7]]:10: error: cannot access member of interface `Add` in type `i32` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return 12 + 3.4 + 12; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Add` in type `` that does not implement that interface + // CHECK:STDERR: fail_type_mismatch_once.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Add` in type `` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return 12 + 3.4 + 12; // CHECK:STDERR: ^~~~~~~~~~~~~ return 12 + 3.4 + 12; diff --git a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon index 4b53bf368a20..84f6f146bed8 100644 --- a/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon +++ b/toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/operators/builtin/fail_unimplemented_op.carbon fn Main() -> i32 { - // CHECK:STDERR: fail_unimplemented_op.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Add` in type `i32` that does not implement that interface + // CHECK:STDERR: fail_unimplemented_op.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Add` in type `i32` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return 12 + 34; // CHECK:STDERR: ^~~~~~~ return 12 + 34; diff --git a/toolchain/check/testdata/operators/overloaded/eq.carbon b/toolchain/check/testdata/operators/overloaded/eq.carbon index 7622b902b870..93027b87fd4f 100644 --- a/toolchain/check/testdata/operators/overloaded/eq.carbon +++ b/toolchain/check/testdata/operators/overloaded/eq.carbon @@ -34,7 +34,7 @@ package FailNoImpl; class D {}; fn TestEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Eq` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a == b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -42,7 +42,7 @@ fn TestEqual(a: D, b: D) -> bool { } fn TestNotEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Eq` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a != b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -62,13 +62,13 @@ impl C as Core.Eq { } fn TestRhsBad(a: C, b: D) -> bool { - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+10]]:15: error(ImplicitAsConversionFailure): cannot implicitly convert from `D` to `C` + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+10]]:15: error: cannot implicitly convert from `D` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: return a == b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+7]]:15: note(MissingImplInMemberAccessNote): type `D` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+7]]:15: note: type `D` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return a == b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE-11]]:21: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE-11]]:21: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn Equal[self: C](other: C) -> bool; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -76,7 +76,7 @@ fn TestRhsBad(a: C, b: D) -> bool { } fn TestLhsBad(a: D, b: C) -> bool { - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Eq` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Eq` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a != b; // CHECK:STDERR: ^~~~~~ return a != b; diff --git a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon index 9882f08cd654..f1ec8b0cd0ed 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_assign_non_ref.carbon @@ -20,10 +20,10 @@ impl C as Core.AddAssign { } fn TestIncNonRef(a: C) { - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+7]]:5: error(AddrSelfIsNonRef): `addr self` method cannot be invoked on a value + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+7]]:5: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef] // CHECK:STDERR: ++a; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-10]]:9: note(InCallToFunctionSelf): initializing `addr self` parameter of method declared here + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-10]]:9: note: initializing `addr self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn Op[addr self: C*](); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -31,10 +31,10 @@ fn TestIncNonRef(a: C) { } fn TestAddAssignNonRef(a: C, b: C) { - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+6]]:3: error(AddrSelfIsNonRef): `addr self` method cannot be invoked on a value + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+6]]:3: error: `addr self` method cannot be invoked on a value [AddrSelfIsNonRef] // CHECK:STDERR: a += b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-18]]:9: note(InCallToFunctionSelf): initializing `addr self` parameter of method declared here + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-18]]:9: note: initializing `addr self` parameter of method declared here [InCallToFunctionSelf] // CHECK:STDERR: fn Op[addr self: C*](other: C); // CHECK:STDERR: ^~~~~~~~~~~~~ a += b; diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon index 959134f9ce70..a333b07079bf 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl.carbon @@ -13,7 +13,7 @@ package User; class C {}; fn TestUnary(a: C) -> C { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Negate` in type `C` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Negate` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return -a; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -21,7 +21,7 @@ fn TestUnary(a: C) -> C { } fn TestBinary(a: C, b: C) -> C { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Add` in type `C` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Add` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a + b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -30,12 +30,12 @@ fn TestBinary(a: C, b: C) -> C { fn TestRef(b: C) { var a: C = {}; - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:3: error(MissingImplInMemberAccess): cannot access member of interface `AddAssign` in type `C` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:3: error: cannot access member of interface `AddAssign` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: a += b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: a += b; - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+3]]:3: error(MissingImplInMemberAccess): cannot access member of interface `Inc` in type `C` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+3]]:3: error: cannot access member of interface `Inc` in type `C` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: ++a; // CHECK:STDERR: ^~~ ++a; diff --git a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon index e52077004cda..755577de0d7a 100644 --- a/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon +++ b/toolchain/check/testdata/operators/overloaded/fail_no_impl_for_arg.carbon @@ -21,13 +21,13 @@ impl C as Core.AddAssign { } fn Test(a: C, b: D) -> C { - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+10]]:14: error(ImplicitAsConversionFailure): cannot implicitly convert from `D` to `C` + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+10]]:14: error: cannot implicitly convert from `D` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: return a + b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:14: note(MissingImplInMemberAccessNote): type `D` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:14: note: type `D` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return a + b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-13]]:18: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-13]]:18: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn Op[self: C](other: C) -> C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -36,13 +36,13 @@ fn Test(a: C, b: D) -> C { fn TestAssign(b: D) { var a: C = {}; - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+9]]:8: error(ImplicitAsConversionFailure): cannot implicitly convert from `D` to `C` + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+9]]:8: error: cannot implicitly convert from `D` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: a += b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+6]]:8: note(MissingImplInMemberAccessNote): type `D` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+6]]:8: note: type `D` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: a += b; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-25]]:24: note(InCallToFunctionParam): initializing function parameter + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-25]]:24: note: initializing function parameter [InCallToFunctionParam] // CHECK:STDERR: fn Op[addr self: C*](other: C); // CHECK:STDERR: ^~~~~~~~ a += b; diff --git a/toolchain/check/testdata/operators/overloaded/ordered.carbon b/toolchain/check/testdata/operators/overloaded/ordered.carbon index ba5074eb8f6a..a96b4b6950d1 100644 --- a/toolchain/check/testdata/operators/overloaded/ordered.carbon +++ b/toolchain/check/testdata/operators/overloaded/ordered.carbon @@ -44,7 +44,7 @@ package FailNoImpl; class D {}; fn TestLess(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Ordered` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a < b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -52,7 +52,7 @@ fn TestLess(a: D, b: D) -> bool { } fn TestLessEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Ordered` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a <= b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -60,7 +60,7 @@ fn TestLessEqual(a: D, b: D) -> bool { } fn TestGreater(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Ordered` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+4]]:10: error: cannot access member of interface `Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a > b; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -68,7 +68,7 @@ fn TestGreater(a: D, b: D) -> bool { } fn TestGreaterEqual(a: D, b: D) -> bool { - // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+3]]:10: error(MissingImplInMemberAccess): cannot access member of interface `Ordered` in type `D` that does not implement that interface + // CHECK:STDERR: fail_no_impl.carbon:[[@LINE+3]]:10: error: cannot access member of interface `Ordered` in type `D` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: return a >= b; // CHECK:STDERR: ^~~~~~ return a >= b; diff --git a/toolchain/check/testdata/package_expr/fail_not_found.carbon b/toolchain/check/testdata/package_expr/fail_not_found.carbon index 37a627face22..5d3eb1fff7b2 100644 --- a/toolchain/check/testdata/package_expr/fail_not_found.carbon +++ b/toolchain/check/testdata/package_expr/fail_not_found.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/package_expr/fail_not_found.carbon fn Main() { - // CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:16: error(NameNotFound): name `x` not found + // CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:16: error: name `x` not found [NameNotFound] // CHECK:STDERR: var y: i32 = package.x; // CHECK:STDERR: ^~~~~~~~~ var y: i32 = package.x; diff --git a/toolchain/check/testdata/packages/fail_api_not_found.carbon b/toolchain/check/testdata/packages/fail_api_not_found.carbon index 18f0e68fc5ff..d604aeae39cc 100644 --- a/toolchain/check/testdata/packages/fail_api_not_found.carbon +++ b/toolchain/check/testdata/packages/fail_api_not_found.carbon @@ -10,7 +10,7 @@ // --- fail_no_api.impl.carbon -// CHECK:STDERR: fail_no_api.impl.carbon:[[@LINE+4]]:6: error(LibraryApiNotFound): corresponding API for 'Foo' not found +// CHECK:STDERR: fail_no_api.impl.carbon:[[@LINE+4]]:6: error: corresponding API for 'Foo' not found [LibraryApiNotFound] // CHECK:STDERR: impl package Foo; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -18,7 +18,7 @@ impl package Foo; // --- fail_no_api_lib.impl.carbon -// CHECK:STDERR: fail_no_api_lib.impl.carbon:[[@LINE+4]]:6: error(LibraryApiNotFound): corresponding API for 'Foo//no_api_lib' not found +// CHECK:STDERR: fail_no_api_lib.impl.carbon:[[@LINE+4]]:6: error: corresponding API for 'Foo//no_api_lib' not found [LibraryApiNotFound] // CHECK:STDERR: impl package Foo library "no_api_lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -26,7 +26,7 @@ impl package Foo library "[[@TEST_NAME]]"; // --- fail_no_api_main_lib.impl.carbon -// CHECK:STDERR: fail_no_api_main_lib.impl.carbon:[[@LINE+3]]:6: error(LibraryApiNotFound): corresponding API for 'Main//no_api_main_lib' not found +// CHECK:STDERR: fail_no_api_main_lib.impl.carbon:[[@LINE+3]]:6: error: corresponding API for 'Main//no_api_main_lib' not found [LibraryApiNotFound] // CHECK:STDERR: impl library "no_api_main_lib"; // CHECK:STDERR: ^~~~~~~ impl library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon index ac9732f83d20..9da5a4df66ff 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -24,12 +24,12 @@ var Foo: i32; package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: var.carbon:4:5: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: var.carbon:4:5: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: var Foo: i32; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: fn.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: fn.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn Foo(); // CHECK:STDERR: ^~~~~~~~~ import library "fn"; diff --git a/toolchain/check/testdata/packages/fail_cycle.carbon b/toolchain/check/testdata/packages/fail_cycle.carbon index 5741a361e2e5..8b890ce387f3 100644 --- a/toolchain/check/testdata/packages/fail_cycle.carbon +++ b/toolchain/check/testdata/packages/fail_cycle.carbon @@ -12,7 +12,7 @@ package A; -// CHECK:STDERR: fail_a.carbon:[[@LINE+4]]:1: error(ImportCycleDetected): import cannot be used due to a cycle; cycle must be fixed to import +// CHECK:STDERR: fail_a.carbon:[[@LINE+4]]:1: error: import cannot be used due to a cycle; cycle must be fixed to import [ImportCycleDetected] // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -22,7 +22,7 @@ import B; package B; -// CHECK:STDERR: fail_b.carbon:[[@LINE+4]]:1: error(ImportCycleDetected): import cannot be used due to a cycle; cycle must be fixed to import +// CHECK:STDERR: fail_b.carbon:[[@LINE+4]]:1: error: import cannot be used due to a cycle; cycle must be fixed to import [ImportCycleDetected] // CHECK:STDERR: import C; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -32,7 +32,7 @@ import C; package C; -// CHECK:STDERR: fail_c.carbon:[[@LINE+4]]:1: error(ImportCycleDetected): import cannot be used due to a cycle; cycle must be fixed to import +// CHECK:STDERR: fail_c.carbon:[[@LINE+4]]:1: error: import cannot be used due to a cycle; cycle must be fixed to import [ImportCycleDetected] // CHECK:STDERR: import A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -40,7 +40,7 @@ import A; // --- fail_c.impl.carbon -// CHECK:STDERR: fail_c.impl.carbon:[[@LINE+4]]:6: error(ImportCycleDetected): import cannot be used due to a cycle; cycle must be fixed to import +// CHECK:STDERR: fail_c.impl.carbon:[[@LINE+4]]:6: error: import cannot be used due to a cycle; cycle must be fixed to import [ImportCycleDetected] // CHECK:STDERR: impl package C; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -50,7 +50,7 @@ impl package C; package CycleChild; -// CHECK:STDERR: fail_cycle_child.carbon:[[@LINE+3]]:1: error(ImportCycleDetected): import cannot be used due to a cycle; cycle must be fixed to import +// CHECK:STDERR: fail_cycle_child.carbon:[[@LINE+3]]:1: error: import cannot be used due to a cycle; cycle must be fixed to import [ImportCycleDetected] // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ import B; diff --git a/toolchain/check/testdata/packages/fail_duplicate_api.carbon b/toolchain/check/testdata/packages/fail_duplicate_api.carbon index 7ef74c06af42..fb5623bacff2 100644 --- a/toolchain/check/testdata/packages/fail_duplicate_api.carbon +++ b/toolchain/check/testdata/packages/fail_duplicate_api.carbon @@ -7,7 +7,7 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/packages/fail_duplicate_api.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/packages/fail_duplicate_api.carbon -// CHECK:STDERR: fail_main2.carbon: error(DuplicateMainApi): `Main//default` previously provided by `main1.carbon` +// CHECK:STDERR: fail_main2.carbon: error: `Main//default` previously provided by `main1.carbon` [DuplicateMainApi] // CHECK:STDERR: // --- main1.carbon @@ -20,7 +20,7 @@ library "lib"; // --- fail_main_lib2.carbon -// CHECK:STDERR: fail_main_lib2.carbon:[[@LINE+4]]:1: error(DuplicateLibraryApi): library's API previously provided by `main_lib1.carbon` +// CHECK:STDERR: fail_main_lib2.carbon:[[@LINE+4]]:1: error: library's API previously provided by `main_lib1.carbon` [DuplicateLibraryApi] // CHECK:STDERR: library "lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -32,7 +32,7 @@ package Package; // --- fail_package2.carbon -// CHECK:STDERR: fail_package2.carbon:[[@LINE+4]]:1: error(DuplicateLibraryApi): library's API previously provided by `package1.carbon` +// CHECK:STDERR: fail_package2.carbon:[[@LINE+4]]:1: error: library's API previously provided by `package1.carbon` [DuplicateLibraryApi] // CHECK:STDERR: package Package; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -44,7 +44,7 @@ package Package library "lib"; // --- fail_package_lib2.carbon -// CHECK:STDERR: fail_package_lib2.carbon:[[@LINE+3]]:1: error(DuplicateLibraryApi): library's API previously provided by `package_lib1.carbon` +// CHECK:STDERR: fail_package_lib2.carbon:[[@LINE+3]]:1: error: library's API previously provided by `package_lib1.carbon` [DuplicateLibraryApi] // CHECK:STDERR: package Package library "lib"; // CHECK:STDERR: ^~~~~~~ package Package library "lib"; diff --git a/toolchain/check/testdata/packages/fail_extension.carbon b/toolchain/check/testdata/packages/fail_extension.carbon index 8ada13ec247b..d3e2b8ad43c3 100644 --- a/toolchain/check/testdata/packages/fail_extension.carbon +++ b/toolchain/check/testdata/packages/fail_extension.carbon @@ -7,12 +7,12 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/check/testdata/packages/fail_extension.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/packages/fail_extension.carbon -// CHECK:STDERR: fail_main.incorrect: error(IncorrectExtension): file extension of `.carbon` required for api +// CHECK:STDERR: fail_main.incorrect: error: file extension of `.carbon` required for api [IncorrectExtension] // CHECK:STDERR: -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: error(DuplicateMainApi): `Main//default` previously provided by `fail_main.incorrect` +// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: error: `Main//default` previously provided by `fail_main.incorrect` [DuplicateMainApi] // CHECK:STDERR: -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: error(IncorrectExtension): file extension of `.carbon` required for api -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: note(IncorrectExtensionImplNote): file extension of `.impl.carbon` only allowed for `impl` +// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: error: file extension of `.carbon` required for api [IncorrectExtension] +// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: note: file extension of `.impl.carbon` only allowed for `impl` [IncorrectExtensionImplNote] // CHECK:STDERR: // --- fail_main.incorrect @@ -21,7 +21,7 @@ // --- fail_main_lib.incorrect -// CHECK:STDERR: fail_main_lib.incorrect:[[@LINE+4]]:1: error(IncorrectExtension): file extension of `.carbon` required for api +// CHECK:STDERR: fail_main_lib.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for api [IncorrectExtension] // CHECK:STDERR: library "main_lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -29,7 +29,7 @@ library "[[@TEST_NAME]]"; // --- fail_main_lib.impl.incorrect -// CHECK:STDERR: fail_main_lib.impl.incorrect:[[@LINE+4]]:6: error(IncorrectExtension): file extension of `.impl.carbon` required for `impl` +// CHECK:STDERR: fail_main_lib.impl.incorrect:[[@LINE+4]]:6: error: file extension of `.impl.carbon` required for `impl` [IncorrectExtension] // CHECK:STDERR: impl library "main_lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -37,7 +37,7 @@ impl library "[[@TEST_NAME]]"; // --- fail_package.incorrect -// CHECK:STDERR: fail_package.incorrect:[[@LINE+4]]:1: error(IncorrectExtension): file extension of `.carbon` required for api +// CHECK:STDERR: fail_package.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for api [IncorrectExtension] // CHECK:STDERR: package Package; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -45,7 +45,7 @@ package Package; // --- fail_package_impl.incorrect -// CHECK:STDERR: fail_package_impl.incorrect:[[@LINE+4]]:6: error(IncorrectExtension): file extension of `.impl.carbon` required for `impl` +// CHECK:STDERR: fail_package_impl.incorrect:[[@LINE+4]]:6: error: file extension of `.impl.carbon` required for `impl` [IncorrectExtension] // CHECK:STDERR: impl package Package; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -53,7 +53,7 @@ impl package Package; // --- fail_package_lib.incorrect -// CHECK:STDERR: fail_package_lib.incorrect:[[@LINE+4]]:1: error(IncorrectExtension): file extension of `.carbon` required for api +// CHECK:STDERR: fail_package_lib.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for api [IncorrectExtension] // CHECK:STDERR: package Package library "package_lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -61,7 +61,7 @@ package Package library "[[@TEST_NAME]]"; // --- fail_package_lib.impl.incorrect -// CHECK:STDERR: fail_package_lib.impl.incorrect:[[@LINE+4]]:6: error(IncorrectExtension): file extension of `.impl.carbon` required for `impl` +// CHECK:STDERR: fail_package_lib.impl.incorrect:[[@LINE+4]]:6: error: file extension of `.impl.carbon` required for `impl` [IncorrectExtension] // CHECK:STDERR: impl package Package library "package_lib"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -69,16 +69,16 @@ impl package Package library "[[@TEST_NAME]]"; // --- fail_swapped_ext.impl.carbon -// CHECK:STDERR: fail_swapped_ext.impl.carbon:[[@LINE+5]]:1: error(IncorrectExtension): file extension of `.carbon` required for api +// CHECK:STDERR: fail_swapped_ext.impl.carbon:[[@LINE+5]]:1: error: file extension of `.carbon` required for api [IncorrectExtension] // CHECK:STDERR: package SwappedExt; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_swapped_ext.impl.carbon: note(IncorrectExtensionImplNote): file extension of `.impl.carbon` only allowed for `impl` +// CHECK:STDERR: fail_swapped_ext.impl.carbon: note: file extension of `.impl.carbon` only allowed for `impl` [IncorrectExtensionImplNote] // CHECK:STDERR: package SwappedExt; // --- fail_swapped_ext.carbon -// CHECK:STDERR: fail_swapped_ext.carbon:[[@LINE+3]]:6: error(IncorrectExtension): file extension of `.impl.carbon` required for `impl` +// CHECK:STDERR: fail_swapped_ext.carbon:[[@LINE+3]]:6: error: file extension of `.impl.carbon` required for `impl` [IncorrectExtension] // CHECK:STDERR: impl package SwappedExt; // CHECK:STDERR: ^~~~~~~ impl package SwappedExt; diff --git a/toolchain/check/testdata/packages/fail_import_default.carbon b/toolchain/check/testdata/packages/fail_import_default.carbon index d7420ae919d0..2d76ba3132e5 100644 --- a/toolchain/check/testdata/packages/fail_import_default.carbon +++ b/toolchain/check/testdata/packages/fail_import_default.carbon @@ -12,7 +12,7 @@ package A; -// CHECK:STDERR: fail_default_api.carbon:[[@LINE+4]]:1: error(ImportSelf): file cannot import itself +// CHECK:STDERR: fail_default_api.carbon:[[@LINE+4]]:1: error: file cannot import itself [ImportSelf] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -22,7 +22,7 @@ import library default; impl package A; -// CHECK:STDERR: fail_default.impl.carbon:[[@LINE+4]]:1: error(ExplicitImportApi): explicit import of `api` from `impl` file is redundant with implicit import +// CHECK:STDERR: fail_default.impl.carbon:[[@LINE+4]]:1: error: explicit import of `api` from `impl` file is redundant with implicit import [ExplicitImportApi] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -30,7 +30,7 @@ import library default; // --- fail_main_import_default.carbon -// CHECK:STDERR: fail_main_import_default.carbon:[[@LINE+4]]:1: error(ExplicitImportApi): explicit import of `api` from `impl` file is redundant with implicit import +// CHECK:STDERR: fail_main_import_default.carbon:[[@LINE+4]]:1: error: explicit import of `api` from `impl` file is redundant with implicit import [ExplicitImportApi] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -40,7 +40,7 @@ import library default; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_main_lib_import_default.carbon:[[@LINE+3]]:1: error(ImportMainDefaultLibrary): cannot import `Main//default` +// CHECK:STDERR: fail_main_lib_import_default.carbon:[[@LINE+3]]:1: error: cannot import `Main//default` [ImportMainDefaultLibrary] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ import library default; diff --git a/toolchain/check/testdata/packages/fail_import_invalid.carbon b/toolchain/check/testdata/packages/fail_import_invalid.carbon index 9b8681914527..4de0fa10f500 100644 --- a/toolchain/check/testdata/packages/fail_import_invalid.carbon +++ b/toolchain/check/testdata/packages/fail_import_invalid.carbon @@ -10,13 +10,13 @@ // --- fail_main.carbon -// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error(ImportCurrentPackageByName): imports from the current package must omit the package name +// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error: imports from the current package must omit the package name [ImportCurrentPackageByName] // CHECK:STDERR: import Main; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Main; -// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error(ImportCurrentPackageByName): imports from the current package must omit the package name +// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error: imports from the current package must omit the package name [ImportCurrentPackageByName] // CHECK:STDERR: import Main library "lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -26,13 +26,13 @@ import Main library "lib"; package NotMain; -// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error(ImportMainPackage): cannot import `Main` from other packages +// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error: cannot import `Main` from other packages [ImportMainPackage] // CHECK:STDERR: import Main; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Main; -// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error(ImportMainPackage): cannot import `Main` from other packages +// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error: cannot import `Main` from other packages [ImportMainPackage] // CHECK:STDERR: import Main library "lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -42,7 +42,7 @@ import Main library "lib"; package This; -// CHECK:STDERR: fail_this.carbon:[[@LINE+4]]:1: error(ImportSelf): file cannot import itself +// CHECK:STDERR: fail_this.carbon:[[@LINE+4]]:1: error: file cannot import itself [ImportSelf] // CHECK:STDERR: import This; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -52,7 +52,7 @@ import This; package This library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_this_lib.carbon:[[@LINE+4]]:1: error(ImportSelf): file cannot import itself +// CHECK:STDERR: fail_this_lib.carbon:[[@LINE+4]]:1: error: file cannot import itself [ImportSelf] // CHECK:STDERR: import library "this_lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -66,7 +66,7 @@ package Implicit; impl package Implicit; -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+4]]:1: error(ExplicitImportApi): explicit import of `api` from `impl` file is redundant with implicit import +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+4]]:1: error: explicit import of `api` from `impl` file is redundant with implicit import [ExplicitImportApi] // CHECK:STDERR: import Implicit; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -80,7 +80,7 @@ package Implicit library "[[@TEST_NAME]]"; impl package Implicit library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_implicit_lib.impl.carbon:[[@LINE+4]]:1: error(ExplicitImportApi): explicit import of `api` from `impl` file is redundant with implicit import +// CHECK:STDERR: fail_implicit_lib.impl.carbon:[[@LINE+4]]:1: error: explicit import of `api` from `impl` file is redundant with implicit import [ExplicitImportApi] // CHECK:STDERR: import Implicit library "implicit_lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -89,7 +89,7 @@ import Implicit library "implicit_lib"; // --- fail_not_found.carbon package NotFound; -// CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:1: error(ImportNotFound): imported API 'ImportNotFound' not found +// CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:1: error: imported API 'ImportNotFound' not found [ImportNotFound] // CHECK:STDERR: import ImportNotFound; // CHECK:STDERR: ^~~~~~ import ImportNotFound; diff --git a/toolchain/check/testdata/packages/fail_import_repeat.carbon b/toolchain/check/testdata/packages/fail_import_repeat.carbon index 65ff44db01fa..ef1dd72dceb5 100644 --- a/toolchain/check/testdata/packages/fail_import_repeat.carbon +++ b/toolchain/check/testdata/packages/fail_import_repeat.carbon @@ -23,30 +23,30 @@ library "[[@TEST_NAME]]"; // --- fail_import.carbon import Api; -// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error(RepeatedImport): library imported more than once +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once [RepeatedImport] // CHECK:STDERR: import Api; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note(FirstImported): first import here +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note: first import here [FirstImported] // CHECK:STDERR: import Api; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Api; import Api library "api_lib"; -// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error(RepeatedImport): library imported more than once +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once [RepeatedImport] // CHECK:STDERR: import Api library "api_lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note(FirstImported): first import here +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note: first import here [FirstImported] // CHECK:STDERR: import Api library "api_lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Api library "api_lib"; import library "main_lib"; -// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error(RepeatedImport): library imported more than once +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once [RepeatedImport] // CHECK:STDERR: import library "main_lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note(FirstImported): first import here +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: note: first import here [FirstImported] // CHECK:STDERR: import library "main_lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -57,10 +57,10 @@ import library "main_lib"; package Api library "[[@TEST_NAME]]"; import library default; -// CHECK:STDERR: fail_default_import.carbon:[[@LINE+6]]:1: error(RepeatedImport): library imported more than once +// CHECK:STDERR: fail_default_import.carbon:[[@LINE+6]]:1: error: library imported more than once [RepeatedImport] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_default_import.carbon:[[@LINE-4]]:1: note(FirstImported): first import here +// CHECK:STDERR: fail_default_import.carbon:[[@LINE-4]]:1: note: first import here [FirstImported] // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ import library default; diff --git a/toolchain/check/testdata/packages/fail_import_type_error.carbon b/toolchain/check/testdata/packages/fail_import_type_error.carbon index 2bff2d402e9c..62b457a80a4a 100644 --- a/toolchain/check/testdata/packages/fail_import_type_error.carbon +++ b/toolchain/check/testdata/packages/fail_import_type_error.carbon @@ -12,22 +12,22 @@ package Implicit; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:12: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:12: error: name `x` not found [NameNotFound] // CHECK:STDERR: var a_ref: x; // CHECK:STDERR: ^ // CHECK:STDERR: var a_ref: x; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:18: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:18: error: name `x` not found [NameNotFound] // CHECK:STDERR: var b_ref: {.a = x}; // CHECK:STDERR: ^ // CHECK:STDERR: var b_ref: {.a = x}; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:13: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:13: error: name `x` not found [NameNotFound] // CHECK:STDERR: var c_ref: (x,); // CHECK:STDERR: ^ // CHECK:STDERR: var c_ref: (x,); -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+3]]:12: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+3]]:12: error: name `x` not found [NameNotFound] // CHECK:STDERR: var d_ref: x*; // CHECK:STDERR: ^ var d_ref: x*; diff --git a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon index ba54acad2931..faf91ab44053 100644 --- a/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon +++ b/toolchain/check/testdata/packages/fail_name_with_import_failure.carbon @@ -10,7 +10,7 @@ // --- fail_implicit.impl.carbon -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:6: error(LibraryApiNotFound): corresponding API for 'Implicit' not found +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:6: error: corresponding API for 'Implicit' not found [LibraryApiNotFound] // CHECK:STDERR: impl package Implicit; // CHECK:STDERR: ^~~~~~~ impl package Implicit; diff --git a/toolchain/check/testdata/packages/fail_package_main.carbon b/toolchain/check/testdata/packages/fail_package_main.carbon index 3da0014cc75e..b1da8dbc95b2 100644 --- a/toolchain/check/testdata/packages/fail_package_main.carbon +++ b/toolchain/check/testdata/packages/fail_package_main.carbon @@ -10,7 +10,7 @@ // --- fail_main.carbon -// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error(ExplicitMainPackage): `Main//default` must omit `package` declaration +// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error: `Main//default` must omit `package` declaration [ExplicitMainPackage] // CHECK:STDERR: package Main; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -18,7 +18,7 @@ package Main; // --- fail_main_impl.carbon -// CHECK:STDERR: fail_main_impl.carbon:[[@LINE+4]]:6: error(ExplicitMainPackage): `Main//default` must omit `package` declaration +// CHECK:STDERR: fail_main_impl.carbon:[[@LINE+4]]:6: error: `Main//default` must omit `package` declaration [ExplicitMainPackage] // CHECK:STDERR: impl package Main; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -27,7 +27,7 @@ impl package Main; // --- fail_raw_main.carbon // `Main` isn't a keyword, so this fails the same way. -// CHECK:STDERR: fail_raw_main.carbon:[[@LINE+4]]:1: error(ExplicitMainPackage): `Main//default` must omit `package` declaration +// CHECK:STDERR: fail_raw_main.carbon:[[@LINE+4]]:1: error: `Main//default` must omit `package` declaration [ExplicitMainPackage] // CHECK:STDERR: package r#Main; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -35,7 +35,7 @@ package r#Main; // --- fail_main_lib.carbon -// CHECK:STDERR: fail_main_lib.carbon:[[@LINE+3]]:1: error(ExplicitMainLibrary): use `library` declaration in `Main` package libraries +// CHECK:STDERR: fail_main_lib.carbon:[[@LINE+3]]:1: error: use `library` declaration in `Main` package libraries [ExplicitMainLibrary] // CHECK:STDERR: package Main library "main_lib"; // CHECK:STDERR: ^~~~~~~ package Main library "[[@TEST_NAME]]"; diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon index 99c34890026f..c5407fe2b18a 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -153,18 +153,18 @@ import Other library "conflict"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: base.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: base.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: conflict.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: conflict.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn C() {} // CHECK:STDERR: ^~~~~~~~ import Other library "export_import"; import Other library "conflict"; -// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+4]]:11: note(InNameLookup): in name lookup for `C` +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+4]]:11: note: in name lookup for `C` [InNameLookup] // CHECK:STDERR: alias C = Other.C; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -174,19 +174,19 @@ alias C = Other.C; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+9]]:1(InImport): in import -// CHECK:STDERR: conflict.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+9]]:1: in import [InImport] +// CHECK:STDERR: conflict.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn C() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: export_name.carbon:4:1(InImport): in import -// CHECK:STDERR: base.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: export_name.carbon:4:1: in import [InImport] +// CHECK:STDERR: base.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ import Other library "export_name"; import Other library "conflict"; -// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+3]]:11: note(InNameLookup): in name lookup for `C` +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+3]]:11: note: in name lookup for `C` [InNameLookup] // CHECK:STDERR: alias C = Other.C; // CHECK:STDERR: ^~~~~~~ alias C = Other.C; diff --git a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon index 180bc097138b..db74b6096c29 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -70,19 +70,19 @@ fn Run() { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: other_fn_extern.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: other_fn_extern.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: other_fn.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: other_fn.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ import Other library "other_fn"; import Other library "other_fn_extern"; fn Run() { - // CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+4]]:3: note(InNameLookup): in name lookup for `F` + // CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+4]]:3: note: in name lookup for `F` [InNameLookup] // CHECK:STDERR: Other.F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -100,19 +100,19 @@ import Other library "other_fn_conflict"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+8]]:1(InImport): in import -// CHECK:STDERR: other_fn_conflict.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+8]]:1: in import [InImport] +// CHECK:STDERR: other_fn_conflict.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: fn F(x: ()) {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+4]]:1(InImport): in import -// CHECK:STDERR: other_fn.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+4]]:1: in import [InImport] +// CHECK:STDERR: other_fn.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ import Other library "other_fn"; import Other library "other_fn_conflict"; fn Run() { - // CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+4]]:3: note(InNameLookup): in name lookup for `F` + // CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+4]]:3: note: in name lookup for `F` [InNameLookup] // CHECK:STDERR: Other.F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -124,21 +124,21 @@ fn Run() { library "[[@TEST_NAME]]"; import library "main_other_ns"; -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-4]]:1(InImport): in import -// CHECK:STDERR: main_other_ns.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-4]]:1: in import [InImport] +// CHECK:STDERR: main_other_ns.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: import Other library "other_fn"; -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+8]]:1: error(RedeclRedundant): redeclaration of `fn F` is redundant +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+8]]:1: error: redeclaration of `fn F` is redundant [RedeclRedundant] // CHECK:STDERR: fn Other.F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: other_fn.carbon:4:1: note(RedeclPrevDecl): previously declared here +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: other_fn.carbon:4:1: note: previously declared here [RedeclPrevDecl] // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -150,10 +150,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE+7]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE+7]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -168,10 +168,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE+7]]:11: error(QualifiedDeclOutsidePackage): imported packages cannot be used for declarations +// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE+7]]:11: error: imported packages cannot be used for declarations [QualifiedDeclOutsidePackage] // CHECK:STDERR: namespace Other.Nested; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE-5]]:1: note(QualifiedDeclOutsidePackageSource): package imported here +// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE-5]]:1: note: package imported here [QualifiedDeclOutsidePackageSource] // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -186,10 +186,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE+7]]:4: error(QualifiedDeclOutsidePackage): imported packages cannot be used for declarations +// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE+7]]:4: error: imported packages cannot be used for declarations [QualifiedDeclOutsidePackage] // CHECK:STDERR: fn Other.G() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE-5]]:1: note(QualifiedDeclOutsidePackageSource): package imported here +// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE-5]]:1: note: package imported here [QualifiedDeclOutsidePackageSource] // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -201,7 +201,7 @@ library "[[@TEST_NAME]]"; import Other library "other_fn_use"; -// CHECK:STDERR: fail_use_other_fn_use.carbon:[[@LINE+3]]:13: error(NameNotFound): name `F` not found +// CHECK:STDERR: fail_use_other_fn_use.carbon:[[@LINE+3]]:13: error: name `F` not found [NameNotFound] // CHECK:STDERR: fn UseF() { Other.F(); } // CHECK:STDERR: ^~~~~~~ fn UseF() { Other.F(); } diff --git a/toolchain/check/testdata/packages/no_prelude/export_import.carbon b/toolchain/check/testdata/packages/no_prelude/export_import.carbon index a44fd40a33f3..70de99dec0d4 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_import.carbon @@ -72,7 +72,7 @@ var c: C = {.x = ()}; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_export_in_impl.impl.carbon:[[@LINE+4]]:1: error(ExportFromImpl): `export` is only allowed in API files +// CHECK:STDERR: fail_export_in_impl.impl.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files [ExportFromImpl] // CHECK:STDERR: export import library "base"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -144,7 +144,7 @@ library "[[@TEST_NAME]]"; import library "non_export"; -// CHECK:STDERR: fail_use_non_export.carbon:[[@LINE+3]]:15: error(NameNotFound): name `C` not found +// CHECK:STDERR: fail_use_non_export.carbon:[[@LINE+3]]:15: error: name `C` not found [NameNotFound] // CHECK:STDERR: alias Local = C; // CHECK:STDERR: ^ alias Local = C; diff --git a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon index 8cf9577498e3..0383ef14e90c 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_mixed.carbon @@ -88,7 +88,7 @@ library "[[@TEST_NAME]]"; import library "export_import_then_name"; import library "export_name_then_import"; -// CHECK:STDERR: fail_nonexport_use_both.carbon:[[@LINE+3]]:8: error(NameNotFound): name `D` not found +// CHECK:STDERR: fail_nonexport_use_both.carbon:[[@LINE+3]]:8: error: name `D` not found [NameNotFound] // CHECK:STDERR: var d: D = {.y = ()}; // CHECK:STDERR: ^ var d: D = {.y = ()}; diff --git a/toolchain/check/testdata/packages/no_prelude/export_name.carbon b/toolchain/check/testdata/packages/no_prelude/export_name.carbon index abefdfef72cf..698f16a2bd26 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -87,11 +87,11 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_export_ns.carbon:[[@LINE+8]]:1: error(ExportNotImportedEntity): only imported entities are valid for `export` +// CHECK:STDERR: fail_export_ns.carbon:[[@LINE+8]]:1: error: only imported entities are valid for `export` [ExportNotImportedEntity] // CHECK:STDERR: export NS; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_export_ns.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: base.carbon:8:1: note(ExportNotImportedEntitySource): name is declared here +// CHECK:STDERR: fail_export_ns.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: base.carbon:8:1: note: name is declared here [ExportNotImportedEntitySource] // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -103,10 +103,10 @@ library "[[@TEST_NAME]]"; class Local {} -// CHECK:STDERR: fail_export_decl.carbon:[[@LINE+7]]:1: error(ExportNotImportedEntity): only imported entities are valid for `export` +// CHECK:STDERR: fail_export_decl.carbon:[[@LINE+7]]:1: error: only imported entities are valid for `export` [ExportNotImportedEntity] // CHECK:STDERR: export Local; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_export_decl.carbon:[[@LINE-5]]:1: note(ExportNotImportedEntitySource): name is declared here +// CHECK:STDERR: fail_export_decl.carbon:[[@LINE-5]]:1: note: name is declared here [ExportNotImportedEntitySource] // CHECK:STDERR: class Local {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -118,11 +118,11 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_export_member.carbon:[[@LINE+8]]:8: error(QualifiedNameInNonScope): name qualifiers are only allowed for entities that provide a scope +// CHECK:STDERR: fail_export_member.carbon:[[@LINE+8]]:8: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope] // CHECK:STDERR: export C.x; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_export_member.carbon:[[@LINE-5]]:1(InImport): in import -// CHECK:STDERR: base.carbon:4:1: note(QualifiedNameNonScopeEntity): referenced non-scope entity declared here +// CHECK:STDERR: fail_export_member.carbon:[[@LINE-5]]:1: in import [InImport] +// CHECK:STDERR: base.carbon:4:1: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity] // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -154,12 +154,12 @@ library "[[@TEST_NAME]]"; import library "not_reexporting"; -// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:15: error(NameNotFound): name `C` not found +// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:15: error: name `C` not found [NameNotFound] // CHECK:STDERR: alias Local = C; // CHECK:STDERR: ^ // CHECK:STDERR: alias Local = C; -// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:17: error(NameNotFound): name `NS` not found +// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:17: error: name `NS` not found [NameNotFound] // CHECK:STDERR: alias NSLocal = NS.NSC; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -172,10 +172,10 @@ library "[[@TEST_NAME]]"; import library "base"; export C; -// CHECK:STDERR: repeat_export.carbon:[[@LINE+7]]:1: warning(ExportRedundant): `export` matches previous `export` +// CHECK:STDERR: repeat_export.carbon:[[@LINE+7]]:1: warning: `export` matches previous `export` [ExportRedundant] // CHECK:STDERR: export C; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: repeat_export.carbon:[[@LINE-4]]:1: note(ExportPrevious): previous `export` here +// CHECK:STDERR: repeat_export.carbon:[[@LINE-4]]:1: note: previous `export` here [ExportPrevious] // CHECK:STDERR: export C; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -195,7 +195,7 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `export` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `private` not allowed on `export` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private export C; // CHECK:STDERR: ^~~~~~~ private export C; diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon index 5c8ce3bfa9cb..c1043df16644 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_member.carbon @@ -24,11 +24,11 @@ import library "a"; // TODO: This diagnostic doesn't clearly explain the problem. We should instead // say something like: Only namespace-scope names can be exported. -// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:8: error(QualifiedNameInNonScope): name qualifiers are only allowed for entities that provide a scope +// CHECK:STDERR: fail_b.carbon:[[@LINE+7]]:8: error: name qualifiers are only allowed for entities that provide a scope [QualifiedNameInNonScope] // CHECK:STDERR: export C.n; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_b.carbon:[[@LINE-7]]:1(InImport): in import -// CHECK:STDERR: a.carbon:4:1: note(QualifiedNameNonScopeEntity): referenced non-scope entity declared here +// CHECK:STDERR: fail_b.carbon:[[@LINE-7]]:1: in import [InImport] +// CHECK:STDERR: a.carbon:4:1: note: referenced non-scope entity declared here [QualifiedNameNonScopeEntity] // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ export C.n; diff --git a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon index 70f6c15c1123..02e65fdb73bc 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_export_name_params.carbon @@ -23,7 +23,7 @@ import library "a"; export C1; -// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:10: error(UnexpectedDeclNameParams): `export` declaration cannot have parameters +// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:10: error: `export` declaration cannot have parameters [UnexpectedDeclNameParams] // CHECK:STDERR: export C2(T:! type); // CHECK:STDERR: ^~~~~~~~~~ export C2(T:! type); diff --git a/toolchain/check/testdata/packages/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/packages/no_prelude/fail_modifiers.carbon index 2825d6e9037f..7acaeb69674d 100644 --- a/toolchain/check/testdata/packages/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/packages/no_prelude/fail_modifiers.carbon @@ -10,7 +10,7 @@ // --- fail_export_package.carbon -// CHECK:STDERR: fail_export_package.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `export` not allowed on `package` declaration +// CHECK:STDERR: fail_export_package.carbon:[[@LINE+4]]:1: error: `export` not allowed on `package` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: export package ExportPackage; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -18,7 +18,7 @@ export package ExportPackage; // --- fail_extend_package.carbon -// CHECK:STDERR: fail_extend_package.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `extend` not allowed on `package` declaration +// CHECK:STDERR: fail_extend_package.carbon:[[@LINE+4]]:1: error: `extend` not allowed on `package` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: extend package ExtendPackage; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -26,7 +26,7 @@ extend package ExtendPackage; // --- fail_virtual_package.carbon -// CHECK:STDERR: fail_virtual_package.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `package` declaration +// CHECK:STDERR: fail_virtual_package.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `package` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: virtual package VirtualPackage; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -34,7 +34,7 @@ virtual package VirtualPackage; // --- fail_private_package.carbon -// CHECK:STDERR: fail_private_package.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `package` declaration +// CHECK:STDERR: fail_private_package.carbon:[[@LINE+4]]:1: error: `private` not allowed on `package` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private package PrivatePackage; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -42,7 +42,7 @@ private package PrivatePackage; // --- fail_export_library.carbon -// CHECK:STDERR: fail_export_library.carbon:[[@LINE+4]]:1: error(ModifierNotAllowedOnDeclaration): `export` not allowed on `library` declaration +// CHECK:STDERR: fail_export_library.carbon:[[@LINE+4]]:1: error: `export` not allowed on `library` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: export library "export_library"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -50,51 +50,51 @@ export library "export_library"; // --- fail_import_modifiers.carbon -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error(ModifierNotAllowedOnDeclaration): `impl` not allowed on `import` declaration +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `impl` not allowed on `import` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: impl import ImplImport; // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error(ImportNotFound): imported API 'ImplImport' not found +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error: imported API 'ImplImport' not found [ImportNotFound] // CHECK:STDERR: impl import ImplImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl import ImplImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error(ModifierNotAllowedOnDeclaration): `extend` not allowed on `import` declaration +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `extend` not allowed on `import` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: extend import ExtendImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:8: error(ImportNotFound): imported API 'ExtendImport' not found +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:8: error: imported API 'ExtendImport' not found [ImportNotFound] // CHECK:STDERR: extend import ExtendImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: extend import ExtendImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error(ModifierNotAllowedOnDeclaration): `virtual` not allowed on `import` declaration +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `virtual` not allowed on `import` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: virtual import VirtualImport; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:9: error(ImportNotFound): imported API 'VirtualImport' not found +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:9: error: imported API 'VirtualImport' not found [ImportNotFound] // CHECK:STDERR: virtual import VirtualImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: virtual import VirtualImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error(ModifierNotAllowedOnDeclaration): `base` not allowed on `import` declaration +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `base` not allowed on `import` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: base import BaseImport; // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error(ImportNotFound): imported API 'BaseImport' not found +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error: imported API 'BaseImport' not found [ImportNotFound] // CHECK:STDERR: base import BaseImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: base import BaseImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+7]]:1: error(ModifierNotAllowedOnDeclaration): `private` not allowed on `import` declaration +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+7]]:1: error: `private` not allowed on `import` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: private import PrivateImport; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+3]]:9: error(ImportNotFound): imported API 'PrivateImport' not found +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+3]]:9: error: imported API 'PrivateImport' not found [ImportNotFound] // CHECK:STDERR: private import PrivateImport; // CHECK:STDERR: ^~~~~~ private import PrivateImport; diff --git a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon index e7986b54fd5a..bdb53b73c797 100644 --- a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon @@ -131,12 +131,12 @@ import Other library "o1"; // --- fail_import_conflict.impl.carbon -// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+9]]:6(InImport): in import -// CHECK:STDERR: import_conflict.carbon:4:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+9]]:6: in import [InImport] +// CHECK:STDERR: import_conflict.carbon:4:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: import Other library "o1"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+5]]:6(InImport): in import -// CHECK:STDERR: local_other.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+5]]:6: in import [InImport] +// CHECK:STDERR: local_other.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class Other {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -154,12 +154,12 @@ import library "local_other"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE+8]]:1: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE+8]]:1: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: import Other library "o1"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: import_conflict_reverse.carbon:4:1(InImport): in import -// CHECK:STDERR: local_other.carbon:4:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: import_conflict_reverse.carbon:4:1: in import [InImport] +// CHECK:STDERR: local_other.carbon:4:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: class Other {} // CHECK:STDERR: ^~~~~~~~~~~~~ import Other library "o1"; diff --git a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon index 7bf92b984d08..eb295ed81a3c 100644 --- a/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon +++ b/toolchain/check/testdata/packages/no_prelude/missing_prelude.carbon @@ -12,7 +12,7 @@ library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_missing_prelude.carbon:[[@LINE+4]]:8: error(CoreNotFound): package `Core` implicitly referenced here, but not found +// CHECK:STDERR: fail_missing_prelude.carbon:[[@LINE+4]]:8: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -28,7 +28,7 @@ library "[[@TEST_NAME]]"; import Core library "prelude_empty"; -// CHECK:STDERR: fail_missing_prelude_member.carbon:[[@LINE+4]]:8: error(CoreNameNotFound): name `Core.Int32` implicitly referenced here, but not found +// CHECK:STDERR: fail_missing_prelude_member.carbon:[[@LINE+4]]:8: error: name `Core.Int32` implicitly referenced here, but not found [CoreNameNotFound] // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -80,7 +80,7 @@ class Core { fn Int32() -> {} { return {}; } } -// CHECK:STDERR: fail_prelude_as_class.carbon:[[@LINE+3]]:13: error(CoreNotFound): package `Core` implicitly referenced here, but not found +// CHECK:STDERR: fail_prelude_as_class.carbon:[[@LINE+3]]:13: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: var n: {} = i32; // CHECK:STDERR: ^~~ var n: {} = i32; diff --git a/toolchain/check/testdata/pointer/fail_address_of_error.carbon b/toolchain/check/testdata/pointer/fail_address_of_error.carbon index ad85a83cd19a..349c70a86e42 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_error.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_error.carbon @@ -9,16 +9,16 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_address_of_error.carbon fn Test() { - // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+4]]:4: error(NameNotFound): name `undeclared` not found + // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+4]]:4: error: name `undeclared` not found [NameNotFound] // CHECK:STDERR: &undeclared; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: &undeclared; - // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+7]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+7]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &(&undeclared); // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+3]]:6: error(NameNotFound): name `undeclared` not found + // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+3]]:6: error: name `undeclared` not found [NameNotFound] // CHECK:STDERR: &(&undeclared); // CHECK:STDERR: ^~~~~~~~~~ &(&undeclared); diff --git a/toolchain/check/testdata/pointer/fail_address_of_value.carbon b/toolchain/check/testdata/pointer/fail_address_of_value.carbon index fad1250c5f10..310ff13c058f 100644 --- a/toolchain/check/testdata/pointer/fail_address_of_value.carbon +++ b/toolchain/check/testdata/pointer/fail_address_of_value.carbon @@ -13,32 +13,32 @@ fn G() -> i32; fn H() -> {.a: i32}; fn AddressOfLiteral() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &0; // CHECK:STDERR: ^ // CHECK:STDERR: &0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &true; // CHECK:STDERR: ^ // CHECK:STDERR: &true; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &1.0; // CHECK:STDERR: ^ // CHECK:STDERR: &1.0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &"Hello"; // CHECK:STDERR: ^ // CHECK:STDERR: &"Hello"; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &(1, 2); // CHECK:STDERR: ^ // CHECK:STDERR: &(1, 2); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &{.a = 5}; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -46,17 +46,17 @@ fn AddressOfLiteral() { } fn AddressOfOperator() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &(true and false); // CHECK:STDERR: ^ // CHECK:STDERR: &(true and false); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfEphemeralRef): cannot take the address of a temporary object + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of a temporary object [AddrOfEphemeralRef] // CHECK:STDERR: &H().a; // CHECK:STDERR: ^ // CHECK:STDERR: &H().a; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &(not true); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -64,7 +64,7 @@ fn AddressOfOperator() { } fn AddressOfCall() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &G(); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -72,12 +72,12 @@ fn AddressOfCall() { } fn AddressOfType() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &i32; // CHECK:STDERR: ^ // CHECK:STDERR: &i32; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &(const i32*); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -85,7 +85,7 @@ fn AddressOfType() { } fn AddressOfTupleElementValue() { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: &((1, 2).0); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -93,7 +93,7 @@ fn AddressOfTupleElementValue() { } fn AddressOfParam(param: i32) { - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:26: error(AddrOfNonRef): cannot take the address of non-reference expression + // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+3]]:26: error: cannot take the address of non-reference expression [AddrOfNonRef] // CHECK:STDERR: var param_addr: i32* = ¶m; // CHECK:STDERR: ^ var param_addr: i32* = ¶m; diff --git a/toolchain/check/testdata/pointer/fail_deref_error.carbon b/toolchain/check/testdata/pointer/fail_deref_error.carbon index 70c1787c8b55..135574685bb0 100644 --- a/toolchain/check/testdata/pointer/fail_deref_error.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_error.carbon @@ -8,12 +8,12 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_deref_error.carbon -// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+4]]:15: error(NameNotFound): name `undeclared` not found +// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+4]]:15: error: name `undeclared` not found [NameNotFound] // CHECK:STDERR: let n: i32 = *undeclared; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: let n: i32 = *undeclared; -// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+3]]:15: error(NameNotFound): name `undeclared` not found +// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+3]]:15: error: name `undeclared` not found [NameNotFound] // CHECK:STDERR: let n2: i32 = undeclared->foo; // CHECK:STDERR: ^~~~~~~~~~ let n2: i32 = undeclared->foo; diff --git a/toolchain/check/testdata/pointer/fail_deref_function.carbon b/toolchain/check/testdata/pointer/fail_deref_function.carbon index dbeba356d24f..1196a7669a87 100644 --- a/toolchain/check/testdata/pointer/fail_deref_function.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_function.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_deref_function.carbon fn A() { - // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+4]]:4: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+4]]:4: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: *A; // CHECK:STDERR: ^ // CHECK:STDERR: *A; - // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+3]]:3: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+3]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: A->foo; // CHECK:STDERR: ^ A->foo; diff --git a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon index e215bfb64db6..5015002daa06 100644 --- a/toolchain/check/testdata/pointer/fail_deref_namespace.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_namespace.carbon @@ -11,12 +11,12 @@ namespace A; fn F() { - // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+4]]:4: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+4]]:4: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: *A; // CHECK:STDERR: ^ // CHECK:STDERR: *A; - // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+3]]:3: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+3]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: A->foo; // CHECK:STDERR: ^ A->foo; diff --git a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon index 79a60da9c8a4..66faebd45fdf 100644 --- a/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon @@ -9,32 +9,32 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_deref_not_pointer.carbon fn Deref(n: i32) { - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error(DerefOfNonPointer): cannot dereference operand of non-pointer type `i32` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error: cannot dereference operand of non-pointer type `i32` [DerefOfNonPointer] // CHECK:STDERR: *n; // CHECK:STDERR: ^ // CHECK:STDERR: *n; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:4: error(ArrowOperatorOfNonPointer): cannot apply `->` operator to non-pointer type `i32` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:4: error: cannot apply `->` operator to non-pointer type `i32` [ArrowOperatorOfNonPointer] // CHECK:STDERR: n->foo; // CHECK:STDERR: ^~ // CHECK:STDERR: n->foo; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error(DerefOfNonPointer): cannot dereference operand of non-pointer type `()` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error: cannot dereference operand of non-pointer type `()` [DerefOfNonPointer] // CHECK:STDERR: *(); // CHECK:STDERR: ^ // CHECK:STDERR: *(); - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:5: error(ArrowOperatorOfNonPointer): cannot apply `->` operator to non-pointer type `()` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:5: error: cannot apply `->` operator to non-pointer type `()` [ArrowOperatorOfNonPointer] // CHECK:STDERR: ()->foo; // CHECK:STDERR: ^~ // CHECK:STDERR: ()->foo; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error(DerefOfNonPointer): cannot dereference operand of non-pointer type `{}` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: error: cannot dereference operand of non-pointer type `{}` [DerefOfNonPointer] // CHECK:STDERR: *{}; // CHECK:STDERR: ^ // CHECK:STDERR: *{}; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:5: error(ArrowOperatorOfNonPointer): cannot apply `->` operator to non-pointer type `{}` + // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:5: error: cannot apply `->` operator to non-pointer type `{}` [ArrowOperatorOfNonPointer] // CHECK:STDERR: {}->foo; // CHECK:STDERR: ^~ {}->foo; diff --git a/toolchain/check/testdata/pointer/fail_deref_type.carbon b/toolchain/check/testdata/pointer/fail_deref_type.carbon index 44b4da2faec4..180a7264afea 100644 --- a/toolchain/check/testdata/pointer/fail_deref_type.carbon +++ b/toolchain/check/testdata/pointer/fail_deref_type.carbon @@ -8,15 +8,15 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_deref_type.carbon -// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+7]]:8: error(DerefOfNonPointer): cannot dereference operand of non-pointer type `type` +// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+7]]:8: error: cannot dereference operand of non-pointer type `type` [DerefOfNonPointer] // CHECK:STDERR: var p: *i32; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+4]]:8: note(DerefOfType): to form a pointer type, write the `*` after the pointee type +// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+4]]:8: note: to form a pointer type, write the `*` after the pointee type [DerefOfType] // CHECK:STDERR: var p: *i32; // CHECK:STDERR: ^ // CHECK:STDERR: var p: *i32; -// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+3]]:12: error(ArrowOperatorOfNonPointer): cannot apply `->` operator to non-pointer type `type` +// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+3]]:12: error: cannot apply `->` operator to non-pointer type `type` [ArrowOperatorOfNonPointer] // CHECK:STDERR: var p2: i32->foo; // CHECK:STDERR: ^~ var p2: i32->foo; diff --git a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon index cdc0a314a6e2..ea561453db95 100644 --- a/toolchain/check/testdata/pointer/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/pointer/fail_type_mismatch.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/pointer/fail_type_mismatch.carbon fn ConstMismatch(p: const {}*) -> const ({}*) { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `const {}*` to `const ({}*)` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `const {}*` to `const ({}*)` [ImplicitAsConversionFailure] // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `const {}*` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: note: type `const {}*` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ return p; diff --git a/toolchain/check/testdata/return/fail_call_in_type.carbon b/toolchain/check/testdata/return/fail_call_in_type.carbon index 9135087cf53e..4740c1d7e864 100644 --- a/toolchain/check/testdata/return/fail_call_in_type.carbon +++ b/toolchain/check/testdata/return/fail_call_in_type.carbon @@ -11,7 +11,7 @@ // TODO: Some variant of this should work, once compile-time function calls are // supported. fn ReturnType() -> type { return i32; } -// CHECK:STDERR: fail_call_in_type.carbon:[[@LINE+3]]:13: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_call_in_type.carbon:[[@LINE+3]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn Six() -> ReturnType() { return 6; } // CHECK:STDERR: ^~~~~~~~~~~~ fn Six() -> ReturnType() { return 6; } diff --git a/toolchain/check/testdata/return/fail_error_in_type.carbon b/toolchain/check/testdata/return/fail_error_in_type.carbon index ed8db591f0dc..3dad1c534d41 100644 --- a/toolchain/check/testdata/return/fail_error_in_type.carbon +++ b/toolchain/check/testdata/return/fail_error_in_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_error_in_type.carbon -// CHECK:STDERR: fail_error_in_type.carbon:[[@LINE+3]]:13: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_error_in_type.carbon:[[@LINE+3]]:13: error: name `x` not found [NameNotFound] // CHECK:STDERR: fn Six() -> x; // CHECK:STDERR: ^ fn Six() -> x; diff --git a/toolchain/check/testdata/return/fail_let_in_type.carbon b/toolchain/check/testdata/return/fail_let_in_type.carbon index 7da27836e95c..d7261f9c84f8 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -9,30 +9,30 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_let_in_type.carbon let x: type = i32; -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:13: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn Six() -> x { return 6; } // CHECK:STDERR: ^ // CHECK:STDERR: fn Six() -> x { return 6; } // TODO: This should probably work. -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:5: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:5: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let y:! type = i32; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: let y:! type = i32; -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:19: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:19: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn HalfDozen() -> y { return 6; } // CHECK:STDERR: ^ // CHECK:STDERR: fn HalfDozen() -> y { return 6; } // TODO: This should work. -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+7]]:5: error(SemanticsTodo): semantics TODO: `HandleTemplate` +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+7]]:5: error: semantics TODO: `HandleTemplate` [SemanticsTodo] // CHECK:STDERR: let template z:! type = i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+3]]:14: error(SemanticsTodo): semantics TODO: ``let` compile time binding outside function or interface` +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+3]]:14: error: semantics TODO: ``let` compile time binding outside function or interface` [SemanticsTodo] // CHECK:STDERR: let template z:! type = i32; // CHECK:STDERR: ^~~~~~~~ let template z:! type = i32; diff --git a/toolchain/check/testdata/return/fail_missing_return.carbon b/toolchain/check/testdata/return/fail_missing_return.carbon index 644d43cc121b..8c7767eee80a 100644 --- a/toolchain/check/testdata/return/fail_missing_return.carbon +++ b/toolchain/check/testdata/return/fail_missing_return.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_missing_return.carbon fn Main() -> i32 { -// CHECK:STDERR: fail_missing_return.carbon:[[@LINE+3]]:1: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_missing_return.carbon:[[@LINE+3]]:1: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon index 2d0c10112dbe..48599ea35410 100644 --- a/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon +++ b/toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_missing_return_empty_tuple.carbon fn F() -> () { -// CHECK:STDERR: fail_missing_return_empty_tuple.carbon:[[@LINE+3]]:1: error(MissingReturnStatement): missing `return` at end of function with declared return type +// CHECK:STDERR: fail_missing_return_empty_tuple.carbon:[[@LINE+3]]:1: error: missing `return` at end of function with declared return type [MissingReturnStatement] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon index 3af7e8eb8680..63f6e0658176 100644 --- a/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_return_var_no_returned_var.carbon fn Procedure() -> i32 { - // CHECK:STDERR: fail_return_var_no_returned_var.carbon:[[@LINE+3]]:3: error(ReturnVarWithNoReturnedVar): `return var;` with no `returned var` in scope + // CHECK:STDERR: fail_return_var_no_returned_var.carbon:[[@LINE+3]]:3: error: `return var;` with no `returned var` in scope [ReturnVarWithNoReturnedVar] // CHECK:STDERR: return var; // CHECK:STDERR: ^~~~~~~~~~~ return var; diff --git a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon index d76421c74025..25a72833c2a6 100644 --- a/toolchain/check/testdata/return/fail_return_with_returned_var.carbon +++ b/toolchain/check/testdata/return/fail_return_with_returned_var.carbon @@ -10,10 +10,10 @@ fn F() -> i32 { returned var v: i32 = 0; - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE+7]]:3: error(ReturnExprWithReturnedVar): can only `return var;` in the scope of a `returned var` + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE+7]]:3: error: can only `return var;` in the scope of a `returned var` [ReturnExprWithReturnedVar] // CHECK:STDERR: return 1; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: note(ReturnedVarHere): `returned var` was declared here + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: note: `returned var` was declared here [ReturnedVarHere] // CHECK:STDERR: returned var v: i32 = 0; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -23,10 +23,10 @@ fn F() -> i32 { class C { var a: i32; var b: i32; } fn G() -> C { returned var c: C = {.a = 1, .b = 2}; - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE+6]]:3: error(ReturnExprWithReturnedVar): can only `return var;` in the scope of a `returned var` + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE+6]]:3: error: can only `return var;` in the scope of a `returned var` [ReturnExprWithReturnedVar] // CHECK:STDERR: return c; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: note(ReturnedVarHere): `returned var` was declared here + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: note: `returned var` was declared here [ReturnedVarHere] // CHECK:STDERR: returned var c: C = {.a = 1, .b = 2}; // CHECK:STDERR: ^ return c; diff --git a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon index 31dcf95a5b44..1f529bd3dd18 100644 --- a/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_returned_var_no_return_type.carbon fn Procedure() { - // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE+6]]:3: error(ReturnedVarWithNoReturnType): cannot declare a `returned var` in this function + // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE+6]]:3: error: cannot declare a `returned var` in this function [ReturnedVarWithNoReturnType] // CHECK:STDERR: returned var v: () = (); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE-4]]:1: note(ReturnTypeOmittedNote): there was no return type provided + // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE-4]]:1: note: there was no return type provided [ReturnTypeOmittedNote] // CHECK:STDERR: fn Procedure() { // CHECK:STDERR: ^~~~~~~~~~~~~~~~ returned var v: () = (); diff --git a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon index b869db39ac04..956023a475a7 100644 --- a/toolchain/check/testdata/return/fail_returned_var_shadow.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_shadow.carbon @@ -11,10 +11,10 @@ fn SameScope() -> i32 { if (true) { returned var v: i32 = 0; - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE+7]]:18: error(ReturnedVarShadowed): cannot declare a `returned var` in the scope of another `returned var` + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE+7]]:18: error: cannot declare a `returned var` in the scope of another `returned var` [ReturnedVarShadowed] // CHECK:STDERR: returned var w: i32 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-4]]:18: note(ReturnedVarHere): `returned var` was declared here + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-4]]:18: note: `returned var` was declared here [ReturnedVarHere] // CHECK:STDERR: returned var v: i32 = 0; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -27,10 +27,10 @@ fn DifferentScopes() -> i32 { if (true) { returned var v: i32 = 0; if (true) { - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE+6]]:20: error(ReturnedVarShadowed): cannot declare a `returned var` in the scope of another `returned var` + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE+6]]:20: error: cannot declare a `returned var` in the scope of another `returned var` [ReturnedVarShadowed] // CHECK:STDERR: returned var w: i32 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-5]]:18: note(ReturnedVarHere): `returned var` was declared here + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-5]]:18: note: `returned var` was declared here [ReturnedVarHere] // CHECK:STDERR: returned var v: i32 = 0; // CHECK:STDERR: ^ returned var w: i32 = 1; diff --git a/toolchain/check/testdata/return/fail_returned_var_type.carbon b/toolchain/check/testdata/return/fail_returned_var_type.carbon index 64f6f97d13ef..dd8019a36a68 100644 --- a/toolchain/check/testdata/return/fail_returned_var_type.carbon +++ b/toolchain/check/testdata/return/fail_returned_var_type.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_returned_var_type.carbon fn Mismatch() -> i32 { - // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE+6]]:19: error(ReturnedVarWrongType): type `f64` of `returned var` does not match return type of enclosing function + // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE+6]]:19: error: type `f64` of `returned var` does not match return type of enclosing function [ReturnedVarWrongType] // CHECK:STDERR: returned var v: f64 = 0.0; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE-4]]:15: note(ReturnTypeHereNote): return type of function is `i32` + // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE-4]]:15: note: return type of function is `i32` [ReturnTypeHereNote] // CHECK:STDERR: fn Mismatch() -> i32 { // CHECK:STDERR: ^~~~~~ returned var v: f64 = 0.0; diff --git a/toolchain/check/testdata/return/fail_type_mismatch.carbon b/toolchain/check/testdata/return/fail_type_mismatch.carbon index 2462b3d40d40..15ddeb3db387 100644 --- a/toolchain/check/testdata/return/fail_type_mismatch.carbon +++ b/toolchain/check/testdata/return/fail_type_mismatch.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_type_mismatch.carbon fn Main() -> i32 { - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: return 1.0; // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: return 1.0; // CHECK:STDERR: ^~~~~~~~~~~ return 1.0; diff --git a/toolchain/check/testdata/return/fail_value_disallowed.carbon b/toolchain/check/testdata/return/fail_value_disallowed.carbon index 3b9dd91f0ddc..3a486949caea 100644 --- a/toolchain/check/testdata/return/fail_value_disallowed.carbon +++ b/toolchain/check/testdata/return/fail_value_disallowed.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_value_disallowed.carbon fn Main() { - // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE+6]]:3: error(ReturnStatementDisallowExpr): no return expression should be provided in this context + // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE+6]]:3: error: no return expression should be provided in this context [ReturnStatementDisallowExpr] // CHECK:STDERR: return 0; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE-4]]:1: note(ReturnTypeOmittedNote): there was no return type provided + // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE-4]]:1: note: there was no return type provided [ReturnTypeOmittedNote] // CHECK:STDERR: fn Main() { // CHECK:STDERR: ^~~~~~~~~~~ return 0; diff --git a/toolchain/check/testdata/return/fail_value_missing.carbon b/toolchain/check/testdata/return/fail_value_missing.carbon index a27b8089bfd1..5c0ade46da84 100644 --- a/toolchain/check/testdata/return/fail_value_missing.carbon +++ b/toolchain/check/testdata/return/fail_value_missing.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_value_missing.carbon fn Main() -> i32 { - // CHECK:STDERR: fail_value_missing.carbon:[[@LINE+6]]:3: error(ReturnStatementMissingExpr): missing return value + // CHECK:STDERR: fail_value_missing.carbon:[[@LINE+6]]:3: error: missing return value [ReturnStatementMissingExpr] // CHECK:STDERR: return; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_value_missing.carbon:[[@LINE-4]]:11: note(ReturnTypeHereNote): return type of function is `i32` + // CHECK:STDERR: fail_value_missing.carbon:[[@LINE-4]]:11: note: return type of function is `i32` [ReturnTypeHereNote] // CHECK:STDERR: fn Main() -> i32 { // CHECK:STDERR: ^~~~~~ return; diff --git a/toolchain/check/testdata/return/fail_var_in_type.carbon b/toolchain/check/testdata/return/fail_var_in_type.carbon index db19d34cadb2..a2f64fbf8ca6 100644 --- a/toolchain/check/testdata/return/fail_var_in_type.carbon +++ b/toolchain/check/testdata/return/fail_var_in_type.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/return/fail_var_in_type.carbon var x: type = i32; -// CHECK:STDERR: fail_var_in_type.carbon:[[@LINE+3]]:13: error(TypeExprEvaluationFailure): cannot evaluate type expression +// CHECK:STDERR: fail_var_in_type.carbon:[[@LINE+3]]:13: error: cannot evaluate type expression [TypeExprEvaluationFailure] // CHECK:STDERR: fn Six() -> x { return 6; } // CHECK:STDERR: ^ fn Six() -> x { return 6; } diff --git a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon index d64f12081ec4..dbb345176a61 100644 --- a/toolchain/check/testdata/struct/fail_access_into_invalid.carbon +++ b/toolchain/check/testdata/struct/fail_access_into_invalid.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_access_into_invalid.carbon -// CHECK:STDERR: fail_access_into_invalid.carbon:[[@LINE+3]]:10: error(NameNotFound): name `a` not found +// CHECK:STDERR: fail_access_into_invalid.carbon:[[@LINE+3]]:10: error: name `a` not found [NameNotFound] // CHECK:STDERR: fn F() { a.b; } // CHECK:STDERR: ^ fn F() { a.b; } diff --git a/toolchain/check/testdata/struct/fail_assign_empty.carbon b/toolchain/check/testdata/struct/fail_assign_empty.carbon index 8099944038fa..0ef906b6e219 100644 --- a/toolchain/check/testdata/struct/fail_assign_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_assign_empty.carbon -// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:20: error(StructInitElementCountMismatch): cannot initialize struct with 1 field from struct with 0 fields +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:20: error: cannot initialize struct with 1 field from struct with 0 fields [StructInitElementCountMismatch] // CHECK:STDERR: var x: {.a: i32} = {}; // CHECK:STDERR: ^~ var x: {.a: i32} = {}; diff --git a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon index 34fb594c0130..521bcc844bca 100644 --- a/toolchain/check/testdata/struct/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/struct/fail_assign_to_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_assign_to_empty.carbon -// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error(StructInitElementCountMismatch): cannot initialize struct with 0 fields from struct with 1 field +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error: cannot initialize struct with 0 fields from struct with 1 field [StructInitElementCountMismatch] // CHECK:STDERR: var x: {} = {.a = 1}; // CHECK:STDERR: ^~~~~~~~ var x: {} = {.a = 1}; diff --git a/toolchain/check/testdata/struct/fail_duplicate_name.carbon b/toolchain/check/testdata/struct/fail_duplicate_name.carbon index 14f6e92a79fa..e501e0571261 100644 --- a/toolchain/check/testdata/struct/fail_duplicate_name.carbon +++ b/toolchain/check/testdata/struct/fail_duplicate_name.carbon @@ -8,46 +8,46 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_duplicate_name.carbon -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:42: error(StructNameDuplicate): duplicated field name `abc` in struct type literal +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:42: error: duplicated field name `abc` in struct type literal [StructNameDuplicate] // CHECK:STDERR: fn F() -> {.d: i32, .abc: i32, .e: i32, .abc: i32, .f: i32}; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: note(StructNamePrevious): field with the same name here +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: note: field with the same name here [StructNamePrevious] // CHECK:STDERR: fn F() -> {.d: i32, .abc: i32, .e: i32, .abc: i32, .f: i32}; // CHECK:STDERR: ^~~ // CHECK:STDERR: fn F() -> {.d: i32, .abc: i32, .e: i32, .abc: i32, .f: i32}; -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:19: error(StructNameDuplicate): duplicated field name `a` in struct type literal +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:19: error: duplicated field name `a` in struct type literal [StructNameDuplicate] // CHECK:STDERR: let v: {.a: i32, .a: i32} = {.a = 1}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:10: note(StructNamePrevious): field with the same name here +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:10: note: field with the same name here [StructNamePrevious] // CHECK:STDERR: let v: {.a: i32, .a: i32} = {.a = 1}; // CHECK:STDERR: ^ // CHECK:STDERR: let v: {.a: i32, .a: i32} = {.a = 1}; -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:26: error(StructNameDuplicate): duplicated field name `def` in struct literal +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:26: error: duplicated field name `def` in struct literal [StructNameDuplicate] // CHECK:STDERR: let w: i32 = {.def = 1, .def = 2}.def; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:16: note(StructNamePrevious): field with the same name here +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:16: note: field with the same name here [StructNamePrevious] // CHECK:STDERR: let w: i32 = {.def = 1, .def = 2}.def; // CHECK:STDERR: ^~~ // CHECK:STDERR: let w: i32 = {.def = 1, .def = 2}.def; -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:30: error(StructNameDuplicate): duplicated field name `a` in struct literal +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:30: error: duplicated field name `a` in struct literal [StructNameDuplicate] // CHECK:STDERR: var x: {.a: i32} = {.a = 1, .a = 2}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: note(StructNamePrevious): field with the same name here +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: note: field with the same name here [StructNamePrevious] // CHECK:STDERR: var x: {.a: i32} = {.a = 1, .a = 2}; // CHECK:STDERR: ^ // CHECK:STDERR: var x: {.a: i32} = {.a = 1, .a = 2}; -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+6]]:39: error(StructNameDuplicate): duplicated field name `b` in struct literal +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+6]]:39: error: duplicated field name `b` in struct literal [StructNameDuplicate] // CHECK:STDERR: var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+3]]:31: note(StructNamePrevious): field with the same name here +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+3]]:31: note: field with the same name here [StructNamePrevious] // CHECK:STDERR: var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDERR: ^ var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; diff --git a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon index 2cd5a039a98e..5bc8e33d6218 100644 --- a/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_name_mismatch.carbon @@ -8,13 +8,13 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_field_name_mismatch.carbon -// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+4]]:20: error(StructInitMissingFieldInLiteral): missing value for field `a` in struct initialization +// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+4]]:20: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral] // CHECK:STDERR: var x: {.a: i32} = {.b = 1}; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: var x: {.a: i32} = {.b = 1}; -// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+3]]:20: error(StructInitMissingFieldInConversion): cannot convert from struct type `{.a: i32}` to `{.b: i32}`: missing field `b` in source type +// CHECK:STDERR: fail_field_name_mismatch.carbon:[[@LINE+3]]:20: error: cannot convert from struct type `{.a: i32}` to `{.b: i32}`: missing field `b` in source type [StructInitMissingFieldInConversion] // CHECK:STDERR: var y: {.b: i32} = x; // CHECK:STDERR: ^ var y: {.b: i32} = x; diff --git a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon index 7dbc6defcd83..ec5ee40571d6 100644 --- a/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon +++ b/toolchain/check/testdata/struct/fail_field_type_mismatch.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_field_type_mismatch.carbon -// CHECK:STDERR: fail_field_type_mismatch.carbon:[[@LINE+3]]:20: error(StructInitMissingFieldInLiteral): missing value for field `a` in struct initialization +// CHECK:STDERR: fail_field_type_mismatch.carbon:[[@LINE+3]]:20: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral] // CHECK:STDERR: var x: {.a: i32} = {.b = 1.0}; // CHECK:STDERR: ^~~~~~~~~~ var x: {.a: i32} = {.b = 1.0}; diff --git a/toolchain/check/testdata/struct/fail_keyword_name.carbon b/toolchain/check/testdata/struct/fail_keyword_name.carbon index 2e84a8ad8101..605a8b039467 100644 --- a/toolchain/check/testdata/struct/fail_keyword_name.carbon +++ b/toolchain/check/testdata/struct/fail_keyword_name.carbon @@ -8,17 +8,17 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_keyword_name.carbon -// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+8]]:13: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+8]]:13: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: fn F() -> {.class: i32}; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+4]]:13: error(SemanticsTodo): semantics TODO: `Error recovery from keyword name.` +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+4]]:13: error: semantics TODO: `Error recovery from keyword name.` [SemanticsTodo] // CHECK:STDERR: fn F() -> {.class: i32}; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fn F() -> {.class: i32}; -// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+3]]:19: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+3]]:19: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: fn G() { return {.return = 5}; }; // CHECK:STDERR: ^~~~~~ fn G() { return {.return = 5}; }; diff --git a/toolchain/check/testdata/struct/fail_member_access_type.carbon b/toolchain/check/testdata/struct/fail_member_access_type.carbon index 0ee3fa2240a7..9545732ede6e 100644 --- a/toolchain/check/testdata/struct/fail_member_access_type.carbon +++ b/toolchain/check/testdata/struct/fail_member_access_type.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_member_access_type.carbon var x: {.a: f64} = {.a = 4.0}; -// CHECK:STDERR: fail_member_access_type.carbon:[[@LINE+3]]:14: error(QualifiedExprNameNotFound): type `{.a: f64}` does not have a member `b` +// CHECK:STDERR: fail_member_access_type.carbon:[[@LINE+3]]:14: error: type `{.a: f64}` does not have a member `b` [QualifiedExprNameNotFound] // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^~~ var y: i32 = x.b; diff --git a/toolchain/check/testdata/struct/fail_member_of_function.carbon b/toolchain/check/testdata/struct/fail_member_of_function.carbon index 7d888fe888b2..5283124e6098 100644 --- a/toolchain/check/testdata/struct/fail_member_of_function.carbon +++ b/toolchain/check/testdata/struct/fail_member_of_function.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_member_of_function.carbon fn A() { - // CHECK:STDERR: fail_member_of_function.carbon:[[@LINE+3]]:3: error(UseOfNonExprAsValue): expression cannot be used as a value + // CHECK:STDERR: fail_member_of_function.carbon:[[@LINE+3]]:3: error: expression cannot be used as a value [UseOfNonExprAsValue] // CHECK:STDERR: A.y; // CHECK:STDERR: ^ A.y; diff --git a/toolchain/check/testdata/struct/fail_non_member_access.carbon b/toolchain/check/testdata/struct/fail_non_member_access.carbon index 4b083796feec..2db947db5060 100644 --- a/toolchain/check/testdata/struct/fail_non_member_access.carbon +++ b/toolchain/check/testdata/struct/fail_non_member_access.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_non_member_access.carbon var x: {.a: i32} = {.a = 4}; -// CHECK:STDERR: fail_non_member_access.carbon:[[@LINE+3]]:14: error(QualifiedExprNameNotFound): type `{.a: i32}` does not have a member `b` +// CHECK:STDERR: fail_non_member_access.carbon:[[@LINE+3]]:14: error: type `{.a: i32}` does not have a member `b` [QualifiedExprNameNotFound] // CHECK:STDERR: var y: i32 = x.b; // CHECK:STDERR: ^~~ var y: i32 = x.b; diff --git a/toolchain/check/testdata/struct/fail_too_few_values.carbon b/toolchain/check/testdata/struct/fail_too_few_values.carbon index 4c100edd6866..5e5c69412df8 100644 --- a/toolchain/check/testdata/struct/fail_too_few_values.carbon +++ b/toolchain/check/testdata/struct/fail_too_few_values.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_too_few_values.carbon -// CHECK:STDERR: fail_too_few_values.carbon:[[@LINE+3]]:29: error(StructInitElementCountMismatch): cannot initialize struct with 2 fields from struct with 1 field +// CHECK:STDERR: fail_too_few_values.carbon:[[@LINE+3]]:29: error: cannot initialize struct with 2 fields from struct with 1 field [StructInitElementCountMismatch] // CHECK:STDERR: var x: {.a: i32, .b: i32} = {.a = 1}; // CHECK:STDERR: ^~~~~~~~ var x: {.a: i32, .b: i32} = {.a = 1}; diff --git a/toolchain/check/testdata/struct/fail_type_assign.carbon b/toolchain/check/testdata/struct/fail_type_assign.carbon index 25aeca5c7385..c4f6499b5891 100644 --- a/toolchain/check/testdata/struct/fail_type_assign.carbon +++ b/toolchain/check/testdata/struct/fail_type_assign.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_type_assign.carbon -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+6]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `type` to `{.a: i32}` +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `type` to `{.a: i32}` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: {.a: i32} = {.a: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:1: note(MissingImplInMemberAccessNote): type `type` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:1: note: type `type` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: {.a: i32} = {.a: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var x: {.a: i32} = {.a: i32}; diff --git a/toolchain/check/testdata/struct/fail_value_as_type.carbon b/toolchain/check/testdata/struct/fail_value_as_type.carbon index 2521256dc51b..7d6e1a503758 100644 --- a/toolchain/check/testdata/struct/fail_value_as_type.carbon +++ b/toolchain/check/testdata/struct/fail_value_as_type.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/fail_value_as_type.carbon -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+6]]:8: error(ImplicitAsConversionFailure): cannot implicitly convert from `{.a: i32}` to `type` +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+6]]:8: error: cannot implicitly convert from `{.a: i32}` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: {.a = 1}; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: note(MissingImplInMemberAccessNote): type `{.a: i32}` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: note: type `{.a: i32}` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: {.a = 1}; // CHECK:STDERR: ^~~~~~~~ var x: {.a = 1}; diff --git a/toolchain/check/testdata/struct/import.carbon b/toolchain/check/testdata/struct/import.carbon index 016e7a32fbeb..3e99e06ad73c 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -30,11 +30,11 @@ var c: C({.a = 1, .b = 2}) = F(); // --- fail_bad_type.impl.carbon impl package Implicit; -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error(StructInitMissingFieldInLiteral): missing value for field `a` in struct initialization +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral] // CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6(InImport): in import -// CHECK:STDERR: implicit.carbon:8:1: note(DeductionGenericHere): while deducing parameters of generic declared here +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: in import [InImport] +// CHECK:STDERR: implicit.carbon:8:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -43,10 +43,10 @@ var c_bad: C({.c = 1, .d = 2}) = F(); // --- fail_bad_value.impl.carbon impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `C` to `C` +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note(MissingImplInMemberAccessNote): type `C` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ var c_bad: C({.a = 3, .b = 4}) = F(); diff --git a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon index 34160cea8afc..80e62f1c04c0 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/struct/no_prelude/fail_assign_nested.carbon -// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:19: error(StructInitMissingFieldInLiteral): missing value for field `a` in struct initialization +// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:19: error: missing value for field `a` in struct initialization [StructInitMissingFieldInLiteral] // CHECK:STDERR: var x: {.a: {}} = {.b = {}}; // CHECK:STDERR: ^~~~~~~~~ var x: {.a: {}} = {.b = {}}; diff --git a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon index 078752f9fbf8..0d44aefd951a 100644 --- a/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/struct/no_prelude/fail_nested_incomplete.carbon @@ -10,10 +10,10 @@ class Incomplete; -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error(IncompleteTypeInVarDecl): variable has incomplete type `{.a: Incomplete}` +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error: variable has incomplete type `{.a: Incomplete}` [IncompleteTypeInVarDecl] // CHECK:STDERR: var s: {.a: Incomplete}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ var s: {.a: Incomplete}; diff --git a/toolchain/check/testdata/tuple/access/fail_access_error.carbon b/toolchain/check/testdata/tuple/access/fail_access_error.carbon index bad66f3bdc81..ae09a111bd78 100644 --- a/toolchain/check/testdata/tuple/access/fail_access_error.carbon +++ b/toolchain/check/testdata/tuple/access/fail_access_error.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_access_error.carbon var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_access_error.carbon:[[@LINE+3]]:17: error(NameNotFound): name `oops` not found +// CHECK:STDERR: fail_access_error.carbon:[[@LINE+3]]:17: error: name `oops` not found [NameNotFound] // CHECK:STDERR: var b: i32 = a.(oops); // CHECK:STDERR: ^~~~ var b: i32 = a.(oops); diff --git a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon index 05b576e158ea..448b666eab98 100644 --- a/toolchain/check/testdata/tuple/access/fail_empty_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_empty_access.carbon @@ -11,7 +11,7 @@ fn F() {} fn Run() { - // CHECK:STDERR: fail_empty_access.carbon:[[@LINE+3]]:3: error(TupleIndexOutOfBounds): tuple element index `0` is past the end of type `()` + // CHECK:STDERR: fail_empty_access.carbon:[[@LINE+3]]:3: error: tuple element index `0` is past the end of type `()` [TupleIndexOutOfBounds] // CHECK:STDERR: F().0; // CHECK:STDERR: ^~~~~ F().0; diff --git a/toolchain/check/testdata/tuple/access/fail_large_index.carbon b/toolchain/check/testdata/tuple/access/fail_large_index.carbon index 93cd23f0c421..1a33389bafa2 100644 --- a/toolchain/check/testdata/tuple/access/fail_large_index.carbon +++ b/toolchain/check/testdata/tuple/access/fail_large_index.carbon @@ -10,12 +10,12 @@ var a: (i32,) = (12,); var b: (i32,) = a; -// CHECK:STDERR: fail_large_index.carbon:[[@LINE+4]]:14: error(TupleIndexOutOfBounds): tuple element index `1` is past the end of type `(i32,)` +// CHECK:STDERR: fail_large_index.carbon:[[@LINE+4]]:14: error: tuple element index `1` is past the end of type `(i32,)` [TupleIndexOutOfBounds] // CHECK:STDERR: var c: i32 = b.1; // CHECK:STDERR: ^~~ // CHECK:STDERR: var c: i32 = b.1; -// CHECK:STDERR: fail_large_index.carbon:[[@LINE+3]]:14: error(TupleIndexOutOfBounds): tuple element index `2147483647` is past the end of type `(i32,)` +// CHECK:STDERR: fail_large_index.carbon:[[@LINE+3]]:14: error: tuple element index `2147483647` is past the end of type `(i32,)` [TupleIndexOutOfBounds] // CHECK:STDERR: var d: i32 = b.(0x7FFF_FFFF); // CHECK:STDERR: ^~~~~~~~~~~~~~~ var d: i32 = b.(0x7FFF_FFFF); diff --git a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon index 9c32a4d57851..06fd1019e942 100644 --- a/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_negative_indexing.carbon var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:17: error(MissingImplInMemberAccess): cannot access member of interface `Negate` in type `i32` that does not implement that interface +// CHECK:STDERR: fail_negative_indexing.carbon:[[@LINE+3]]:17: error: cannot access member of interface `Negate` in type `i32` that does not implement that interface [MissingImplInMemberAccess] // CHECK:STDERR: var b: i32 = a.(-10); // CHECK:STDERR: ^~~ var b: i32 = a.(-10); diff --git a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon index 26ad9454c8cb..1165d6490374 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_deterministic_type.carbon @@ -10,7 +10,7 @@ var a: (i32, i32) = (2, 3); var b: i32 = 0; -// CHECK:STDERR: fail_non_deterministic_type.carbon:[[@LINE+3]]:14: error(TupleIndexNotConstant): tuple index must be a constant +// CHECK:STDERR: fail_non_deterministic_type.carbon:[[@LINE+3]]:14: error: tuple index must be a constant [TupleIndexNotConstant] // CHECK:STDERR: var c: i32 = a.(b); // CHECK:STDERR: ^~~~~ var c: i32 = a.(b); diff --git a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon index 7167bb8e4423..c3cb1c13cc29 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_non_int_indexing.carbon var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+6]]:17: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` +// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+6]]:17: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var b: i32 = a.(2.6); // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+3]]:17: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+3]]:17: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var b: i32 = a.(2.6); // CHECK:STDERR: ^~~ var b: i32 = a.(2.6); diff --git a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon index b9a3de8764c3..ab715a517bb4 100644 --- a/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon @@ -9,14 +9,14 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_non_tuple_access.carbon fn Main() { - // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+4]]:3: error(TypeNotIndexable): type `i32` does not support indexing + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+4]]:3: error: type `i32` does not support indexing [TypeNotIndexable] // CHECK:STDERR: 0[1]; // CHECK:STDERR: ^~~~ // CHECK:STDERR: 0[1]; var non_tuple: [i32; 2] = (5, 5); - // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:20: error(TupleIndexOnANonTupleType): type `[i32; 2]` does not support tuple indexing; only tuples can be indexed that way + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:20: error: type `[i32; 2]` does not support tuple indexing; only tuples can be indexed that way [TupleIndexOnANonTupleType] // CHECK:STDERR: var first: i32 = non_tuple.0; // CHECK:STDERR: ^~~~~~~~~~~ var first: i32 = non_tuple.0; diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon index 5b828be0cd9b..90e0115a2a82 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_out_of_bound_access.carbon var a: (i32, i32) = (12, 6); -// CHECK:STDERR: fail_out_of_bound_access.carbon:[[@LINE+3]]:14: error(TupleIndexOutOfBounds): tuple element index `2` is past the end of type `(i32, i32)` +// CHECK:STDERR: fail_out_of_bound_access.carbon:[[@LINE+3]]:14: error: tuple element index `2` is past the end of type `(i32, i32)` [TupleIndexOutOfBounds] // CHECK:STDERR: var b: i32 = a.2; // CHECK:STDERR: ^~~ var b: i32 = a.2; diff --git a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon index 1bbe0b2d2a6d..62139d5f8084 100644 --- a/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon +++ b/toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/access/fail_out_of_bound_not_literal.carbon var a: (i32, i32) = (12, 34); -// CHECK:STDERR: fail_out_of_bound_not_literal.carbon:[[@LINE+3]]:14: error(TupleIndexOutOfBounds): tuple element index `2` is past the end of type `(i32, i32)` +// CHECK:STDERR: fail_out_of_bound_not_literal.carbon:[[@LINE+3]]:14: error: tuple element index `2` is past the end of type `(i32, i32)` [TupleIndexOutOfBounds] // CHECK:STDERR: var b: i32 = a.({.index = 2}.index); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ var b: i32 = a.({.index = 2}.index); diff --git a/toolchain/check/testdata/tuple/fail_assign_nested.carbon b/toolchain/check/testdata/tuple/fail_assign_nested.carbon index d7a4d3763920..662bf3ac951b 100644 --- a/toolchain/check/testdata/tuple/fail_assign_nested.carbon +++ b/toolchain/check/testdata/tuple/fail_assign_nested.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/fail_assign_nested.carbon -// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:36: error(TupleInitElementCountMismatch): cannot initialize tuple of 2 elements from tuple with 3 elements +// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:36: error: cannot initialize tuple of 2 elements from tuple with 3 elements [TupleInitElementCountMismatch] // CHECK:STDERR: var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); // CHECK:STDERR: ^~~~~~~~~ var x: ((i32, i32), (i32, i32)) = ((1, 2, 3), (4, 5, 6)); diff --git a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon index ea6eed089ff0..5d7862434844 100644 --- a/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon +++ b/toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/fail_element_type_mismatch.carbon -// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+6]]:21: error(ImplicitAsConversionFailure): cannot implicitly convert from `f64` to `i32` +// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+6]]:21: error: cannot implicitly convert from `f64` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: (i32, i32) = (2, 65.89); // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:21: note(MissingImplInMemberAccessNote): type `f64` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:21: note: type `f64` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: (i32, i32) = (2, 65.89); // CHECK:STDERR: ^~~~~~~~~~ var x: (i32, i32) = (2, 65.89); diff --git a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon index 6eb71f3708dc..a00b02b0f0d3 100644 --- a/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon +++ b/toolchain/check/testdata/tuple/fail_nested_incomplete.carbon @@ -10,10 +10,10 @@ class Incomplete; -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error(IncompleteTypeInVarDecl): variable has incomplete type `(i32, Incomplete)` +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error: variable has incomplete type `(i32, Incomplete)` [IncompleteTypeInVarDecl] // CHECK:STDERR: var t: (i32, Incomplete); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: note(ClassForwardDeclaredHere): class was forward declared here +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: note: class was forward declared here [ClassForwardDeclaredHere] // CHECK:STDERR: class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ var t: (i32, Incomplete); diff --git a/toolchain/check/testdata/tuple/fail_too_few_element.carbon b/toolchain/check/testdata/tuple/fail_too_few_element.carbon index 3452f73b8ab2..7b88ce3cf09f 100644 --- a/toolchain/check/testdata/tuple/fail_too_few_element.carbon +++ b/toolchain/check/testdata/tuple/fail_too_few_element.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/fail_too_few_element.carbon -// CHECK:STDERR: fail_too_few_element.carbon:[[@LINE+3]]:21: error(TupleInitElementCountMismatch): cannot initialize tuple of 2 elements from tuple with 1 element +// CHECK:STDERR: fail_too_few_element.carbon:[[@LINE+3]]:21: error: cannot initialize tuple of 2 elements from tuple with 1 element [TupleInitElementCountMismatch] // CHECK:STDERR: var x: (i32, i32) = (2, ); // CHECK:STDERR: ^~~~~ var x: (i32, i32) = (2, ); diff --git a/toolchain/check/testdata/tuple/fail_type_assign.carbon b/toolchain/check/testdata/tuple/fail_type_assign.carbon index e01d183b5c7a..a928c277e77d 100644 --- a/toolchain/check/testdata/tuple/fail_type_assign.carbon +++ b/toolchain/check/testdata/tuple/fail_type_assign.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/fail_type_assign.carbon -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+6]]:18: error(ImplicitAsConversionFailure): cannot implicitly convert from `type` to `i32` +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+6]]:18: error: cannot implicitly convert from `type` to `i32` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: (i32, ) = (i32, ); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:18: note(MissingImplInMemberAccessNote): type `type` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:18: note: type `type` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: (i32, ) = (i32, ); // CHECK:STDERR: ^~~~~~~ var x: (i32, ) = (i32, ); diff --git a/toolchain/check/testdata/tuple/fail_value_as_type.carbon b/toolchain/check/testdata/tuple/fail_value_as_type.carbon index 0fdfea3d1775..531df9584bc1 100644 --- a/toolchain/check/testdata/tuple/fail_value_as_type.carbon +++ b/toolchain/check/testdata/tuple/fail_value_as_type.carbon @@ -8,10 +8,10 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/fail_value_as_type.carbon -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+6]]:8: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+6]]:8: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: (1, ); // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: (1, ); // CHECK:STDERR: ^~~~~ var x: (1, ); diff --git a/toolchain/check/testdata/tuple/import.carbon b/toolchain/check/testdata/tuple/import.carbon index 2e1ed742e52f..2d595186a7c4 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -31,11 +31,11 @@ var c: C((1, 2)) = F(); impl package Implicit; -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error(TupleInitElementCountMismatch): cannot initialize tuple of 2 elements from tuple with 3 elements +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+8]]:14: error: cannot initialize tuple of 2 elements from tuple with 3 elements [TupleInitElementCountMismatch] // CHECK:STDERR: var c_bad: C((1, 2, 3)) = F(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:6(InImport): in import -// CHECK:STDERR: implicit.carbon:7:1: note(DeductionGenericHere): while deducing parameters of generic declared here +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:6: in import [InImport] +// CHECK:STDERR: implicit.carbon:7:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: class C(X:! (i32, i32)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -45,10 +45,10 @@ var c_bad: C((1, 2, 3)) = F(); impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error(ImplicitAsConversionFailure): cannot implicitly convert from `C` to `C` +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `C` to `C` [ImplicitAsConversionFailure] // CHECK:STDERR: var c_bad: C((3, 4)) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note(MissingImplInMemberAccessNote): type `C` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: note: type `C` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var c_bad: C((3, 4)) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ var c_bad: C((3, 4)) = F(); diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon index bfbe27119e8b..b8cf00191aba 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/no_prelude/fail_assign_empty.carbon -// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:16: error(TupleInitElementCountMismatch): cannot initialize tuple of 1 element from tuple with 0 elements +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:16: error: cannot initialize tuple of 1 element from tuple with 0 elements [TupleInitElementCountMismatch] // CHECK:STDERR: var x: ((),) = (); // CHECK:STDERR: ^~ var x: ((),) = (); diff --git a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon index a0d42d3ede2a..d78daa776d85 100644 --- a/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon +++ b/toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/tuple/no_prelude/fail_assign_to_empty.carbon -// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error(TupleInitElementCountMismatch): cannot initialize tuple of 0 elements from tuple with 1 element +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error: cannot initialize tuple of 0 elements from tuple with 1 element [TupleInitElementCountMismatch] // CHECK:STDERR: var x: () = ((),); // CHECK:STDERR: ^~~~~ var x: () = ((),); diff --git a/toolchain/check/testdata/var/fail_not_copyable.carbon b/toolchain/check/testdata/var/fail_not_copyable.carbon index 69c48f3ea986..79b5d6aecddf 100644 --- a/toolchain/check/testdata/var/fail_not_copyable.carbon +++ b/toolchain/check/testdata/var/fail_not_copyable.carbon @@ -14,14 +14,14 @@ class X { fn F(x: X) { // TODO: Strings should eventually be copyable, once we decide how to // represent them. - // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+4]]:19: error(CopyOfUncopyableType): cannot copy value of type `String` + // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+4]]:19: error: cannot copy value of type `String` [CopyOfUncopyableType] // CHECK:STDERR: var s: String = "hello"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var s: String = "hello"; // TODO: Decide on rules for when classes are copyable. - // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+3]]:14: error(CopyOfUncopyableType): cannot copy value of type `X` + // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+3]]:14: error: cannot copy value of type `X` [CopyOfUncopyableType] // CHECK:STDERR: var y: X = x; // CHECK:STDERR: ^ var y: X = x; diff --git a/toolchain/check/testdata/var/fail_storage_is_literal.carbon b/toolchain/check/testdata/var/fail_storage_is_literal.carbon index 106cbdc6358d..20f6ede4865a 100644 --- a/toolchain/check/testdata/var/fail_storage_is_literal.carbon +++ b/toolchain/check/testdata/var/fail_storage_is_literal.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/fail_storage_is_literal.carbon fn Main() { - // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+6]]:10: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` + // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+6]]:10: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: var x: 1 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: var x: 1 = 1; // CHECK:STDERR: ^ var x: 1 = 1; diff --git a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon index 1ce42ca344c3..95dacd794107 100644 --- a/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon +++ b/toolchain/check/testdata/var/fail_todo_control_flow_init.carbon @@ -8,49 +8,49 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/fail_todo_control_flow_init.carbon -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:13: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:13: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:13: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:21: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:21: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var x: () = if true then () else (); -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:14: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+12]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:14: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:14: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:23: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:23: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var x2: () = if false then () else (); -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:15: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y: bool = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:15: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:15: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y: bool = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: var y: bool = true or false; -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+7]]:16: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+7]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y2: bool = false or true; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+3]]:16: error(SemanticsTodo): semantics TODO: `Control flow expressions are currently only supported inside functions.` +// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+3]]:16: error: semantics TODO: `Control flow expressions are currently only supported inside functions.` [SemanticsTodo] // CHECK:STDERR: var y2: bool = false or true; // CHECK:STDERR: ^~~~~~~~~~~~~ var y2: bool = false or true; diff --git a/toolchain/check/testdata/var/no_prelude/export_name.carbon b/toolchain/check/testdata/var/no_prelude/export_name.carbon index 6e84fe888d4c..3ca4be96d6bb 100644 --- a/toolchain/check/testdata/var/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/var/no_prelude/export_name.carbon @@ -34,9 +34,9 @@ export v; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_use_export.carbon:[[@LINE+5]]:1(InImport): in import -// CHECK:STDERR: export.carbon:4:1(InImport): in import -// CHECK:STDERR: base.carbon:4:5: error(SemanticsTodo): semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` +// CHECK:STDERR: fail_todo_use_export.carbon:[[@LINE+5]]:1: in import [InImport] +// CHECK:STDERR: export.carbon:4:1: in import [InImport] +// CHECK:STDERR: base.carbon:4:5: error: semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` [SemanticsTodo] // CHECK:STDERR: var v: (); // CHECK:STDERR: ^ import library "export"; diff --git a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon index ba58c344bd75..59afbdb1a0f1 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_duplicate_decl.carbon @@ -11,10 +11,10 @@ fn Main() { var x: () = (); - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: error(NameDeclDuplicate): duplicate name being declared in the same scope + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE+6]]:7: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: var x: () = (); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: note(NameDeclPrevious): name is previously declared here + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: var x: () = (); // CHECK:STDERR: ^ var x: () = (); diff --git a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon index 467aa35538d5..3a87f52c6e28 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_generic.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_generic.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/fail_generic.carbon fn Main() { - // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:11: error(CompileTimeBindingInVarDecl): `var` declaration cannot declare a compile-time binding + // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:11: error: `var` declaration cannot declare a compile-time binding [CompileTimeBindingInVarDecl] // CHECK:STDERR: var x:! () = (); // CHECK:STDERR: ^~ var x:! () = (); diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon index a684f05d26bb..cd455e5ad5cd 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/fail_init_type_mismatch.carbon fn Main() { - // CHECK:STDERR: fail_init_type_mismatch.carbon:[[@LINE+3]]:3: error(CoreNotFound): package `Core` implicitly referenced here, but not found + // CHECK:STDERR: fail_init_type_mismatch.carbon:[[@LINE+3]]:3: error: package `Core` implicitly referenced here, but not found [CoreNotFound] // CHECK:STDERR: var x: {} = (); // CHECK:STDERR: ^~~~~~~~~~~~~~~ var x: {} = (); diff --git a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon index bef082841c9c..cc59108ec608 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/fail_init_with_self.carbon fn Main() { - // CHECK:STDERR: fail_init_with_self.carbon:[[@LINE+3]]:15: error(NameNotFound): name `x` not found + // CHECK:STDERR: fail_init_with_self.carbon:[[@LINE+3]]:15: error: name `x` not found [NameNotFound] // CHECK:STDERR: var x: () = x; // CHECK:STDERR: ^ var x: () = x; diff --git a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon index 707c9ecded6b..7c140d306b99 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_lookup_outside_scope.carbon @@ -12,7 +12,7 @@ fn Main() { var x: (); } -// CHECK:STDERR: fail_lookup_outside_scope.carbon:[[@LINE+3]]:13: error(NameNotFound): name `x` not found +// CHECK:STDERR: fail_lookup_outside_scope.carbon:[[@LINE+3]]:13: error: name `x` not found [NameNotFound] // CHECK:STDERR: var y: () = x; // CHECK:STDERR: ^ var y: () = x; diff --git a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon index 9a5815cfb13d..276a2e8369f3 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon @@ -8,35 +8,35 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/var/no_prelude/fail_modifiers.carbon -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected var b: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected var b: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error(ModifierNotAllowedWith): `protected` not allowed on declaration with `private` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` not allowed on declaration with `private` [ModifierNotAllowedWith] // CHECK:STDERR: private protected var c: (); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `private` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `private` previously appeared here [ModifierPrevious] // CHECK:STDERR: private protected var c: (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private protected var c: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error(ModifierProtectedNotAllowed): `protected` not allowed; requires class scope +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `protected` not allowed; requires class scope [ModifierProtectedNotAllowed] // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error(ModifierRepeated): `protected` repeated on declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error: `protected` repeated on declaration [ModifierRepeated] // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note(ModifierPrevious): `protected` previously appeared here +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: note: `protected` previously appeared here [ModifierPrevious] // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected protected var d: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error(ModifierNotAllowedOnDeclaration): `abstract` not allowed on `var` declaration +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `abstract` not allowed on `var` declaration [ModifierNotAllowedOnDeclaration] // CHECK:STDERR: abstract var e: (); // CHECK:STDERR: ^~~~~~~~ abstract var e: (); diff --git a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon index bc26029fdb87..983625760744 100644 --- a/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon +++ b/toolchain/check/testdata/var/no_prelude/fail_namespace_conflict.carbon @@ -10,19 +10,19 @@ namespace A; -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE+7]]:5: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE+7]]:5: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: var A: (); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-5]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-5]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace A; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: var A: (); -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE+6]]:5: error(NameDeclDuplicate): duplicate name being declared in the same scope +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE+6]]:5: error: duplicate name being declared in the same scope [NameDeclDuplicate] // CHECK:STDERR: var A: () = (); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-14]]:1: note(NameDeclPrevious): name is previously declared here +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-14]]:1: note: name is previously declared here [NameDeclPrevious] // CHECK:STDERR: namespace A; // CHECK:STDERR: ^~~~~~~~~~~~ var A: () = (); diff --git a/toolchain/check/testdata/var/no_prelude/import_access.carbon b/toolchain/check/testdata/var/no_prelude/import_access.carbon index a063bce76420..82e0cce0e8b4 100644 --- a/toolchain/check/testdata/var/no_prelude/import_access.carbon +++ b/toolchain/check/testdata/var/no_prelude/import_access.carbon @@ -34,7 +34,7 @@ package Test library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error(NameNotFound): name `v` not found +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error: name `v` not found [NameNotFound] // CHECK:STDERR: var v2: () = v; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -46,7 +46,7 @@ package Other library "[[@TEST_NAME]]"; import Test library "def"; -// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error(NameNotFound): name `v` not found +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error: name `v` not found [NameNotFound] // CHECK:STDERR: var v2: () = Test.v; // CHECK:STDERR: ^~~~~~ var v2: () = Test.v; diff --git a/toolchain/check/testdata/where_expr/constraints.carbon b/toolchain/check/testdata/where_expr/constraints.carbon index 0a073d0a6097..1be622e882aa 100644 --- a/toolchain/check/testdata/where_expr/constraints.carbon +++ b/toolchain/check/testdata/where_expr/constraints.carbon @@ -33,10 +33,10 @@ interface N { let P:! type; } -// CHECK:STDERR: fail_todo_equal_constraint.carbon:[[@LINE+7]]:27: error(ImplicitAsConversionFailure): cannot implicitly convert from `{}` to `` +// CHECK:STDERR: fail_todo_equal_constraint.carbon:[[@LINE+7]]:27: error: cannot implicitly convert from `{}` to `` [ImplicitAsConversionFailure] // CHECK:STDERR: fn Equal(T:! N where .P = {}); // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_todo_equal_constraint.carbon:[[@LINE+4]]:27: note(MissingImplInMemberAccessNote): type `{}` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_todo_equal_constraint.carbon:[[@LINE+4]]:27: note: type `{}` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn Equal(T:! N where .P = {}); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -53,10 +53,10 @@ interface K { let Associated:! L; } -// CHECK:STDERR: fail_todo_associated_type_impls.carbon:[[@LINE+7]]:36: error(ImplicitAsConversionFailure): cannot implicitly convert from `` to `type` +// CHECK:STDERR: fail_todo_associated_type_impls.carbon:[[@LINE+7]]:36: error: cannot implicitly convert from `` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: fn AssociatedTypeImpls(W:! K where .Associated impls M); // CHECK:STDERR: ^~~~~~~~~~~ -// CHECK:STDERR: fail_todo_associated_type_impls.carbon:[[@LINE+4]]:36: note(MissingImplInMemberAccessNote): type `` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_todo_associated_type_impls.carbon:[[@LINE+4]]:36: note: type `` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn AssociatedTypeImpls(W:! K where .Associated impls M); // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: @@ -71,10 +71,10 @@ import library "state_constraints"; // `2` can't be converted to the type of `I.Member` // TODO: The diagnostics are wrong since member access into facets isn't // working properly yet. -// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+7]]:46: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `` +// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+7]]:46: error: cannot implicitly convert from `i32` to `` [ImplicitAsConversionFailure] // CHECK:STDERR: fn RewriteTypeMismatch(X:! I where .Member = 2); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+4]]:46: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_check_rewrite_constraints.carbon:[[@LINE+4]]:46: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn RewriteTypeMismatch(X:! I where .Member = 2); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -84,10 +84,10 @@ fn RewriteTypeMismatch(X:! I where .Member = 2); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+7]]:32: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+7]]:32: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: fn NonTypeImpls(U:! type where 7 impls type); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+4]]:32: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_left_of_impls_non_type.carbon:[[@LINE+4]]:32: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn NonTypeImpls(U:! type where 7 impls type); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -97,10 +97,10 @@ fn NonTypeImpls(U:! type where 7 impls type); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+7]]:44: error(ImplicitAsConversionFailure): cannot implicitly convert from `i32` to `type` +// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+7]]:44: error: cannot implicitly convert from `i32` to `type` [ImplicitAsConversionFailure] // CHECK:STDERR: fn ImplsNonType(U:! type where .Self impls 7); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+4]]:44: note(MissingImplInMemberAccessNote): type `i32` does not implement interface `ImplicitAs` +// CHECK:STDERR: fail_right_of_impls_non_type.carbon:[[@LINE+4]]:44: note: type `i32` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: fn ImplsNonType(U:! type where .Self impls 7); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -110,7 +110,7 @@ fn ImplsNonType(U:! type where .Self impls 7); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_right_of_impls_non_facet_type.carbon:[[@LINE+4]]:51: error(ImplsOnNonFacetType): right argument of `impls` requirement must be a facet type +// CHECK:STDERR: fail_right_of_impls_non_facet_type.carbon:[[@LINE+4]]:51: error: right argument of `impls` requirement must be a facet type [ImplsOnNonFacetType] // CHECK:STDERR: fn ImplsOfNonFacetType(U:! type where .Self impls i32); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -128,14 +128,14 @@ impl C as J {} // TODO: Should report that `C` does not meet the constraint. fn DoesNotImplI() { - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+11]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `type` to `J` + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+11]]:3: error: cannot implicitly convert from `type` to `J` [ImplicitAsConversionFailure] // CHECK:STDERR: Impls(C); // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+8]]:3: note(MissingImplInMemberAccessNote): type `type` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+8]]:3: note: type `type` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: Impls(C); // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-14]]:1(InImport): in import - // CHECK:STDERR: state_constraints.carbon:13:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-14]]:1: in import [InImport] + // CHECK:STDERR: state_constraints.carbon:13:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn Impls(V:! J where .Self impls I); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -146,13 +146,13 @@ fn EmptyStruct(Y:! J where .Self == {}); // TODO: Should report that `C` does not meeet the constraint. fn NotEmptyStruct() { - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+9]]:3: error(ImplicitAsConversionFailure): cannot implicitly convert from `type` to `J` + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `type` to `J` [ImplicitAsConversionFailure] // CHECK:STDERR: EmptyStruct(C); // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+6]]:3: note(MissingImplInMemberAccessNote): type `type` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE+6]]:3: note: type `type` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: EmptyStruct(C); // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-10]]:1: note(DeductionGenericHere): while deducing parameters of generic declared here + // CHECK:STDERR: fail_todo_enforce_constraint.carbon:[[@LINE-10]]:1: note: while deducing parameters of generic declared here [DeductionGenericHere] // CHECK:STDERR: fn EmptyStruct(Y:! J where .Self == {}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ EmptyStruct(C); diff --git a/toolchain/check/testdata/where_expr/designator.carbon b/toolchain/check/testdata/where_expr/designator.carbon index f4285e541e9f..b1d1ee6ab362 100644 --- a/toolchain/check/testdata/where_expr/designator.carbon +++ b/toolchain/check/testdata/where_expr/designator.carbon @@ -30,7 +30,7 @@ interface J { let Member:! type; } -// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:31: error(NameNotFound): name `Mismatch` not found +// CHECK:STDERR: fail_wrong_member.carbon:[[@LINE+4]]:31: error: name `Mismatch` not found [NameNotFound] // CHECK:STDERR: fn PeriodMismatch(W:! J where .Mismatch = {}); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -42,10 +42,10 @@ library "[[@TEST_NAME]]"; fn Foo() -> () { var x: (); - // CHECK:STDERR: fail_designator_matches_var.carbon:[[@LINE+5]]:10: error(NameNotFound): name `.Self` not found + // CHECK:STDERR: fail_designator_matches_var.carbon:[[@LINE+5]]:10: error: name `.Self` not found [NameNotFound] // CHECK:STDERR: return .x; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_designator_matches_var.carbon: note(NoPeriodSelfForDesignator): designator may only be used when `.Self` is in scope + // CHECK:STDERR: fail_designator_matches_var.carbon: note: designator may only be used when `.Self` is in scope [NoPeriodSelfForDesignator] // CHECK:STDERR: return .x; } @@ -55,10 +55,10 @@ fn Foo() -> () { library "[[@TEST_NAME]]"; fn Bar() -> () { - // CHECK:STDERR: fail_unknown_designator.carbon:[[@LINE+5]]:10: error(NameNotFound): name `.Self` not found + // CHECK:STDERR: fail_unknown_designator.carbon:[[@LINE+5]]:10: error: name `.Self` not found [NameNotFound] // CHECK:STDERR: return .undef; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_unknown_designator.carbon: note(NoPeriodSelfForDesignator): designator may only be used when `.Self` is in scope + // CHECK:STDERR: fail_unknown_designator.carbon: note: designator may only be used when `.Self` is in scope [NoPeriodSelfForDesignator] // CHECK:STDERR: return .undef; } @@ -68,7 +68,7 @@ fn Bar() -> () { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_dot_self_method_return_value.carbon:[[@LINE+4]]:27: error(NameNotFound): name `.Self` not found + // CHECK:STDERR: fail_dot_self_method_return_value.carbon:[[@LINE+4]]:27: error: name `.Self` not found [NameNotFound] // CHECK:STDERR: fn F() -> Self { return .Self; } // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -80,7 +80,7 @@ class C { library "[[@TEST_NAME]]"; class D { - // CHECK:STDERR: fail_dot_self_method_return_type.carbon:[[@LINE+3]]:13: error(NameNotFound): name `.Self` not found + // CHECK:STDERR: fail_dot_self_method_return_type.carbon:[[@LINE+3]]:13: error: name `.Self` not found [NameNotFound] // CHECK:STDERR: fn G() -> .Self { return Self; } // CHECK:STDERR: ^~~~~ fn G() -> .Self { return Self; } diff --git a/toolchain/check/testdata/where_expr/fail_not_facet.carbon b/toolchain/check/testdata/where_expr/fail_not_facet.carbon index b253238cdaa8..5b440c8908eb 100644 --- a/toolchain/check/testdata/where_expr/fail_not_facet.carbon +++ b/toolchain/check/testdata/where_expr/fail_not_facet.carbon @@ -12,7 +12,7 @@ library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_left_where_not_facet.carbon:[[@LINE+3]]:10: error(WhereOnNonFacetType): left argument of `where` operator must be a facet type +// CHECK:STDERR: fail_left_where_not_facet.carbon:[[@LINE+3]]:10: error: left argument of `where` operator must be a facet type [WhereOnNonFacetType] // CHECK:STDERR: fn F(T:! i32 where .Self == bool); // CHECK:STDERR: ^~~ fn F(T:! i32 where .Self == bool); diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index f2512dcaee80..efe00b18922f 100644 --- a/toolchain/check/testdata/while/fail_bad_condition.carbon +++ b/toolchain/check/testdata/while/fail_bad_condition.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/while/fail_bad_condition.carbon fn While() { - // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+6]]:9: error(ImplicitAsConversionFailure): cannot implicitly convert from `String` to `bool` + // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+6]]:9: error: cannot implicitly convert from `String` to `bool` [ImplicitAsConversionFailure] // CHECK:STDERR: while ("Hello") {} // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+3]]:9: note(MissingImplInMemberAccessNote): type `String` does not implement interface `ImplicitAs` + // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+3]]:9: note: type `String` does not implement interface `ImplicitAs` [MissingImplInMemberAccessNote] // CHECK:STDERR: while ("Hello") {} // CHECK:STDERR: ^~~~~~~~~ while ("Hello") {} diff --git a/toolchain/check/testdata/while/fail_break_continue.carbon b/toolchain/check/testdata/while/fail_break_continue.carbon index 91318dc532cb..913d7b5d6ce1 100644 --- a/toolchain/check/testdata/while/fail_break_continue.carbon +++ b/toolchain/check/testdata/while/fail_break_continue.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/check/testdata/while/fail_break_continue.carbon fn While() { - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error(ContinueOutsideLoop): `continue` can only be used in a loop + // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error: `continue` can only be used in a loop [ContinueOutsideLoop] // CHECK:STDERR: continue; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: continue; - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error(BreakOutsideLoop): `break` can only be used in a loop + // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error: `break` can only be used in a loop [BreakOutsideLoop] // CHECK:STDERR: break; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -23,12 +23,12 @@ fn While() { continue; break; } - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error(ContinueOutsideLoop): `continue` can only be used in a loop + // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: error: `continue` can only be used in a loop [ContinueOutsideLoop] // CHECK:STDERR: continue; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: continue; - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+3]]:3: error(BreakOutsideLoop): `break` can only be used in a loop + // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+3]]:3: error: `break` can only be used in a loop [BreakOutsideLoop] // CHECK:STDERR: break; // CHECK:STDERR: ^~~~~ break; diff --git a/toolchain/diagnostics/diagnostic_consumer.cpp b/toolchain/diagnostics/diagnostic_consumer.cpp index 7924124f5e9c..cada656a61db 100644 --- a/toolchain/diagnostics/diagnostic_consumer.cpp +++ b/toolchain/diagnostics/diagnostic_consumer.cpp @@ -31,10 +31,11 @@ auto StreamDiagnosticConsumer::HandleDiagnostic(Diagnostic diagnostic) -> void { case DiagnosticLevel::LocationInfo: break; } + *stream_ << ": " << message.format_fn(message); if (include_diagnostic_kind_) { - *stream_ << "(" << message.kind << ")"; + *stream_ << " [" << message.kind << "]"; } - *stream_ << ": " << message.format_fn(message) << "\n"; + *stream_ << "\n"; // Don't include a snippet for location information to keep this diagnostic // more visually associated with the following diagnostic that it describes // and to better match C++ compilers. diff --git a/toolchain/diagnostics/emitted_diagnostics_test.cpp b/toolchain/diagnostics/emitted_diagnostics_test.cpp index 6209c128ecbf..6f147a0afd7f 100644 --- a/toolchain/diagnostics/emitted_diagnostics_test.cpp +++ b/toolchain/diagnostics/emitted_diagnostics_test.cpp @@ -69,7 +69,7 @@ TEST(EmittedDiagnostics, Verify) { std::ifstream manifest_in("toolchain/diagnostics/all_testdata.txt"); ASSERT_TRUE(manifest_in.good()); - RE2 diagnostic_re(R"(\w\((\w+)\): )"); + RE2 diagnostic_re(R"(^ *// CHECK:STDERR: .*\.carbon:.* \[(\w+)\]$)"); ASSERT_TRUE(diagnostic_re.ok()) << diagnostic_re.error(); Set emitted_diagnostics; diff --git a/toolchain/driver/testdata/fail_missing_file.carbon b/toolchain/driver/testdata/fail_missing_file.carbon index 07a6e20dffb9..4dcb817a6fb3 100644 --- a/toolchain/driver/testdata/fail_missing_file.carbon +++ b/toolchain/driver/testdata/fail_missing_file.carbon @@ -9,4 +9,4 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_missing_file.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_missing_file.carbon -// CHECK:STDERR: not_file.carbon: error(ErrorOpeningFile): error opening file for read: No such file or directory +// CHECK:STDERR: not_file.carbon: error: error opening file for read: No such file or directory [ErrorOpeningFile] diff --git a/toolchain/lex/testdata/fail_bad_comment_introducers.carbon b/toolchain/lex/testdata/fail_bad_comment_introducers.carbon index 5365d746ca9e..fa3009d9b43f 100644 --- a/toolchain/lex/testdata/fail_bad_comment_introducers.carbon +++ b/toolchain/lex/testdata/fail_bad_comment_introducers.carbon @@ -13,13 +13,13 @@ // // Comments have to have whitespace after `//` currently. -// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' +// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: //abc - // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:7: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:7: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //indented // CHECK:STDERR: ^ // CHECK:STDERR: @@ -28,7 +28,7 @@ // We only want to diagnose these on the first line of a block of similarly // indented comments. -// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' +// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: @@ -36,7 +36,7 @@ //123 //dce - // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:11: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:11: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //indented block // CHECK:STDERR: ^ // CHECK:STDERR: @@ -48,7 +48,7 @@ // As we have specialized code to scan short indented comment blocks, make sure // the behavior is preserved even for (absurdly) large indents. - // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+3]]:83: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+3]]:83: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //very indented block // CHECK:STDERR: ^ //very indented block diff --git a/toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon b/toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon index fa3ad6558ff0..c7de18913ffc 100644 --- a/toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon +++ b/toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon @@ -23,15 +23,15 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lex/testdata/fail_bad_comment_introducers_mid_block_indent_change.carbon -// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-17]]:3: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-17]]:3: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-18]]:5: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-18]]:5: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-19]]:3: error(NoWhitespaceAfterCommentIntroducer): whitespace is required after '//' +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-19]]:3: error: whitespace is required after '//' [NoWhitespaceAfterCommentIntroducer] // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_bad_comment_introducers_mid_block_indent_change.carbon diff --git a/toolchain/lex/testdata/fail_bad_raw_identifier.carbon b/toolchain/lex/testdata/fail_bad_raw_identifier.carbon index ebf42a5f9779..4d21edb2c639 100644 --- a/toolchain/lex/testdata/fail_bad_raw_identifier.carbon +++ b/toolchain/lex/testdata/fail_bad_raw_identifier.carbon @@ -15,7 +15,7 @@ // Missing the character after `#`. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: r# // CHECK:STDERR: ^ // CHECK:STDERR: @@ -24,7 +24,7 @@ r# // CHECK:STDOUT: { index: 2, kind: 'Error', line: {{ *}}[[@LINE-2]], column: 2, indent: 1, spelling: '#' }, // Not a valid identifier. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: r#3 // CHECK:STDERR: ^ // CHECK:STDERR: @@ -34,7 +34,7 @@ r#3 // CHECK:STDOUT: { index: 5, kind: 'IntLiteral', line: {{ *}}[[@LINE-3]], column: 3, indent: 1, spelling: '3', value: `3` }, // Non ascii start to identifier. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: r#á // CHECK:STDERR: ^ // CHECK:STDERR: @@ -43,7 +43,7 @@ r#á // CHECK:STDOUT: { index: 7, kind: 'Error', line: {{ *}}[[@LINE-2]], column: 2, indent: 1, spelling: '#á' }, // Raw `r` identifier doesn't start a second raw identifier. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: r#r#foo // CHECK:STDERR: ^ // CHECK:STDERR: @@ -53,7 +53,7 @@ r#r#foo // CHECK:STDOUT: { index: 10, kind: 'Identifier', line: {{ *}}[[@LINE-3]], column: 5, indent: 1, spelling: 'foo', identifier: 1 }, // Other identifier characters don't start a raw identifier. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: s#foo // CHECK:STDERR: ^ // CHECK:STDERR: @@ -63,7 +63,7 @@ s#foo // CHECK:STDOUT: { index: 13, kind: 'Identifier', line: {{ *}}[[@LINE-3]], column: 3, indent: 1, spelling: 'foo', identifier: 1 }, // Identifier ending in `r` doesn't start a raw identifier. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: arr#foo // CHECK:STDERR: ^ // CHECK:STDERR: @@ -73,7 +73,7 @@ arr#foo // CHECK:STDOUT: { index: 16, kind: 'Identifier', line: {{ *}}[[@LINE-3]], column: 5, indent: 1, spelling: 'foo', identifier: 1 }, // Whitespace between `r` and `#` isn't allowed. -// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:3: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:3: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: r #foo // CHECK:STDERR: ^ // CHECK:STDERR: @@ -95,7 +95,7 @@ r#"hello"# // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, // Ensure that we correctly handle a `#` as the first token in the file. -// CHECK:STDERR: fail_hash_at_start_of_file.carbon:[[@LINE+3]]:1: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_hash_at_start_of_file.carbon:[[@LINE+3]]:1: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: #foo // CHECK:STDERR: ^ #foo diff --git a/toolchain/lex/testdata/fail_block_string_second_line.carbon b/toolchain/lex/testdata/fail_block_string_second_line.carbon index 93385a96d7ed..82bb9d7137c8 100644 --- a/toolchain/lex/testdata/fail_block_string_second_line.carbon +++ b/toolchain/lex/testdata/fail_block_string_second_line.carbon @@ -13,7 +13,7 @@ var s: String = ''' // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lex/testdata/fail_block_string_second_line.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lex/testdata/fail_block_string_second_line.carbon -// CHECK:STDERR: fail_block_string_second_line.carbon:[[@LINE-10]]:3: error(ContentBeforeStringTerminator): only whitespace is permitted before the closing `'''` of a multi-line string +// CHECK:STDERR: fail_block_string_second_line.carbon:[[@LINE-10]]:3: error: only whitespace is permitted before the closing `'''` of a multi-line string [ContentBeforeStringTerminator] // CHECK:STDERR: error here: ''' // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_block_string_second_line.carbon diff --git a/toolchain/lex/testdata/fail_mismatched_brackets.carbon b/toolchain/lex/testdata/fail_mismatched_brackets.carbon index 60dd69ae8b83..68956128254a 100644 --- a/toolchain/lex/testdata/fail_mismatched_brackets.carbon +++ b/toolchain/lex/testdata/fail_mismatched_brackets.carbon @@ -11,14 +11,14 @@ // CHECK:STDOUT: tokens: [ // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, -// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:1: error(UnmatchedClosing): closing symbol without a corresponding opening symbol +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:1: error: closing symbol without a corresponding opening symbol [UnmatchedClosing] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: } // CHECK:STDOUT: { index: 1, kind: 'Error', line: {{ *}}[[@LINE-1]], column: 1, indent: 1, spelling: '}', has_leading_space: true }, -// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:3: error(UnmatchedClosing): closing symbol without a corresponding opening symbol +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:3: error: closing symbol without a corresponding opening symbol [UnmatchedClosing] // CHECK:STDERR: ( } ) // CHECK:STDERR: ^ // CHECK:STDERR: @@ -27,7 +27,7 @@ // CHECK:STDOUT: { index: 3, kind: 'Error', line: {{ *}}[[@LINE-2]], column: 3, indent: 1, spelling: '}', has_leading_space: true }, // CHECK:STDOUT: { index: 4, kind: 'CloseParen', line: {{ *}}[[@LINE-3]], column: 5, indent: 1, spelling: ')', opening_token: 2, has_leading_space: true }, -// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+3]]:1: error(UnmatchedOpening): opening symbol without a corresponding closing symbol +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+3]]:1: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: [ // CHECK:STDERR: ^ [ diff --git a/toolchain/lex/testdata/fail_mismatched_brackets_2.carbon b/toolchain/lex/testdata/fail_mismatched_brackets_2.carbon index 9bbb6a335d99..6a80913a9cff 100644 --- a/toolchain/lex/testdata/fail_mismatched_brackets_2.carbon +++ b/toolchain/lex/testdata/fail_mismatched_brackets_2.carbon @@ -18,7 +18,7 @@ fn F() { // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lex/testdata/fail_mismatched_brackets_2.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lex/testdata/fail_mismatched_brackets_2.carbon -// CHECK:STDERR: fail_mismatched_brackets_2.carbon:[[@LINE-9]]:1: error(UnmatchedClosing): closing symbol without a corresponding opening symbol +// CHECK:STDERR: fail_mismatched_brackets_2.carbon:[[@LINE-9]]:1: error: closing symbol without a corresponding opening symbol [UnmatchedClosing] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_mismatched_brackets_2.carbon diff --git a/toolchain/lex/testdata/fail_multifile.carbon b/toolchain/lex/testdata/fail_multifile.carbon index 5c3e3e5a6e78..4d891fef74a3 100644 --- a/toolchain/lex/testdata/fail_multifile.carbon +++ b/toolchain/lex/testdata/fail_multifile.carbon @@ -12,7 +12,7 @@ // CHECK:STDOUT: - filename: fail_a.carbon // CHECK:STDOUT: tokens: [ // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, -// CHECK:STDERR: fail_a.carbon:[[@LINE+4]]:3: error(EmptyDigitSequence): empty digit sequence in numeric literal +// CHECK:STDERR: fail_a.carbon:[[@LINE+4]]:3: error: empty digit sequence in numeric literal [EmptyDigitSequence] // CHECK:STDERR: 1.a // CHECK:STDERR: ^ // CHECK:STDERR: @@ -25,7 +25,7 @@ // CHECK:STDOUT: - filename: fail_b.carbon // CHECK:STDOUT: tokens: [ // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, -// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:3: error(EmptyDigitSequence): empty digit sequence in numeric literal +// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:3: error: empty digit sequence in numeric literal [EmptyDigitSequence] // CHECK:STDERR: 2.b // CHECK:STDERR: ^ 2.b diff --git a/toolchain/lex/testdata/fail_trailing_comments.carbon b/toolchain/lex/testdata/fail_trailing_comments.carbon index 5fcd9d12c8e2..5a9a1e9c5bf0 100644 --- a/toolchain/lex/testdata/fail_trailing_comments.carbon +++ b/toolchain/lex/testdata/fail_trailing_comments.carbon @@ -16,15 +16,15 @@ var c: i32 = 0.4; // still more trailing comment // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/lex/testdata/fail_trailing_comments.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lex/testdata/fail_trailing_comments.carbon -// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-11]]:19: error(TrailingComment): trailing comments are not permitted +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-11]]:19: error: trailing comments are not permitted [TrailingComment] // CHECK:STDERR: var a: i32 = 1; // trailing comment // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-14]]:19: error(TrailingComment): trailing comments are not permitted +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-14]]:19: error: trailing comments are not permitted [TrailingComment] // CHECK:STDERR: var b: 32 = 13; // more trailing comment // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-17]]:19: error(TrailingComment): trailing comments are not permitted +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-17]]:19: error: trailing comments are not permitted [TrailingComment] // CHECK:STDERR: var c: i32 = 0.4; // still more trailing comment // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_trailing_comments.carbon diff --git a/toolchain/lex/testdata/numeric_literals.carbon b/toolchain/lex/testdata/numeric_literals.carbon index b8c6f49b770a..2d0e838ce424 100644 --- a/toolchain/lex/testdata/numeric_literals.carbon +++ b/toolchain/lex/testdata/numeric_literals.carbon @@ -97,7 +97,7 @@ fn F() { // CHECK:STDOUT: tokens: [ // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, -// CHECK:STDERR: fail_binary_real.carbon:[[@LINE+4]]:4: error(BinaryRealLiteral): binary real number literals are not supported +// CHECK:STDERR: fail_binary_real.carbon:[[@LINE+4]]:4: error: binary real number literals are not supported [BinaryRealLiteral] // CHECK:STDERR: 0b1.0 // CHECK:STDERR: ^ // CHECK:STDERR: @@ -106,12 +106,12 @@ fn F() { // CHECK:STDOUT: { index: 2, kind: 'FileEnd', line: {{ *}}[[@LINE+1]], column: {{ *\d+}}, indent: 1, spelling: '', has_leading_space: true }, // CHECK:STDOUT: ] -// --- fail_wrong_real_exponent -// CHECK:STDOUT: - filename: fail_wrong_real_exponent +// --- fail_wrong_real_exponent.carbon +// CHECK:STDOUT: - filename: fail_wrong_real_exponent.carbon // CHECK:STDOUT: tokens: [ // CHECK:STDOUT: { index: 0, kind: 'FileStart', line: {{ *\d+}}, column: 1, indent: 1, spelling: '' }, -// CHECK:STDERR: fail_wrong_real_exponent:[[@LINE+3]]:4: error(WrongRealLiteralExponent): expected 'e' to introduce exponent +// CHECK:STDERR: fail_wrong_real_exponent.carbon:[[@LINE+3]]:4: error: expected 'e' to introduce exponent [WrongRealLiteralExponent] // CHECK:STDERR: 1.0r3 // CHECK:STDERR: ^ 1.0r3 diff --git a/toolchain/lex/testdata/string_literals.carbon b/toolchain/lex/testdata/string_literals.carbon index f225fec9a5cfdcfaa48b3abfa23761ee047a7191..8c54e214cff8a91b6f2459616166a175a77c3f42 100644 GIT binary patch delta 124 zcmZpZ?ULPK!aUiVIa5L*+9fqPGdD5EwKzGkAT>C(urxI0k7UnHXlWW)%L=~b# z^GZ^Sax?Q1OHxyUONuh{(qlKzVVlP^IgnEcXh3LQc3ysY9=ZX=oWGeSPv9wKQiz_M O&!fN?yP1`@kr4pbKP%h- delta 88 zcmeB@ZIj(#!px{Kc|Nl!qvm82=FH7onYS>BXoTjKq!#67<|US-rUaK1W#*-8PR?Xg m*gTJI9urV`0w+kh4X4uPGS1&1ffqaqK!HM@(#@Q_jf?=;RvTXc diff --git a/toolchain/lower/testdata/basics/fail_before_lowering.carbon b/toolchain/lower/testdata/basics/fail_before_lowering.carbon index 00cb885f387d..cf4d03be9495 100644 --- a/toolchain/lower/testdata/basics/fail_before_lowering.carbon +++ b/toolchain/lower/testdata/basics/fail_before_lowering.carbon @@ -9,11 +9,11 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/lower/testdata/basics/fail_before_lowering.carbon -// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+7]]:1: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+7]]:1: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: a; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: error(SemanticsTodo): semantics TODO: `HandleInvalidParseStart` +// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: error: semantics TODO: `HandleInvalidParseStart` [SemanticsTodo] // CHECK:STDERR: a; // CHECK:STDERR: ^ a; diff --git a/toolchain/parse/testdata/alias/fail_syntax.carbon b/toolchain/parse/testdata/alias/fail_syntax.carbon index ba08f8c20e38..0cdb27c9c204 100644 --- a/toolchain/parse/testdata/alias/fail_syntax.carbon +++ b/toolchain/parse/testdata/alias/fail_syntax.carbon @@ -8,63 +8,63 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/alias/fail_syntax.carbon -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:7: error(ExpectedDeclName): `alias` introducer should be followed by a name +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:7: error: `alias` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: alias = b; // CHECK:STDERR: ^ // CHECK:STDERR: alias = b; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error(ExpectedAliasInitializer): `alias` requires a `=` for the source +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error: `alias` requires a `=` for the source [ExpectedAliasInitializer] // CHECK:STDERR: alias a b; // CHECK:STDERR: ^ // CHECK:STDERR: alias a b; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:10: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:10: error: expected expression [ExpectedExpr] // CHECK:STDERR: alias a =; // CHECK:STDERR: ^ // CHECK:STDERR: alias a =; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: error(ExpectedAliasInitializer): `alias` requires a `=` for the source +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: error: `alias` requires a `=` for the source [ExpectedAliasInitializer] // CHECK:STDERR: alias a; // CHECK:STDERR: ^ // CHECK:STDERR: alias a; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:7: error(ExpectedDeclName): `alias` introducer should be followed by a name +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:7: error: `alias` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: alias =; // CHECK:STDERR: ^ // CHECK:STDERR: alias =; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error(ExpectedAliasInitializer): `alias` requires a `=` for the source +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error: `alias` requires a `=` for the source [ExpectedAliasInitializer] // CHECK:STDERR: alias a b c = d; // CHECK:STDERR: ^ // CHECK:STDERR: alias a b c = d; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:13: error(ExpectedDeclSemi): `alias` declarations must end with a `;` +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:13: error: `alias` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: alias a = b c d; // CHECK:STDERR: ^ // CHECK:STDERR: alias a = b c d; fn F() { - // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: error(ExpectedDeclName): `alias` introducer should be followed by a name + // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: error: `alias` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: alias; // CHECK:STDERR: ^ // CHECK:STDERR: alias; - // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:12: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: alias a =; // CHECK:STDERR: ^ // CHECK:STDERR: alias a =; alias a = -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:1: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:1: error: expected expression [ExpectedExpr] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -72,7 +72,7 @@ fn F() { alias a = b -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+56]]:21: error(ExpectedDeclSemi): `alias` declarations must end with a `;` +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+56]]:21: error: `alias` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_syntax.carbon diff --git a/toolchain/parse/testdata/array/fail_require_close_bracket.carbon b/toolchain/parse/testdata/array/fail_require_close_bracket.carbon index 964d3925197f..25f8f3631768 100644 --- a/toolchain/parse/testdata/array/fail_require_close_bracket.carbon +++ b/toolchain/parse/testdata/array/fail_require_close_bracket.carbon @@ -9,11 +9,11 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/array/fail_require_close_bracket.carbon // TODO: It should emit only one error message. -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+7]]:8: error(UnmatchedOpening): opening symbol without a corresponding closing symbol +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+7]]:8: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:8: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:8: error: expected expression [ExpectedExpr] // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ var x: [i32;; diff --git a/toolchain/parse/testdata/array/fail_require_semi.carbon b/toolchain/parse/testdata/array/fail_require_semi.carbon index 6ff18fb45dac..804653a7f8a1 100644 --- a/toolchain/parse/testdata/array/fail_require_semi.carbon +++ b/toolchain/parse/testdata/array/fail_require_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/array/fail_require_semi.carbon -// CHECK:STDERR: fail_require_semi.carbon:[[@LINE+3]]:12: error(ExpectedArraySemi): expected `;` in array type +// CHECK:STDERR: fail_require_semi.carbon:[[@LINE+3]]:12: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: var x: [i32]; // CHECK:STDERR: ^ var x: [i32]; diff --git a/toolchain/parse/testdata/array/fail_syntax.carbon b/toolchain/parse/testdata/array/fail_syntax.carbon index fc7701671a48..0eb6bd90422f 100644 --- a/toolchain/parse/testdata/array/fail_syntax.carbon +++ b/toolchain/parse/testdata/array/fail_syntax.carbon @@ -10,7 +10,7 @@ // --- fail_type.carbon -// CHECK:STDERR: fail_type.carbon:[[@LINE+4]]:12: error(ExpectedArraySemi): expected `;` in array type +// CHECK:STDERR: fail_type.carbon:[[@LINE+4]]:12: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: var x: [i32]; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -18,19 +18,19 @@ var x: [i32]; // --- fail_invalid_char.carbon -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+16]]:12: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+16]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+12]]:12: error(ExpectedArraySemi): expected `;` in array type +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+12]]:12: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+8]]:12: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+8]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+4]]:12: error(ExpectedCloseSymbol): unexpected tokens before `]` +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+4]]:12: error: unexpected tokens before `]` [ExpectedCloseSymbol] // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -38,23 +38,23 @@ fn X() -> [:]; // --- fail_unlexed_expr.carbon -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+20]]:9: error(UnrecognizedCharacters): encountered unrecognized characters while parsing +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+20]]:9: error: encountered unrecognized characters while parsing [UnrecognizedCharacters] // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+16]]:9: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+16]]:9: error: expected expression [ExpectedExpr] // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+12]]:9: error(ExpectedArraySemi): expected `;` in array type +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+12]]:9: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+8]]:9: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+8]]:9: error: expected expression [ExpectedExpr] // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+4]]:9: error(ExpectedCloseSymbol): unexpected tokens before `]` +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+4]]:9: error: unexpected tokens before `]` [ExpectedCloseSymbol] // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -62,11 +62,11 @@ var y: [`]; // --- fail_no_close_bracket.carbon -// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+8]]:8: error(UnmatchedOpening): opening symbol without a corresponding closing symbol +// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+8]]:8: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+4]]:8: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+4]]:8: error: expected expression [ExpectedExpr] // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -74,7 +74,7 @@ var x: [i32;; // --- fail_no_semi.carbon -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:12: error(ExpectedArraySemi): expected `;` in array type +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:12: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: var x: [i32]; // CHECK:STDERR: ^ var x: [i32]; diff --git a/toolchain/parse/testdata/basics/fail_bracket_recovery.carbon b/toolchain/parse/testdata/basics/fail_bracket_recovery.carbon index fddbf52f2f6d..324904ea47d3 100644 --- a/toolchain/parse/testdata/basics/fail_bracket_recovery.carbon +++ b/toolchain/parse/testdata/basics/fail_bracket_recovery.carbon @@ -10,20 +10,20 @@ // This is a valid parse tree even though the lex errors. fn F() { - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+4]]:11: error(UnmatchedOpening): opening symbol without a corresponding closing symbol + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+4]]:11: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: ([i32; 3) = (0, 1, 2); // CHECK:STDERR: ^ // CHECK:STDERR: var x: ([i32; 3) = (0, 1, 2); - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+11]]:15: error(UnmatchedOpening): opening symbol without a corresponding closing symbol + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+11]]:15: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: {.y: (} = {.y = ((}; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+7]]:26: error(UnmatchedOpening): opening symbol without a corresponding closing symbol + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+7]]:26: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: {.y: (} = {.y = ((}; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+3]]:27: error(UnmatchedOpening): opening symbol without a corresponding closing symbol + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+3]]:27: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: var x: {.y: (} = {.y = ((}; // CHECK:STDERR: ^ var x: {.y: (} = {.y = ((}; diff --git a/toolchain/parse/testdata/basics/fail_invalid_designators.carbon b/toolchain/parse/testdata/basics/fail_invalid_designators.carbon index 4450d8230a59..b018b3fd208f 100644 --- a/toolchain/parse/testdata/basics/fail_invalid_designators.carbon +++ b/toolchain/parse/testdata/basics/fail_invalid_designators.carbon @@ -10,12 +10,12 @@ // NOTE: Move to its own directory when more tests are added. fn F() { - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+4]]:5: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+4]]:5: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: a.; // CHECK:STDERR: ^ // CHECK:STDERR: a.; - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: a.fn; // CHECK:STDERR: ^~ a.fn; diff --git a/toolchain/parse/testdata/basics/fail_modifiers_before_semi.carbon b/toolchain/parse/testdata/basics/fail_modifiers_before_semi.carbon index c4039b6867f3..f07dc53fc4eb 100644 --- a/toolchain/parse/testdata/basics/fail_modifiers_before_semi.carbon +++ b/toolchain/parse/testdata/basics/fail_modifiers_before_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/fail_modifiers_before_semi.carbon -// CHECK:STDERR: fail_modifiers_before_semi.carbon:[[@LINE+3]]:18: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_modifiers_before_semi.carbon:[[@LINE+3]]:18: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: protected virtual; // CHECK:STDERR: ^ protected virtual; diff --git a/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon b/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon index 8ae04c10fe70..8370169ccf5c 100644 --- a/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon +++ b/toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/fail_no_intro_with_semi.carbon -// CHECK:STDERR: fail_no_intro_with_semi.carbon:[[@LINE+3]]:1: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_no_intro_with_semi.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: foo; // CHECK:STDERR: ^~~ foo; diff --git a/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon b/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon index 127d56088d95..3d119b08615d 100644 --- a/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon +++ b/toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/fail_no_intro_without_semi.carbon -// CHECK:STDERR: fail_no_intro_without_semi.carbon:[[@LINE+3]]:1: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_no_intro_without_semi.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: foo bar baz // CHECK:STDERR: ^~~ foo bar baz diff --git a/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon b/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon index 7a52948a9bcc..d87ae18a1503 100644 --- a/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon +++ b/toolchain/parse/testdata/basics/fail_paren_match_regression.carbon @@ -8,17 +8,17 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/basics/fail_paren_match_regression.carbon -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+8]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+8]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+4]]:12: error(UnexpectedTokenAfterListElement): expected `,` or `)` +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+4]]:12: error: expected `,` or `)` [UnexpectedTokenAfterListElement] // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ // CHECK:STDERR: var = (foo {}) -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+16]]:21: error(ExpectedDeclSemi): `var` declarations must end with a `;` +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+16]]:21: error: `var` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_paren_match_regression.carbon diff --git a/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon b/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon index 565a5b5ef546..19bc2b9855df 100644 --- a/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon +++ b/toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_alternative_with_implicit_params.carbon choice X { - // CHECK:STDERR: fail_alternative_with_implicit_params.carbon:[[@LINE+3]]:4: error(UnexpectedTokenAfterListElement): expected `,` or `}` + // CHECK:STDERR: fail_alternative_with_implicit_params.carbon:[[@LINE+3]]:4: error: expected `,` or `}` [UnexpectedTokenAfterListElement] // CHECK:STDERR: A[T:! type](value: T) // CHECK:STDERR: ^ A[T:! type](value: T) diff --git a/toolchain/parse/testdata/choice/fail_invalid_alternative_identifier.carbon b/toolchain/parse/testdata/choice/fail_invalid_alternative_identifier.carbon index b538252a2dc2..b5db9f3a5f06 100644 --- a/toolchain/parse/testdata/choice/fail_invalid_alternative_identifier.carbon +++ b/toolchain/parse/testdata/choice/fail_invalid_alternative_identifier.carbon @@ -9,12 +9,12 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_invalid_alternative_identifier.carbon choice InvalidAlternativeIdentifier { - // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+4]]:5: error(ExpectedChoiceAlternativeName): expected choice alternative name + // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+4]]:5: error: expected choice alternative name [ExpectedChoiceAlternativeName] // CHECK:STDERR: ,Some, // CHECK:STDERR: ^ // CHECK:STDERR: ,Some, - // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+3]]:5: error(ExpectedChoiceAlternativeName): expected choice alternative name + // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+3]]:5: error: expected choice alternative name [ExpectedChoiceAlternativeName] // CHECK:STDERR: 42, // CHECK:STDERR: ^~ 42, diff --git a/toolchain/parse/testdata/choice/fail_invalid_braces.carbon b/toolchain/parse/testdata/choice/fail_invalid_braces.carbon index b0c8cfe4ccdf..762769b83612 100644 --- a/toolchain/parse/testdata/choice/fail_invalid_braces.carbon +++ b/toolchain/parse/testdata/choice/fail_invalid_braces.carbon @@ -8,13 +8,13 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_invalid_braces.carbon -// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+4]]:22: error(ExpectedChoiceDefinition): choice definition expected +// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+4]]:22: error: choice definition expected [ExpectedChoiceDefinition] // CHECK:STDERR: choice InvalidBraces | // CHECK:STDERR: ^ // CHECK:STDERR: choice InvalidBraces | Some -// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+3]]:1: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: | // CHECK:STDERR: ^ | diff --git a/toolchain/parse/testdata/choice/fail_missing_definition.carbon b/toolchain/parse/testdata/choice/fail_missing_definition.carbon index 9ff6b70f4636..fc6d7e8b08ac 100644 --- a/toolchain/parse/testdata/choice/fail_missing_definition.carbon +++ b/toolchain/parse/testdata/choice/fail_missing_definition.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_missing_definition.carbon -// CHECK:STDERR: fail_missing_definition.carbon:[[@LINE+3]]:25: error(ExpectedChoiceDefinition): choice definition expected +// CHECK:STDERR: fail_missing_definition.carbon:[[@LINE+3]]:25: error: choice definition expected [ExpectedChoiceDefinition] // CHECK:STDERR: choice MissingDefinition; // CHECK:STDERR: ^ choice MissingDefinition; diff --git a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon index bc41d045eb1d..8a76d9af0768 100644 --- a/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon +++ b/toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_missing_definition_parameterized.carbon -// CHECK:STDERR: fail_missing_definition_parameterized.carbon:[[@LINE+3]]:35: error(ExpectedChoiceDefinition): choice definition expected +// CHECK:STDERR: fail_missing_definition_parameterized.carbon:[[@LINE+3]]:35: error: choice definition expected [ExpectedChoiceDefinition] // CHECK:STDERR: choice MissingDefinition(T:! type); // CHECK:STDERR: ^ choice MissingDefinition(T:! type); diff --git a/toolchain/parse/testdata/choice/fail_qualified_alternative_name.carbon b/toolchain/parse/testdata/choice/fail_qualified_alternative_name.carbon index c638eae4c945..76402ce451f1 100644 --- a/toolchain/parse/testdata/choice/fail_qualified_alternative_name.carbon +++ b/toolchain/parse/testdata/choice/fail_qualified_alternative_name.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/choice/fail_qualified_alternative_name.carbon choice X { - // CHECK:STDERR: fail_qualified_alternative_name.carbon:[[@LINE+3]]:4: error(UnexpectedTokenAfterListElement): expected `,` or `}` + // CHECK:STDERR: fail_qualified_alternative_name.carbon:[[@LINE+3]]:4: error: expected `,` or `}` [UnexpectedTokenAfterListElement] // CHECK:STDERR: A.B // CHECK:STDERR: ^ A.B diff --git a/toolchain/parse/testdata/class/adapt.carbon b/toolchain/parse/testdata/class/adapt.carbon index ad4646e1e039..abd3c34a942c 100644 --- a/toolchain/parse/testdata/class/adapt.carbon +++ b/toolchain/parse/testdata/class/adapt.carbon @@ -36,7 +36,7 @@ adapt i32; // --- fail_bad_syntax.carbon class A { - // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:11: error(ExpectedDeclSemi): `adapt` declarations must end with a `;` + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:11: error: `adapt` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: adapt 1 trailing_token; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -44,7 +44,7 @@ class A { } class B { - // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:8: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:8: error: expected expression [ExpectedExpr] // CHECK:STDERR: adapt; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -53,14 +53,14 @@ class B { class C { adapt -// CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:1: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:1: error: expected expression [ExpectedExpr] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: } class D { - // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:9: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:9: error: expected expression [ExpectedExpr] // CHECK:STDERR: adapt class; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -68,7 +68,7 @@ class D { } fn F() { - // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+3]]:3: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+3]]:3: error: expected expression [ExpectedExpr] // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~ adapt i32; diff --git a/toolchain/parse/testdata/class/fail_base.carbon b/toolchain/parse/testdata/class/fail_base.carbon index df1a0ce7b026..19ff6ed1d222 100644 --- a/toolchain/parse/testdata/class/fail_base.carbon +++ b/toolchain/parse/testdata/class/fail_base.carbon @@ -9,13 +9,13 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/class/fail_base.carbon class A { - // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:7: error(ExpectedAfterBase): `class` or `:` expected after `base` + // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:7: error: `class` or `:` expected after `base` [ExpectedAfterBase] // CHECK:STDERR: base; // CHECK:STDERR: ^ // CHECK:STDERR: base; - // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:9: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:9: error: expected expression [ExpectedExpr] // CHECK:STDERR: base: ; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -23,11 +23,11 @@ class A { base: { } // We should resume parsing here after the previous error. - // CHECK:STDERR: fail_base.carbon:[[@LINE+7]]:3: error(ExpectedDeclSemi): `base` declarations must end with a `;` + // CHECK:STDERR: fail_base.carbon:[[@LINE+7]]:3: error: `base` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base.carbon:[[@LINE+3]]:7: error(UnrecognizedDecl): unrecognized declaration introducer + // CHECK:STDERR: fail_base.carbon:[[@LINE+3]]:7: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^ var n: i32; diff --git a/toolchain/parse/testdata/class/fail_base_misplaced.carbon b/toolchain/parse/testdata/class/fail_base_misplaced.carbon index 726c42113410..c5eb24cca152 100644 --- a/toolchain/parse/testdata/class/fail_base_misplaced.carbon +++ b/toolchain/parse/testdata/class/fail_base_misplaced.carbon @@ -11,7 +11,7 @@ base class B {} fn F() { - // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error: expected expression [ExpectedExpr] // CHECK:STDERR: base: B; // CHECK:STDERR: ^~~~ base: B; diff --git a/toolchain/parse/testdata/class/fail_modifiers.carbon b/toolchain/parse/testdata/class/fail_modifiers.carbon index 1c1851f0f8f8..3d8ed25cbb14 100644 --- a/toolchain/parse/testdata/class/fail_modifiers.carbon +++ b/toolchain/parse/testdata/class/fail_modifiers.carbon @@ -11,14 +11,14 @@ // --- fail_virtual_class.carbon virtual class B -// CHECK:STDERR: fail_virtual_class.carbon:[[@LINE+4]]:1: error(ExpectedDeclSemiOrDefinition): `virtual` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_virtual_class.carbon:[[@LINE+4]]:1: error: `virtual` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: // CHECK:STDERR: ^ // CHECK:STDERR: // --- fail_impl_class.carbon -// CHECK:STDERR: fail_impl_class.carbon:[[@LINE+4]]:1: error(ExpectedDeclName): `impl` introducer should be followed by a name +// CHECK:STDERR: fail_impl_class.carbon:[[@LINE+4]]:1: error: `impl` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: impl class // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -27,7 +27,7 @@ impl class // --- fail_extend_adapt_base.carbon class C { - // CHECK:STDERR: fail_extend_adapt_base.carbon:[[@LINE+3]]:16: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_extend_adapt_base.carbon:[[@LINE+3]]:16: error: expected expression [ExpectedExpr] // CHECK:STDERR: extend adapt base B; // CHECK:STDERR: ^~~~ extend adapt base B; diff --git a/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon b/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon index 3a13f59d57ed..1041c4cc442d 100644 --- a/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon +++ b/toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/for/fail_colon_instead_of_in.carbon fn foo() { - // CHECK:STDERR: fail_colon_instead_of_in.carbon:[[@LINE+3]]:19: error(ExpectedInNotColon): `:` should be replaced by `in` + // CHECK:STDERR: fail_colon_instead_of_in.carbon:[[@LINE+3]]:19: error: `:` should be replaced by `in` [ExpectedInNotColon] // CHECK:STDERR: for (var x: i32 : y) { // CHECK:STDERR: ^ for (var x: i32 : y) { diff --git a/toolchain/parse/testdata/for/fail_missing_cond.carbon b/toolchain/parse/testdata/for/fail_missing_cond.carbon index a5cd2c1e33fe..e24eab8a1cd6 100644 --- a/toolchain/parse/testdata/for/fail_missing_cond.carbon +++ b/toolchain/parse/testdata/for/fail_missing_cond.carbon @@ -9,21 +9,21 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/for/fail_missing_cond.carbon fn F() { - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+8]]:7: error(ExpectedParenAfter): expected `(` after `for` + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+8]]:7: error: expected `(` after `for` [ExpectedParenAfter] // CHECK:STDERR: for { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+4]]:7: error(ExpectedVariableDecl): expected `var` declaration + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+4]]:7: error: expected `var` declaration [ExpectedVariableDecl] // CHECK:STDERR: for { // CHECK:STDERR: ^ // CHECK:STDERR: for { } -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+7]]:1: error(ExpectedCodeBlock): expected braced code block +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+7]]:1: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: error: expected expression [ExpectedExpr] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/for/fail_missing_in.carbon b/toolchain/parse/testdata/for/fail_missing_in.carbon index f52a175cbcb2..40073c480d1d 100644 --- a/toolchain/parse/testdata/for/fail_missing_in.carbon +++ b/toolchain/parse/testdata/for/fail_missing_in.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/for/fail_missing_in.carbon fn foo() { - // CHECK:STDERR: fail_missing_in.carbon:[[@LINE+3]]:19: error(ExpectedIn): expected `in` after loop `var` declaration + // CHECK:STDERR: fail_missing_in.carbon:[[@LINE+3]]:19: error: expected `in` after loop `var` declaration [ExpectedIn] // CHECK:STDERR: for (var x: i32 y) { // CHECK:STDERR: ^ for (var x: i32 y) { diff --git a/toolchain/parse/testdata/for/fail_missing_var.carbon b/toolchain/parse/testdata/for/fail_missing_var.carbon index 962cbb104634..ed5317ca21f4 100644 --- a/toolchain/parse/testdata/for/fail_missing_var.carbon +++ b/toolchain/parse/testdata/for/fail_missing_var.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/for/fail_missing_var.carbon fn foo() { - // CHECK:STDERR: fail_missing_var.carbon:[[@LINE+3]]:8: error(ExpectedVariableDecl): expected `var` declaration + // CHECK:STDERR: fail_missing_var.carbon:[[@LINE+3]]:8: error: expected `var` declaration [ExpectedVariableDecl] // CHECK:STDERR: for (x: i32 in y) { // CHECK:STDERR: ^ for (x: i32 in y) { diff --git a/toolchain/parse/testdata/for/fail_returned_var.carbon b/toolchain/parse/testdata/for/fail_returned_var.carbon index f3319c543360..9867023c392a 100644 --- a/toolchain/parse/testdata/for/fail_returned_var.carbon +++ b/toolchain/parse/testdata/for/fail_returned_var.carbon @@ -10,7 +10,7 @@ fn foo() -> i32 { // TODO: Should we allow this? - // CHECK:STDERR: fail_returned_var.carbon:[[@LINE+3]]:8: error(ExpectedVariableDecl): expected `var` declaration + // CHECK:STDERR: fail_returned_var.carbon:[[@LINE+3]]:8: error: expected `var` declaration [ExpectedVariableDecl] // CHECK:STDERR: for (returned var x: i32 in y) { // CHECK:STDERR: ^~~~~~~~ for (returned var x: i32 in y) { diff --git a/toolchain/parse/testdata/for/fail_square_brackets.carbon b/toolchain/parse/testdata/for/fail_square_brackets.carbon index 0d443d323487..3be3f2e73c75 100644 --- a/toolchain/parse/testdata/for/fail_square_brackets.carbon +++ b/toolchain/parse/testdata/for/fail_square_brackets.carbon @@ -9,19 +9,19 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/for/fail_square_brackets.carbon fn F() { - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+15]]:7: error(ExpectedParenAfter): expected `(` after `for` + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+15]]:7: error: expected `(` after `for` [ExpectedParenAfter] // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:7: error(ExpectedVariableDecl): expected `var` declaration + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:7: error: expected `var` declaration [ExpectedVariableDecl] // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:8: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:8: error: expected expression [ExpectedExpr] // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: error(ExpectedArraySemi): expected `;` in array type + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: for [] { // CHECK:STDERR: ^ for [] { diff --git a/toolchain/parse/testdata/function/declaration/extern.carbon b/toolchain/parse/testdata/function/declaration/extern.carbon index d0487de0fee4..f9a46bc3d4f9 100644 --- a/toolchain/parse/testdata/function/declaration/extern.carbon +++ b/toolchain/parse/testdata/function/declaration/extern.carbon @@ -22,7 +22,7 @@ extern library default fn G(); // --- fail_name_missing.carbon -// CHECK:STDERR: fail_name_missing.carbon:[[@LINE+4]]:16: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_name_missing.carbon:[[@LINE+4]]:16: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: extern library fn G(); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -30,11 +30,11 @@ extern library fn G(); // --- fail_identifier.carbon -// CHECK:STDERR: fail_identifier.carbon:[[@LINE+7]]:16: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_identifier.carbon:[[@LINE+7]]:16: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: extern library foo fn G(); // CHECK:STDERR: ^~~ // CHECK:STDERR: -// CHECK:STDERR: fail_identifier.carbon:[[@LINE+3]]:16: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_identifier.carbon:[[@LINE+3]]:16: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: extern library foo fn G(); // CHECK:STDERR: ^~~ extern library foo fn G(); diff --git a/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon b/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon index 4fce0a0d357a..648904850d4d 100644 --- a/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_identifier_instead_of_sig.carbon -// CHECK:STDERR: fail_identifier_instead_of_sig.carbon:[[@LINE+3]]:8: error(ExpectedDeclSemiOrDefinition): `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_identifier_instead_of_sig.carbon:[[@LINE+3]]:8: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: fn foo bar; // CHECK:STDERR: ^~~ fn foo bar; diff --git a/toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon b/toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon index 9813e3b2c610..5515742c60bd 100644 --- a/toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon @@ -9,11 +9,11 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_missing_implicit_close.carbon // Fix and uncomment this to test error handling. -// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+7]]:7: error(UnmatchedOpening): opening symbol without a corresponding closing symbol +// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+7]]:7: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: fn Div[(); // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+3]]:7: error(ExpectedDeclSemiOrDefinition): `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_missing_implicit_close.carbon:[[@LINE+3]]:7: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: fn Div[(); // CHECK:STDERR: ^ fn Div[(); diff --git a/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon b/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon index 8831ea507a3a..2abab4230d57 100644 --- a/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_missing_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_missing_name.carbon -// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (); // CHECK:STDERR: ^ fn (); diff --git a/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon index 2d24a73681db..4fa758ee1716 100644 --- a/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_no_sig_or_semi.carbon @@ -10,7 +10,7 @@ fn foo -// CHECK:STDERR: fail_no_sig_or_semi.carbon:[[@LINE+10]]:21: error(ExpectedDeclSemiOrDefinition): `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_no_sig_or_semi.carbon:[[@LINE+10]]:21: error: `fn` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_sig_or_semi.carbon diff --git a/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon index 672f69a700e1..cb9b61630975 100644 --- a/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_only_fn_and_semi.carbon -// CHECK:STDERR: fail_only_fn_and_semi.carbon:[[@LINE+3]]:3: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_only_fn_and_semi.carbon:[[@LINE+3]]:3: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn; // CHECK:STDERR: ^ fn; diff --git a/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon index 71f8e867d3ee..0d133480882c 100644 --- a/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_repeated_fn_and_semi.carbon -// CHECK:STDERR: fail_repeated_fn_and_semi.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_repeated_fn_and_semi.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn fn; // CHECK:STDERR: ^~ fn fn; diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon index a6c4961e7d9c..3822b48b6bb5 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_until_outdent.carbon - // CHECK:STDERR: fail_skip_indented_newline_until_outdent.carbon:[[@LINE+3]]:6: error(ExpectedDeclName): `fn` introducer should be followed by a name + // CHECK:STDERR: fail_skip_indented_newline_until_outdent.carbon:[[@LINE+3]]:6: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon index a0e9c3a18611..4cef41901e22 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_with_semi.carbon -// CHECK:STDERR: fail_skip_indented_newline_with_semi.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_skip_indented_newline_with_semi.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon index 572a74c38cd5..b3516fc84ec3 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_skip_indented_newline_without_semi.carbon -// CHECK:STDERR: fail_skip_indented_newline_without_semi.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_skip_indented_newline_without_semi.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (x, // CHECK:STDERR: ^ fn (x, diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon index 7506a42a013d..d7d24fcc919e 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_skip_to_newline_without_semi.carbon -// CHECK:STDERR: fail_skip_to_newline_without_semi.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_skip_to_newline_without_semi.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn () // CHECK:STDERR: ^ fn () diff --git a/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon b/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon index e2c7f9a561a0..05f07584cb71 100644 --- a/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_skip_without_semi_to_curly.carbon -// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: error(UnrecognizedDecl): unrecognized declaration introducer +// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer [UnrecognizedDecl] // CHECK:STDERR: struct X { fn () } // CHECK:STDERR: ^~~~~~ struct X { fn () } diff --git a/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon b/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon index 34db6b1b960b..cfc7e2d8a6c5 100644 --- a/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_with_identifier_as_param.carbon -// CHECK:STDERR: fail_with_identifier_as_param.carbon:[[@LINE+3]]:11: error(ExpectedBindingPattern): expected `:` or `:!` in binding pattern +// CHECK:STDERR: fail_with_identifier_as_param.carbon:[[@LINE+3]]:11: error: expected `:` or `:!` in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn foo(bar); // CHECK:STDERR: ^ fn foo(bar); diff --git a/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon b/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon index e966c7f7a9ee..156db7e254de 100644 --- a/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon +++ b/toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/declaration/fail_without_name_and_many_tokens_in_params.carbon -// CHECK:STDERR: fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+3]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_without_name_and_many_tokens_in_params.carbon:[[@LINE+3]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (a tokens c d e f g h i j k l m n o p q r s t u v w x y z); // CHECK:STDERR: ^ fn (a tokens c d e f g h i j k l m n o p q r s t u v w x y z); diff --git a/toolchain/parse/testdata/function/definition/fail_builtin.carbon b/toolchain/parse/testdata/function/definition/fail_builtin.carbon index 19d66a8f8266..4635b517a7df 100644 --- a/toolchain/parse/testdata/function/definition/fail_builtin.carbon +++ b/toolchain/parse/testdata/function/definition/fail_builtin.carbon @@ -8,18 +8,18 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/function/definition/fail_builtin.carbon -// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:18: error(ExpectedBuiltinName): expected builtin function name after `=` +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:18: error: expected builtin function name after `=` [ExpectedBuiltinName] // CHECK:STDERR: fn NotString() = banana; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fn NotString() = banana; -// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:32: error(ExpectedDeclSemi): `fn` declarations must end with a `;` +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:32: error: `fn` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: fn JunkAfterString() = "hello" "world"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn JunkAfterString() = "hello" "world"; -// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:23: error(ExpectedBuiltinName): expected builtin function name after `=` +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:23: error: expected builtin function name after `=` [ExpectedBuiltinName] // CHECK:STDERR: fn SpuriousEquals() = { } // CHECK:STDERR: ^ fn SpuriousEquals() = { } diff --git a/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon b/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon index ad9ba7cdda74..4e81ca5dc121 100644 --- a/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon +++ b/toolchain/parse/testdata/function/definition/fail_identifier_in_statements.carbon @@ -12,7 +12,7 @@ fn F() { // Note: this might become valid depending on the expression syntax. This test // shouldn't be taken as a sign it should remain invalid. bar -// CHECK:STDERR: fail_identifier_in_statements.carbon:[[@LINE+3]]:1: error(ExpectedExprSemi): expected `;` after expression statement +// CHECK:STDERR: fail_identifier_in_statements.carbon:[[@LINE+3]]:1: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon b/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon index 93350be88565..ca092fc909ab 100644 --- a/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon +++ b/toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon @@ -8,25 +8,25 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/deduced_params/fail_no_parens.carbon -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:12: error(ParamsRequiredAfterImplicit): a `(` for parameters is required after implicit parameters +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:12: error: a `(` for parameters is required after implicit parameters [ParamsRequiredAfterImplicit] // CHECK:STDERR: class Foo[]; // CHECK:STDERR: ^ // CHECK:STDERR: class Foo[]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:18: error(ParamsRequiredAfterImplicit): a `(` for parameters is required after implicit parameters +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:18: error: a `(` for parameters is required after implicit parameters [ParamsRequiredAfterImplicit] // CHECK:STDERR: class Foo[a: i32]; // CHECK:STDERR: ^ // CHECK:STDERR: class Foo[a: i32]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:17: error(ParamsRequiredAfterImplicit): a `(` for parameters is required after implicit parameters +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:17: error: a `(` for parameters is required after implicit parameters [ParamsRequiredAfterImplicit] // CHECK:STDERR: interface Bar[] {} // CHECK:STDERR: ^ // CHECK:STDERR: interface Bar[] {} -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:23: error(ParamsRequiredAfterImplicit): a `(` for parameters is required after implicit parameters +// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:23: error: a `(` for parameters is required after implicit parameters [ParamsRequiredAfterImplicit] // CHECK:STDERR: interface Bar[a: i32] {} // CHECK:STDERR: ^ interface Bar[a: i32] {} diff --git a/toolchain/parse/testdata/generics/impl/fail_impl.carbon b/toolchain/parse/testdata/generics/impl/fail_impl.carbon index 2fa5c761bddf..bf3405624980 100644 --- a/toolchain/parse/testdata/generics/impl/fail_impl.carbon +++ b/toolchain/parse/testdata/generics/impl/fail_impl.carbon @@ -8,87 +8,87 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/impl/fail_impl.carbon -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:10: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:10: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl foo bar; // CHECK:STDERR: ^~~ // CHECK:STDERR: impl foo bar; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:12: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: impl i32 as; // CHECK:STDERR: ^ // CHECK:STDERR: impl i32 as; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:18: error(ExpectedDeclSemiOrDefinition): `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:18: error: `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: impl bool as bar unexpected; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: impl bool as bar unexpected; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error: expected expression [ExpectedExpr] // CHECK:STDERR: impl return as A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl return as A; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error: expected expression [ExpectedExpr] // CHECK:STDERR: impl return B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl return B; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:13: error(ImplExpectedAfterForall): expected `[` after `forall` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:13: error: expected `[` after `forall` in `impl` declaration [ImplExpectedAfterForall] // CHECK:STDERR: impl forall f32; // CHECK:STDERR: ^~~ // CHECK:STDERR: -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:16: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:16: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl forall f32; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall f32; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:19: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:19: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl forall [] u32; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall [] u32; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:21: error(ExpectedBindingPattern): expected `:` or `:!` in binding pattern +// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:21: error: expected `:` or `:!` in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: impl forall [invalid] i8; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:25: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:25: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl forall [invalid] i8; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall [invalid] i8; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:13: error(ImplExpectedAfterForall): expected `[` after `forall` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:13: error: expected `[` after `forall` in `impl` declaration [ImplExpectedAfterForall] // CHECK:STDERR: impl forall f16 as Quux; // CHECK:STDERR: ^~~ // CHECK:STDERR: impl forall f16 as Quux; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:30: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:30: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl forall [T:! type] String; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall [T:! type] String; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:26: error(ImplExpectedAs): expected `as` in `impl` declaration +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:26: error: expected `as` in `impl` declaration [ImplExpectedAs] // CHECK:STDERR: impl forall [T:! type] T missing_as; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: impl forall [T:! type] T missing_as; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:39: error(ExpectedDeclSemiOrDefinition): `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:39: error: `impl` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: impl forall [T:! type] T as Interface extra; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: impl forall [T:! type] T as Interface extra; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:5: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:5: error: expected expression [ExpectedExpr] // CHECK:STDERR: impl; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -96,7 +96,7 @@ impl; impl -// CHECK:STDERR: fail_impl.carbon:[[@LINE+88]]:21: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_impl.carbon:[[@LINE+88]]:21: error: expected expression [ExpectedExpr] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_impl.carbon diff --git a/toolchain/parse/testdata/generics/impl/fail_out_of_line_member.carbon b/toolchain/parse/testdata/generics/impl/fail_out_of_line_member.carbon index a3218c5274ac..bdaf57c37d08 100644 --- a/toolchain/parse/testdata/generics/impl/fail_out_of_line_member.carbon +++ b/toolchain/parse/testdata/generics/impl/fail_out_of_line_member.carbon @@ -18,7 +18,7 @@ impl bool as Interface { fn F(); } -// CHECK:STDERR: fail_out_of_line_member.carbon:[[@LINE+4]]:4: error(ExpectedDeclName): `fn` introducer should be followed by a name +// CHECK:STDERR: fail_out_of_line_member.carbon:[[@LINE+4]]:4: error: `fn` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: fn (bool as Interface).F() {} // CHECK:STDERR: ^ // CHECK:STDERR: @@ -30,7 +30,7 @@ class C { } } -// CHECK:STDERR: fail_out_of_line_member.carbon:[[@LINE+3]]:6: error(ExpectedDeclNameAfterPeriod): `.` should be followed by a name +// CHECK:STDERR: fail_out_of_line_member.carbon:[[@LINE+3]]:6: error: `.` should be followed by a name [ExpectedDeclNameAfterPeriod] // CHECK:STDERR: fn C.(Self as Interface).F() {} // CHECK:STDERR: ^ fn C.(Self as Interface).F() {} diff --git a/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon b/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon index 8ff442a66e07..b37a609f7c5b 100644 --- a/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_missing_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/interface/fail_missing_name.carbon -// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:11: error(ExpectedDeclName): `interface` introducer should be followed by a name +// CHECK:STDERR: fail_missing_name.carbon:[[@LINE+3]]:11: error: `interface` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: interface { // CHECK:STDERR: ^ interface { diff --git a/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon b/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon index 6cdc606b86a4..d679936c944e 100644 --- a/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/interface/fail_missing_open_curly.carbon -// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+4]]:15: error(ExpectedDeclSemiOrDefinition): `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+4]]:15: error: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: interface Bar Baz {} // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -16,7 +16,7 @@ interface Bar Baz {} interface Foo -// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+13]]:21: error(ExpectedDeclSemiOrDefinition): `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_missing_open_curly.carbon:[[@LINE+13]]:21: error: `interface` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_missing_open_curly.carbon diff --git a/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon b/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon index 41b138790081..5fb82dc3ea8b 100644 --- a/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon +++ b/toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon @@ -9,13 +9,13 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/interface/fail_self_param_syntax.carbon interface Foo { - // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+4]]:13: error(ExpectedBindingPattern): expected `:` or `:!` in binding pattern + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+4]]:13: error: expected `:` or `:!` in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn Sub[me Self](b: Self) -> Self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: fn Sub[me Self](b: Self) -> Self; - // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:10: error(ExpectedBindingPattern): expected name in binding pattern + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:10: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: fn Mul[Self](b: Self) -> Self; // CHECK:STDERR: ^~~~ fn Mul[Self](b: Self) -> Self; diff --git a/toolchain/parse/testdata/generics/named_constraint/fail_incomplete.carbon b/toolchain/parse/testdata/generics/named_constraint/fail_incomplete.carbon index 3419e300b250..cd192bc8d701 100644 --- a/toolchain/parse/testdata/generics/named_constraint/fail_incomplete.carbon +++ b/toolchain/parse/testdata/generics/named_constraint/fail_incomplete.carbon @@ -8,13 +8,13 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/generics/named_constraint/fail_incomplete.carbon -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:12: error(ExpectedDeclName): `constraint` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:12: error: `constraint` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: constraint "Foo" // CHECK:STDERR: ^~~~~ // CHECK:STDERR: constraint "Foo" -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+3]]:1: error(ExpectedDeclName): `constraint` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+3]]:1: error: `constraint` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: constraint // CHECK:STDERR: ^~~~~~~~~~ constraint diff --git a/toolchain/parse/testdata/if/fail_else_unbraced.carbon b/toolchain/parse/testdata/if/fail_else_unbraced.carbon index b2012319485e..1360b8d6dd12 100644 --- a/toolchain/parse/testdata/if/fail_else_unbraced.carbon +++ b/toolchain/parse/testdata/if/fail_else_unbraced.carbon @@ -10,24 +10,24 @@ fn F() { if (a) - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:5: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:5: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: if (b) // CHECK:STDERR: ^~ // CHECK:STDERR: if (b) - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: c; // CHECK:STDERR: ^ // CHECK:STDERR: c; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: d; // CHECK:STDERR: ^ // CHECK:STDERR: d; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: e; // CHECK:STDERR: ^ e; diff --git a/toolchain/parse/testdata/if/fail_errors.carbon b/toolchain/parse/testdata/if/fail_errors.carbon index c044e7a7f7b5..c22a2866a69e 100644 --- a/toolchain/parse/testdata/if/fail_errors.carbon +++ b/toolchain/parse/testdata/if/fail_errors.carbon @@ -9,27 +9,27 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if/fail_errors.carbon fn F() { - // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:6: error(ExpectedParenAfter): expected `(` after `if` + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:6: error: expected `(` after `if` [ExpectedParenAfter] // CHECK:STDERR: if a {} // CHECK:STDERR: ^ // CHECK:STDERR: if a {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:7: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:7: error: expected expression [ExpectedExpr] // CHECK:STDERR: if () {} // CHECK:STDERR: ^ // CHECK:STDERR: if () {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:9: error(ExpectedCloseSymbol): unexpected tokens before `)` + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:9: error: unexpected tokens before `)` [ExpectedCloseSymbol] // CHECK:STDERR: if (b c) {} // CHECK:STDERR: ^ // CHECK:STDERR: if (b c) {} if (d) -// CHECK:STDERR: fail_errors.carbon:[[@LINE+7]]:1: error(ExpectedCodeBlock): expected braced code block +// CHECK:STDERR: fail_errors.carbon:[[@LINE+7]]:1: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: error: expected expression [ExpectedExpr] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/if/fail_missing_cond.carbon b/toolchain/parse/testdata/if/fail_missing_cond.carbon index 23c3ba5c2989..f19ff720b196 100644 --- a/toolchain/parse/testdata/if/fail_missing_cond.carbon +++ b/toolchain/parse/testdata/if/fail_missing_cond.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if/fail_missing_cond.carbon fn F() { - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:6: error(ExpectedParenAfter): expected `(` after `if` + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:6: error: expected `(` after `if` [ExpectedParenAfter] // CHECK:STDERR: if { // CHECK:STDERR: ^ if { diff --git a/toolchain/parse/testdata/if/fail_square_brackets.carbon b/toolchain/parse/testdata/if/fail_square_brackets.carbon index a145ca8b87cd..cf870ef2b9b6 100644 --- a/toolchain/parse/testdata/if/fail_square_brackets.carbon +++ b/toolchain/parse/testdata/if/fail_square_brackets.carbon @@ -9,15 +9,15 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if/fail_square_brackets.carbon fn F() { - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:6: error(ExpectedParenAfter): expected `(` after `if` + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:6: error: expected `(` after `if` [ExpectedParenAfter] // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:7: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:7: error: expected expression [ExpectedExpr] // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: error(ExpectedArraySemi): expected `;` in array type + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: error: expected `;` in array type [ExpectedArraySemi] // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ if [] {} diff --git a/toolchain/parse/testdata/if/fail_unbraced.carbon b/toolchain/parse/testdata/if/fail_unbraced.carbon index 3a0af7615042..62afe0db4bfa 100644 --- a/toolchain/parse/testdata/if/fail_unbraced.carbon +++ b/toolchain/parse/testdata/if/fail_unbraced.carbon @@ -11,17 +11,17 @@ fn F() { if (a) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:5: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:5: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: if (b) // CHECK:STDERR: ^~ // CHECK:STDERR: if (b) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:7: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: if (c) // CHECK:STDERR: ^~ // CHECK:STDERR: if (c) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: d; // CHECK:STDERR: ^ d; diff --git a/toolchain/parse/testdata/if_expr/fail_condition_missing.carbon b/toolchain/parse/testdata/if_expr/fail_condition_missing.carbon index 079e42fc22e0..c33341e36249 100644 --- a/toolchain/parse/testdata/if_expr/fail_condition_missing.carbon +++ b/toolchain/parse/testdata/if_expr/fail_condition_missing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_condition_missing.carbon fn F() { - // CHECK:STDERR: fail_condition_missing.carbon:[[@LINE+3]]:18: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_condition_missing.carbon:[[@LINE+3]]:18: error: expected expression [ExpectedExpr] // CHECK:STDERR: var n: i32 = if; // CHECK:STDERR: ^ var n: i32 = if; diff --git a/toolchain/parse/testdata/if_expr/fail_else_expr_missing.carbon b/toolchain/parse/testdata/if_expr/fail_else_expr_missing.carbon index 7474fd31d4b5..3447813a1944 100644 --- a/toolchain/parse/testdata/if_expr/fail_else_expr_missing.carbon +++ b/toolchain/parse/testdata/if_expr/fail_else_expr_missing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_else_expr_missing.carbon fn F() { - // CHECK:STDERR: fail_else_expr_missing.carbon:[[@LINE+3]]:35: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_else_expr_missing.carbon:[[@LINE+3]]:35: error: expected expression [ExpectedExpr] // CHECK:STDERR: var n: i32 = if true then 1 else; // CHECK:STDERR: ^ var n: i32 = if true then 1 else; diff --git a/toolchain/parse/testdata/if_expr/fail_else_missing.carbon b/toolchain/parse/testdata/if_expr/fail_else_missing.carbon index 5b3b3ff63a65..408e1b9dbd8c 100644 --- a/toolchain/parse/testdata/if_expr/fail_else_missing.carbon +++ b/toolchain/parse/testdata/if_expr/fail_else_missing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_else_missing.carbon fn F() { - // CHECK:STDERR: fail_else_missing.carbon:[[@LINE+3]]:30: error(ExpectedElseAfterIf): expected `else` after `if ... then ...` + // CHECK:STDERR: fail_else_missing.carbon:[[@LINE+3]]:30: error: expected `else` after `if ... then ...` [ExpectedElseAfterIf] // CHECK:STDERR: var n: i32 = if true then 1; // CHECK:STDERR: ^ var n: i32 = if true then 1; diff --git a/toolchain/parse/testdata/if_expr/fail_then_expr_missing.carbon b/toolchain/parse/testdata/if_expr/fail_then_expr_missing.carbon index 209047052b8c..03136922c346 100644 --- a/toolchain/parse/testdata/if_expr/fail_then_expr_missing.carbon +++ b/toolchain/parse/testdata/if_expr/fail_then_expr_missing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_then_expr_missing.carbon fn F() { - // CHECK:STDERR: fail_then_expr_missing.carbon:[[@LINE+3]]:28: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_then_expr_missing.carbon:[[@LINE+3]]:28: error: expected expression [ExpectedExpr] // CHECK:STDERR: var n: i32 = if true then; // CHECK:STDERR: ^ var n: i32 = if true then; diff --git a/toolchain/parse/testdata/if_expr/fail_then_missing.carbon b/toolchain/parse/testdata/if_expr/fail_then_missing.carbon index b747dbfd71ae..a8f048ad2b34 100644 --- a/toolchain/parse/testdata/if_expr/fail_then_missing.carbon +++ b/toolchain/parse/testdata/if_expr/fail_then_missing.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_then_missing.carbon fn F() { - // CHECK:STDERR: fail_then_missing.carbon:[[@LINE+3]]:23: error(ExpectedThenAfterIf): expected `then` after `if` condition + // CHECK:STDERR: fail_then_missing.carbon:[[@LINE+3]]:23: error: expected `then` after `if` condition [ExpectedThenAfterIf] // CHECK:STDERR: var n: i32 = if true; // CHECK:STDERR: ^ var n: i32 = if true; diff --git a/toolchain/parse/testdata/if_expr/fail_top_level_if.carbon b/toolchain/parse/testdata/if_expr/fail_top_level_if.carbon index 5dcc0304343d..811aaac5c627 100644 --- a/toolchain/parse/testdata/if_expr/fail_top_level_if.carbon +++ b/toolchain/parse/testdata/if_expr/fail_top_level_if.carbon @@ -9,15 +9,15 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/if_expr/fail_top_level_if.carbon fn F() { - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+11]]:6: error(ExpectedParenAfter): expected `(` after `if` + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+11]]:6: error: expected `(` after `if` [ExpectedParenAfter] // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+7]]:11: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+7]]:11: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: error: expected expression [ExpectedExpr] // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^~~~ if true then 1 else 2; diff --git a/toolchain/parse/testdata/index/fail_empty_expr.carbon b/toolchain/parse/testdata/index/fail_empty_expr.carbon index a822d8fd161c..1cf783a0bee3 100644 --- a/toolchain/parse/testdata/index/fail_empty_expr.carbon +++ b/toolchain/parse/testdata/index/fail_empty_expr.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/index/fail_empty_expr.carbon -// CHECK:STDERR: fail_empty_expr.carbon:[[@LINE+3]]:16: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_empty_expr.carbon:[[@LINE+3]]:16: error: expected expression [ExpectedExpr] // CHECK:STDERR: var v: i32 = t[]; // CHECK:STDERR: ^ var v: i32 = t[]; diff --git a/toolchain/parse/testdata/index/fail_malformed_expr.carbon b/toolchain/parse/testdata/index/fail_malformed_expr.carbon index d75679ef4719..f7f27eff1a8c 100644 --- a/toolchain/parse/testdata/index/fail_malformed_expr.carbon +++ b/toolchain/parse/testdata/index/fail_malformed_expr.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/index/fail_malformed_expr.carbon -// CHECK:STDERR: fail_malformed_expr.carbon:[[@LINE+3]]:17: error(ExpectedCloseSymbol): unexpected tokens before `]` +// CHECK:STDERR: fail_malformed_expr.carbon:[[@LINE+3]]:17: error: unexpected tokens before `]` [ExpectedCloseSymbol] // CHECK:STDERR: var v: i32 = t[0,]; // CHECK:STDERR: ^ var v: i32 = t[0,]; diff --git a/toolchain/parse/testdata/let/fail_bad_name.carbon b/toolchain/parse/testdata/let/fail_bad_name.carbon index f692e94e43e2..071b850b3f4e 100644 --- a/toolchain/parse/testdata/let/fail_bad_name.carbon +++ b/toolchain/parse/testdata/let/fail_bad_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/let/fail_bad_name.carbon -// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: let ? = 4; // CHECK:STDERR: ^ let ? = 4; diff --git a/toolchain/parse/testdata/let/fail_empty.carbon b/toolchain/parse/testdata/let/fail_empty.carbon index 21d0ac978c8e..1cb2e09cb407 100644 --- a/toolchain/parse/testdata/let/fail_empty.carbon +++ b/toolchain/parse/testdata/let/fail_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/let/fail_empty.carbon -// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: let; // CHECK:STDERR: ^ let; diff --git a/toolchain/parse/testdata/let/fail_missing_name.carbon b/toolchain/parse/testdata/let/fail_missing_name.carbon index dc8aa00c88f1..97c3896f6215 100644 --- a/toolchain/parse/testdata/let/fail_missing_name.carbon +++ b/toolchain/parse/testdata/let/fail_missing_name.carbon @@ -10,7 +10,7 @@ // --- fail_runtime_binding.carbon -// CHECK:STDERR: fail_runtime_binding.carbon:[[@LINE+4]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_runtime_binding.carbon:[[@LINE+4]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: let : i32 = 4; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -18,7 +18,7 @@ let : i32 = 4; // --- fail_complietime_binding.carbon -// CHECK:STDERR: fail_complietime_binding.carbon:[[@LINE+3]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_complietime_binding.carbon:[[@LINE+3]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: let :! bool = true; // CHECK:STDERR: ^~ let :! bool = true; diff --git a/toolchain/parse/testdata/let/fail_missing_type.carbon b/toolchain/parse/testdata/let/fail_missing_type.carbon index e0b5717fda47..28251537c732 100644 --- a/toolchain/parse/testdata/let/fail_missing_type.carbon +++ b/toolchain/parse/testdata/let/fail_missing_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/let/fail_missing_type.carbon -// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:7: error(ExpectedBindingPattern): expected `:` or `:!` in binding pattern +// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:7: error: expected `:` or `:!` in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: let a = 4; // CHECK:STDERR: ^ let a = 4; diff --git a/toolchain/parse/testdata/let/fail_no_semi.carbon b/toolchain/parse/testdata/let/fail_no_semi.carbon index 243d7aba7da5..4d5aa29ce069 100644 --- a/toolchain/parse/testdata/let/fail_no_semi.carbon +++ b/toolchain/parse/testdata/let/fail_no_semi.carbon @@ -10,11 +10,11 @@ let -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error(ExpectedDeclSemi): `let` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error: `let` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_semi.carbon diff --git a/toolchain/parse/testdata/match/fail_cases_after_default.carbon b/toolchain/parse/testdata/match/fail_cases_after_default.carbon index 943b9db1abc9..60c41cf305dc 100644 --- a/toolchain/parse/testdata/match/fail_cases_after_default.carbon +++ b/toolchain/parse/testdata/match/fail_cases_after_default.carbon @@ -12,17 +12,17 @@ fn f() -> i32 { var x: i32 = 3; match (x) { default => { return 1; } - // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+4]]:5: error(UnreachableMatchCase): unreachable case; `case` occurs after the `default` + // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+4]]:5: error: unreachable case; `case` occurs after the `default` [UnreachableMatchCase] // CHECK:STDERR: case a: i32 => { return 2; } // CHECK:STDERR: ^~~~ // CHECK:STDERR: case a: i32 => { return 2; } - // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+4]]:5: error(UnreachableMatchCase): unreachable case; `default` occurs after the `default` + // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+4]]:5: error: unreachable case; `default` occurs after the `default` [UnreachableMatchCase] // CHECK:STDERR: default => { return 3; } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default => { return 3; } - // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+3]]:5: error(UnreachableMatchCase): unreachable case; `case` occurs after the `default` + // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+3]]:5: error: unreachable case; `case` occurs after the `default` [UnreachableMatchCase] // CHECK:STDERR: case (a: i32) if (a == 4) => { return 4; } // CHECK:STDERR: ^~~~ case (a: i32) if (a == 4) => { return 4; } diff --git a/toolchain/parse/testdata/match/fail_missing_case_arrow.carbon b/toolchain/parse/testdata/match/fail_missing_case_arrow.carbon index 3d5206e711be..251e3a81d158 100644 --- a/toolchain/parse/testdata/match/fail_missing_case_arrow.carbon +++ b/toolchain/parse/testdata/match/fail_missing_case_arrow.carbon @@ -10,12 +10,12 @@ fn f() -> i32 { match (3) { - // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+4]]:17: error(ExpectedMatchCaseArrow): expected `=>` introducing statement block + // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+4]]:17: error: expected `=>` introducing statement block [ExpectedMatchCaseArrow] // CHECK:STDERR: case x: i32 { return 2; } // CHECK:STDERR: ^ // CHECK:STDERR: case x: i32 { return 2; } - // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+3]]:29: error(ExpectedMatchCaseArrow): expected `=>` introducing statement block + // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+3]]:29: error: expected `=>` introducing statement block [ExpectedMatchCaseArrow] // CHECK:STDERR: case x: i32 if (x == 3) { return 3; } // CHECK:STDERR: ^ case x: i32 if (x == 3) { return 3; } diff --git a/toolchain/parse/testdata/match/fail_missing_case_pattern.carbon b/toolchain/parse/testdata/match/fail_missing_case_pattern.carbon index 96d23ceb5c18..73c38a2704b1 100644 --- a/toolchain/parse/testdata/match/fail_missing_case_pattern.carbon +++ b/toolchain/parse/testdata/match/fail_missing_case_pattern.carbon @@ -10,7 +10,7 @@ fn f() -> i32 { match (3) { - // CHECK:STDERR: fail_missing_case_pattern.carbon:[[@LINE+3]]:10: error(ExpectedBindingPattern): expected name in binding pattern + // CHECK:STDERR: fail_missing_case_pattern.carbon:[[@LINE+3]]:10: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: case => { return 2; } // CHECK:STDERR: ^~ case => { return 2; } diff --git a/toolchain/parse/testdata/match/fail_missing_case_statements_block.carbon b/toolchain/parse/testdata/match/fail_missing_case_statements_block.carbon index a57a77fc412b..73309391100f 100644 --- a/toolchain/parse/testdata/match/fail_missing_case_statements_block.carbon +++ b/toolchain/parse/testdata/match/fail_missing_case_statements_block.carbon @@ -11,7 +11,7 @@ fn f() -> i32 { match (3) { case x: i32 => - // CHECK:STDERR: fail_missing_case_statements_block.carbon:[[@LINE+3]]:5: error(ExpectedMatchCaseBlock): expected `{` after `=>` + // CHECK:STDERR: fail_missing_case_statements_block.carbon:[[@LINE+3]]:5: error: expected `{` after `=>` [ExpectedMatchCaseBlock] // CHECK:STDERR: default => { return 3; } // CHECK:STDERR: ^~~~~~~ default => { return 3; } diff --git a/toolchain/parse/testdata/match/fail_missing_cases.carbon b/toolchain/parse/testdata/match/fail_missing_cases.carbon index a152ac38331f..48bbe366bbf1 100644 --- a/toolchain/parse/testdata/match/fail_missing_cases.carbon +++ b/toolchain/parse/testdata/match/fail_missing_cases.carbon @@ -10,7 +10,7 @@ fn f() -> i32 { - // CHECK:STDERR: fail_missing_cases.carbon:[[@LINE+3]]:14: error(ExpectedMatchCases): expected cases + // CHECK:STDERR: fail_missing_cases.carbon:[[@LINE+3]]:14: error: expected cases [ExpectedMatchCases] // CHECK:STDERR: match (3) {} // CHECK:STDERR: ^ match (3) {} diff --git a/toolchain/parse/testdata/match/fail_missing_cases_block.carbon b/toolchain/parse/testdata/match/fail_missing_cases_block.carbon index 0d59f68b7f12..db2610b561d2 100644 --- a/toolchain/parse/testdata/match/fail_missing_cases_block.carbon +++ b/toolchain/parse/testdata/match/fail_missing_cases_block.carbon @@ -10,7 +10,7 @@ fn f() -> i32 { match (1) - // CHECK:STDERR: fail_missing_cases_block.carbon:[[@LINE+3]]:3: error(ExpectedMatchCasesBlock): expected `{` starting block with cases + // CHECK:STDERR: fail_missing_cases_block.carbon:[[@LINE+3]]:3: error: expected `{` starting block with cases [ExpectedMatchCasesBlock] // CHECK:STDERR: return 0; // CHECK:STDERR: ^~~~~~ return 0; diff --git a/toolchain/parse/testdata/match/fail_missing_default_arrow.carbon b/toolchain/parse/testdata/match/fail_missing_default_arrow.carbon index 75de71a6768d..ed6d7a37697e 100644 --- a/toolchain/parse/testdata/match/fail_missing_default_arrow.carbon +++ b/toolchain/parse/testdata/match/fail_missing_default_arrow.carbon @@ -10,7 +10,7 @@ fn f() -> i32 { match (3) { - // CHECK:STDERR: fail_missing_default_arrow.carbon:[[@LINE+3]]:13: error(ExpectedMatchCaseArrow): expected `=>` introducing statement block + // CHECK:STDERR: fail_missing_default_arrow.carbon:[[@LINE+3]]:13: error: expected `=>` introducing statement block [ExpectedMatchCaseArrow] // CHECK:STDERR: default { return 1; } // CHECK:STDERR: ^ default { return 1; } diff --git a/toolchain/parse/testdata/match/fail_missing_default_statements_block.carbon b/toolchain/parse/testdata/match/fail_missing_default_statements_block.carbon index 2258714f2d82..06ae2fc8b6e8 100644 --- a/toolchain/parse/testdata/match/fail_missing_default_statements_block.carbon +++ b/toolchain/parse/testdata/match/fail_missing_default_statements_block.carbon @@ -11,7 +11,7 @@ fn f() -> i32 { match (3) { default => - // CHECK:STDERR: fail_missing_default_statements_block.carbon:[[@LINE+3]]:3: error(ExpectedMatchCaseBlock): expected `{` after `=>` + // CHECK:STDERR: fail_missing_default_statements_block.carbon:[[@LINE+3]]:3: error: expected `{` after `=>` [ExpectedMatchCaseBlock] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/match/fail_missing_guard_close_paren.carbon b/toolchain/parse/testdata/match/fail_missing_guard_close_paren.carbon index be303b3067c7..ef4578057cfa 100644 --- a/toolchain/parse/testdata/match/fail_missing_guard_close_paren.carbon +++ b/toolchain/parse/testdata/match/fail_missing_guard_close_paren.carbon @@ -10,11 +10,11 @@ fn f() -> i32 { match (true) { - // CHECK:STDERR: fail_missing_guard_close_paren.carbon:[[@LINE+7]]:21: error(UnmatchedOpening): opening symbol without a corresponding closing symbol + // CHECK:STDERR: fail_missing_guard_close_paren.carbon:[[@LINE+7]]:21: error: opening symbol without a corresponding closing symbol [UnmatchedOpening] // CHECK:STDERR: case x: bool if (false => { return 1; } // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_missing_guard_close_paren.carbon:[[@LINE+3]]:28: error(MatchParseTODO): TODO: improve match parsing + // CHECK:STDERR: fail_missing_guard_close_paren.carbon:[[@LINE+3]]:28: error: TODO: improve match parsing [MatchParseTODO] // CHECK:STDERR: case x: bool if (false => { return 1; } // CHECK:STDERR: ^~ case x: bool if (false => { return 1; } diff --git a/toolchain/parse/testdata/match/fail_missing_guard_open_paren.carbon b/toolchain/parse/testdata/match/fail_missing_guard_open_paren.carbon index 2a87de18f657..5ec8859b3afc 100644 --- a/toolchain/parse/testdata/match/fail_missing_guard_open_paren.carbon +++ b/toolchain/parse/testdata/match/fail_missing_guard_open_paren.carbon @@ -10,11 +10,11 @@ fn f() -> i32 { match (true) { - // CHECK:STDERR: fail_missing_guard_open_paren.carbon:[[@LINE+7]]:21: error(MatchParseTODO): TODO: improve match parsing + // CHECK:STDERR: fail_missing_guard_open_paren.carbon:[[@LINE+7]]:21: error: TODO: improve match parsing [MatchParseTODO] // CHECK:STDERR: case x: bool if false) => { return 1; } // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_missing_guard_open_paren.carbon:[[@LINE+3]]:26: error(UnmatchedClosing): closing symbol without a corresponding opening symbol + // CHECK:STDERR: fail_missing_guard_open_paren.carbon:[[@LINE+3]]:26: error: closing symbol without a corresponding opening symbol [UnmatchedClosing] // CHECK:STDERR: case x: bool if false) => { return 1; } // CHECK:STDERR: ^ case x: bool if false) => { return 1; } diff --git a/toolchain/parse/testdata/match/fail_missing_matched_expr.carbon b/toolchain/parse/testdata/match/fail_missing_matched_expr.carbon index abb55b6ed8d1..75b1004e525f 100644 --- a/toolchain/parse/testdata/match/fail_missing_matched_expr.carbon +++ b/toolchain/parse/testdata/match/fail_missing_matched_expr.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/match/fail_missing_matched_expr.carbon fn f() -> i32 { - // CHECK:STDERR: fail_missing_matched_expr.carbon:[[@LINE+3]]:9: error(ExpectedParenAfter): expected `(` after `match` + // CHECK:STDERR: fail_missing_matched_expr.carbon:[[@LINE+3]]:9: error: expected `(` after `match` [ExpectedParenAfter] // CHECK:STDERR: match { // CHECK:STDERR: ^ match { diff --git a/toolchain/parse/testdata/match/fail_unexpected_tokens_in_cases_block.carbon b/toolchain/parse/testdata/match/fail_unexpected_tokens_in_cases_block.carbon index 89724c25f089..57528b26f12b 100644 --- a/toolchain/parse/testdata/match/fail_unexpected_tokens_in_cases_block.carbon +++ b/toolchain/parse/testdata/match/fail_unexpected_tokens_in_cases_block.carbon @@ -11,26 +11,26 @@ fn f() -> i32 { var x: i32 = 3; match (x) { - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `let`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `let`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: let u: i32 = // CHECK:STDERR: ^~~ // CHECK:STDERR: let u: i32 = case y: i32 if (y > 2) => { return 1; } - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `if`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `if`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: if (true) { // CHECK:STDERR: ^~ // CHECK:STDERR: if (true) { return 2; } - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `var`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `var`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: var w // CHECK:STDERR: ^~~ // CHECK:STDERR: var w case z: i32 if (z == 3) => { return 3; } - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `{`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `{`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: { // CHECK:STDERR: ^ // CHECK:STDERR: @@ -38,12 +38,12 @@ fn f() -> i32 { break; } default => { return 3; } - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `return`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `return`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: return 1; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: return 1; - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+3]]:5: error(UnexpectedTokenInMatchCasesBlock): unexpected `(`; expected `case`, `default` or `}` + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+3]]:5: error: unexpected `(`; expected `case`, `default` or `}` [UnexpectedTokenInMatchCasesBlock] // CHECK:STDERR: ((), (), ()) // CHECK:STDERR: ^ ((), (), ()) diff --git a/toolchain/parse/testdata/member_access/fail_keyword.carbon b/toolchain/parse/testdata/member_access/fail_keyword.carbon index 56f9b2e40c16..ae2302d8444b 100644 --- a/toolchain/parse/testdata/member_access/fail_keyword.carbon +++ b/toolchain/parse/testdata/member_access/fail_keyword.carbon @@ -9,32 +9,32 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/member_access/fail_keyword.carbon fn F() { - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: a.self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: a.self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: a.Self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: a.Self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: a.for; // CHECK:STDERR: ^~~ // CHECK:STDERR: a.for; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `->` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error: expected identifier after `->` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: p->self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: p->self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `->` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error: expected identifier after `->` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: p->Self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: p->Self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+3]]:6: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `->` + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+3]]:6: error: expected identifier after `->` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: p->while; // CHECK:STDERR: ^~~~~ p->while; diff --git a/toolchain/parse/testdata/namespace/fail_arrow.carbon b/toolchain/parse/testdata/namespace/fail_arrow.carbon index defd8c3c52cd..877a5fc3ce0b 100644 --- a/toolchain/parse/testdata/namespace/fail_arrow.carbon +++ b/toolchain/parse/testdata/namespace/fail_arrow.carbon @@ -10,7 +10,7 @@ namespace Foo; -// CHECK:STDERR: fail_arrow.carbon:[[@LINE+3]]:10: error(ExpectedDeclSemiOrDefinition): `class` declarations must either end with a `;` or have a `{ ... }` block for a definition +// CHECK:STDERR: fail_arrow.carbon:[[@LINE+3]]:10: error: `class` declarations must either end with a `;` or have a `{ ... }` block for a definition [ExpectedDeclSemiOrDefinition] // CHECK:STDERR: class Foo->Bar {} // CHECK:STDERR: ^~ class Foo->Bar {} diff --git a/toolchain/parse/testdata/namespace/fail_incomplete.carbon b/toolchain/parse/testdata/namespace/fail_incomplete.carbon index 5488c1e80b0a..c7e8061c386a 100644 --- a/toolchain/parse/testdata/namespace/fail_incomplete.carbon +++ b/toolchain/parse/testdata/namespace/fail_incomplete.carbon @@ -8,37 +8,37 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/namespace/fail_incomplete.carbon -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace 123 // CHECK:STDERR: ^~~ // CHECK:STDERR: namespace 123 -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace "" // CHECK:STDERR: ^~ // CHECK:STDERR: namespace "" -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace + // CHECK:STDERR: ^ // CHECK:STDERR: namespace + -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace bool // CHECK:STDERR: ^~~~ // CHECK:STDERR: namespace bool -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace namespace namespace namespace namespace // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: namespace namespace namespace namespace namespace -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+3]]:1: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+3]]:1: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace // CHECK:STDERR: ^~~~~~~~~ namespace diff --git a/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon b/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon index b4fdf77edfc7..a4f9e4a9fc10 100644 --- a/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon +++ b/toolchain/parse/testdata/namespace/fail_incomplete_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/namespace/fail_incomplete_name.carbon -// CHECK:STDERR: fail_incomplete_name.carbon:[[@LINE+3]]:15: error(ExpectedDeclNameAfterPeriod): `.` should be followed by a name +// CHECK:STDERR: fail_incomplete_name.carbon:[[@LINE+3]]:15: error: `.` should be followed by a name [ExpectedDeclNameAfterPeriod] // CHECK:STDERR: namespace Foo.; // CHECK:STDERR: ^ namespace Foo.; diff --git a/toolchain/parse/testdata/namespace/fail_modifiers.carbon b/toolchain/parse/testdata/namespace/fail_modifiers.carbon index 8c6cddd81c25..eeeb999838d4 100644 --- a/toolchain/parse/testdata/namespace/fail_modifiers.carbon +++ b/toolchain/parse/testdata/namespace/fail_modifiers.carbon @@ -10,11 +10,11 @@ virtual namespace B -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:1: error(ExpectedDeclSemi): `namespace` declarations must end with a `;` +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:1: error: `namespace` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: impl namespace // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:6: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:6: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: impl namespace // CHECK:STDERR: ^~~~~~~~~ impl namespace diff --git a/toolchain/parse/testdata/namespace/fail_no_name.carbon b/toolchain/parse/testdata/namespace/fail_no_name.carbon index 45d00edfa4b7..bc83b0649962 100644 --- a/toolchain/parse/testdata/namespace/fail_no_name.carbon +++ b/toolchain/parse/testdata/namespace/fail_no_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/namespace/fail_no_name.carbon -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:10: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:10: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace; // CHECK:STDERR: ^ namespace; diff --git a/toolchain/parse/testdata/operators/fail_chained_assign.carbon b/toolchain/parse/testdata/operators/fail_chained_assign.carbon index 8f81f7e063c3..779bab74b09b 100644 --- a/toolchain/parse/testdata/operators/fail_chained_assign.carbon +++ b/toolchain/parse/testdata/operators/fail_chained_assign.carbon @@ -13,7 +13,7 @@ fn F() { var b: i32; // TODO: Produce a custom diagnostic for this. - // CHECK:STDERR: fail_chained_assign.carbon:[[@LINE+3]]:9: error(StatementOperatorAsSubExpr): operator `=` can only be used as a complete statement + // CHECK:STDERR: fail_chained_assign.carbon:[[@LINE+3]]:9: error: operator `=` can only be used as a complete statement [StatementOperatorAsSubExpr] // CHECK:STDERR: a = b = 1; // CHECK:STDERR: ^ a = b = 1; diff --git a/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon b/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon index c30ce8f32b65..8382387a1517 100644 --- a/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon +++ b/toolchain/parse/testdata/operators/fail_infix_uneven_space_after.carbon @@ -10,7 +10,7 @@ // TODO: We could figure out that this first Failed example is infix // with one-token lookahead. -// CHECK:STDERR: fail_infix_uneven_space_after.carbon:[[@LINE+3]]:16: error(ExpectedDeclSemi): `var` declarations must end with a `;` +// CHECK:STDERR: fail_infix_uneven_space_after.carbon:[[@LINE+3]]:16: error: `var` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: var n: i8 = n* n; // CHECK:STDERR: ^ var n: i8 = n* n; diff --git a/toolchain/parse/testdata/operators/fail_infix_uneven_space_before.carbon b/toolchain/parse/testdata/operators/fail_infix_uneven_space_before.carbon index 5fcdac6ea866..9aff5d071938 100644 --- a/toolchain/parse/testdata/operators/fail_infix_uneven_space_before.carbon +++ b/toolchain/parse/testdata/operators/fail_infix_uneven_space_before.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_infix_uneven_space_before.carbon -// CHECK:STDERR: fail_infix_uneven_space_before.carbon:[[@LINE+3]]:15: error(BinaryOperatorRequiresWhitespace): whitespace missing after binary operator +// CHECK:STDERR: fail_infix_uneven_space_before.carbon:[[@LINE+3]]:15: error: whitespace missing after binary operator [BinaryOperatorRequiresWhitespace] // CHECK:STDERR: var n: i8 = n *n; // CHECK:STDERR: ^ var n: i8 = n *n; diff --git a/toolchain/parse/testdata/operators/fail_invalid_infix.carbon b/toolchain/parse/testdata/operators/fail_invalid_infix.carbon index 8ea075cfd265..0b8b7953b446 100644 --- a/toolchain/parse/testdata/operators/fail_invalid_infix.carbon +++ b/toolchain/parse/testdata/operators/fail_invalid_infix.carbon @@ -8,21 +8,21 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_invalid_infix.carbon -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:19: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:19: error: expected expression [ExpectedExpr] // CHECK:STDERR: var a: i32 = n == ; // CHECK:STDERR: ^ // CHECK:STDERR: var a: i32 = n == ; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:14: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:14: error: expected expression [ExpectedExpr] // CHECK:STDERR: var b: i32 = == n; // CHECK:STDERR: ^~ // CHECK:STDERR: var b: i32 = == n; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+7]]:14: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+7]]:14: error: expected expression [ExpectedExpr] // CHECK:STDERR: var c: i32 = == ; // CHECK:STDERR: ^~ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: error: expected expression [ExpectedExpr] // CHECK:STDERR: var c: i32 = == ; // CHECK:STDERR: ^ var c: i32 = == ; diff --git a/toolchain/parse/testdata/operators/fail_postfix_space.carbon b/toolchain/parse/testdata/operators/fail_postfix_space.carbon index d6b889d9d16d..96a442c67dab 100644 --- a/toolchain/parse/testdata/operators/fail_postfix_space.carbon +++ b/toolchain/parse/testdata/operators/fail_postfix_space.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_postfix_space.carbon -// CHECK:STDERR: fail_postfix_space.carbon:[[@LINE+3]]:18: error(UnaryOperatorHasWhitespace): whitespace is not allowed before this unary operator +// CHECK:STDERR: fail_postfix_space.carbon:[[@LINE+3]]:18: error: whitespace is not allowed before this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var v: type = i8 *; // CHECK:STDERR: ^ var v: type = i8 *; diff --git a/toolchain/parse/testdata/operators/fail_postfix_space_before_comma.carbon b/toolchain/parse/testdata/operators/fail_postfix_space_before_comma.carbon index e9ba9e7302ed..55b0c9e52d81 100644 --- a/toolchain/parse/testdata/operators/fail_postfix_space_before_comma.carbon +++ b/toolchain/parse/testdata/operators/fail_postfix_space_before_comma.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_postfix_space_before_comma.carbon -// CHECK:STDERR: fail_postfix_space_before_comma.carbon:[[@LINE+3]]:18: error(UnaryOperatorHasWhitespace): whitespace is not allowed before this unary operator +// CHECK:STDERR: fail_postfix_space_before_comma.carbon:[[@LINE+3]]:18: error: whitespace is not allowed before this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var n: i8 = F(i8 *, 0); // CHECK:STDERR: ^ var n: i8 = F(i8 *, 0); diff --git a/toolchain/parse/testdata/operators/fail_postfix_space_in_call.carbon b/toolchain/parse/testdata/operators/fail_postfix_space_in_call.carbon index 2a511a74dbac..92d49f872764 100644 --- a/toolchain/parse/testdata/operators/fail_postfix_space_in_call.carbon +++ b/toolchain/parse/testdata/operators/fail_postfix_space_in_call.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_postfix_space_in_call.carbon -// CHECK:STDERR: fail_postfix_space_in_call.carbon:[[@LINE+3]]:18: error(UnaryOperatorHasWhitespace): whitespace is not allowed before this unary operator +// CHECK:STDERR: fail_postfix_space_in_call.carbon:[[@LINE+3]]:18: error: whitespace is not allowed before this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var n: i8 = F(i8 *); // CHECK:STDERR: ^ var n: i8 = F(i8 *); diff --git a/toolchain/parse/testdata/operators/fail_postfix_space_surrounding.carbon b/toolchain/parse/testdata/operators/fail_postfix_space_surrounding.carbon index aecc5ab1d0a2..a171015a32e8 100644 --- a/toolchain/parse/testdata/operators/fail_postfix_space_surrounding.carbon +++ b/toolchain/parse/testdata/operators/fail_postfix_space_surrounding.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_postfix_space_surrounding.carbon -// CHECK:STDERR: fail_postfix_space_surrounding.carbon:[[@LINE+3]]:18: error(UnaryOperatorHasWhitespace): whitespace is not allowed before this unary operator +// CHECK:STDERR: fail_postfix_space_surrounding.carbon:[[@LINE+3]]:18: error: whitespace is not allowed before this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var v: type = i8 * ; // CHECK:STDERR: ^ var v: type = i8 * ; diff --git a/toolchain/parse/testdata/operators/fail_postincrement.carbon b/toolchain/parse/testdata/operators/fail_postincrement.carbon index c2d8a2fb1af5..31f77bc7000c 100644 --- a/toolchain/parse/testdata/operators/fail_postincrement.carbon +++ b/toolchain/parse/testdata/operators/fail_postincrement.carbon @@ -11,12 +11,12 @@ fn F() { var n: i32 = 0; // TODO: It'd be nice to produce a custom diagnostic here. - // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+4]]:4: error(ExpectedExprSemi): expected `;` after expression statement + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+4]]:4: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: n++; // CHECK:STDERR: ^~ // CHECK:STDERR: n++; - // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: error(ExpectedExprSemi): expected `;` after expression statement + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: n--; // CHECK:STDERR: ^~ n--; diff --git a/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon b/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon index dfa74588071f..e9417572e190 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_and_or.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_precedence_and_or.carbon fn F() { - // CHECK:STDERR: fail_precedence_and_or.carbon:[[@LINE+3]]:11: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_and_or.carbon:[[@LINE+3]]:11: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: a and b or c; // CHECK:STDERR: ^~ a and b or c; diff --git a/toolchain/parse/testdata/operators/fail_precedence_as.carbon b/toolchain/parse/testdata/operators/fail_precedence_as.carbon index 562132001eb1..f9f093dc7c96 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_as.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_as.carbon @@ -10,43 +10,43 @@ fn F(n: i32) { // No ordering between `not` and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: not true as bool; // CHECK:STDERR: ^~ // CHECK:STDERR: not true as bool; // No ordering between mathematical binary operators and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: 1 + 1 as i32; // CHECK:STDERR: ^~ // CHECK:STDERR: 1 + 1 as i32; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: 5 % 2 as i32; // CHECK:STDERR: ^~ // CHECK:STDERR: 5 % 2 as i32; // No ordering between logical binary operators and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: 3 as i32 and true; // CHECK:STDERR: ^~~ // CHECK:STDERR: 3 as i32 and true; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:14: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:14: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: false or 4 as i32; // CHECK:STDERR: ^~ // CHECK:STDERR: false or 4 as i32; // No ordering between relational binary operators and `as`. - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: 6 as i32 == 7; // CHECK:STDERR: ^~ // CHECK:STDERR: 6 as i32 == 7; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:10: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:10: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: 8 <= 9 as i32; // CHECK:STDERR: ^~ 8 <= 9 as i32; diff --git a/toolchain/parse/testdata/operators/fail_precedence_assign.carbon b/toolchain/parse/testdata/operators/fail_precedence_assign.carbon index eb9ad2b44ca0..f60f43cd6a70 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_assign.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_assign.carbon @@ -12,26 +12,26 @@ fn F() { var a: i32; // Assignment can only appear as an expression statement, not as a subexpression. // TODO: Produce the "can only be used as a complete statement" diagnostic in each of these cases. - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:10: error(UnexpectedTokenAfterListElement): expected `,` or `)` + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:10: error: expected `,` or `)` [UnexpectedTokenAfterListElement] // CHECK:STDERR: 1 + (a = 1); // CHECK:STDERR: ^ // CHECK:STDERR: 1 + (a = 1); - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+8]]:19: error(ExpectedElseAfterIf): expected `else` after `if ... then ...` + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+8]]:19: error: expected `else` after `if ... then ...` [ExpectedElseAfterIf] // CHECK:STDERR: (if true then a += 1 else a /= 2); // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:19: error(UnexpectedTokenAfterListElement): expected `,` or `)` + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:19: error: expected `,` or `)` [UnexpectedTokenAfterListElement] // CHECK:STDERR: (if true then a += 1 else a /= 2); // CHECK:STDERR: ^~ // CHECK:STDERR: (if true then a += 1 else a /= 2); - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:7: error(StatementOperatorAsSubExpr): operator `++` can only be used as a complete statement + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:7: error: operator `++` can only be used as a complete statement [StatementOperatorAsSubExpr] // CHECK:STDERR: a + ++a; // CHECK:STDERR: ^~ // CHECK:STDERR: a + ++a; - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:5: error(UnaryOperatorRequiresParentheses): parentheses are required around this unary `if` operator + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:5: error: parentheses are required around this unary `if` operator [UnaryOperatorRequiresParentheses] // CHECK:STDERR: ++if c then a else b; // CHECK:STDERR: ^~ ++if c then a else b; diff --git a/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon b/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon index 29895f5aa277..e83f504feee6 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_or_and.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_precedence_or_and.carbon fn F() { - // CHECK:STDERR: fail_precedence_or_and.carbon:[[@LINE+3]]:10: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_precedence_or_and.carbon:[[@LINE+3]]:10: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: a or b and c; // CHECK:STDERR: ^~~ a or b and c; diff --git a/toolchain/parse/testdata/operators/fail_precedence_where.carbon b/toolchain/parse/testdata/operators/fail_precedence_where.carbon index 479b2b243fda..9afd40c150ea 100644 --- a/toolchain/parse/testdata/operators/fail_precedence_where.carbon +++ b/toolchain/parse/testdata/operators/fail_precedence_where.carbon @@ -11,7 +11,7 @@ // --- fail_and_where.carbon fn AndWhere() { - // CHECK:STDERR: fail_and_where.carbon:[[@LINE+4]]:14: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_and_where.carbon:[[@LINE+4]]:14: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: true and T where .A = B; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -21,7 +21,7 @@ fn AndWhere() { // --- fail_where_or.carbon fn WhereOr() { - // CHECK:STDERR: fail_where_or.carbon:[[@LINE+4]]:22: error(ExpectedExprSemi): expected `;` after expression statement + // CHECK:STDERR: fail_where_or.carbon:[[@LINE+4]]:22: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: U where .C impls D or false; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -31,7 +31,7 @@ fn WhereOr() { // --- fail_equals_where.carbon fn EqualsWhere() { - // CHECK:STDERR: fail_equals_where.carbon:[[@LINE+4]]:10: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_equals_where.carbon:[[@LINE+4]]:10: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: e == V where .G == f32; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -41,7 +41,7 @@ fn EqualsWhere() { // --- fail_where_neq.carbon fn WhereNEq() { - // CHECK:STDERR: fail_where_neq.carbon:[[@LINE+4]]:21: error(ExpectedExprSemi): expected `;` after expression statement + // CHECK:STDERR: fail_where_neq.carbon:[[@LINE+4]]:21: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: W where .H = bool != i; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -51,7 +51,7 @@ fn WhereNEq() { // --- fail_less_requirement.carbon fn LessRequirement() { - // CHECK:STDERR: fail_less_requirement.carbon:[[@LINE+4]]:14: error(ExpectedRequirementOperator): requirement should use `impls`, `=`, or `==` operator + // CHECK:STDERR: fail_less_requirement.carbon:[[@LINE+4]]:14: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] // CHECK:STDERR: X where .J < .K; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -61,7 +61,7 @@ fn LessRequirement() { // --- fail_as_where.carbon fn AsWhere() { - // CHECK:STDERR: fail_as_where.carbon:[[@LINE+4]]:10: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_as_where.carbon:[[@LINE+4]]:10: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: Y as Z where .L impls M; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -71,7 +71,7 @@ fn AsWhere() { // --- fail_where_as.carbon fn WhereAs() { - // CHECK:STDERR: fail_where_as.carbon:[[@LINE+4]]:21: error(ExpectedExprSemi): expected `;` after expression statement + // CHECK:STDERR: fail_where_as.carbon:[[@LINE+4]]:21: error: expected `;` after expression statement [ExpectedExprSemi] // CHECK:STDERR: S where .N == i32 as type; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -81,7 +81,7 @@ fn WhereAs() { // --- fail_as_in_argument.carbon fn AsInArgument() { - // CHECK:STDERR: fail_as_in_argument.carbon:[[@LINE+4]]:14: error(ExpectedRequirementOperator): requirement should use `impls`, `=`, or `==` operator + // CHECK:STDERR: fail_as_in_argument.carbon:[[@LINE+4]]:14: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] // CHECK:STDERR: R where .O as type impls P; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -91,7 +91,7 @@ fn AsInArgument() { // --- fail_greater_in_argument.carbon fn GreaterInArgument() { - // CHECK:STDERR: fail_greater_in_argument.carbon:[[@LINE+3]]:15: error(ExpectedRequirementOperator): requirement should use `impls`, `=`, or `==` operator + // CHECK:STDERR: fail_greater_in_argument.carbon:[[@LINE+3]]:15: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] // CHECK:STDERR: Q where .AA > .BB impls CC; // CHECK:STDERR: ^ Q where .AA > .BB impls CC; diff --git a/toolchain/parse/testdata/operators/fail_prefix_repeat.carbon b/toolchain/parse/testdata/operators/fail_prefix_repeat.carbon index c0b0622baa85..64a2ab4346a8 100644 --- a/toolchain/parse/testdata/operators/fail_prefix_repeat.carbon +++ b/toolchain/parse/testdata/operators/fail_prefix_repeat.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_prefix_repeat.carbon -// CHECK:STDERR: fail_prefix_repeat.carbon:[[@LINE+3]]:17: error(UnaryOperatorRequiresParentheses): parentheses are required around this unary `const` operator +// CHECK:STDERR: fail_prefix_repeat.carbon:[[@LINE+3]]:17: error: parentheses are required around this unary `const` operator [UnaryOperatorRequiresParentheses] // CHECK:STDERR: fn F() -> const const i32* { // CHECK:STDERR: ^~~~~ fn F() -> const const i32* { diff --git a/toolchain/parse/testdata/operators/fail_prefix_space.carbon b/toolchain/parse/testdata/operators/fail_prefix_space.carbon index 162fe6cac1dc..c3b9669dc931 100644 --- a/toolchain/parse/testdata/operators/fail_prefix_space.carbon +++ b/toolchain/parse/testdata/operators/fail_prefix_space.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_prefix_space.carbon -// CHECK:STDERR: fail_prefix_space.carbon:[[@LINE+3]]:13: error(UnaryOperatorHasWhitespace): whitespace is not allowed after this unary operator +// CHECK:STDERR: fail_prefix_space.carbon:[[@LINE+3]]:13: error: whitespace is not allowed after this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var n: i8 = - n; // CHECK:STDERR: ^ var n: i8 = - n; diff --git a/toolchain/parse/testdata/operators/fail_prefix_uneven_space_with_assign.carbon b/toolchain/parse/testdata/operators/fail_prefix_uneven_space_with_assign.carbon index 78107aa1b228..01d984e00982 100644 --- a/toolchain/parse/testdata/operators/fail_prefix_uneven_space_with_assign.carbon +++ b/toolchain/parse/testdata/operators/fail_prefix_uneven_space_with_assign.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_prefix_uneven_space_with_assign.carbon -// CHECK:STDERR: fail_prefix_uneven_space_with_assign.carbon:[[@LINE+3]]:12: error(UnaryOperatorHasWhitespace): whitespace is not allowed after this unary operator +// CHECK:STDERR: fail_prefix_uneven_space_with_assign.carbon:[[@LINE+3]]:12: error: whitespace is not allowed after this unary operator [UnaryOperatorHasWhitespace] // CHECK:STDERR: var n: i8 =- n; // CHECK:STDERR: ^ var n: i8 =- n; diff --git a/toolchain/parse/testdata/operators/fail_star_minus.carbon b/toolchain/parse/testdata/operators/fail_star_minus.carbon index de7ecf10aad3..a791c4d0f410 100644 --- a/toolchain/parse/testdata/operators/fail_star_minus.carbon +++ b/toolchain/parse/testdata/operators/fail_star_minus.carbon @@ -13,7 +13,7 @@ // available because it has already accepted that first part of the expression, // so it is recovering by using the second option, but the diagnostic should // ideally offer (or consider) both fixes as alternatives. -// CHECK:STDERR: fail_star_minus.carbon:[[@LINE+3]]:16: error(BinaryOperatorRequiresWhitespace): whitespace missing after binary operator +// CHECK:STDERR: fail_star_minus.carbon:[[@LINE+3]]:16: error: whitespace missing after binary operator [BinaryOperatorRequiresWhitespace] // CHECK:STDERR: var n: i8 = n* -n; // CHECK:STDERR: ^ var n: i8 = n* -n; diff --git a/toolchain/parse/testdata/operators/fail_star_star.carbon b/toolchain/parse/testdata/operators/fail_star_star.carbon index 1c8080e224bd..0175155ad67a 100644 --- a/toolchain/parse/testdata/operators/fail_star_star.carbon +++ b/toolchain/parse/testdata/operators/fail_star_star.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_star_star.carbon -// CHECK:STDERR: fail_star_star.carbon:[[@LINE+3]]:16: error(BinaryOperatorRequiresWhitespace): whitespace missing after binary operator +// CHECK:STDERR: fail_star_star.carbon:[[@LINE+3]]:16: error: whitespace missing after binary operator [BinaryOperatorRequiresWhitespace] // CHECK:STDERR: var n: i8 = n* *p; // CHECK:STDERR: ^ var n: i8 = n* *p; diff --git a/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon b/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon index e7d90a39c510..fa2888a1342f 100644 --- a/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon +++ b/toolchain/parse/testdata/operators/fail_star_star_no_space.carbon @@ -12,7 +12,7 @@ // before we notice the missing whitespace around the second `*`. // It'd be better to (somehow) form n*(*p) and reject due to the missing // whitespace around the first `*`. -// CHECK:STDERR: fail_star_star_no_space.carbon:[[@LINE+3]]:16: error(ExpectedDeclSemi): `var` declarations must end with a `;` +// CHECK:STDERR: fail_star_star_no_space.carbon:[[@LINE+3]]:16: error: `var` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: var n: i8 = n**p; // CHECK:STDERR: ^ var n: i8 = n**p; diff --git a/toolchain/parse/testdata/operators/fail_variety.carbon b/toolchain/parse/testdata/operators/fail_variety.carbon index af30d4fb6833..4e80172e27ac 100644 --- a/toolchain/parse/testdata/operators/fail_variety.carbon +++ b/toolchain/parse/testdata/operators/fail_variety.carbon @@ -9,23 +9,23 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/operators/fail_variety.carbon fn F() { - // CHECK:STDERR: fail_variety.carbon:[[@LINE+19]]:21: error(StatementOperatorAsSubExpr): operator `=` can only be used as a complete statement + // CHECK:STDERR: fail_variety.carbon:[[@LINE+19]]:21: error: operator `=` can only be used as a complete statement [StatementOperatorAsSubExpr] // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_variety.carbon:[[@LINE+15]]:29: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_variety.carbon:[[@LINE+15]]:29: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_variety.carbon:[[@LINE+11]]:34: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_variety.carbon:[[@LINE+11]]:34: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_variety.carbon:[[@LINE+7]]:38: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_variety.carbon:[[@LINE+7]]:38: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_variety.carbon:[[@LINE+3]]:40: error(UnaryOperatorRequiresParentheses): parentheses are required around this unary `not` operator + // CHECK:STDERR: fail_variety.carbon:[[@LINE+3]]:40: error: parentheses are required around this unary `not` operator [UnaryOperatorRequiresParentheses] // CHECK:STDERR: n = a * b + c * d = d * d << e & f - not g; // CHECK:STDERR: ^~~ n = a * b + c * d = d * d << e & f - not g; diff --git a/toolchain/parse/testdata/package_expr/fail_in_name.carbon b/toolchain/parse/testdata/package_expr/fail_in_name.carbon index c8ca38755fcd..b849a75b9695 100644 --- a/toolchain/parse/testdata/package_expr/fail_in_name.carbon +++ b/toolchain/parse/testdata/package_expr/fail_in_name.carbon @@ -8,19 +8,19 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/package_expr/fail_in_name.carbon -// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: var package.val: i32; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var package.val: i32; -// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:11: error(ExpectedDeclName): `namespace` introducer should be followed by a name +// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:11: error: `namespace` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: namespace package.NS; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: namespace package.NS; -// CHECK:STDERR: fail_in_name.carbon:[[@LINE+3]]:7: error(ExpectedDeclName): `class` introducer should be followed by a name +// CHECK:STDERR: fail_in_name.carbon:[[@LINE+3]]:7: error: `class` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: class package.C { // CHECK:STDERR: ^~~~~~~ class package.C { diff --git a/toolchain/parse/testdata/packages/export.carbon b/toolchain/parse/testdata/packages/export.carbon index d1d42dfec993..180dfc74508d 100644 --- a/toolchain/parse/testdata/packages/export.carbon +++ b/toolchain/parse/testdata/packages/export.carbon @@ -28,7 +28,7 @@ export Foo.Bar; package Pkg; -// CHECK:STDERR: fail_expr.carbon:[[@LINE+4]]:8: error(ExpectedDeclName): `export` introducer should be followed by a name +// CHECK:STDERR: fail_expr.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: export (); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -38,7 +38,7 @@ export (); package Pkg; -// CHECK:STDERR: fail_package_in_name.carbon:[[@LINE+4]]:8: error(ExpectedDeclName): `export` introducer should be followed by a name +// CHECK:STDERR: fail_package_in_name.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: export package.Bar; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -48,7 +48,7 @@ export package.Bar; package Pkg; -// CHECK:STDERR: fail_keyword_only:[[@LINE+4]]:1: error(ExpectedDeclName): `export` introducer should be followed by a name +// CHECK:STDERR: fail_keyword_only:[[@LINE+4]]:1: error: `export` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: export // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -58,7 +58,7 @@ export package Pkg; -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+4]]:8: error(ExpectedDeclName): `export` introducer should be followed by a name +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: export ; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -69,7 +69,7 @@ export ; package Pkg; export Foo -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:1: error(ExpectedDeclSemi): `export` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:1: error: `export` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDERR: ^ // CHECK:STDERR: @@ -78,7 +78,7 @@ export Foo package Pkg; -// CHECK:STDERR: fail_incomplete_qual_name.carbon:[[@LINE+4]]:12: error(ExpectedDeclNameAfterPeriod): `.` should be followed by a name +// CHECK:STDERR: fail_incomplete_qual_name.carbon:[[@LINE+4]]:12: error: `.` should be followed by a name [ExpectedDeclNameAfterPeriod] // CHECK:STDERR: export Foo.; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -88,7 +88,7 @@ export Foo.; package Pkg; -// CHECK:STDERR: fail_incomplete_qual_name2.carbon:[[@LINE+4]]:8: error(ExpectedDeclName): `export` introducer should be followed by a name +// CHECK:STDERR: fail_incomplete_qual_name2.carbon:[[@LINE+4]]:8: error: `export` introducer should be followed by a name [ExpectedDeclName] // CHECK:STDERR: export .Bar; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -108,10 +108,10 @@ package Pkg; export Foo; -// CHECK:STDERR: fail_before_import.carbon:[[@LINE+7]]:1: error(ImportTooLate): `import` declarations must come after the `package` declaration (if present) and before any other entities in the file +// CHECK:STDERR: fail_before_import.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file [ImportTooLate] // CHECK:STDERR: import library "lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: note(FirstDecl): first declaration is here +// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: note: first declaration is here [FirstDecl] // CHECK:STDERR: export Foo; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -119,7 +119,7 @@ import library "lib"; // --- fail_in_default_library.carbon -// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error(ExportFromImpl): `export` is only allowed in API files +// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files [ExportFromImpl] // CHECK:STDERR: export Foo; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -129,7 +129,7 @@ export Foo; impl package Pkg; -// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error(ExportFromImpl): `export` is only allowed in API files +// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files [ExportFromImpl] // CHECK:STDERR: export Foo; // CHECK:STDERR: ^~~~~~ export Foo; diff --git a/toolchain/parse/testdata/packages/import/export.carbon b/toolchain/parse/testdata/packages/import/export.carbon index 503d47bf75bb..f8db17dd37bf 100644 --- a/toolchain/parse/testdata/packages/import/export.carbon +++ b/toolchain/parse/testdata/packages/import/export.carbon @@ -12,7 +12,7 @@ package Pkg; -// CHECK:STDERR: fail_package.carbon:[[@LINE+4]]:15: error(ExportImportPackage): `export` cannot be used when importing a package +// CHECK:STDERR: fail_package.carbon:[[@LINE+4]]:15: error: `export` cannot be used when importing a package [ExportImportPackage] // CHECK:STDERR: export import Bar; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -38,10 +38,10 @@ export import library "a"; class C; -// CHECK:STDERR: fail_order.carbon:[[@LINE+7]]:1: error(ImportTooLate): `import` declarations must come after the `package` declaration (if present) and before any other entities in the file +// CHECK:STDERR: fail_order.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file [ImportTooLate] // CHECK:STDERR: export import library "b"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: note(FirstDecl): first declaration is here +// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: note: first declaration is here [FirstDecl] // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -49,7 +49,7 @@ export import library "b"; // --- fail_in_default_library.carbon -// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error(ExportFromImpl): `export` is only allowed in API files +// CHECK:STDERR: fail_in_default_library.carbon:[[@LINE+4]]:1: error: `export` is only allowed in API files [ExportFromImpl] // CHECK:STDERR: export import library "lib"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -59,7 +59,7 @@ export import library "lib"; impl package Pkg; -// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error(ExportFromImpl): `export` is only allowed in API files +// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files [ExportFromImpl] // CHECK:STDERR: export import library "lib"; // CHECK:STDERR: ^~~~~~ export import library "lib"; diff --git a/toolchain/parse/testdata/packages/import/fail_after_decl.carbon b/toolchain/parse/testdata/packages/import/fail_after_decl.carbon index 5f333758a02d..0277cfc4ee76 100644 --- a/toolchain/parse/testdata/packages/import/fail_after_decl.carbon +++ b/toolchain/parse/testdata/packages/import/fail_after_decl.carbon @@ -10,10 +10,10 @@ fn A(); -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error(ImportTooLate): `import` declarations must come after the `package` declaration (if present) and before any other entities in the file +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file [ImportTooLate] // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: note(FirstDecl): first declaration is here +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: note: first declaration is here [FirstDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~ import B; diff --git a/toolchain/parse/testdata/packages/import/fail_after_decl_repeated.carbon b/toolchain/parse/testdata/packages/import/fail_after_decl_repeated.carbon index 705d71cc883e..bb9f3b529780 100644 --- a/toolchain/parse/testdata/packages/import/fail_after_decl_repeated.carbon +++ b/toolchain/parse/testdata/packages/import/fail_after_decl_repeated.carbon @@ -10,10 +10,10 @@ fn A(); -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error(ImportTooLate): `import` declarations must come after the `package` declaration (if present) and before any other entities in the file +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file [ImportTooLate] // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: note(FirstDecl): first declaration is here +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: note: first declaration is here [FirstDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -21,10 +21,10 @@ import B; // Note this is still invalid, but doesn't warn because it's sequential. import C; -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error(PackageTooLate): the `package` declaration must be the first non-comment line +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+7]]:1: error: the `package` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: package D; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -32,10 +32,10 @@ package D; fn E(); -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+6]]:1: error(ImportTooLate): `import` declarations must come after the `package` declaration (if present) and before any other entities in the file +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE+6]]:1: error: `import` declarations must come after the `package` declaration (if present) and before any other entities in the file [ImportTooLate] // CHECK:STDERR: import F; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: note(FirstDecl): first declaration is here +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: note: first declaration is here [FirstDecl] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~ import F; diff --git a/toolchain/parse/testdata/packages/import/fail_extra_string.carbon b/toolchain/parse/testdata/packages/import/fail_extra_string.carbon index 25009262fc7c..6880a5af7511 100644 --- a/toolchain/parse/testdata/packages/import/fail_extra_string.carbon +++ b/toolchain/parse/testdata/packages/import/fail_extra_string.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_extra_string.carbon -// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:26: error(ExpectedDeclSemi): `import` declarations must end with a `;` +// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:26: error: `import` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: import Foo library "bar" "baz"; // CHECK:STDERR: ^~~~~ import Foo library "bar" "baz"; diff --git a/toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon b/toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon index 1eaed3334fcf..5a592ae90c21 100644 --- a/toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon +++ b/toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_library_is_identifier.carbon -// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:25: error(ExpectedLibraryName): expected a string literal to specify the library name +// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:25: error: expected a string literal to specify the library name [ExpectedLibraryName] // CHECK:STDERR: import Geometry library Shapes; // CHECK:STDERR: ^~~~~~ import Geometry library Shapes; diff --git a/toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon b/toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon index d94b3a886343..829bb50baeb7 100644 --- a/toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon +++ b/toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_name_is_keyword.carbon -// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:8: error(ExpectedIdentifierAfterImport): expected identifier or `library` after `import` +// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:8: error: expected identifier or `library` after `import` [ExpectedIdentifierAfterImport] // CHECK:STDERR: import fn; // CHECK:STDERR: ^~ import fn; diff --git a/toolchain/parse/testdata/packages/import/fail_no_name.carbon b/toolchain/parse/testdata/packages/import/fail_no_name.carbon index 1207763ddb01..6b92d2599e45 100644 --- a/toolchain/parse/testdata/packages/import/fail_no_name.carbon +++ b/toolchain/parse/testdata/packages/import/fail_no_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_no_name.carbon -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:7: error(ExpectedIdentifierAfterImport): expected identifier or `library` after `import` +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:7: error: expected identifier or `library` after `import` [ExpectedIdentifierAfterImport] // CHECK:STDERR: import; // CHECK:STDERR: ^ import; diff --git a/toolchain/parse/testdata/packages/import/fail_no_semi.carbon b/toolchain/parse/testdata/packages/import/fail_no_semi.carbon index 730dceb2bdbb..0b116941ae66 100644 --- a/toolchain/parse/testdata/packages/import/fail_no_semi.carbon +++ b/toolchain/parse/testdata/packages/import/fail_no_semi.carbon @@ -10,7 +10,7 @@ import Geometry -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error(ExpectedDeclSemi): `import` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `import` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_semi.carbon diff --git a/toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon b/toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon index 2b6d58c96e31..7d0a094e155b 100644 --- a/toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon +++ b/toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_omit_library_keyword.carbon -// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:17: error(MissingLibraryKeyword): missing `library` keyword +// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:17: error: missing `library` keyword [MissingLibraryKeyword] // CHECK:STDERR: import Geometry "Shapes"; // CHECK:STDERR: ^~~~~~~~ import Geometry "Shapes"; diff --git a/toolchain/parse/testdata/packages/import/fail_type.carbon b/toolchain/parse/testdata/packages/import/fail_type.carbon index 04418c4d137d..4a98a7e2fd49 100644 --- a/toolchain/parse/testdata/packages/import/fail_type.carbon +++ b/toolchain/parse/testdata/packages/import/fail_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/import/fail_type.carbon -// CHECK:STDERR: fail_type.carbon:[[@LINE+3]]:17: error(ExpectedDeclSemi): `import` declarations must end with a `;` +// CHECK:STDERR: fail_type.carbon:[[@LINE+3]]:17: error: `import` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: import Geometry api; // CHECK:STDERR: ^~~ import Geometry api; diff --git a/toolchain/parse/testdata/packages/library/fail_invalid_name.carbon b/toolchain/parse/testdata/packages/library/fail_invalid_name.carbon index cdb09e8244b0..9bdf3e42977c 100644 --- a/toolchain/parse/testdata/packages/library/fail_invalid_name.carbon +++ b/toolchain/parse/testdata/packages/library/fail_invalid_name.carbon @@ -10,7 +10,7 @@ // --- fail_identifier.carbon -// CHECK:STDERR: fail_identifier.carbon:[[@LINE+4]]:9: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_identifier.carbon:[[@LINE+4]]:9: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: library Shapes; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -18,7 +18,7 @@ library Shapes; // --- fail_raw_identifier.carbon -// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+4]]:9: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_raw_identifier.carbon:[[@LINE+4]]:9: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: library r#default; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -26,7 +26,7 @@ library r#default; // --- fail_missing.carbon -// CHECK:STDERR: fail_missing.carbon:[[@LINE+4]]:8: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_missing.carbon:[[@LINE+4]]:8: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: library; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -34,7 +34,7 @@ library; // --- fail_missing_with_api.carbon -// CHECK:STDERR: fail_missing_with_api.carbon:[[@LINE+4]]:8: error(ExpectedLibraryNameOrDefault): expected `default` or a string literal to specify the library name +// CHECK:STDERR: fail_missing_with_api.carbon:[[@LINE+4]]:8: error: expected `default` or a string literal to specify the library name [ExpectedLibraryNameOrDefault] // CHECK:STDERR: library; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -42,7 +42,7 @@ library; // --- fail_trailing_impl.carbon -// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+4]]:25: error(ExpectedDeclSemi): `library` declarations must end with a `;` +// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+4]]:25: error: `library` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: library "trailing_impl" impl // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -52,7 +52,7 @@ library "[[@TEST_NAME]]" impl library "[[@TEST_NAME]]" -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+46]]:21: error(ExpectedDeclSemi): `library` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+46]]:21: error: `library` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_identifier.carbon diff --git a/toolchain/parse/testdata/packages/library/fail_semi_before.carbon b/toolchain/parse/testdata/packages/library/fail_semi_before.carbon index 0a6338ae4728..c7249d6e4c5b 100644 --- a/toolchain/parse/testdata/packages/library/fail_semi_before.carbon +++ b/toolchain/parse/testdata/packages/library/fail_semi_before.carbon @@ -10,10 +10,10 @@ ; -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `library` declaration must be the first non-comment line +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error: the `library` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: library "semi_before"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: ; // CHECK:STDERR: ^ library "[[@TEST_NAME]]"; diff --git a/toolchain/parse/testdata/packages/library/fail_too_late.carbon b/toolchain/parse/testdata/packages/library/fail_too_late.carbon index 56b6e0e5652e..59c9285ea87e 100644 --- a/toolchain/parse/testdata/packages/library/fail_too_late.carbon +++ b/toolchain/parse/testdata/packages/library/fail_too_late.carbon @@ -10,10 +10,10 @@ import Geometry; -// CHECK:STDERR: fail_too_late.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `library` declaration must be the first non-comment line +// CHECK:STDERR: fail_too_late.carbon:[[@LINE+6]]:1: error: the `library` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: library "too_late"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: import Geometry; // CHECK:STDERR: ^~~~~~ library "[[@TEST_NAME]]"; diff --git a/toolchain/parse/testdata/packages/package/fail_after_decl.carbon b/toolchain/parse/testdata/packages/package/fail_after_decl.carbon index b6f88f4047ca..6d8410ea98ee 100644 --- a/toolchain/parse/testdata/packages/package/fail_after_decl.carbon +++ b/toolchain/parse/testdata/packages/package/fail_after_decl.carbon @@ -10,10 +10,10 @@ fn A(); -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `package` declaration must be the first non-comment line +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~ package B; diff --git a/toolchain/parse/testdata/packages/package/fail_after_import.carbon b/toolchain/parse/testdata/packages/package/fail_after_import.carbon index e913f09c39db..3604c60a0192 100644 --- a/toolchain/parse/testdata/packages/package/fail_after_import.carbon +++ b/toolchain/parse/testdata/packages/package/fail_after_import.carbon @@ -10,10 +10,10 @@ import A; -// CHECK:STDERR: fail_after_import.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `package` declaration must be the first non-comment line +// CHECK:STDERR: fail_after_import.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: import A; // CHECK:STDERR: ^~~~~~ package B; diff --git a/toolchain/parse/testdata/packages/package/fail_after_package.carbon b/toolchain/parse/testdata/packages/package/fail_after_package.carbon index 554bcfbc609e..f895b1112a99 100644 --- a/toolchain/parse/testdata/packages/package/fail_after_package.carbon +++ b/toolchain/parse/testdata/packages/package/fail_after_package.carbon @@ -9,10 +9,10 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_after_package.carbon package A; -// CHECK:STDERR: fail_after_package.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `package` declaration must be the first non-comment line +// CHECK:STDERR: fail_after_package.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: package A; // CHECK:STDERR: ^~~~~~~ package B; diff --git a/toolchain/parse/testdata/packages/package/fail_extra_string.carbon b/toolchain/parse/testdata/packages/package/fail_extra_string.carbon index 684bc53a4f76..785541861d4e 100644 --- a/toolchain/parse/testdata/packages/package/fail_extra_string.carbon +++ b/toolchain/parse/testdata/packages/package/fail_extra_string.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_extra_string.carbon -// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: error(ExpectedDeclSemi): `package` declarations must end with a `;` +// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: error: `package` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: package Foo library "bar" "baz"; // CHECK:STDERR: ^~~~~ package Foo library "bar" "baz"; diff --git a/toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon b/toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon index 4bf52287a766..925199d661f2 100644 --- a/toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon +++ b/toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_library_is_identifier.carbon -// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: error(ExpectedLibraryName): expected a string literal to specify the library name +// CHECK:STDERR: fail_library_is_identifier.carbon:[[@LINE+3]]:26: error: expected a string literal to specify the library name [ExpectedLibraryName] // CHECK:STDERR: package Geometry library Shapes; // CHECK:STDERR: ^~~~~~ package Geometry library Shapes; diff --git a/toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon b/toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon index 904494337e86..c63e8e329604 100644 --- a/toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon +++ b/toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_library_skips_name.carbon -// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: error(ExpectedIdentifierAfterPackage): expected identifier after `package` +// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: error: expected identifier after `package` [ExpectedIdentifierAfterPackage] // CHECK:STDERR: package library "Shapes"; // CHECK:STDERR: ^~~~~~~ package library "Shapes"; diff --git a/toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon b/toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon index 5bf66513ece3..0caf38cdf232 100644 --- a/toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon +++ b/toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_name_is_keyword.carbon -// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: error(ExpectedIdentifierAfterPackage): expected identifier after `package` +// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: error: expected identifier after `package` [ExpectedIdentifierAfterPackage] // CHECK:STDERR: package fn; // CHECK:STDERR: ^~ package fn; diff --git a/toolchain/parse/testdata/packages/package/fail_no_name.carbon b/toolchain/parse/testdata/packages/package/fail_no_name.carbon index 5b8d8cd95a48..3a64a8710e58 100644 --- a/toolchain/parse/testdata/packages/package/fail_no_name.carbon +++ b/toolchain/parse/testdata/packages/package/fail_no_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_no_name.carbon -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: error(ExpectedIdentifierAfterPackage): expected identifier after `package` +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: error: expected identifier after `package` [ExpectedIdentifierAfterPackage] // CHECK:STDERR: package; // CHECK:STDERR: ^ package; diff --git a/toolchain/parse/testdata/packages/package/fail_no_semi.carbon b/toolchain/parse/testdata/packages/package/fail_no_semi.carbon index 60f911687f27..2e742be21238 100644 --- a/toolchain/parse/testdata/packages/package/fail_no_semi.carbon +++ b/toolchain/parse/testdata/packages/package/fail_no_semi.carbon @@ -10,7 +10,7 @@ package Geometry -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error(ExpectedDeclSemi): `package` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `package` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_semi.carbon diff --git a/toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon b/toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon index d573b158d91f..6d47d984c3ad 100644 --- a/toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon +++ b/toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_omit_library_keyword.carbon -// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: error(MissingLibraryKeyword): missing `library` keyword +// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: error: missing `library` keyword [MissingLibraryKeyword] // CHECK:STDERR: package Geometry "Shapes"; // CHECK:STDERR: ^~~~~~~~ package Geometry "Shapes"; diff --git a/toolchain/parse/testdata/packages/package/fail_semi_before.carbon b/toolchain/parse/testdata/packages/package/fail_semi_before.carbon index 307fb3a9d68b..3096ee9d63f1 100644 --- a/toolchain/parse/testdata/packages/package/fail_semi_before.carbon +++ b/toolchain/parse/testdata/packages/package/fail_semi_before.carbon @@ -10,10 +10,10 @@ ; -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error(PackageTooLate): the `package` declaration must be the first non-comment line +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE+6]]:1: error: the `package` declaration must be the first non-comment line [PackageTooLate] // CHECK:STDERR: package Geometry; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: note(FirstNonCommentLine): first non-comment line is here +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: note: first non-comment line is here [FirstNonCommentLine] // CHECK:STDERR: ; // CHECK:STDERR: ^ package Geometry; diff --git a/toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon b/toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon index 351530e3f0fe..3563980f35e0 100644 --- a/toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon +++ b/toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/packages/package/fail_trailing_impl.carbon -// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+3]]:18: error(ExpectedDeclSemi): `package` declarations must end with a `;` +// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+3]]:18: error: `package` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: package Geometry impl; // CHECK:STDERR: ^~~~ package Geometry impl; diff --git a/toolchain/parse/testdata/pointer/fail_pointer_type_in_expr.carbon b/toolchain/parse/testdata/pointer/fail_pointer_type_in_expr.carbon index bc4a9d4b63f0..7f0bc82ccf16 100644 --- a/toolchain/parse/testdata/pointer/fail_pointer_type_in_expr.carbon +++ b/toolchain/parse/testdata/pointer/fail_pointer_type_in_expr.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/pointer/fail_pointer_type_in_expr.carbon fn F() -> i32 { - // CHECK:STDERR: fail_pointer_type_in_expr.carbon:[[@LINE+3]]:14: error(OperatorRequiresParentheses): parentheses are required to disambiguate operator precedence + // CHECK:STDERR: fail_pointer_type_in_expr.carbon:[[@LINE+3]]:14: error: parentheses are required to disambiguate operator precedence [OperatorRequiresParentheses] // CHECK:STDERR: return *i32*; // CHECK:STDERR: ^ return *i32*; diff --git a/toolchain/parse/testdata/pointer/fail_tuple_instead_of_compound_member_access.carbon b/toolchain/parse/testdata/pointer/fail_tuple_instead_of_compound_member_access.carbon index 7cffbc0cb25c..118d1a2a3b23 100644 --- a/toolchain/parse/testdata/pointer/fail_tuple_instead_of_compound_member_access.carbon +++ b/toolchain/parse/testdata/pointer/fail_tuple_instead_of_compound_member_access.carbon @@ -9,49 +9,49 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/pointer/fail_tuple_instead_of_compound_member_access.carbon fn F() { - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:6: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:6: error: expected expression [ExpectedExpr] // CHECK:STDERR: x.(); // CHECK:STDERR: ^ // CHECK:STDERR: x.(); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: y.(1,); // CHECK:STDERR: ^ // CHECK:STDERR: y.(1,); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: z.(a, b); // CHECK:STDERR: ^ // CHECK:STDERR: z.(a, b); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: w.(c d e ()); // CHECK:STDERR: ^ // CHECK:STDERR: w.(c d e ()); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error(ExpectedExpr): expected expression + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected expression [ExpectedExpr] // CHECK:STDERR: v->(); // CHECK:STDERR: ^ // CHECK:STDERR: v->(); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: u->(f,); // CHECK:STDERR: ^ // CHECK:STDERR: u->(f,); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: t->(2, 3); // CHECK:STDERR: ^ // CHECK:STDERR: t->(2, 3); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+3]]:9: error(UnexpectedTokenInCompoundMemberAccess): expected `)` + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+3]]:9: error: expected `)` [UnexpectedTokenInCompoundMemberAccess] // CHECK:STDERR: s->(g h i ()); // CHECK:STDERR: ^ s->(g h i ()); diff --git a/toolchain/parse/testdata/return/fail_expr_no_semi.carbon b/toolchain/parse/testdata/return/fail_expr_no_semi.carbon index 34d8c4736d81..9a1be88d9b1e 100644 --- a/toolchain/parse/testdata/return/fail_expr_no_semi.carbon +++ b/toolchain/parse/testdata/return/fail_expr_no_semi.carbon @@ -10,7 +10,7 @@ fn F() { return x -// CHECK:STDERR: fail_expr_no_semi.carbon:[[@LINE+3]]:1: error(ExpectedStatementSemi): `return` statements must end with a `;` +// CHECK:STDERR: fail_expr_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` [ExpectedStatementSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/return/fail_no_semi.carbon b/toolchain/parse/testdata/return/fail_no_semi.carbon index e0cdc9952c2b..c1a4c03aa37b 100644 --- a/toolchain/parse/testdata/return/fail_no_semi.carbon +++ b/toolchain/parse/testdata/return/fail_no_semi.carbon @@ -10,11 +10,11 @@ fn F() { return -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+7]]:1: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+7]]:1: error: expected expression [ExpectedExpr] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: error(ExpectedStatementSemi): `return` statements must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` [ExpectedStatementSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/return/fail_returned_no_var.carbon b/toolchain/parse/testdata/return/fail_returned_no_var.carbon index 4f15fbb9fea4..18d1495e5694 100644 --- a/toolchain/parse/testdata/return/fail_returned_no_var.carbon +++ b/toolchain/parse/testdata/return/fail_returned_no_var.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/return/fail_returned_no_var.carbon fn F() -> String { - // CHECK:STDERR: fail_returned_no_var.carbon:[[@LINE+3]]:12: error(ExpectedVarAfterReturned): expected `var` after `returned` + // CHECK:STDERR: fail_returned_no_var.carbon:[[@LINE+3]]:12: error: expected `var` after `returned` [ExpectedVarAfterReturned] // CHECK:STDERR: returned fn G() -> i32; // CHECK:STDERR: ^~ returned fn G() -> i32; diff --git a/toolchain/parse/testdata/return/fail_var_no_semi.carbon b/toolchain/parse/testdata/return/fail_var_no_semi.carbon index fe3b3321c440..36f06d90164e 100644 --- a/toolchain/parse/testdata/return/fail_var_no_semi.carbon +++ b/toolchain/parse/testdata/return/fail_var_no_semi.carbon @@ -10,7 +10,7 @@ fn F() { return var -// CHECK:STDERR: fail_var_no_semi.carbon:[[@LINE+3]]:1: error(ExpectedStatementSemi): `return` statements must end with a `;` +// CHECK:STDERR: fail_var_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` [ExpectedStatementSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/struct/fail_comma_only.carbon b/toolchain/parse/testdata/struct/fail_comma_only.carbon index 95bb50961eac..bb5786e7ef73 100644 --- a/toolchain/parse/testdata/struct/fail_comma_only.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_only.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_comma_only.carbon -// CHECK:STDERR: fail_comma_only.carbon:[[@LINE+3]]:9: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_comma_only.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {,} = {}; // CHECK:STDERR: ^ var x: {,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon b/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon index 2ae6419a7099..136422c3963f 100644 --- a/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_comma_repeat_in_type.carbon -// CHECK:STDERR: fail_comma_repeat_in_type.carbon:[[@LINE+3]]:17: error(ExpectedStructLiteralField): expected `.field: field_type` +// CHECK:STDERR: fail_comma_repeat_in_type.carbon:[[@LINE+3]]:17: error: expected `.field: field_type` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {.a: i32,,} = {}; // CHECK:STDERR: ^ var x: {.a: i32,,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon b/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon index d3e29cf8ebaa..9fe559449dbe 100644 --- a/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon +++ b/toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_comma_repeat_in_value.carbon -// CHECK:STDERR: fail_comma_repeat_in_value.carbon:[[@LINE+3]]:16: error(ExpectedStructLiteralField): expected `.field = value` +// CHECK:STDERR: fail_comma_repeat_in_value.carbon:[[@LINE+3]]:16: error: expected `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {.a = 0,,} = {}; // CHECK:STDERR: ^ var x: {.a = 0,,} = {}; diff --git a/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon b/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon index 80107eca2a54..a7787b2207b4 100644 --- a/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon +++ b/toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_extra_token_in_type.carbon -// CHECK:STDERR: fail_extra_token_in_type.carbon:[[@LINE+3]]:17: error(UnexpectedTokenAfterListElement): expected `,` or `}` +// CHECK:STDERR: fail_extra_token_in_type.carbon:[[@LINE+3]]:17: error: expected `,` or `}` [UnexpectedTokenAfterListElement] // CHECK:STDERR: var x: {.a: i32 banana} = {.a = 0}; // CHECK:STDERR: ^~~~~~ var x: {.a: i32 banana} = {.a = 0}; diff --git a/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon b/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon index 39919394c637..7159d8272144 100644 --- a/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon +++ b/toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_extra_token_in_value.carbon -// CHECK:STDERR: fail_extra_token_in_value.carbon:[[@LINE+3]]:28: error(UnexpectedTokenAfterListElement): expected `,` or `}` +// CHECK:STDERR: fail_extra_token_in_value.carbon:[[@LINE+3]]:28: error: expected `,` or `}` [UnexpectedTokenAfterListElement] // CHECK:STDERR: var x: {.a: i32} = {.a = 0 banana}; // CHECK:STDERR: ^~~~~~ var x: {.a: i32} = {.a = 0 banana}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_colon.carbon b/toolchain/parse/testdata/struct/fail_identifier_colon.carbon index fad8e2a2ef06..414ed3719491 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_colon.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_colon.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_identifier_colon.carbon -// CHECK:STDERR: fail_identifier_colon.carbon:[[@LINE+3]]:9: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_identifier_colon.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {a:} = {}; // CHECK:STDERR: ^ var x: {a:} = {}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_equals.carbon b/toolchain/parse/testdata/struct/fail_identifier_equals.carbon index dd4faf06ea32..d96d9a5c1a06 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_equals.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_identifier_equals.carbon -// CHECK:STDERR: fail_identifier_equals.carbon:[[@LINE+3]]:9: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_identifier_equals.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {a=} = {}; // CHECK:STDERR: ^ var x: {a=} = {}; diff --git a/toolchain/parse/testdata/struct/fail_identifier_only.carbon b/toolchain/parse/testdata/struct/fail_identifier_only.carbon index 99b0f77dbb7d..4df4916cb70d 100644 --- a/toolchain/parse/testdata/struct/fail_identifier_only.carbon +++ b/toolchain/parse/testdata/struct/fail_identifier_only.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_identifier_only.carbon -// CHECK:STDERR: fail_identifier_only.carbon:[[@LINE+3]]:9: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_identifier_only.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {a} = {}; // CHECK:STDERR: ^ var x: {a} = {}; diff --git a/toolchain/parse/testdata/struct/fail_invalid_struct_designator.carbon b/toolchain/parse/testdata/struct/fail_invalid_struct_designator.carbon index ab39ed3b8fb8..348afedd7f7e 100644 --- a/toolchain/parse/testdata/struct/fail_invalid_struct_designator.carbon +++ b/toolchain/parse/testdata/struct/fail_invalid_struct_designator.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_invalid_struct_designator.carbon -// CHECK:STDERR: fail_invalid_struct_designator.carbon:[[@LINE+3]]:16: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_invalid_struct_designator.carbon:[[@LINE+3]]:16: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var x: i32 = {.7 = 8}; // CHECK:STDERR: ^ var x: i32 = {.7 = 8}; diff --git a/toolchain/parse/testdata/struct/fail_missing_type.carbon b/toolchain/parse/testdata/struct/fail_missing_type.carbon index 35089d0fd138..03fce48ab9b9 100644 --- a/toolchain/parse/testdata/struct/fail_missing_type.carbon +++ b/toolchain/parse/testdata/struct/fail_missing_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_missing_type.carbon -// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:12: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: var x: {.a:} = {}; // CHECK:STDERR: ^ var x: {.a:} = {}; diff --git a/toolchain/parse/testdata/struct/fail_missing_value.carbon b/toolchain/parse/testdata/struct/fail_missing_value.carbon index 24bc5d019649..5c189bfc89fa 100644 --- a/toolchain/parse/testdata/struct/fail_missing_value.carbon +++ b/toolchain/parse/testdata/struct/fail_missing_value.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_missing_value.carbon -// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:12: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:12: error: expected expression [ExpectedExpr] // CHECK:STDERR: var x: {.a=} = {}; // CHECK:STDERR: ^ var x: {.a=} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon b/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon index 60072bc80670..39d2128cbdcb 100644 --- a/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_mix_type_and_value.carbon -// CHECK:STDERR: fail_mix_type_and_value.carbon:[[@LINE+3]]:21: error(ExpectedStructLiteralField): expected `.field: field_type` +// CHECK:STDERR: fail_mix_type_and_value.carbon:[[@LINE+3]]:21: error: expected `.field: field_type` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {.a: i32, .b = 0} = {}; // CHECK:STDERR: ^ var x: {.a: i32, .b = 0} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon b/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon index fe1bc6a82188..2e3e9bce2400 100644 --- a/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_mix_value_and_type.carbon -// CHECK:STDERR: fail_mix_value_and_type.carbon:[[@LINE+3]]:17: error(ExpectedStructLiteralField): expected `.field = value` +// CHECK:STDERR: fail_mix_value_and_type.carbon:[[@LINE+3]]:17: error: expected `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {.a = 0, b: i32} = {}; // CHECK:STDERR: ^ var x: {.a = 0, b: i32} = {}; diff --git a/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon b/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon index cbd37a9a475e..cdefbcaeb202 100644 --- a/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon +++ b/toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon @@ -8,21 +8,21 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_mix_with_unknown.carbon -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+8]]:25: error(ExpectedStructLiteralField): expected `.field = value` +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+8]]:25: error: expected `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: i32 = {.a = 1, .b, .c: i32}; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+4]]:29: error(ExpectedStructLiteralField): expected `.field = value` +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+4]]:29: error: expected `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: i32 = {.a = 1, .b, .c: i32}; // CHECK:STDERR: ^ // CHECK:STDERR: var x: i32 = {.a = 1, .b, .c: i32}; -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+7]]:26: error(ExpectedStructLiteralField): expected `.field: field_type` +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+7]]:26: error: expected `.field: field_type` [ExpectedStructLiteralField] // CHECK:STDERR: var x: i32 = {.a: i32, .b, .c = 1}; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:31: error(ExpectedStructLiteralField): expected `.field: field_type` +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:31: error: expected `.field: field_type` [ExpectedStructLiteralField] // CHECK:STDERR: var x: i32 = {.a: i32, .b, .c = 1}; // CHECK:STDERR: ^ var x: i32 = {.a: i32, .b, .c = 1}; diff --git a/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon b/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon index 0de998470918..dbd2dfe10a8c 100644 --- a/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_no_colon_or_equals.carbon -// CHECK:STDERR: fail_no_colon_or_equals.carbon:[[@LINE+3]]:11: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_no_colon_or_equals.carbon:[[@LINE+3]]:11: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {.a} = {}; // CHECK:STDERR: ^ var x: {.a} = {}; diff --git a/toolchain/parse/testdata/struct/fail_period_only.carbon b/toolchain/parse/testdata/struct/fail_period_only.carbon index 87412decf59b..34a5b15f7077 100644 --- a/toolchain/parse/testdata/struct/fail_period_only.carbon +++ b/toolchain/parse/testdata/struct/fail_period_only.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_period_only.carbon -// CHECK:STDERR: fail_period_only.carbon:[[@LINE+3]]:10: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_period_only.carbon:[[@LINE+3]]:10: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var x: {.} = {}; // CHECK:STDERR: ^ var x: {.} = {}; diff --git a/toolchain/parse/testdata/struct/fail_period_paren.carbon b/toolchain/parse/testdata/struct/fail_period_paren.carbon index ab12de1c7e15..7206de965caf 100644 --- a/toolchain/parse/testdata/struct/fail_period_paren.carbon +++ b/toolchain/parse/testdata/struct/fail_period_paren.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_period_paren.carbon -// CHECK:STDERR: fail_period_paren.carbon:[[@LINE+3]]:10: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_period_paren.carbon:[[@LINE+3]]:10: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var x: {.(a) = 1}; // CHECK:STDERR: ^ var x: {.(a) = 1}; diff --git a/toolchain/parse/testdata/struct/fail_period_string_colon.carbon b/toolchain/parse/testdata/struct/fail_period_string_colon.carbon index 81d581b18667..ebf6bfc331fe 100644 --- a/toolchain/parse/testdata/struct/fail_period_string_colon.carbon +++ b/toolchain/parse/testdata/struct/fail_period_string_colon.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_period_string_colon.carbon -// CHECK:STDERR: fail_period_string_colon.carbon:[[@LINE+3]]:10: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_period_string_colon.carbon:[[@LINE+3]]:10: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var x: {."hello": i32, .y: i32} = {}; // CHECK:STDERR: ^~~~~~~ var x: {."hello": i32, .y: i32} = {}; diff --git a/toolchain/parse/testdata/struct/fail_period_string_equals.carbon b/toolchain/parse/testdata/struct/fail_period_string_equals.carbon index e06399957662..b04cba089f97 100644 --- a/toolchain/parse/testdata/struct/fail_period_string_equals.carbon +++ b/toolchain/parse/testdata/struct/fail_period_string_equals.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_period_string_equals.carbon -// CHECK:STDERR: fail_period_string_equals.carbon:[[@LINE+3]]:10: error(ExpectedIdentifierAfterPeriodOrArrow): expected identifier after `.` +// CHECK:STDERR: fail_period_string_equals.carbon:[[@LINE+3]]:10: error: expected identifier after `.` [ExpectedIdentifierAfterPeriodOrArrow] // CHECK:STDERR: var x: {."hello" = 0, .y = 4} = {}; // CHECK:STDERR: ^~~~~~~ var x: {."hello" = 0, .y = 4} = {}; diff --git a/toolchain/parse/testdata/struct/fail_type_no_designator.carbon b/toolchain/parse/testdata/struct/fail_type_no_designator.carbon index 6884655dccee..7fd81e397422 100644 --- a/toolchain/parse/testdata/struct/fail_type_no_designator.carbon +++ b/toolchain/parse/testdata/struct/fail_type_no_designator.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/struct/fail_type_no_designator.carbon -// CHECK:STDERR: fail_type_no_designator.carbon:[[@LINE+3]]:9: error(ExpectedStructLiteralField): expected `.field: field_type` or `.field = value` +// CHECK:STDERR: fail_type_no_designator.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` [ExpectedStructLiteralField] // CHECK:STDERR: var x: {i32} = {}; // CHECK:STDERR: ^~~ var x: {i32} = {}; diff --git a/toolchain/parse/testdata/var/fail_bad_name.carbon b/toolchain/parse/testdata/var/fail_bad_name.carbon index 6dd35bceec7d..2d4f7671bdc3 100644 --- a/toolchain/parse/testdata/var/fail_bad_name.carbon +++ b/toolchain/parse/testdata/var/fail_bad_name.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/var/fail_bad_name.carbon -// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: var *; // CHECK:STDERR: ^ var *; diff --git a/toolchain/parse/testdata/var/fail_empty.carbon b/toolchain/parse/testdata/var/fail_empty.carbon index 0c69ad26b031..f92555b54ae4 100644 --- a/toolchain/parse/testdata/var/fail_empty.carbon +++ b/toolchain/parse/testdata/var/fail_empty.carbon @@ -8,7 +8,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/var/fail_empty.carbon -// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: var; // CHECK:STDERR: ^ var; diff --git a/toolchain/parse/testdata/var/fail_no_semi.carbon b/toolchain/parse/testdata/var/fail_no_semi.carbon index 9e236df4ce33..6b328de4ea8e 100644 --- a/toolchain/parse/testdata/var/fail_no_semi.carbon +++ b/toolchain/parse/testdata/var/fail_no_semi.carbon @@ -10,11 +10,11 @@ var -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error(ExpectedBindingPattern): expected name in binding pattern +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error: expected name in binding pattern [ExpectedBindingPattern] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error(ExpectedDeclSemi): `var` declarations must end with a `;` +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error: `var` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_no_semi.carbon diff --git a/toolchain/parse/testdata/where_expr/designators.carbon b/toolchain/parse/testdata/where_expr/designators.carbon index 29605b1a53ba..01f3bc09244e 100644 --- a/toolchain/parse/testdata/where_expr/designators.carbon +++ b/toolchain/parse/testdata/where_expr/designators.carbon @@ -18,7 +18,7 @@ fn Success() { // --- fail_numeric_designator.carbon fn FailNumeric() { - // CHECK:STDERR: fail_numeric_designator.carbon:[[@LINE+4]]:4: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` + // CHECK:STDERR: fail_numeric_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: .1; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -28,7 +28,7 @@ fn FailNumeric() { // --- fail_keyword_designator.carbon fn FailKeyword() { - // CHECK:STDERR: fail_keyword_designator.carbon:[[@LINE+4]]:4: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` + // CHECK:STDERR: fail_keyword_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: .base; // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -38,7 +38,7 @@ fn FailKeyword() { // --- fail_empty_designator.carbon fn FailEmpty() { - // CHECK:STDERR: fail_empty_designator.carbon:[[@LINE+4]]:4: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` + // CHECK:STDERR: fail_empty_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: .; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -48,7 +48,7 @@ fn FailEmpty() { // --- fail_star_designator.carbon fn FailStar() { - // CHECK:STDERR: fail_star_designator.carbon:[[@LINE+4]]:4: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` + // CHECK:STDERR: fail_star_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: .*; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -59,11 +59,11 @@ fn FailStar() { var x: i32 = . -// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+93]]:21: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` +// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+93]]:21: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+89]]:21: error(ExpectedDeclSemi): `var` declarations must end with a `;` +// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+89]]:21: error: `var` declarations must end with a `;` [ExpectedDeclSemi] // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: designator.carbon diff --git a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon index 159d16c0ba7f..ddfaf13496e7 100644 --- a/toolchain/parse/testdata/where_expr/fail_rewrite.carbon +++ b/toolchain/parse/testdata/where_expr/fail_rewrite.carbon @@ -13,7 +13,7 @@ // --- fail_not_designator.carbon -// CHECK:STDERR: fail_not_designator.carbon:[[@LINE+4]]:37: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_not_designator.carbon:[[@LINE+4]]:37: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn NotDesignator(T:! type where i32 = .U); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -21,7 +21,7 @@ fn NotDesignator(T:! type where i32 = .U); // --- fail_designator_in_parens.carbon -// CHECK:STDERR: fail_designator_in_parens.carbon:[[@LINE+4]]:40: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_designator_in_parens.carbon:[[@LINE+4]]:40: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn DesignatorInParens(V:! I where (.J) = bool); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -29,7 +29,7 @@ fn DesignatorInParens(V:! I where (.J) = bool); // --- fail_dot_self.carbon -// CHECK:STDERR: fail_dot_self.carbon:[[@LINE+4]]:30: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_dot_self.carbon:[[@LINE+4]]:30: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn DotSelf(W:! K where .Self = f32); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -37,7 +37,7 @@ fn DotSelf(W:! K where .Self = f32); // --- fail_dot_keyword.carbon -// CHECK:STDERR: fail_dot_keyword.carbon:[[@LINE+4]]:28: error(ExpectedIdentifierOrSelfAfterPeriod): expected identifier or `Self` after `.` +// CHECK:STDERR: fail_dot_keyword.carbon:[[@LINE+4]]:28: error: expected identifier or `Self` after `.` [ExpectedIdentifierOrSelfAfterPeriod] // CHECK:STDERR: fn DotKeyword(W:! K where .and = u8); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -45,7 +45,7 @@ fn DotKeyword(W:! K where .and = u8); // --- fail_postfix_after_designator.carbon -// CHECK:STDERR: fail_postfix_after_designator.carbon:[[@LINE+4]]:43: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_postfix_after_designator.carbon:[[@LINE+4]]:43: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn PostfixAfterDesignator(X:! L where .M* = u64*); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -53,7 +53,7 @@ fn PostfixAfterDesignator(X:! L where .M* = u64*); // --- fail_binary_op_after_designator.carbon -// CHECK:STDERR: fail_binary_op_after_designator.carbon:[[@LINE+4]]:48: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_binary_op_after_designator.carbon:[[@LINE+4]]:48: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn BinaryOpAfterDesignator(Y:! N where .O + .P = {}); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -61,7 +61,7 @@ fn BinaryOpAfterDesignator(Y:! N where .O + .P = {}); // --- fail_after_and.carbon -// CHECK:STDERR: fail_after_and.carbon:[[@LINE+3]]:43: error(RequirementEqualAfterNonDesignator): requirement can only use `=` after `.member` designator +// CHECK:STDERR: fail_after_and.carbon:[[@LINE+3]]:43: error: requirement can only use `=` after `.member` designator [RequirementEqualAfterNonDesignator] // CHECK:STDERR: fn AfterAnd(Z:! Q where .R impls S and () = .A); // CHECK:STDERR: ^ fn AfterAnd(Z:! Q where .R impls S and () = .A); diff --git a/toolchain/parse/testdata/where_expr/where_and.carbon b/toolchain/parse/testdata/where_expr/where_and.carbon index fbf69f04cf7f..aed973dde5eb 100644 --- a/toolchain/parse/testdata/where_expr/where_and.carbon +++ b/toolchain/parse/testdata/where_expr/where_and.carbon @@ -16,7 +16,7 @@ fn TwoAnd(Y:! I where .J impls K and .L == .M and .N = bool); // --- fail_and_prefix.carbon -// CHECK:STDERR: fail_and_prefix.carbon:[[@LINE+4]]:29: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_and_prefix.carbon:[[@LINE+4]]:29: error: expected expression [ExpectedExpr] // CHECK:STDERR: fn AndPrefix(T:! type where and .V == .W); // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -24,7 +24,7 @@ fn AndPrefix(T:! type where and .V == .W); // --- fail_and_suffix.carbon -// CHECK:STDERR: fail_and_suffix.carbon:[[@LINE+4]]:40: error(ExpectedExpr): expected expression +// CHECK:STDERR: fail_and_suffix.carbon:[[@LINE+4]]:40: error: expected expression [ExpectedExpr] // CHECK:STDERR: fn AndSuffix(Y:! I where .J impls K and); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -32,7 +32,7 @@ fn AndSuffix(Y:! I where .J impls K and); // --- fail_and_early.carbon -// CHECK:STDERR: fail_and_early.carbon:[[@LINE+3]]:28: error(ExpectedRequirementOperator): requirement should use `impls`, `=`, or `==` operator +// CHECK:STDERR: fail_and_early.carbon:[[@LINE+3]]:28: error: requirement should use `impls`, `=`, or `==` operator [ExpectedRequirementOperator] // CHECK:STDERR: fn AndEarly(Z:! L where .M and N); // CHECK:STDERR: ^~~ fn AndEarly(Z:! L where .M and N); diff --git a/toolchain/parse/testdata/while/fail_missing_cond.carbon b/toolchain/parse/testdata/while/fail_missing_cond.carbon index 6bd54c641635..c5d9779a33b5 100644 --- a/toolchain/parse/testdata/while/fail_missing_cond.carbon +++ b/toolchain/parse/testdata/while/fail_missing_cond.carbon @@ -9,7 +9,7 @@ // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/parse/testdata/while/fail_missing_cond.carbon fn F() { - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:9: error(ExpectedParenAfter): expected `(` after `while` + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:9: error: expected `(` after `while` [ExpectedParenAfter] // CHECK:STDERR: while { // CHECK:STDERR: ^ while { diff --git a/toolchain/parse/testdata/while/fail_no_semi.carbon b/toolchain/parse/testdata/while/fail_no_semi.carbon index c5d83d3403f7..77d09328ac0d 100644 --- a/toolchain/parse/testdata/while/fail_no_semi.carbon +++ b/toolchain/parse/testdata/while/fail_no_semi.carbon @@ -12,14 +12,14 @@ fn F() { while (a) { if (b) { break - // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:5: error(ExpectedStatementSemi): `break` statements must end with a `;` + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:5: error: `break` statements must end with a `;` [ExpectedStatementSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: } if (c) { continue - // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: error(ExpectedStatementSemi): `continue` statements must end with a `;` + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: error: `continue` statements must end with a `;` [ExpectedStatementSemi] // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/while/fail_unbraced.carbon b/toolchain/parse/testdata/while/fail_unbraced.carbon index 18c2e2178818..5c77acffc62e 100644 --- a/toolchain/parse/testdata/while/fail_unbraced.carbon +++ b/toolchain/parse/testdata/while/fail_unbraced.carbon @@ -11,7 +11,7 @@ fn F() { while (a) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: error(ExpectedCodeBlock): expected braced code block + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: error: expected braced code block [ExpectedCodeBlock] // CHECK:STDERR: break; // CHECK:STDERR: ^~~~~ break;