From e7aebbe581a4f4f8ecab50e3f3f5ec57c4fc2c86 Mon Sep 17 00:00:00 2001 From: Jon Ross-Perkins Date: Thu, 19 Sep 2024 14:32:53 -0700 Subject: [PATCH] Update basic diagnostic capitalization/punctuation (#4328) This is a primarily automated change: - Search & replace for capitalization - `(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s")([A-Z])` - `$1\L$2` - Search & replace for period - `(CARBON_DIAGNOSTIC\((?:\n\s+)?\w+,(?:\n\s+)?\s\w+,(?:\n\s+)?\s"(?:[^)]|\n)+)\.("[,)])` - `$1$2` - Limited search & replace for `ERROR: ` -> `error: ` in streamed things - Leaving a TODO for command_line because there's more cleanup that can be done there - Modify diagnostic_consumer.cpp - ERROR -> error - WARNING -> warning --------- Co-authored-by: Richard Smith --- toolchain/check/call.cpp | 6 +- toolchain/check/check.cpp | 38 +++--- toolchain/check/context.cpp | 32 +++-- toolchain/check/convert.cpp | 44 +++---- toolchain/check/decl_name_stack.cpp | 18 +-- toolchain/check/deduce.cpp | 10 +- toolchain/check/eval.cpp | 27 +++-- toolchain/check/function.cpp | 10 +- toolchain/check/generic.cpp | 2 +- toolchain/check/handle_alias.cpp | 2 +- toolchain/check/handle_array.cpp | 3 +- toolchain/check/handle_binding_pattern.cpp | 10 +- toolchain/check/handle_export.cpp | 8 +- toolchain/check/handle_function.cpp | 12 +- toolchain/check/handle_impl.cpp | 21 ++-- toolchain/check/handle_index.cpp | 2 +- toolchain/check/handle_let_and_var.cpp | 6 +- toolchain/check/handle_literal.cpp | 10 +- toolchain/check/handle_loop_statement.cpp | 4 +- toolchain/check/handle_modifier.cpp | 8 +- toolchain/check/handle_name.cpp | 2 +- toolchain/check/handle_operator.cpp | 12 +- toolchain/check/handle_struct.cpp | 4 +- toolchain/check/impl.cpp | 8 +- toolchain/check/import.cpp | 2 +- toolchain/check/member_access.cpp | 33 +++--- toolchain/check/merge.cpp | 34 +++--- toolchain/check/modifiers.cpp | 13 +-- toolchain/check/name_component.cpp | 2 +- toolchain/check/return.cpp | 24 ++-- .../check/sem_ir_diagnostic_converter.cpp | 2 +- .../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 | 2 +- .../testdata/class/fail_adapt_bad_decl.carbon | 20 ++-- .../testdata/class/fail_adapt_bad_type.carbon | 4 +- .../class/fail_adapt_modifiers.carbon | 14 +-- .../class/fail_adapt_with_subobjects.carbon | 8 +- .../testdata/class/fail_addr_not_self.carbon | 4 +- .../testdata/class/fail_addr_self.carbon | 14 +-- .../class/fail_base_as_declared_name.carbon | 4 +- .../testdata/class/fail_base_bad_type.carbon | 36 +++--- .../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 | 4 +- .../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 | 50 ++++---- .../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 | 28 ++--- .../class/fail_out_of_line_decl.carbon | 2 +- .../fail_redeclaration_introducer.carbon | 12 +- .../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 +-- .../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 ++--- .../class/syntactic_merge_literal.carbon | 6 +- .../check/testdata/const/collapse.carbon | 2 +- .../check/testdata/const/fail_collapse.carbon | 6 +- .../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 +- .../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 | 20 ++-- .../generic/fail_todo_param_in_type.carbon | 2 +- .../fail_type_param_mismatch.carbon | 2 +- .../function/generic/redeclare.carbon | 24 ++-- .../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 | 2 +- .../lookup/fail_alias_impl_not_found.carbon | 4 +- .../lookup/fail_todo_undefined_impl.carbon | 2 +- .../impl/no_prelude/fail_impl_bad_type.carbon | 2 +- .../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/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 +- .../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 | 8 +- .../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 +- .../no_prelude/fail_designator.carbon | 8 +- .../testdata/while/fail_bad_condition.carbon | 4 +- .../testdata/while/fail_break_continue.carbon | 8 +- toolchain/codegen/codegen.cpp | 4 +- .../testdata/fail_target_triple.carbon | 2 +- toolchain/diagnostics/diagnostic.h | 4 +- toolchain/diagnostics/diagnostic_consumer.cpp | 4 +- .../testdata/fail_multiline_token.carbon | 2 +- toolchain/docs/diagnostics.md | 8 +- toolchain/docs/parse.md | 2 +- toolchain/driver/compile_subcommand.cpp | 20 ++-- toolchain/driver/driver_fuzzer.cpp | 5 +- toolchain/driver/driver_test.cpp | 2 +- .../testdata/fail_errors_in_two_files.carbon | 4 +- .../driver/testdata/fail_errors_sorted.carbon | 4 +- .../testdata/fail_errors_streamed.carbon | 4 +- .../driver/testdata/fail_flush_errors.carbon | 6 +- .../testdata/fail_input_is_directory.carbon | 2 +- .../driver/testdata/fail_missing_file.carbon | 2 +- .../testdata/fail_missing_stdin_output.carbon | 2 +- toolchain/lex/helpers.cpp | 4 +- toolchain/lex/lex.cpp | 20 ++-- toolchain/lex/numeric_literal.cpp | 12 +- toolchain/lex/string_literal.cpp | 36 +++--- .../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 +- .../basics/fail_before_lowering.carbon | 4 +- toolchain/parse/context.cpp | 20 ++-- toolchain/parse/handle_alias.cpp | 2 +- toolchain/parse/handle_array_expr.cpp | 2 +- toolchain/parse/handle_base.cpp | 2 +- toolchain/parse/handle_binding_pattern.cpp | 3 +- toolchain/parse/handle_brace_expr.cpp | 2 +- toolchain/parse/handle_choice.cpp | 4 +- toolchain/parse/handle_code_block.cpp | 2 +- .../parse/handle_decl_name_and_params.cpp | 6 +- toolchain/parse/handle_decl_scope_loop.cpp | 2 +- toolchain/parse/handle_expr.cpp | 12 +- toolchain/parse/handle_function.cpp | 2 +- toolchain/parse/handle_if_expr.cpp | 4 +- toolchain/parse/handle_impl.cpp | 4 +- toolchain/parse/handle_import_and_package.cpp | 18 +-- toolchain/parse/handle_match.cpp | 20 ++-- toolchain/parse/handle_paren_expr.cpp | 2 +- toolchain/parse/handle_period.cpp | 2 +- toolchain/parse/handle_requirement.cpp | 4 +- toolchain/parse/handle_statement.cpp | 4 +- toolchain/parse/handle_var.cpp | 6 +- .../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 +- toolchain/source/source_buffer.cpp | 8 +- 578 files changed, 2166 insertions(+), 2173 deletions(-) diff --git a/toolchain/check/call.cpp b/toolchain/check/call.cpp index 016a8e815f4a..3760ffcef7d9 100644 --- a/toolchain/check/call.cpp +++ b/toolchain/check/call.cpp @@ -43,7 +43,7 @@ static auto ResolveCalleeInCall(Context& context, SemIR::LocId loc_id, "{0} argument(s) passed to {1} expecting " "{2} argument(s).", int, llvm::StringLiteral, int); - CARBON_DIAGNOSTIC(InCallToEntity, Note, "Calling {0} declared here.", + CARBON_DIAGNOSTIC(InCallToEntity, Note, "calling {0} declared here", llvm::StringLiteral); context.emitter() .Build(loc_id, CallArgCountMismatch, arg_ids.size(), @@ -128,7 +128,7 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, default: { if (!callee_function.is_error) { CARBON_DIAGNOSTIC(CallToNonCallable, Error, - "Value of type `{0}` is not callable.", + "value of type `{0}` is not callable", SemIR::TypeId); context.emitter().Emit(loc_id, CallToNonCallable, context.insts().Get(callee_id).type_id()); @@ -154,7 +154,7 @@ auto PerformCall(Context& context, SemIR::LocId loc_id, SemIR::InstId callee_id, DiagnosticAnnotationScope annotate_diagnostics( &context.emitter(), [&](auto& builder) { CARBON_DIAGNOSTIC(IncompleteReturnTypeHere, Note, - "Return type declared here."); + "return type declared here"); builder.Note(callable.return_storage_id, IncompleteReturnTypeHere); }); return CheckFunctionReturnType(context, callee_id, callable, diff --git a/toolchain/check/check.cpp b/toolchain/check/check.cpp index 2d25b0a263a3..7f26358445e5 100644 --- a/toolchain/check/check.cpp +++ b/toolchain/check/check.cpp @@ -789,7 +789,7 @@ static auto DiagnoseMissingDefinitions(Context& context, Context::DiagnosticEmitter& emitter) -> void { CARBON_DIAGNOSTIC(MissingDefinitionInImpl, Error, - "No definition found for declaration in impl file"); + "no definition found for declaration in impl file"); for (SemIR::InstId decl_inst_id : context.definitions_required()) { SemIR::Inst decl_inst = context.insts().Get(decl_inst_id); CARBON_KIND_SWITCH(context.insts().Get(decl_inst_id)) { @@ -983,8 +983,8 @@ static auto TrackImport(Map& api_map, explicit_import_map->Insert(import_key, import.node_id); !insert_result.is_inserted()) { CARBON_DIAGNOSTIC(RepeatedImport, Error, - "Library imported more than once."); - CARBON_DIAGNOSTIC(FirstImported, Note, "First import here."); + "library imported more than once"); + CARBON_DIAGNOSTIC(FirstImported, Note, "first import here"); unit_info.emitter.Build(import.node_id, RepeatedImport) .Note(insert_result.value(), FirstImported) .Emit(); @@ -1014,9 +1014,9 @@ static auto TrackImport(Map& api_map, // `impl`. if (is_same_library) { CARBON_DIAGNOSTIC(ExplicitImportApi, Error, - "Explicit import of `api` from `impl` file is " - "redundant with implicit import."); - CARBON_DIAGNOSTIC(ImportSelf, Error, "File cannot import itself."); + "explicit import of `api` from `impl` file is " + "redundant with implicit import"); + CARBON_DIAGNOSTIC(ImportSelf, Error, "file cannot import itself"); bool is_impl = !packaging || packaging->is_impl; unit_info.emitter.Emit(import.node_id, is_impl ? ExplicitImportApi : ImportSelf); @@ -1028,7 +1028,7 @@ static auto TrackImport(Map& api_map, if (is_file_implicit_main && is_import_implicit_current_package && is_import_default_library) { CARBON_DIAGNOSTIC(ImportMainDefaultLibrary, Error, - "Cannot import `Main//default`."); + "cannot import `Main//default`"); unit_info.emitter.Emit(import.node_id, ImportMainDefaultLibrary); return; @@ -1040,7 +1040,7 @@ static auto TrackImport(Map& api_map, if (is_same_package || (is_file_implicit_main && is_explicit_main)) { CARBON_DIAGNOSTIC( ImportCurrentPackageByName, Error, - "Imports from the current package must omit the package name."); + "imports from the current package must omit the package name"); unit_info.emitter.Emit(import.node_id, ImportCurrentPackageByName); return; } @@ -1048,7 +1048,7 @@ static auto TrackImport(Map& api_map, // Diagnose explicit imports from `Main`. if (is_explicit_main) { CARBON_DIAGNOSTIC(ImportMainPackage, Error, - "Cannot import `Main` from other packages."); + "cannot import `Main` from other packages"); unit_info.emitter.Emit(import.node_id, ImportMainPackage); return; } @@ -1088,8 +1088,8 @@ static auto TrackImport(Map& api_map, // The imported api is missing. package_imports.has_load_error = true; CARBON_DIAGNOSTIC(LibraryApiNotFound, Error, - "Corresponding API for '{0}' not found.", std::string); - CARBON_DIAGNOSTIC(ImportNotFound, Error, "Imported API '{0}' not found.", + "corresponding API for '{0}' not found", std::string); + CARBON_DIAGNOSTIC(ImportNotFound, Error, "imported API '{0}' not found", std::string); unit_info.emitter.Emit( import.node_id, @@ -1117,10 +1117,10 @@ static auto BuildApiMapAndDiagnosePackaging( // APIs. if (import_key.first == ExplicitMainName) { CARBON_DIAGNOSTIC(ExplicitMainPackage, Error, - "`Main//default` must omit `package` declaration."); + "`Main//default` must omit `package` declaration"); CARBON_DIAGNOSTIC( ExplicitMainLibrary, Error, - "Use `library` declaration in `Main` package libraries."); + "use `library` declaration in `Main` package libraries"); unit_info.emitter.Emit(packaging->names.node_id, import_key.second.empty() ? ExplicitMainPackage : ExplicitMainLibrary); @@ -1140,13 +1140,13 @@ static auto BuildApiMapAndDiagnosePackaging( insert_result.value()->unit->tokens->source().filename(); if (packaging) { CARBON_DIAGNOSTIC(DuplicateLibraryApi, Error, - "Library's API previously provided by `{0}`.", + "library's API previously provided by `{0}`", std::string); unit_info.emitter.Emit(packaging->names.node_id, DuplicateLibraryApi, prev_filename.str()); } else { CARBON_DIAGNOSTIC(DuplicateMainApi, Error, - "Main//default previously provided by `{0}`.", + "`Main//default` previously provided by `{0}`", std::string); // Use the invalid node because there's no node to associate with. unit_info.emitter.Emit(Parse::NodeId::Invalid, DuplicateMainApi, @@ -1166,7 +1166,7 @@ static auto BuildApiMapAndDiagnosePackaging( auto want_ext = is_impl ? ImplExt : ApiExt; if (is_api_with_impl_ext || !filename.ends_with(want_ext)) { CARBON_DIAGNOSTIC(IncorrectExtension, Error, - "File extension of `{0}` required for `{1}`.", + "file extension of `{0}` required for `{1}`", llvm::StringLiteral, Lex::TokenKind); auto diag = unit_info.emitter.Build( packaging ? packaging->names.node_id : Parse::NodeId::Invalid, @@ -1174,7 +1174,7 @@ static auto BuildApiMapAndDiagnosePackaging( is_impl ? Lex::TokenKind::Impl : Lex::TokenKind::Api); if (is_api_with_impl_ext) { CARBON_DIAGNOSTIC(IncorrectExtensionImplNote, Note, - "File extension of `{0}` only allowed for `{1}`.", + "file extension of `{0}` only allowed for `{1}`", llvm::StringLiteral, Lex::TokenKind); diag.Note(Parse::NodeId::Invalid, IncorrectExtensionImplNote, ImplExt, Lex::TokenKind::Impl); @@ -1270,8 +1270,8 @@ auto CheckParseTrees( } else { // The import hasn't been checked, indicating a cycle. CARBON_DIAGNOSTIC(ImportCycleDetected, Error, - "Import cannot be used due to a cycle. Cycle " - "must be fixed to import."); + "import cannot be used due to a cycle; cycle " + "must be fixed to import"); unit_info.emitter.Emit(import_it->names.node_id, ImportCycleDetected); // Make this look the same as an import which wasn't found. diff --git a/toolchain/check/context.cpp b/toolchain/check/context.cpp index fc77e2c582cc..3dd34a3e6912 100644 --- a/toolchain/check/context.cpp +++ b/toolchain/check/context.cpp @@ -70,8 +70,7 @@ Context::Context(const Lex::TokenizedBuffer& tokens, DiagnosticEmitter& emitter, } auto Context::TODO(SemIRLoc loc, std::string label) -> bool { - CARBON_DIAGNOSTIC(SemanticsTodo, Error, "Semantics TODO: `{0}`.", - std::string); + CARBON_DIAGNOSTIC(SemanticsTodo, Error, "semantics TODO: `{0}`", std::string); emitter_->Emit(loc, SemanticsTodo, std::move(label)); return false; } @@ -202,9 +201,8 @@ auto Context::ReplaceInstBeforeConstantUse(SemIR::InstId inst_id, auto Context::DiagnoseDuplicateName(SemIRLoc dup_def, SemIRLoc prev_def) -> void { CARBON_DIAGNOSTIC(NameDeclDuplicate, Error, - "Duplicate name being declared in the same scope."); - CARBON_DIAGNOSTIC(NameDeclPrevious, Note, - "Name is previously declared here."); + "duplicate name being declared in the same scope"); + CARBON_DIAGNOSTIC(NameDeclPrevious, Note, "name is previously declared here"); emitter_->Build(dup_def, NameDeclDuplicate) .Note(prev_def, NameDeclPrevious) .Emit(); @@ -212,8 +210,7 @@ auto Context::DiagnoseDuplicateName(SemIRLoc dup_def, SemIRLoc prev_def) auto Context::DiagnoseNameNotFound(SemIRLoc loc, SemIR::NameId name_id) -> void { - CARBON_DIAGNOSTIC(NameNotFound, Error, "Name `{0}` not found.", - SemIR::NameId); + CARBON_DIAGNOSTIC(NameNotFound, Error, "name `{0}` not found", SemIR::NameId); emitter_->Emit(loc, NameNotFound, name_id); } @@ -223,11 +220,11 @@ auto Context::NoteIncompleteClass(SemIR::ClassId class_id, CARBON_CHECK(!class_info.is_defined(), "Class is not incomplete"); if (class_info.definition_id.is_valid()) { CARBON_DIAGNOSTIC(ClassIncompleteWithinDefinition, Note, - "Class is incomplete within its definition."); + "class is incomplete within its definition"); builder.Note(class_info.definition_id, ClassIncompleteWithinDefinition); } else { CARBON_DIAGNOSTIC(ClassForwardDeclaredHere, Note, - "Class was forward declared here."); + "class was forward declared here"); builder.Note(class_info.latest_decl_id(), ClassForwardDeclaredHere); } } @@ -238,12 +235,12 @@ auto Context::NoteUndefinedInterface(SemIR::InterfaceId interface_id, CARBON_CHECK(!interface_info.is_defined(), "Interface is not incomplete"); if (interface_info.is_being_defined()) { CARBON_DIAGNOSTIC(InterfaceUndefinedWithinDefinition, Note, - "Interface is currently being defined."); + "interface is currently being defined"); builder.Note(interface_info.definition_id, InterfaceUndefinedWithinDefinition); } else { CARBON_DIAGNOSTIC(InterfaceForwardDeclaredHere, Note, - "Interface was forward declared here."); + "interface was forward declared here"); builder.Note(interface_info.latest_decl_id(), InterfaceForwardDeclaredHere); } } @@ -374,10 +371,10 @@ static auto DiagnoseInvalidQualifiedNameAccess(Context& context, SemIRLoc loc, auto class_info = context.classes().Get(class_type->class_id); CARBON_DIAGNOSTIC(ClassInvalidMemberAccess, Error, - "Cannot access {0} member `{1}` of type `{2}`.", + "cannot access {0} member `{1}` of type `{2}`", SemIR::AccessKind, SemIR::NameId, SemIR::TypeId); CARBON_DIAGNOSTIC(ClassMemberDefinition, Note, - "The {0} member `{1}` is defined here.", SemIR::AccessKind, + "the {0} member `{1}` is defined here", SemIR::AccessKind, SemIR::NameId); auto parent_type_id = class_info.self_type_id; @@ -491,7 +488,7 @@ auto Context::LookupQualifiedName(SemIRLoc loc, SemIR::NameId name_id, // Add test coverage once this is possible. CARBON_DIAGNOSTIC( NameAmbiguousDueToExtend, Error, - "Ambiguous use of name `{0}` found in multiple extended scopes.", + "ambiguous use of name `{0}` found in multiple extended scopes", SemIR::NameId); emitter_->Emit(loc, NameAmbiguousDueToExtend, name_id); // TODO: Add notes pointing to the scopes. @@ -554,9 +551,8 @@ static auto GetCorePackage(Context& context, SemIRLoc loc) } } - CARBON_DIAGNOSTIC( - CoreNotFound, Error, - "Package `Core` implicitly referenced here, but not found."); + CARBON_DIAGNOSTIC(CoreNotFound, Error, + "package `Core` implicitly referenced here, but not found"); context.emitter().Emit(loc, CoreNotFound); return SemIR::NameScopeId::Invalid; } @@ -574,7 +570,7 @@ auto Context::LookupNameInCore(SemIRLoc loc, llvm::StringRef name) if (!inst_id.is_valid()) { CARBON_DIAGNOSTIC( CoreNameNotFound, Error, - "Name `Core.{0}` implicitly referenced here, but not found.", + "name `Core.{0}` implicitly referenced here, but not found", SemIR::NameId); emitter_->Emit(loc, CoreNameNotFound, name_id); return SemIR::InstId::BuiltinError; diff --git a/toolchain/check/convert.cpp b/toolchain/check/convert.cpp index 62da182ac013..81ee19719a50 100644 --- a/toolchain/check/convert.cpp +++ b/toolchain/check/convert.cpp @@ -234,10 +234,10 @@ static auto ConvertTupleToArray(Context& context, SemIR::TupleType tuple_type, if (tuple_elem_types.size() != array_bound) { CARBON_DIAGNOSTIC( ArrayInitFromLiteralArgCountMismatch, Error, - "Cannot initialize array of {0} element(s) from {1} initializer(s).", + "cannot initialize array of {0} element(s) from {1} initializer(s)", uint64_t, size_t); CARBON_DIAGNOSTIC(ArrayInitFromExprArgCountMismatch, Error, - "Cannot initialize array of {0} element(s) from tuple " + "cannot initialize array of {0} element(s) from tuple " "with {1} element(s).", uint64_t, size_t); context.emitter().Emit(value_loc_id, @@ -318,7 +318,7 @@ static auto ConvertTupleToTuple(Context& context, SemIR::TupleType src_type, // Check that the tuples are the same size. if (src_elem_types.size() != dest_elem_types.size()) { CARBON_DIAGNOSTIC(TupleInitElementCountMismatch, Error, - "Cannot initialize tuple of {0} element(s) from tuple " + "cannot initialize tuple of {0} element(s) from tuple " "with {1} element(s).", size_t, size_t); context.emitter().Emit(value_loc_id, TupleInitElementCountMismatch, @@ -406,7 +406,7 @@ static auto ConvertStructToStructOrClass(Context& context, // exist in the destination or vice versa in the diagnostic. if (src_elem_fields.size() != dest_elem_fields.size()) { CARBON_DIAGNOSTIC(StructInitElementCountMismatch, Error, - "Cannot initialize {0} with {1} field(s) from struct " + "cannot initialize {0} with {1} field(s) from struct " "with {2} field(s).", llvm::StringLiteral, size_t, size_t); context.emitter().Emit( @@ -460,14 +460,14 @@ static auto ConvertStructToStructOrClass(Context& context, if (literal_elems_id.is_valid()) { CARBON_DIAGNOSTIC( StructInitMissingFieldInLiteral, Error, - "Missing value for field `{0}` in struct initialization.", + "missing value for field `{0}` in struct initialization", SemIR::NameId); context.emitter().Emit(value_loc_id, StructInitMissingFieldInLiteral, dest_field.name_id); } else { CARBON_DIAGNOSTIC(StructInitMissingFieldInConversion, Error, - "Cannot convert from struct type `{0}` to `{1}`: " - "missing field `{2}` in source type.", + "cannot convert from struct type `{0}` to `{1}`: " + "missing field `{2}` in source type", SemIR::TypeId, SemIR::TypeId, SemIR::NameId); context.emitter().Emit( value_loc_id, StructInitMissingFieldInConversion, value.type_id(), @@ -535,8 +535,8 @@ static auto ConvertStructToClass(Context& context, SemIR::StructType src_type, auto& dest_class_info = context.classes().Get(dest_type.class_id); if (dest_class_info.inheritance_kind == SemIR::Class::Abstract) { CARBON_DIAGNOSTIC(ConstructionOfAbstractClass, Error, - "Cannot construct instance of abstract class. " - "Consider using `partial {0}` instead.", + "cannot construct instance of abstract class; " + "consider using `partial {0}` instead", SemIR::TypeId); context.emitter().Emit(value_id, ConstructionOfAbstractClass, target.type_id); @@ -909,7 +909,7 @@ static auto PerformCopy(Context& context, SemIR::InstId expr_id) // TODO: We don't yet have rules for whether and when a class type is // copyable, or how to perform the copy. CARBON_DIAGNOSTIC(CopyOfUncopyableType, Error, - "Cannot copy value of type `{0}`.", SemIR::TypeId); + "cannot copy value of type `{0}`", SemIR::TypeId); context.emitter().Emit(expr_id, CopyOfUncopyableType, type_id); return SemIR::InstId::BuiltinError; } @@ -931,7 +931,7 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, // We should provide a better diagnostic for inappropriate use of // namespace names, and allow use of functions as values. CARBON_DIAGNOSTIC(UseOfNonExprAsValue, Error, - "Expression cannot be used as a value."); + "expression cannot be used as a value"); context.emitter().Emit(expr_id, UseOfNonExprAsValue); return SemIR::InstId::BuiltinError; } @@ -939,13 +939,13 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, // We can only perform initialization for complete types. if (!context.TryToCompleteType(target.type_id, [&] { CARBON_DIAGNOSTIC(IncompleteTypeInInit, Error, - "Initialization of incomplete type `{0}`.", + "initialization of incomplete type `{0}`", SemIR::TypeId); CARBON_DIAGNOSTIC(IncompleteTypeInValueConversion, Error, - "Forming value of incomplete type `{0}`.", + "forming value of incomplete type `{0}`", SemIR::TypeId); CARBON_DIAGNOSTIC(IncompleteTypeInConversion, Error, - "Invalid use of incomplete type `{0}`.", + "invalid use of incomplete type `{0}`", SemIR::TypeId); return context.emitter().Build(loc_id, target.is_initializer() @@ -978,10 +978,10 @@ auto Convert(Context& context, SemIR::LocId loc_id, SemIR::InstId expr_id, }; expr_id = BuildUnaryOperator(context, loc_id, op, expr_id, [&] { CARBON_DIAGNOSTIC(ImplicitAsConversionFailure, Error, - "Cannot implicitly convert from `{0}` to `{1}`.", + "cannot implicitly convert from `{0}` to `{1}`", SemIR::TypeId, SemIR::TypeId); CARBON_DIAGNOSTIC(ExplicitAsConversionFailure, Error, - "Cannot convert from `{0}` to `{1}` with `as`.", + "cannot convert from `{0}` to `{1}` with `as`", SemIR::TypeId, SemIR::TypeId); return context.emitter().Build(loc_id, target.kind == ConversionTarget::ExplicitAs @@ -1126,7 +1126,7 @@ auto ConvertForExplicitAs(Context& context, Parse::NodeId as_node, {.kind = ConversionTarget::ExplicitAs, .type_id = type_id}); } -CARBON_DIAGNOSTIC(InCallToFunction, Note, "Calling function declared here."); +CARBON_DIAGNOSTIC(InCallToFunction, Note, "calling function declared here"); // Convert the object argument in a method call to match the `self` parameter. static auto ConvertSelf(Context& context, SemIR::LocId call_loc_id, @@ -1137,7 +1137,7 @@ static auto ConvertSelf(Context& context, SemIR::LocId call_loc_id, SemIR::InstId self_id) -> SemIR::InstId { if (!self_id.is_valid()) { CARBON_DIAGNOSTIC(MissingObjectInMethodCall, Error, - "Missing object argument in method call."); + "missing object argument in method call"); context.emitter() .Build(call_loc_id, MissingObjectInMethodCall) .Note(callee_loc, InCallToFunction) @@ -1149,7 +1149,7 @@ static auto ConvertSelf(Context& context, SemIR::LocId call_loc_id, &context.emitter(), [&](auto& builder) { CARBON_DIAGNOSTIC( InCallToFunctionSelf, Note, - "Initializing `{0}` parameter of method declared here.", + "initializing `{0}` parameter of method declared here", llvm::StringLiteral); builder.Note(self_param_id, InCallToFunctionSelf, addr_pattern ? llvm::StringLiteral("addr self") @@ -1168,7 +1168,7 @@ static auto ConvertSelf(Context& context, SemIR::LocId call_loc_id, break; default: CARBON_DIAGNOSTIC(AddrSelfIsNonRef, Error, - "`addr self` method cannot be invoked on a value."); + "`addr self` method cannot be invoked on a value"); context.emitter().Emit(TokenOnly(call_loc_id), AddrSelfIsNonRef); return SemIR::InstId::BuiltinError; } @@ -1228,7 +1228,7 @@ auto ConvertCallArgs(Context& context, SemIR::LocId call_loc_id, &context.emitter(), [&](auto& builder) { CARBON_DIAGNOSTIC( InCallToFunctionParam, Note, - "Initializing parameter {0} of function declared here.", int); + "initializing parameter {0} of function declared here", int); builder.Note(callee.callee_loc, InCallToFunctionParam, diag_param_index + 1); }); @@ -1281,7 +1281,7 @@ auto ExprAsType(Context& context, SemIR::LocId loc_id, SemIR::InstId value_id) auto type_const_id = context.constant_values().Get(type_inst_id); if (!type_const_id.is_constant()) { CARBON_DIAGNOSTIC(TypeExprEvaluationFailure, Error, - "Cannot evaluate type expression."); + "cannot evaluate type expression"); context.emitter().Emit(loc_id, TypeExprEvaluationFailure); return SemIR::TypeId::Error; } diff --git a/toolchain/check/decl_name_stack.cpp b/toolchain/check/decl_name_stack.cpp index cb8eeeed51dd..8e7704a6a565 100644 --- a/toolchain/check/decl_name_stack.cpp +++ b/toolchain/check/decl_name_stack.cpp @@ -140,8 +140,8 @@ auto DeclNameStack::AddName(NameContext name_context, SemIR::InstId target_id, // TODO: Point at the declaration for the scoped entity. CARBON_DIAGNOSTIC( QualifiedDeclOutsideScopeEntity, Error, - "Out-of-line declaration requires a declaration in " - "scoped entity."); + "out-of-line declaration requires a declaration in " + "scoped entity"); context_->emitter().Emit(name_context.loc_id, QualifiedDeclOutsideScopeEntity); } @@ -312,7 +312,7 @@ static auto DiagnoseQualifiedDeclInIncompleteClassScope(Context& context, SemIR::ClassId class_id) -> void { CARBON_DIAGNOSTIC(QualifiedDeclInIncompleteClassScope, Error, - "Cannot declare a member of incomplete class `{0}`.", + "cannot declare a member of incomplete class `{0}`", SemIR::TypeId); auto builder = context.emitter().Build(loc, QualifiedDeclInIncompleteClassScope, @@ -327,7 +327,7 @@ static auto DiagnoseQualifiedDeclInUndefinedInterfaceScope( Context& context, SemIRLoc loc, SemIR::InterfaceId interface_id, SemIR::InstId interface_inst_id) -> void { CARBON_DIAGNOSTIC(QualifiedDeclInUndefinedInterfaceScope, Error, - "Cannot declare a member of undefined interface `{0}`.", + "cannot declare a member of undefined interface `{0}`", std::string); auto builder = context.emitter().Build( loc, QualifiedDeclInUndefinedInterfaceScope, @@ -345,9 +345,9 @@ static auto DiagnoseQualifiedDeclInImportedPackage(Context& context, SemIRLoc import_loc) -> void { CARBON_DIAGNOSTIC(QualifiedDeclOutsidePackage, Error, - "Imported packages cannot be used for declarations."); + "imported packages cannot be used for declarations"); CARBON_DIAGNOSTIC(QualifiedDeclOutsidePackageSource, Note, - "Package imported here."); + "package imported here"); context.emitter() .Build(use_loc, QualifiedDeclOutsidePackage) .Note(import_loc, QualifiedDeclOutsidePackageSource) @@ -360,10 +360,10 @@ static auto DiagnoseQualifiedDeclInNonScope(Context& context, SemIRLoc use_loc, SemIRLoc non_scope_entity_loc) -> void { CARBON_DIAGNOSTIC(QualifiedNameInNonScope, Error, - "Name qualifiers are only allowed for entities that " - "provide a scope."); + "name qualifiers are only allowed for entities that " + "provide a scope"); CARBON_DIAGNOSTIC(QualifiedNameNonScopeEntity, Note, - "Referenced non-scope entity declared here."); + "referenced non-scope entity declared here"); context.emitter() .Build(use_loc, QualifiedNameInNonScope) .Note(non_scope_entity_loc, QualifiedNameNonScopeEntity) diff --git a/toolchain/check/deduce.cpp b/toolchain/check/deduce.cpp index 34223629235c..c2dc2172af8c 100644 --- a/toolchain/check/deduce.cpp +++ b/toolchain/check/deduce.cpp @@ -79,7 +79,7 @@ class DeductionWorklist { static auto NoteGenericHere(Context& context, SemIR::GenericId generic_id, Context::DiagnosticBuilder& diag) -> void { CARBON_DIAGNOSTIC(DeductionGenericHere, Note, - "While deducing parameters of generic declared here."); + "while deducing parameters of generic declared here"); diag.Note(context.generics().Get(generic_id).decl_id, DeductionGenericHere); } @@ -141,7 +141,7 @@ auto DeduceGenericCallArguments( param_id)) { CARBON_DIAGNOSTIC( InitializingGenericParam, Note, - "Initializing generic parameter `{0}` declared here.", + "initializing generic parameter `{0}` declared here", SemIR::NameId); builder.Note( param_id, InitializingGenericParam, @@ -188,8 +188,8 @@ auto DeduceGenericCallArguments( result_arg_ids[index.index] != arg_const_inst_id) { // TODO: Include the two different deduced values. CARBON_DIAGNOSTIC(DeductionInconsistent, Error, - "Inconsistent deductions for value of generic " - "parameter `{0}`.", + "inconsistent deductions for value of generic " + "parameter `{0}`", SemIR::NameId); auto diag = context.emitter().Build(loc_id, DeductionInconsistent, entity_name.name_id); @@ -221,7 +221,7 @@ auto DeduceGenericCallArguments( auto entity_name_id = context.insts().GetAs(binding_id).entity_name_id; CARBON_DIAGNOSTIC(DeductionIncomplete, Error, - "Cannot deduce value for generic parameter `{0}`.", + "cannot deduce value for generic parameter `{0}`", SemIR::NameId); auto diag = context.emitter().Build( loc_id, DeductionIncomplete, diff --git a/toolchain/check/eval.cpp b/toolchain/check/eval.cpp index c53d4afc33e5..5f0faefe1021 100644 --- a/toolchain/check/eval.cpp +++ b/toolchain/check/eval.cpp @@ -512,7 +512,7 @@ static auto PerformArrayIndex(EvalContext& eval_context, SemIR::Inst inst) .Get(bound->int_id) .ule(index_val.getZExtValue())) { CARBON_DIAGNOSTIC(ArrayIndexOutOfBounds, Error, - "Array index `{0}` is past the end of type `{1}`.", + "array index `{0}` is past the end of type `{1}`", TypedInt, SemIR::TypeId); eval_context.emitter().Emit( index_inst.index_id, ArrayIndexOutOfBounds, @@ -553,7 +553,7 @@ static auto ValidateIntType(Context& context, SemIRLoc loc, (context.types().IsSignedInt(bit_width->type_id) && bit_width_val.isNegative())) { CARBON_DIAGNOSTIC(IntWidthNotPositive, Error, - "Integer type width of {0} is not positive.", TypedInt); + "integer type width of {0} is not positive", TypedInt); context.emitter().Emit( loc, IntWidthNotPositive, {.type = bit_width->type_id, .value = bit_width_val}); @@ -564,8 +564,8 @@ static auto ValidateIntType(Context& context, SemIRLoc loc, constexpr int MaxIntWidth = 1 << 23; if (bit_width_val.ugt(MaxIntWidth)) { CARBON_DIAGNOSTIC(IntWidthTooLarge, Error, - "Integer type width of {0} is greater than the " - "maximum supported width of {1}.", + "integer type width of {0} is greater than the " + "maximum supported width of {1}", TypedInt, int); context.emitter().Emit(loc, IntWidthTooLarge, {.type = bit_width->type_id, .value = bit_width_val}, @@ -598,7 +598,7 @@ static auto ValidateFloatBitWidth(Context& context, SemIRLoc loc, return true; } - CARBON_DIAGNOSTIC(CompileTimeFloatBitWidth, Error, "Bit width must be 64."); + CARBON_DIAGNOSTIC(CompileTimeFloatBitWidth, Error, "bit width must be 64"); context.emitter().Emit(loc, CompileTimeFloatBitWidth); return false; } @@ -617,7 +617,7 @@ static auto ValidateFloatType(Context& context, SemIRLoc loc, // Issues a diagnostic for a compile-time division by zero. static auto DiagnoseDivisionByZero(Context& context, SemIRLoc loc) -> void { - CARBON_DIAGNOSTIC(CompileTimeDivisionByZero, Error, "Division by zero."); + CARBON_DIAGNOSTIC(CompileTimeDivisionByZero, Error, "division by zero"); context.emitter().Emit(loc, CompileTimeDivisionByZero); } @@ -634,7 +634,7 @@ static auto PerformBuiltinUnaryIntOp(Context& context, SemIRLoc loc, if (context.types().IsSignedInt(op.type_id) && op_val.isMinSignedValue()) { CARBON_DIAGNOSTIC(CompileTimeIntegerNegateOverflow, Error, - "Integer overflow in negation of {0}.", TypedInt); + "integer overflow in negation of {0}", TypedInt); context.emitter().Emit(loc, CompileTimeIntegerNegateOverflow, {.type = op.type_id, .value = op_val}); } @@ -750,10 +750,9 @@ static auto PerformBuiltinBinaryIntOp(Context& context, SemIRLoc loc, : llvm::StringLiteral(">>"); if (rhs_val.uge(lhs_val.getBitWidth()) || (rhs_val.isNegative() && context.types().IsSignedInt(rhs.type_id))) { - CARBON_DIAGNOSTIC( - CompileTimeShiftOutOfRange, Error, - "Shift distance not in range [0, {0}) in {1} {2} {3}.", unsigned, - TypedInt, llvm::StringLiteral, TypedInt); + CARBON_DIAGNOSTIC(CompileTimeShiftOutOfRange, Error, + "shift distance not in range [0, {0}) in {1} {2} {3}", + unsigned, TypedInt, llvm::StringLiteral, TypedInt); context.emitter().Emit(loc, CompileTimeShiftOutOfRange, lhs_val.getBitWidth(), {.type = lhs.type_id, .value = lhs_val}, op_str, @@ -777,7 +776,7 @@ static auto PerformBuiltinBinaryIntOp(Context& context, SemIRLoc loc, if (overflow) { CARBON_DIAGNOSTIC(CompileTimeIntegerOverflow, Error, - "Integer overflow in calculation {0} {1} {2}.", TypedInt, + "integer overflow in calculation {0} {1} {2}", TypedInt, llvm::StringLiteral, TypedInt); context.emitter().Emit(loc, CompileTimeIntegerOverflow, {.type = lhs.type_id, .value = lhs_val}, op_str, @@ -1134,7 +1133,7 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id, if (eval_context.types().IsSignedInt(int_bound->type_id) && bound_val.isNegative()) { CARBON_DIAGNOSTIC(ArrayBoundNegative, Error, - "Array bound of {0} is negative.", TypedInt); + "array bound of {0} is negative", TypedInt); eval_context.emitter().Emit( bound_id, ArrayBoundNegative, {.type = int_bound->type_id, .value = bound_val}); @@ -1142,7 +1141,7 @@ auto TryEvalInstInContext(EvalContext& eval_context, SemIR::InstId inst_id, } if (bound_val.getActiveBits() > 64) { CARBON_DIAGNOSTIC(ArrayBoundTooLarge, Error, - "Array bound of {0} is too large.", TypedInt); + "array bound of {0} is too large", TypedInt); eval_context.emitter().Emit( bound_id, ArrayBoundTooLarge, {.type = int_bound->type_id, .value = bound_val}); diff --git a/toolchain/check/function.cpp b/toolchain/check/function.cpp index 2e09ed2c10b9..0656aa5925fa 100644 --- a/toolchain/check/function.cpp +++ b/toolchain/check/function.cpp @@ -34,11 +34,11 @@ auto CheckFunctionTypeMatches(Context& context, prev_return_type_id)) { CARBON_DIAGNOSTIC( FunctionRedeclReturnTypeDiffers, Error, - "Function redeclaration differs because return type is `{0}`.", + "function redeclaration differs because return type is `{0}`", SemIR::TypeId); CARBON_DIAGNOSTIC( FunctionRedeclReturnTypeDiffersNoReturn, Error, - "Function redeclaration differs because no return type is provided."); + "function redeclaration differs because no return type is provided"); auto diag = new_return_type_id.is_valid() ? context.emitter().Build(new_function.latest_decl_id(), @@ -48,13 +48,13 @@ auto CheckFunctionTypeMatches(Context& context, FunctionRedeclReturnTypeDiffersNoReturn); if (prev_return_type_id.is_valid()) { CARBON_DIAGNOSTIC(FunctionRedeclReturnTypePrevious, Note, - "Previously declared with return type `{0}`.", + "previously declared with return type `{0}`", SemIR::TypeId); diag.Note(prev_function.latest_decl_id(), FunctionRedeclReturnTypePrevious, prev_return_type_id); } else { CARBON_DIAGNOSTIC(FunctionRedeclReturnTypePreviousNoReturn, Note, - "Previously declared with no return type."); + "previously declared with no return type"); diag.Note(prev_function.latest_decl_id(), FunctionRedeclReturnTypePreviousNoReturn); } @@ -77,7 +77,7 @@ auto CheckFunctionReturnType(Context& context, SemIRLoc loc, if (return_info.init_repr.kind == SemIR::InitRepr::Incomplete) { auto diagnose_incomplete_return_type = [&] { CARBON_DIAGNOSTIC(IncompleteTypeInFunctionReturnType, Error, - "Function returns incomplete type `{0}`.", + "function returns incomplete type `{0}`", SemIR::TypeId); return context.emitter().Build(loc, IncompleteTypeInFunctionReturnType, return_info.type_id); diff --git a/toolchain/check/generic.cpp b/toolchain/check/generic.cpp index b64b4234342d..f502ee9bccf8 100644 --- a/toolchain/check/generic.cpp +++ b/toolchain/check/generic.cpp @@ -426,7 +426,7 @@ auto RequireGenericParams(Context& context, SemIR::InstBlockId block_id) for (auto& inst_id : context.inst_blocks().Get(block_id)) { if (!context.constant_values().Get(inst_id).is_constant()) { CARBON_DIAGNOSTIC(GenericParamMustBeConstant, Error, - "Parameters of generic types must be constant."); + "parameters of generic types must be constant"); context.emitter().Emit(inst_id, GenericParamMustBeConstant); // Replace the parameter with an invalid instruction so that we don't try diff --git a/toolchain/check/handle_alias.cpp b/toolchain/check/handle_alias.cpp index 3b6d88bf813f..f3233c77299c 100644 --- a/toolchain/check/handle_alias.cpp +++ b/toolchain/check/handle_alias.cpp @@ -54,7 +54,7 @@ auto HandleParseNode(Context& context, Parse::AliasId /*node_id*/) -> bool { alias_value_id = inst->value_id; } else { CARBON_DIAGNOSTIC(AliasRequiresNameRef, Error, - "Alias initializer must be a name reference."); + "alias initializer must be a name reference"); context.emitter().Emit(expr_node, AliasRequiresNameRef); alias_type_id = SemIR::TypeId::Error; alias_value_id = SemIR::InstId::BuiltinError; diff --git a/toolchain/check/handle_array.cpp b/toolchain/check/handle_array.cpp index fad50be42a20..7794ab679e45 100644 --- a/toolchain/check/handle_array.cpp +++ b/toolchain/check/handle_array.cpp @@ -39,8 +39,7 @@ auto HandleParseNode(Context& context, Parse::ArrayExprId node_id) -> bool { // comptime fn F(n: i32) -> type { return [i32; n]; } auto bound_inst = context.constant_values().Get(bound_inst_id); if (!bound_inst.is_constant()) { - CARBON_DIAGNOSTIC(InvalidArrayExpr, Error, - "Array bound is not a constant."); + CARBON_DIAGNOSTIC(InvalidArrayExpr, Error, "array bound is not a constant"); context.emitter().Emit(bound_inst_id, InvalidArrayExpr); context.node_stack().Push(node_id, SemIR::InstId::BuiltinError); return true; diff --git a/toolchain/check/handle_binding_pattern.cpp b/toolchain/check/handle_binding_pattern.cpp index ea9cadc46613..1c7b39d22d94 100644 --- a/toolchain/check/handle_binding_pattern.cpp +++ b/toolchain/check/handle_binding_pattern.cpp @@ -73,7 +73,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, !context.node_stack().PeekIs()) { CARBON_DIAGNOSTIC( SelfOutsideImplicitParamList, Error, - "`self` can only be declared in an implicit parameter list."); + "`self` can only be declared in an implicit parameter list"); context.emitter().Emit(node_id, SelfOutsideImplicitParamList); } @@ -87,7 +87,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, if (is_generic) { CARBON_DIAGNOSTIC( CompileTimeBindingInVarDecl, Error, - "`var` declaration cannot declare a compile-time binding."); + "`var` declaration cannot declare a compile-time binding"); context.emitter().Emit(type_node, CompileTimeBindingInVarDecl); } auto binding_id = @@ -99,7 +99,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, auto parent_class_decl = context.GetCurrentScopeAs(); cast_type_id = context.AsCompleteType(cast_type_id, [&] { CARBON_DIAGNOSTIC(IncompleteTypeInVarDecl, Error, - "{0} has incomplete type `{1}`.", llvm::StringLiteral, + "{0} has incomplete type `{1}`", llvm::StringLiteral, SemIR::TypeId); return context.emitter().Build(type_node, IncompleteTypeInVarDecl, parent_class_decl @@ -171,7 +171,7 @@ static auto HandleAnyBindingPattern(Context& context, Parse::NodeId node_id, case Parse::NodeKind::LetIntroducer: { cast_type_id = context.AsCompleteType(cast_type_id, [&] { CARBON_DIAGNOSTIC(IncompleteTypeInLetDecl, Error, - "`let` binding has incomplete type `{0}`.", + "`let` binding has incomplete type `{0}`", SemIR::TypeId); return context.emitter().Build(type_node, IncompleteTypeInLetDecl, cast_type_id); @@ -216,7 +216,7 @@ auto HandleParseNode(Context& context, Parse::AddrId node_id) -> bool { node_id, {.type_id = self_param->type_id, .inner_id = self_param_id}); } else { CARBON_DIAGNOSTIC(AddrOnNonSelfParam, Error, - "`addr` can only be applied to a `self` parameter."); + "`addr` can only be applied to a `self` parameter"); context.emitter().Emit(TokenOnly(node_id), AddrOnNonSelfParam); context.node_stack().Push(node_id, self_param_id); } diff --git a/toolchain/check/handle_export.cpp b/toolchain/check/handle_export.cpp index 1389e10fb6b5..32b939b35495 100644 --- a/toolchain/check/handle_export.cpp +++ b/toolchain/check/handle_export.cpp @@ -45,8 +45,8 @@ auto HandleParseNode(Context& context, Parse::ExportDeclId node_id) -> bool { if (inst.Is()) { CARBON_DIAGNOSTIC(ExportRedundant, Warning, - "`export` matches previous `export`."); - CARBON_DIAGNOSTIC(ExportPrevious, Note, "Previous `export` here."); + "`export` matches previous `export`"); + CARBON_DIAGNOSTIC(ExportPrevious, Note, "previous `export` here"); context.emitter() .Build(node_id, ExportRedundant) // Use the location of the export itself, not the exported instruction. @@ -58,9 +58,9 @@ auto HandleParseNode(Context& context, Parse::ExportDeclId node_id) -> bool { auto import_ref = context.insts().TryGetAs(inst_id); if (!import_ref) { CARBON_DIAGNOSTIC(ExportNotImportedEntity, Error, - "Only imported entities are valid for `export`."); + "only imported entities are valid for `export`"); CARBON_DIAGNOSTIC(ExportNotImportedEntitySource, Note, - "Name is declared here."); + "name is declared here"); context.emitter() .Build(node_id, ExportNotImportedEntity) .Note(inst_id, ExportNotImportedEntitySource) diff --git a/toolchain/check/handle_function.cpp b/toolchain/check/handle_function.cpp index d97871eaae87..c06bd8c174d8 100644 --- a/toolchain/check/handle_function.cpp +++ b/toolchain/check/handle_function.cpp @@ -325,8 +325,8 @@ static auto BuildFunctionDecl(Context& context, context.GetBuiltinType(SemIR::BuiltinInstKind::IntType) && return_type_id != context.GetTupleType({}))) { CARBON_DIAGNOSTIC(InvalidMainRunSignature, Error, - "Invalid signature for `Main.Run` function. Expected " - "`fn ()` or `fn () -> i32`."); + "invalid signature for `Main.Run` function; expected " + "`fn ()` or `fn () -> i32`"); context.emitter().Emit(node_id, InvalidMainRunSignature); } } @@ -374,7 +374,7 @@ static auto HandleFunctionDefinitionAfterSignature( context.TryToCompleteType(param.type_id, [&] { CARBON_DIAGNOSTIC( IncompleteTypeInFunctionParam, Error, - "Parameter has incomplete type `{0}` in function definition.", + "parameter has incomplete type `{0}` in function definition", SemIR::TypeId); return context.emitter().Build(param_id, IncompleteTypeInFunctionParam, param.type_id); @@ -424,7 +424,7 @@ auto HandleParseNode(Context& context, Parse::FunctionDefinitionId node_id) if (context.functions().Get(function_id).return_storage_id.is_valid()) { CARBON_DIAGNOSTIC( MissingReturnStatement, Error, - "Missing `return` at end of function with declared return type."); + "missing `return` at end of function with declared return type"); context.emitter().Emit(TokenOnly(node_id), MissingReturnStatement); } else { context.AddInst(node_id, {}); @@ -468,7 +468,7 @@ static auto LookupBuiltinFunctionKind(Context& context, auto kind = SemIR::BuiltinFunctionKind::ForBuiltinName(builtin_name); if (kind == SemIR::BuiltinFunctionKind::None) { CARBON_DIAGNOSTIC(UnknownBuiltinFunctionName, Error, - "Unknown builtin function name \"{0}\".", std::string); + "unknown builtin function name \"{0}\"", std::string); context.emitter().Emit(name_id, UnknownBuiltinFunctionName, builtin_name.str()); } @@ -519,7 +519,7 @@ auto HandleParseNode(Context& context, function.builtin_function_kind = builtin_kind; } else { CARBON_DIAGNOSTIC(InvalidBuiltinSignature, Error, - "Invalid signature for builtin function \"{0}\".", + "invalid signature for builtin function \"{0}\"", std::string); context.emitter().Emit(fn_node_id, InvalidBuiltinSignature, builtin_kind.name().str()); diff --git a/toolchain/check/handle_impl.cpp b/toolchain/check/handle_impl.cpp index 36a2596b6569..70f27ac0f992 100644 --- a/toolchain/check/handle_impl.cpp +++ b/toolchain/check/handle_impl.cpp @@ -88,7 +88,7 @@ auto HandleParseNode(Context& context, Parse::DefaultSelfImplAsId node_id) auto self_type_id = GetDefaultSelfType(context); if (!self_type_id.is_valid()) { CARBON_DIAGNOSTIC(ImplAsOutsideClass, Error, - "`impl as` can only be used in a class."); + "`impl as` can only be used in a class"); context.emitter().Emit(node_id, ImplAsOutsideClass); self_type_id = SemIR::TypeId::Error; } @@ -112,14 +112,14 @@ static auto ExtendImpl(Context& context, Parse::NodeId extend_node, // TODO: This is also valid in a mixin. if (!TryAsClassScope(context, parent_scope_id)) { CARBON_DIAGNOSTIC(ExtendImplOutsideClass, Error, - "`extend impl` can only be used in a class."); + "`extend impl` can only be used in a class"); context.emitter().Emit(node_id, ExtendImplOutsideClass); return; } if (params_node.is_valid()) { CARBON_DIAGNOSTIC(ExtendImplForall, Error, - "Cannot `extend` a parameterized `impl`."); + "cannot `extend` a parameterized `impl`"); context.emitter().Emit(extend_node, ExtendImplForall); parent_scope.has_error = true; return; @@ -128,7 +128,7 @@ static auto ExtendImpl(Context& context, Parse::NodeId extend_node, if (context.parse_tree().node_kind(self_type_node) == Parse::NodeKind::TypeImplAs) { CARBON_DIAGNOSTIC(ExtendImplSelfAs, Error, - "Cannot `extend` an `impl` with an explicit self type."); + "cannot `extend` an `impl` with an explicit self type"); auto diag = context.emitter().Build(extend_node, ExtendImplSelfAs); // If the explicit self type is not the default, just bail out. @@ -144,7 +144,7 @@ static auto ExtendImpl(Context& context, Parse::NodeId extend_node, context.parse_tree_and_subtrees().ExtractAs( self_type_node)) { CARBON_DIAGNOSTIC(ExtendImplSelfAsDefault, Note, - "Remove the explicit `Self` type here."); + "remove the explicit `Self` type here"); diag.Note(self_as->type_expr, ExtendImplSelfAsDefault); } diag.Emit(); @@ -160,10 +160,9 @@ static auto ExtendImpl(Context& context, Parse::NodeId extend_node, auto& interface = context.interfaces().Get(interface_type->interface_id); if (!interface.is_defined()) { - CARBON_DIAGNOSTIC( - ExtendUndefinedInterface, Error, - "`extend impl` requires a definition for interface `{0}`.", - SemIR::TypeId); + CARBON_DIAGNOSTIC(ExtendUndefinedInterface, Error, + "`extend impl` requires a definition for interface `{0}`", + SemIR::TypeId); auto diag = context.emitter().Build(node_id, ExtendUndefinedInterface, constraint_id); context.NoteUndefinedInterface(interface_type->interface_id, diag); @@ -246,10 +245,10 @@ auto HandleParseNode(Context& context, Parse::ImplDefinitionStartId node_id) if (impl_info.is_defined()) { CARBON_DIAGNOSTIC(ImplRedefinition, Error, - "Redefinition of `impl {0} as {1}`.", SemIR::TypeId, + "redefinition of `impl {0} as {1}`", SemIR::TypeId, SemIR::TypeId); CARBON_DIAGNOSTIC(ImplPreviousDefinition, Note, - "Previous definition was here."); + "previous definition was here"); context.emitter() .Build(node_id, ImplRedefinition, impl_info.self_id, impl_info.constraint_id) diff --git a/toolchain/check/handle_index.cpp b/toolchain/check/handle_index.cpp index c236503f5b54..8b20d1730b04 100644 --- a/toolchain/check/handle_index.cpp +++ b/toolchain/check/handle_index.cpp @@ -55,7 +55,7 @@ auto HandleParseNode(Context& context, Parse::IndexExprId node_id) -> bool { default: { if (operand_type_id != SemIR::TypeId::Error) { CARBON_DIAGNOSTIC(TypeNotIndexable, Error, - "Type `{0}` does not support indexing.", + "type `{0}` does not support indexing", SemIR::TypeId); context.emitter().Emit(node_id, TypeNotIndexable, operand_type_id); } diff --git a/toolchain/check/handle_let_and_var.cpp b/toolchain/check/handle_let_and_var.cpp index 5b35f07daff2..1662e4a7c010 100644 --- a/toolchain/check/handle_let_and_var.cpp +++ b/toolchain/check/handle_let_and_var.cpp @@ -70,8 +70,8 @@ static auto BuildAssociatedConstantDecl(Context& context, auto binding_pattern = pattern.inst.TryAs(); if (!binding_pattern) { CARBON_DIAGNOSTIC(ExpectedSymbolicBindingInAssociatedConstant, Error, - "Pattern in associated constant declaration must be a " - "single `:!` binding."); + "pattern in associated constant declaration must be a " + "single `:!` binding"); context.emitter().Emit(pattern.loc_id, ExpectedSymbolicBindingInAssociatedConstant); context.name_scopes().Get(interface_info.scope_id).has_error = true; @@ -229,7 +229,7 @@ auto HandleParseNode(Context& context, Parse::LetDeclId node_id) -> bool { if (!decl_info->init_id) { CARBON_DIAGNOSTIC( ExpectedInitializerAfterLet, Error, - "Expected `=`; `let` declaration must have an initializer."); + "expected `=`; `let` declaration must have an initializer"); context.emitter().Emit(TokenOnly(node_id), ExpectedInitializerAfterLet); } diff --git a/toolchain/check/handle_literal.cpp b/toolchain/check/handle_literal.cpp index 9e095ab62a15..1242aa934758 100644 --- a/toolchain/check/handle_literal.cpp +++ b/toolchain/check/handle_literal.cpp @@ -34,7 +34,7 @@ static auto MakeI32Literal(Context& context, Parse::NodeId node_id, auto val = context.ints().Get(int_id); if (val.getActiveBits() > 31) { CARBON_DIAGNOSTIC(IntLiteralTooLargeForI32, Error, - "Integer literal with value {0} does not fit in i32.", + "integer literal with value {0} does not fit in i32", llvm::APSInt); context.emitter().Emit(node_id, IntLiteralTooLargeForI32, llvm::APSInt(val, /*isUnsigned=*/true)); @@ -72,7 +72,7 @@ auto HandleParseNode(Context& context, Parse::RealLiteralId node_id) -> bool { if (real_value.mantissa.getActiveBits() > 64) { CARBON_DIAGNOSTIC(RealMantissaTooLargeForI64, Error, - "Real mantissa with value {0} does not fit in i64.", + "real mantissa with value {0} does not fit in i64", llvm::APSInt); context.emitter().Emit(node_id, RealMantissaTooLargeForI64, llvm::APSInt(real_value.mantissa, true)); @@ -82,7 +82,7 @@ auto HandleParseNode(Context& context, Parse::RealLiteralId node_id) -> bool { if (real_value.exponent.getSignificantBits() > 64) { CARBON_DIAGNOSTIC(RealExponentTooLargeForI64, Error, - "Real exponent with value {0} does not fit in i64.", + "real exponent with value {0} does not fit in i64", llvm::APSInt); context.emitter().Emit(node_id, RealExponentTooLargeForI64, llvm::APSInt(real_value.exponent, false)); @@ -126,8 +126,8 @@ static auto HandleIntOrUnsignedIntTypeLiteral(Context& context, IntId size_id) -> bool { if (!(context.ints().Get(size_id) & 3).isZero()) { CARBON_DIAGNOSTIC(IntWidthNotMultipleOf8, Error, - "Bit width of integer type literal must be a multiple of " - "8. Use `Core.{0}({1})` instead.", + "bit width of integer type literal must be a multiple of " + "8; use `Core.{0}({1})` instead", std::string, llvm::APSInt); context.emitter().Emit( node_id, IntWidthNotMultipleOf8, int_kind.is_signed() ? "Int" : "UInt", diff --git a/toolchain/check/handle_loop_statement.cpp b/toolchain/check/handle_loop_statement.cpp index 79ba30266161..c296eaf6edb2 100644 --- a/toolchain/check/handle_loop_statement.cpp +++ b/toolchain/check/handle_loop_statement.cpp @@ -97,7 +97,7 @@ auto HandleParseNode(Context& context, Parse::BreakStatementStartId node_id) auto& stack = context.break_continue_stack(); if (stack.empty()) { CARBON_DIAGNOSTIC(BreakOutsideLoop, Error, - "`break` can only be used in a loop."); + "`break` can only be used in a loop"); context.emitter().Emit(node_id, BreakOutsideLoop); } else { context.AddInst(node_id, @@ -122,7 +122,7 @@ auto HandleParseNode(Context& context, Parse::ContinueStatementStartId node_id) auto& stack = context.break_continue_stack(); if (stack.empty()) { CARBON_DIAGNOSTIC(ContinueOutsideLoop, Error, - "`continue` can only be used in a loop."); + "`continue` can only be used in a loop"); context.emitter().Emit(node_id, ContinueOutsideLoop); } else { context.AddInst(node_id, diff --git a/toolchain/check/handle_modifier.cpp b/toolchain/check/handle_modifier.cpp index 66845a771af6..7faed2ddf64d 100644 --- a/toolchain/check/handle_modifier.cpp +++ b/toolchain/check/handle_modifier.cpp @@ -9,12 +9,12 @@ namespace Carbon::Check { -CARBON_DIAGNOSTIC(ModifierPrevious, Note, "`{0}` previously appeared here.", +CARBON_DIAGNOSTIC(ModifierPrevious, Note, "`{0}` previously appeared here", Lex::TokenKind); static auto DiagnoseRepeated(Context& context, Parse::NodeId first_node, Parse::NodeId second_node) -> void { - CARBON_DIAGNOSTIC(ModifierRepeated, Error, "`{0}` repeated on declaration.", + CARBON_DIAGNOSTIC(ModifierRepeated, Error, "`{0}` repeated on declaration", Lex::TokenKind); context.emitter() .Build(second_node, ModifierRepeated, context.token_kind(second_node)) @@ -25,7 +25,7 @@ static auto DiagnoseRepeated(Context& context, Parse::NodeId first_node, static auto DiagnoseNotAllowedWith(Context& context, Parse::NodeId first_node, Parse::NodeId second_node) -> void { CARBON_DIAGNOSTIC(ModifierNotAllowedWith, Error, - "`{0}` not allowed on declaration with `{1}`.", + "`{0}` not allowed on declaration with `{1}`", Lex::TokenKind, Lex::TokenKind); context.emitter() .Build(second_node, ModifierNotAllowedWith, @@ -79,7 +79,7 @@ static auto HandleModifier(Context& context, Parse::NodeId node_id, CARBON_CHECK(closest_later_modifier.is_valid()); CARBON_DIAGNOSTIC(ModifierMustAppearBefore, Error, - "`{0}` must appear before `{1}`.", Lex::TokenKind, + "`{0}` must appear before `{1}`", Lex::TokenKind, Lex::TokenKind); context.emitter() .Build(node_id, ModifierMustAppearBefore, context.token_kind(node_id), diff --git a/toolchain/check/handle_name.cpp b/toolchain/check/handle_name.cpp index b5d5138da933..a28213456839 100644 --- a/toolchain/check/handle_name.cpp +++ b/toolchain/check/handle_name.cpp @@ -46,7 +46,7 @@ auto HandleParseNode(Context& context, Parse::PointerMemberAccessExprId node_id) auto diagnose_not_pointer = [&context, &node_id](SemIR::TypeId not_pointer_type_id) { CARBON_DIAGNOSTIC(ArrowOperatorOfNonPointer, Error, - "Cannot apply `->` operator to non-pointer type `{0}`.", + "cannot apply `->` operator to non-pointer type `{0}`", SemIR::TypeId); auto builder = context.emitter().Build( diff --git a/toolchain/check/handle_operator.cpp b/toolchain/check/handle_operator.cpp index eca65b148dff..dd4b225a56c4 100644 --- a/toolchain/check/handle_operator.cpp +++ b/toolchain/check/handle_operator.cpp @@ -77,7 +77,7 @@ auto HandleParseNode(Context& context, Parse::InfixOperatorEqualId node_id) lhs_cat != SemIR::ExprCategory::DurableRef && lhs_cat != SemIR::ExprCategory::Error) { CARBON_DIAGNOSTIC(AssignmentToNonAssignable, Error, - "Expression is not assignable."); + "expression is not assignable"); context.emitter().Emit(lhs_node, AssignmentToNonAssignable); } // TODO: Destroy the old value before reinitializing. This will require @@ -231,13 +231,13 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorAmpId node_id) break; case SemIR::ExprCategory::EphemeralRef: CARBON_DIAGNOSTIC(AddrOfEphemeralRef, Error, - "Cannot take the address of a temporary object."); + "cannot take the address of a temporary object"); context.emitter().Emit(TokenOnly(node_id), AddrOfEphemeralRef); value_id = SemIR::InstId::BuiltinError; break; default: CARBON_DIAGNOSTIC(AddrOfNonRef, Error, - "Cannot take the address of non-reference expression."); + "cannot take the address of non-reference expression"); context.emitter().Emit(TokenOnly(node_id), AddrOfNonRef); value_id = SemIR::InstId::BuiltinError; break; @@ -263,7 +263,7 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorConstId node_id) if (context.insts().Get(value_id).kind() == SemIR::ConstType::Kind) { CARBON_DIAGNOSTIC(RepeatedConst, Warning, "`const` applied repeatedly to the same type has no " - "additional effect."); + "additional effect"); context.emitter().Emit(node_id, RepeatedConst); } auto inner_type_id = ExprAsType(context, node_id, value_id); @@ -306,7 +306,7 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorStarId node_id) [&context, &node_id](SemIR::TypeId not_pointer_type_id) { CARBON_DIAGNOSTIC( DerefOfNonPointer, Error, - "Cannot dereference operand of non-pointer type `{0}`.", + "cannot dereference operand of non-pointer type `{0}`", SemIR::TypeId); auto builder = context.emitter().Build( @@ -316,7 +316,7 @@ auto HandleParseNode(Context& context, Parse::PrefixOperatorStarId node_id) if (not_pointer_type_id == SemIR::TypeId::TypeType) { CARBON_DIAGNOSTIC( DerefOfType, Note, - "To form a pointer type, write the `*` after the pointee type."); + "to form a pointer type, write the `*` after the pointee type"); builder.Note(TokenOnly(node_id), DerefOfType); } diff --git a/toolchain/check/handle_struct.cpp b/toolchain/check/handle_struct.cpp index fa1583445124..f3a3c7ecf1ba 100644 --- a/toolchain/check/handle_struct.cpp +++ b/toolchain/check/handle_struct.cpp @@ -80,10 +80,10 @@ static auto DiagnoseDuplicateNames(Context& context, auto result = names.Insert(field_inst.name_id, field_inst_id); if (!result.is_inserted()) { CARBON_DIAGNOSTIC(StructNameDuplicate, Error, - "Duplicated field name `{1}` in {0}.", std::string, + "duplicated field name `{1}` in {0}", std::string, SemIR::NameId); CARBON_DIAGNOSTIC(StructNamePrevious, Note, - "Field with the same name here."); + "field with the same name here"); context.emitter() .Build(field_inst_id, StructNameDuplicate, construct.str(), field_inst.name_id) diff --git a/toolchain/check/impl.cpp b/toolchain/check/impl.cpp index bc1844349b77..9660244faf33 100644 --- a/toolchain/check/impl.cpp +++ b/toolchain/check/impl.cpp @@ -23,7 +23,7 @@ static auto NoteAssociatedFunction(Context& context, Context::DiagnosticBuilder& builder, SemIR::FunctionId function_id) -> void { CARBON_DIAGNOSTIC(ImplAssociatedFunctionHere, Note, - "Associated function {0} declared here.", SemIR::NameId); + "associated function {0} declared here", SemIR::NameId); const auto& function = context.functions().Get(function_id); builder.Note(function.latest_decl_id(), ImplAssociatedFunctionHere, function.name_id); @@ -86,7 +86,7 @@ static auto CheckAssociatedFunctionImplementation( context.insts().TryGetAs(impl_decl_id); if (!impl_function_decl) { CARBON_DIAGNOSTIC(ImplFunctionWithNonFunction, Error, - "Associated function {0} implemented by non-function.", + "associated function {0} implemented by non-function", SemIR::NameId); auto builder = context.emitter().Build( impl_decl_id, ImplFunctionWithNonFunction, @@ -130,7 +130,7 @@ static auto BuildInterfaceWitness( const auto& interface = context.interfaces().Get(interface_type.interface_id); if (!context.TryToDefineType(interface_type_id, [&] { CARBON_DIAGNOSTIC(ImplOfUndefinedInterface, Error, - "Implementation of undefined interface {0}.", + "implementation of undefined interface {0}", SemIR::NameId); return context.emitter().Build( impl.definition_id, ImplOfUndefinedInterface, interface.name_id); @@ -172,7 +172,7 @@ static auto BuildInterfaceWitness( } else { CARBON_DIAGNOSTIC( ImplMissingFunction, Error, - "Missing implementation of {0} in impl of interface {1}.", + "missing implementation of {0} in impl of interface {1}", SemIR::NameId, SemIR::NameId); auto builder = context.emitter().Build(impl.definition_id, ImplMissingFunction, diff --git a/toolchain/check/import.cpp b/toolchain/check/import.cpp index 98c5a2f76894..c41ff906c180 100644 --- a/toolchain/check/import.cpp +++ b/toolchain/check/import.cpp @@ -534,7 +534,7 @@ auto ImportNameFromOtherPackage( // Annotate diagnostics as occurring during this name lookup. DiagnosticAnnotationScope annotate_diagnostics( &context.emitter(), [&](auto& builder) { - CARBON_DIAGNOSTIC(InNameLookup, Note, "In name lookup for `{0}`.", + CARBON_DIAGNOSTIC(InNameLookup, Note, "in name lookup for `{0}`", SemIR::NameId); builder.Note(loc, InNameLookup, name_id); }); diff --git a/toolchain/check/member_access.cpp b/toolchain/check/member_access.cpp index 7179f3389160..30f11e1a7fc1 100644 --- a/toolchain/check/member_access.cpp +++ b/toolchain/check/member_access.cpp @@ -37,7 +37,7 @@ static auto GetAsLookupScope(Context& context, SemIR::LocId loc_id, context.TryToDefineType( context.GetTypeIdForTypeConstant(base_const_id), [&] { CARBON_DIAGNOSTIC(QualifiedExprInIncompleteClassScope, Error, - "Member access into incomplete class `{0}`.", + "member access into incomplete class `{0}`", std::string); return context.emitter().Build( loc_id, QualifiedExprInIncompleteClassScope, @@ -51,7 +51,7 @@ static auto GetAsLookupScope(Context& context, SemIR::LocId loc_id, context.TryToDefineType( context.GetTypeIdForTypeConstant(base_const_id), [&] { CARBON_DIAGNOSTIC(QualifiedExprInUndefinedInterfaceScope, Error, - "Member access into undefined interface `{0}`.", + "member access into undefined interface `{0}`", std::string); return context.emitter().Build( loc_id, QualifiedExprInUndefinedInterfaceScope, @@ -218,7 +218,7 @@ static auto PerformImplLookup( if (!witness_id.is_valid()) { if (missing_impl_diagnoser) { CARBON_DIAGNOSTIC(MissingImplInMemberAccessNote, Note, - "Type `{1}` does not implement interface `{0}`.", + "type `{1}` does not implement interface `{0}`", SemIR::NameId, SemIR::TypeId); (*missing_impl_diagnoser)() .Note(loc_id, MissingImplInMemberAccessNote, interface.name_id, @@ -226,8 +226,8 @@ static auto PerformImplLookup( .Emit(); } else { CARBON_DIAGNOSTIC(MissingImplInMemberAccess, Error, - "Cannot access member of interface `{0}` in type `{1}` " - "that does not implement that interface.", + "cannot access member of interface `{0}` in type `{1}` " + "that does not implement that interface", SemIR::NameId, SemIR::TypeId); context.emitter().Emit(loc_id, MissingImplInMemberAccess, interface.name_id, @@ -388,10 +388,9 @@ static auto ValidateTupleIndex(Context& context, SemIR::LocId loc_id, -> const llvm::APInt* { const auto& index_val = context.ints().Get(index_inst.int_id); if (index_val.uge(size)) { - CARBON_DIAGNOSTIC( - TupleIndexOutOfBounds, Error, - "Tuple element index `{0}` is past the end of type `{1}`.", TypedInt, - SemIR::TypeId); + CARBON_DIAGNOSTIC(TupleIndexOutOfBounds, Error, + "tuple element index `{0}` is past the end of type `{1}`", + TypedInt, SemIR::TypeId); context.emitter().Emit(loc_id, TupleIndexOutOfBounds, {.type = index_inst.type_id, .value = index_val}, operand_inst.type_id()); @@ -417,7 +416,7 @@ auto PerformMemberAccess(Context& context, SemIR::LocId loc_id, auto base_type_id = context.insts().Get(base_id).type_id(); if (!context.TryToCompleteType(base_type_id, [&] { CARBON_DIAGNOSTIC(IncompleteTypeInMemberAccess, Error, - "Member access into object of incomplete type `{0}`.", + "member access into object of incomplete type `{0}`", SemIR::TypeId); return context.emitter().Build(base_id, IncompleteTypeInMemberAccess, base_type_id); @@ -450,7 +449,7 @@ auto PerformMemberAccess(Context& context, SemIR::LocId loc_id, } } CARBON_DIAGNOSTIC(QualifiedExprNameNotFound, Error, - "Type `{0}` does not have a member `{1}`.", + "type `{0}` does not have a member `{1}`", SemIR::TypeId, SemIR::NameId); context.emitter().Emit(loc_id, QualifiedExprNameNotFound, base_type_id, name_id); @@ -459,7 +458,7 @@ auto PerformMemberAccess(Context& context, SemIR::LocId loc_id, if (base_type_id != SemIR::TypeId::Error) { CARBON_DIAGNOSTIC(QualifiedExprUnsupported, Error, - "Type `{0}` does not support qualified expressions.", + "type `{0}` does not support qualified expressions", SemIR::TypeId); context.emitter().Emit(loc_id, QualifiedExprUnsupported, base_type_id); } @@ -508,8 +507,8 @@ auto PerformCompoundMemberAccess( // because the base expression is not used for anything. if (member_id == member_expr_id && member.type_id() != SemIR::TypeId::Error) { CARBON_DIAGNOSTIC(CompoundMemberAccessDoesNotUseBase, Error, - "Member name of type `{0}` in compound member access is " - "not an instance member or an interface member.", + "member name of type `{0}` in compound member access is " + "not an instance member or an interface member", SemIR::TypeId); context.emitter().Emit(loc_id, CompoundMemberAccessDoesNotUseBase, member.type_id()); @@ -528,8 +527,8 @@ auto PerformTupleAccess(Context& context, SemIR::LocId loc_id, auto tuple_type = context.types().TryGetAs(tuple_type_id); if (!tuple_type) { CARBON_DIAGNOSTIC(TupleIndexOnANonTupleType, Error, - "Type `{0}` does not support tuple indexing. Only " - "tuples can be indexed that way.", + "type `{0}` does not support tuple indexing; only " + "tuples can be indexed that way", SemIR::TypeId); context.emitter().Emit(loc_id, TupleIndexOnANonTupleType, tuple_type_id); return SemIR::InstId::BuiltinError; @@ -546,7 +545,7 @@ auto PerformTupleAccess(Context& context, SemIR::LocId loc_id, } else if (!index_const_id.is_template()) { // TODO: Decide what to do if the index is a symbolic constant. CARBON_DIAGNOSTIC(TupleIndexNotConstant, Error, - "Tuple index must be a constant."); + "tuple index must be a constant"); context.emitter().Emit(loc_id, TupleIndexNotConstant); return SemIR::InstId::BuiltinError; } diff --git a/toolchain/check/merge.cpp b/toolchain/check/merge.cpp index ae00a8f7b5f4..ab769ef2b323 100644 --- a/toolchain/check/merge.cpp +++ b/toolchain/check/merge.cpp @@ -11,14 +11,14 @@ namespace Carbon::Check { -CARBON_DIAGNOSTIC(RedeclPrevDecl, Note, "Previously declared here."); +CARBON_DIAGNOSTIC(RedeclPrevDecl, Note, "previously declared here"); // Diagnoses a redeclaration which is redundant. static auto DiagnoseRedundant(Context& context, Lex::TokenKind decl_kind, SemIR::NameId name_id, SemIRLoc new_loc, SemIRLoc prev_loc) -> void { CARBON_DIAGNOSTIC(RedeclRedundant, Error, - "Redeclaration of `{0} {1}` is redundant.", Lex::TokenKind, + "redeclaration of `{0} {1}` is redundant", Lex::TokenKind, SemIR::NameId); context.emitter() .Build(new_loc, RedeclRedundant, decl_kind, name_id) @@ -30,9 +30,9 @@ static auto DiagnoseRedundant(Context& context, Lex::TokenKind decl_kind, static auto DiagnoseRedef(Context& context, Lex::TokenKind decl_kind, SemIR::NameId name_id, SemIRLoc new_loc, SemIRLoc prev_loc) -> void { - CARBON_DIAGNOSTIC(RedeclRedef, Error, "Redefinition of `{0} {1}`.", + CARBON_DIAGNOSTIC(RedeclRedef, Error, "redefinition of `{0} {1}`", Lex::TokenKind, SemIR::NameId); - CARBON_DIAGNOSTIC(RedeclPrevDef, Note, "Previously defined here."); + CARBON_DIAGNOSTIC(RedeclPrevDef, Note, "previously defined here"); context.emitter() .Build(new_loc, RedeclRedef, decl_kind, name_id) .Note(prev_loc, RedeclPrevDef) @@ -44,7 +44,7 @@ static auto DiagnoseExternMismatch(Context& context, Lex::TokenKind decl_kind, SemIR::NameId name_id, SemIRLoc new_loc, SemIRLoc prev_loc) -> void { CARBON_DIAGNOSTIC(RedeclExternMismatch, Error, - "Redeclarations of `{0} {1}` must match use of `extern`.", + "redeclarations of `{0} {1}` must match use of `extern`", Lex::TokenKind, SemIR::NameId); context.emitter() .Build(new_loc, RedeclExternMismatch, decl_kind, name_id) @@ -59,7 +59,7 @@ static auto DiagnoseExternLibraryInImporter(Context& context, SemIRLoc new_loc, SemIRLoc prev_loc) -> void { CARBON_DIAGNOSTIC(ExternLibraryInImporter, Error, - "Cannot declare imported `{0} {1}` as `extern library`.", + "cannot declare imported `{0} {1}` as `extern library`", Lex::TokenKind, SemIR::NameId); context.emitter() .Build(new_loc, ExternLibraryInImporter, decl_kind, name_id) @@ -72,10 +72,10 @@ static auto DiagnoseExternLibraryIncorrect(Context& context, SemIRLoc new_loc, SemIRLoc prev_loc) -> void { CARBON_DIAGNOSTIC( ExternLibraryIncorrect, Error, - "Declaration in {0} doesn't match `extern library` declaration.", + "declaration in {0} doesn't match `extern library` declaration", SemIR::LibraryNameId); CARBON_DIAGNOSTIC(ExternLibraryExpected, Note, - "Previously declared with `extern library` here."); + "previously declared with `extern library` here"); context.emitter() .Build(new_loc, ExternLibraryIncorrect, context.sem_ir().library_id()) .Note(prev_loc, ExternLibraryExpected) @@ -86,7 +86,7 @@ auto DiagnoseExternRequiresDeclInApiFile(Context& context, SemIRLoc loc) -> void { CARBON_DIAGNOSTIC( ExternRequiresDeclInApiFile, Error, - "`extern` entities must have a declaration in the API file."); + "`extern` entities must have a declaration in the API file"); context.emitter().Build(loc, ExternRequiresDeclInApiFile).Emit(); } @@ -203,10 +203,10 @@ static auto CheckRedeclParam(Context& context, // params. auto diagnose = [&]() { CARBON_DIAGNOSTIC(RedeclParamDiffers, Error, - "Redeclaration differs at {0}parameter {1}.", + "redeclaration differs at {0}parameter {1}", llvm::StringLiteral, int32_t); CARBON_DIAGNOSTIC(RedeclParamPrevious, Note, - "Previous declaration's corresponding {0}parameter here.", + "previous declaration's corresponding {0}parameter here", llvm::StringLiteral); context.emitter() .Build(new_param_ref_id, RedeclParamDiffers, param_diag_label, @@ -269,10 +269,10 @@ static auto CheckRedeclParams(Context& context, SemIRLoc new_decl_loc, // If exactly one of the parameter lists was present, they differ. if (new_param_refs_id.is_valid() != prev_param_refs_id.is_valid()) { CARBON_DIAGNOSTIC(RedeclParamListDiffers, Error, - "Redeclaration differs because of {1}{0}parameter list.", + "redeclaration differs because of {1}{0}parameter list", llvm::StringLiteral, llvm::StringLiteral); CARBON_DIAGNOSTIC(RedeclParamListPrevious, Note, - "Previously declared with{1} {0}parameter list.", + "previously declared with{1} {0}parameter list", llvm::StringLiteral, llvm::StringLiteral); context.emitter() .Build( @@ -290,10 +290,10 @@ static auto CheckRedeclParams(Context& context, SemIRLoc new_decl_loc, if (new_param_ref_ids.size() != prev_param_ref_ids.size()) { CARBON_DIAGNOSTIC( RedeclParamCountDiffers, Error, - "Redeclaration differs because of {0}parameter count of {1}.", + "redeclaration differs because of {0}parameter count of {1}", llvm::StringLiteral, int32_t); CARBON_DIAGNOSTIC(RedeclParamCountPrevious, Note, - "Previously declared with {0}parameter count of {1}.", + "previously declared with {0}parameter count of {1}", llvm::StringLiteral, int32_t); context.emitter() .Build(new_decl_loc, RedeclParamCountDiffers, param_diag_label, @@ -367,9 +367,9 @@ static auto CheckRedeclParamSyntax(Context& context, for (auto [new_node_id, prev_node_id] : llvm::zip(new_range, prev_range)) { if (!IsNodeSyntaxEqual(context, new_node_id, prev_node_id)) { CARBON_DIAGNOSTIC(RedeclParamSyntaxDiffers, Error, - "Redeclaration syntax differs here."); + "redeclaration syntax differs here"); CARBON_DIAGNOSTIC(RedeclParamSyntaxPrevious, Note, - "Comparing with previous declaration here."); + "comparing with previous declaration here"); context.emitter() .Build(new_node_id, RedeclParamSyntaxDiffers) .Note(prev_node_id, RedeclParamSyntaxPrevious) diff --git a/toolchain/check/modifiers.cpp b/toolchain/check/modifiers.cpp index 17092bd27164..e53836fb310e 100644 --- a/toolchain/check/modifiers.cpp +++ b/toolchain/check/modifiers.cpp @@ -13,14 +13,13 @@ static auto DiagnoseNotAllowed(Context& context, Parse::NodeId modifier_node, llvm::StringRef context_string, SemIR::LocId context_loc_id) -> void { CARBON_DIAGNOSTIC(ModifierNotAllowedOn, Error, - "`{0}` not allowed on `{1}` declaration{2}.", - Lex::TokenKind, Lex::TokenKind, std::string); + "`{0}` not allowed on `{1}` declaration{2}", Lex::TokenKind, + Lex::TokenKind, std::string); auto diag = context.emitter().Build(modifier_node, ModifierNotAllowedOn, context.token_kind(modifier_node), decl_kind, context_string.str()); if (context_loc_id.is_valid()) { - CARBON_DIAGNOSTIC(ModifierNotInContext, Note, - "Containing definition here."); + CARBON_DIAGNOSTIC(ModifierNotInContext, Note, "containing definition here"); diag.Note(context_loc_id, ModifierNotInContext); } diag.Emit(); @@ -136,7 +135,7 @@ auto RestrictExternModifierOnDecl(Context& context, // This prints an error for `extern library`, but doesn't drop it because we // assume there is some other, correct value that we just don't know here. CARBON_DIAGNOSTIC(ExternLibraryIsCurrentLibrary, Error, - "`extern library` cannot specify the current library."); + "`extern library` cannot specify the current library"); context.emitter().Emit(introducer.modifier_node_id(ModifierOrder::Extern), ExternLibraryIsCurrentLibrary); introducer.extern_library = SemIR::LibraryNameId::Error; @@ -145,8 +144,8 @@ auto RestrictExternModifierOnDecl(Context& context, if (is_definition && introducer.extern_library.is_valid()) { CARBON_DIAGNOSTIC(ExternLibraryOnDefinition, Error, - "A library cannot be provided for an `extern` modifier " - "on a definition."); + "a library cannot be provided for an `extern` modifier " + "on a definition"); context.emitter().Emit(introducer.modifier_node_id(ModifierOrder::Extern), ExternLibraryOnDefinition); } diff --git a/toolchain/check/name_component.cpp b/toolchain/check/name_component.cpp index 7c92754303cd..d43d41d1154b 100644 --- a/toolchain/check/name_component.cpp +++ b/toolchain/check/name_component.cpp @@ -58,7 +58,7 @@ auto PopNameComponentWithoutParams(Context& context, Lex::TokenKind introducer) NameComponent name = PopNameComponent(context); if (name.implicit_params_id.is_valid() || name.params_id.is_valid()) { CARBON_DIAGNOSTIC(UnexpectedDeclNameParams, Error, - "`{0}` declaration cannot have parameters.", + "`{0}` declaration cannot have parameters", Lex::TokenKind); // Point to the lexically first parameter list in the diagnostic. context.emitter().Emit(name.implicit_params_id.is_valid() diff --git a/toolchain/check/return.cpp b/toolchain/check/return.cpp index aa3c495efea8..9f966fed50ec 100644 --- a/toolchain/check/return.cpp +++ b/toolchain/check/return.cpp @@ -32,7 +32,7 @@ static auto GetCurrentReturnedVar(Context& context) -> SemIR::InstId { static auto NoteNoReturnTypeProvided(Context::DiagnosticBuilder& diag, const SemIR::Function& function) { CARBON_DIAGNOSTIC(ReturnTypeOmittedNote, Note, - "There was no return type provided."); + "there was no return type provided"); diag.Note(function.latest_decl_id(), ReturnTypeOmittedNote); } @@ -41,14 +41,14 @@ static auto NoteReturnType(Context::DiagnosticBuilder& diag, const SemIR::Function& function, SemIR::TypeId return_type_id) { CARBON_DIAGNOSTIC(ReturnTypeHereNote, Note, - "Return type of function is `{0}`.", SemIR::TypeId); + "return type of function is `{0}`", SemIR::TypeId); diag.Note(function.return_storage_id, ReturnTypeHereNote, return_type_id); } // Produces a note pointing at the currently in scope `returned var`. static auto NoteReturnedVar(Context::DiagnosticBuilder& diag, SemIR::InstId returned_var_id) { - CARBON_DIAGNOSTIC(ReturnedVarHere, Note, "`returned var` was declared here."); + CARBON_DIAGNOSTIC(ReturnedVarHere, Note, "`returned var` was declared here"); diag.Note(returned_var_id, ReturnedVarHere); } @@ -69,7 +69,7 @@ auto CheckReturnedVar(Context& context, Parse::NodeId returned_node, // A `returned var` requires an explicit return type. if (!return_info.type_id.is_valid()) { CARBON_DIAGNOSTIC(ReturnedVarWithNoReturnType, Error, - "Cannot declare a `returned var` in this function."); + "cannot declare a `returned var` in this function"); auto diag = context.emitter().Build(returned_node, ReturnedVarWithNoReturnType); NoteNoReturnTypeProvided(diag, function); @@ -80,8 +80,8 @@ auto CheckReturnedVar(Context& context, Parse::NodeId returned_node, // The declared type of the var must match the return type of the function. if (return_info.type_id != type_id) { CARBON_DIAGNOSTIC(ReturnedVarWrongType, Error, - "Type `{0}` of `returned var` does not match " - "return type of enclosing function.", + "type `{0}` of `returned var` does not match " + "return type of enclosing function", SemIR::TypeId); auto diag = context.emitter().Build(type_node, ReturnedVarWrongType, type_id); @@ -103,8 +103,8 @@ auto RegisterReturnedVar(Context& context, SemIR::InstId bind_id) -> void { auto existing_id = context.scope_stack().SetReturnedVarOrGetExisting(bind_id); if (existing_id.is_valid()) { CARBON_DIAGNOSTIC(ReturnedVarShadowed, Error, - "Cannot declare a `returned var` in the scope of " - "another `returned var`."); + "cannot declare a `returned var` in the scope of " + "another `returned var`"); auto diag = context.emitter().Build(bind_id, ReturnedVarShadowed); NoteReturnedVar(diag, existing_id); diag.Emit(); @@ -118,7 +118,7 @@ auto BuildReturnWithNoExpr(Context& context, Parse::ReturnStatementId node_id) if (return_type_id.is_valid()) { CARBON_DIAGNOSTIC(ReturnStatementMissingExpr, Error, - "Missing return value."); + "missing return value"); auto diag = context.emitter().Build(node_id, ReturnStatementMissingExpr); NoteReturnType(diag, function, return_type_id); diag.Emit(); @@ -138,7 +138,7 @@ auto BuildReturnWithExpr(Context& context, Parse::ReturnStatementId node_id, if (!return_info.type_id.is_valid()) { CARBON_DIAGNOSTIC( ReturnStatementDisallowExpr, Error, - "No return expression should be provided in this context."); + "no return expression should be provided in this context"); auto diag = context.emitter().Build(node_id, ReturnStatementDisallowExpr); NoteNoReturnTypeProvided(diag, function); diag.Emit(); @@ -146,7 +146,7 @@ auto BuildReturnWithExpr(Context& context, Parse::ReturnStatementId node_id, } else if (returned_var_id.is_valid()) { CARBON_DIAGNOSTIC( ReturnExprWithReturnedVar, Error, - "Can only `return var;` in the scope of a `returned var`."); + "can only `return var;` in the scope of a `returned var`"); auto diag = context.emitter().Build(node_id, ReturnExprWithReturnedVar); NoteReturnedVar(diag, returned_var_id); diag.Emit(); @@ -174,7 +174,7 @@ auto BuildReturnVar(Context& context, Parse::ReturnStatementId node_id) if (!returned_var_id.is_valid()) { CARBON_DIAGNOSTIC(ReturnVarWithNoReturnedVar, Error, - "`return var;` with no `returned var` in scope."); + "`return var;` with no `returned var` in scope"); context.emitter().Emit(node_id, ReturnVarWithNoReturnedVar); returned_var_id = SemIR::InstId::BuiltinError; } diff --git a/toolchain/check/sem_ir_diagnostic_converter.cpp b/toolchain/check/sem_ir_diagnostic_converter.cpp index 74c2be1d5456..131fd3829032 100644 --- a/toolchain/check/sem_ir_diagnostic_converter.cpp +++ b/toolchain/check/sem_ir_diagnostic_converter.cpp @@ -47,7 +47,7 @@ auto SemIRDiagnosticConverter::ConvertLoc(SemIRLoc loc, // TODO: Add an "In implicit import of prelude." note for the case where we // don't have a location. if (import_loc_id.is_valid()) { - CARBON_DIAGNOSTIC(InImport, Note, "In import."); + CARBON_DIAGNOSTIC(InImport, Note, "in import"); context_fn(in_import_loc, InImport); } diff --git a/toolchain/check/testdata/alias/fail_bool_value.carbon b/toolchain/check/testdata/alias/fail_bool_value.carbon index 57f028c180a6..84b1e63a3cba 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: Alias initializer must be a name reference. +// CHECK:STDERR: fail_bool_value.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference // 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 7874e0160228..dc169cd29aa5 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: Alias initializer must be a name reference. +// CHECK:STDERR: fail_builtins.carbon:[[@LINE+4]]:11: error: alias initializer must be a name reference // CHECK:STDERR: alias a = i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: alias a = i32; -// CHECK:STDERR: fail_builtins.carbon:[[@LINE+3]]:11: ERROR: Alias initializer must be a name reference. +// CHECK:STDERR: fail_builtins.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference // 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 9e166a5a3ba3..69ce51afd902 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: 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.` // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+7]]:11: ERROR: 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.` // CHECK:STDERR: alias a = true or false; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+3]]:11: ERROR: Alias initializer must be a name reference. +// CHECK:STDERR: fail_control_flow.carbon:[[@LINE+3]]:11: error: alias initializer must be a name reference // 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 fce46c348ae0..f1f047cd98a0 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: Name `C` not found. +// CHECK:STDERR: fail_orig_name_not_in_export.carbon:[[@LINE+3]]:8: error: name `C` not found // 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 d6155b659676..73f2d897efe8 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: 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 // 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 84d49d7370f2..9656040f434d 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: Name `NS` not found. + // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+8]]:9: error: name `NS` not found // CHECK:STDERR: alias NS.a = {}; // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+4]]:16: ERROR: 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 // CHECK:STDERR: alias NS.a = {}; // CHECK:STDERR: ^~ // CHECK:STDERR: alias NS.a = {}; - // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+3]]:10: ERROR: Name `a` not found. + // CHECK:STDERR: fail_local_in_namespace.carbon:[[@LINE+3]]:10: error: name `a` not found // 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 7d47bba4016d..1311b72c89df 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: `abstract` not allowed on `alias` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:1: error: `abstract` not allowed on `alias` declaration // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:10: ERROR: `base` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:10: error: `base` not allowed on declaration with `abstract` // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:15: ERROR: `default` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:15: error: `default` not allowed on declaration with `abstract` // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:23: ERROR: `final` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:23: error: `final` not allowed on declaration with `abstract` // CHECK:STDERR: abstract base default final alias A = Class; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here // 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: `impl` not allowed on `alias` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `impl` not allowed on `alias` declaration // CHECK:STDERR: impl alias B = Class; // CHECK:STDERR: ^~~~ // CHECK:STDERR: impl alias B = Class; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: ERROR: `extern` not allowed on `alias` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `extern` not allowed on `alias` declaration // 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 d1fd15f7c0c2..102ea3407174 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: 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 // CHECK:STDERR: var a: C = {}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:7: Name is previously declared here. +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:7: name is previously declared here // 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: 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 // CHECK:STDERR: alias b = C; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:5: Name is previously declared here. +// CHECK:STDERR: fail_name_conflict.carbon:[[@LINE-4]]:5: name is previously declared here // 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 68cbb84fd9eb..8817318f323a 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: Alias initializer must be a name reference. + // CHECK:STDERR: fail_not_constant.carbon:[[@LINE+3]]:13: error: alias initializer must be a name reference // 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 bb8639e5a371..1077c382900e 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: `alias` declaration cannot have parameters. +// CHECK:STDERR: fail_params.carbon:[[@LINE+7]]:8: error: `alias` declaration cannot have parameters // CHECK:STDERR: alias A(T:! type) = T*; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_params.carbon:[[@LINE+3]]:21: ERROR: Alias initializer must be a name reference. +// CHECK:STDERR: fail_params.carbon:[[@LINE+3]]:21: error: alias initializer must be a name reference // 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 2494c159a482..c844973f2823 100644 --- a/toolchain/check/testdata/alias/no_prelude/import.carbon +++ b/toolchain/check/testdata/alias/no_prelude/import.carbon @@ -58,10 +58,10 @@ var b: () = a_alias; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_var3.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_var3.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import library "var2"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: var2.carbon:8:5: ERROR: Semantics TODO: `Non-constant ImportRefLoaded (comes up with var)`. +// CHECK:STDERR: var2.carbon:8:5: error: semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` // 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 1c4aac6aa407..3edfd8234e2e 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: Name `A` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:11: error: name `A` not found // 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: Name `A` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:11: error: name `A` not found // 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 0713970c02de..f09108c91ed8 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: Array bound of -1 is negative. +// CHECK:STDERR: fail_bound_negative.carbon:[[@LINE+3]]:14: error: array bound of -1 is negative // 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 cda82f13c9c3..ce45093a4c50 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: 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 // CHECK:STDERR: var a: [i32; 39999999999999999993]; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var a: [i32; 39999999999999999993]; -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+10]]:9: ERROR: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+10]]:9: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: var b: [1; 39999999999999999993]; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+7]]:9: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: var b: [1; 39999999999999999993]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bound_overflow.carbon:[[@LINE+3]]:12: ERROR: 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 // 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 33c3c7db833c..07f63b3f4462 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: Variable has incomplete type `[Incomplete; 1]`. +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE+6]]:8: error: Variable has incomplete type `[Incomplete; 1]` // CHECK:STDERR: var a: [Incomplete; 1]; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: Class was forward declared here. +// CHECK:STDERR: fail_incomplete_element.carbon:[[@LINE-5]]:1: class was forward declared here // 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 1c4a9aa520b0..8fb92850b7e5 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: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+6]]:9: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: var a: [1; 1]; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_invalid_type.carbon:[[@LINE+3]]:9: type `i32` does not implement interface `ImplicitAs` // 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 225359a78bfc..7561abffffc8 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: Cannot initialize array of 1 element(s) from 3 initializer(s). +// CHECK:STDERR: fail_out_of_bound.carbon:[[@LINE+3]]:19: error: cannot initialize array of 1 element(s) from 3 initializer(s) // 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 634c05339ce0..63864b398e28 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: 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]` // 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 47ea8bff664f..61801716b913 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: Cannot implicitly convert from `String` to `i32`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` // CHECK:STDERR: var a: [i32; 3] = (1, "Hello", "World"); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: Type `String` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: type `String` does not implement interface `ImplicitAs` // 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: Cannot implicitly convert from `String` to `i32`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+7]]:19: error: cannot implicitly convert from `String` to `i32` // CHECK:STDERR: var b: [i32; 3] = t1; // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: Type `String` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: type `String` does not implement interface `ImplicitAs` // 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: Cannot initialize array of 3 element(s) from 2 initializer(s). +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+4]]:19: error: cannot initialize array of 3 element(s) from 2 initializer(s) // 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: Cannot initialize array of 3 element(s) from tuple with 2 element(s). +// CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:19: error: cannot initialize array of 3 element(s) from tuple with 2 element(s). // 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 e0e567d4be0e..6c071fe92485 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: Semantics TODO: `HandleArrayExprWithoutBounds`. +// CHECK:STDERR: fail_undefined_bound.carbon:[[@LINE+3]]:8: error: semantics TODO: `HandleArrayExprWithoutBounds` // 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 13fbdcd9ecbd..5330d9fa01d4 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: Cannot copy value of type `B`. +// CHECK:STDERR: fail_init_class.carbon:[[@LINE+4]]:17: error: cannot copy value of type `B` // 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: 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` // CHECK:STDERR: var b: B = {.x = 1} as B; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+3]]:12: Type `{.x: i32}` does not implement interface `As`. +// CHECK:STDERR: fail_adapt_init_from_struct.carbon:[[@LINE+3]]:12: type `{.x: i32}` does not implement interface `As` // 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 73a17a6abf98..c255da428bd0 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: 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` // CHECK:STDERR: let n: (i32, i32) = 1 as (i32, i32); // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+3]]:21: Type `i32` does not implement interface `As`. +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+3]]:21: type `i32` does not implement interface `As` // 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 12510f08baeb..766b29af8c41 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: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+6]]:19: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: let n: i32 = 1 as 2; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_not_type.carbon:[[@LINE+3]]:19: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+3]]:19: type `i32` does not implement interface `ImplicitAs` // 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 024e3b04f5ec..10b3caab7ceb 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: 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` // CHECK:STDERR: fn Run() -> String {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_run.carbon:[[@LINE+3]]:21: ERROR: 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 // 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 5aae129a323f..4391cf2427b4 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: 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` // 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 d6e04bd51244..5b3b25f5e927 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: 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` // CHECK:STDERR: var x: type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:1: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_non_type_as_type.carbon:[[@LINE+3]]:1: type `i32` does not implement interface `ImplicitAs` // 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 117c7499332d..35f316a0b018 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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 623cb71dfedd..43b35faae3bd 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: Type `i32` does not support qualified expressions. +// CHECK:STDERR: fail_qualifier_unsupported.carbon:[[@LINE+3]]:14: error: type `i32` does not support qualified expressions // 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 77e0d4ea114d..f66c859c9e12 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: Name `x` not found. + // CHECK:STDERR: fail_name_lookup.carbon:[[@LINE+3]]:3: error: name `x` not found // 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 9442fb697e78..27a1e1738803 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: Name `i0` not found. +// CHECK:STDERR: fail_iN_bad_width.carbon:[[@LINE+4]]:14: error: name `i0` not found // 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: Name `u0` not found. +// CHECK:STDERR: fail_uN_bad_width.carbon:[[@LINE+4]]:14: error: name `u0` not found // 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: Name `f0` not found. +// CHECK:STDERR: fail_fN_bad_width.carbon:[[@LINE+4]]:14: error: name `f0` not found // 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: 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` // 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: 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` // 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 7853e6d9bea2..1651d5eb3355 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: Invalid signature for builtin function "float.add". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.add" // 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: Invalid signature for builtin function "float.add". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.add" // 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: Invalid signature for builtin function "float.add". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.add" // 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 a7f1a897857a..830c2c9ce7d7 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: Invalid signature for builtin function "float.div". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.div" // 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: Invalid signature for builtin function "float.div". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.div" // 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: Invalid signature for builtin function "float.div". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.div" // 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 be57cdec1987..c9bee6442ea5 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: Invalid signature for builtin function "float.eq". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.eq" // 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 e03029056c98..afcc3fc0a6a4 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: Bit width must be 64. +// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+4]]:20: error: bit width must be 64 // 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_invalid_size.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression // 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 d36cf7f2cd98..d3cb45ee31dd 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: Invalid signature for builtin function "float.mul". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.mul" // 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: Invalid signature for builtin function "float.mul". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.mul" // 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: Invalid signature for builtin function "float.mul". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.mul" // 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 39f316fb2c39..29dcb5eb5c77 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: Invalid signature for builtin function "float.negate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" // 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: Invalid signature for builtin function "float.negate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" // 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: Invalid signature for builtin function "float.negate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.negate" // 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: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: calling function declared here // 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: 3 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: calling function declared here // 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: 2 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: calling function declared here // 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 c242b7f458ca..6ba9f1c068f6 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: Invalid signature for builtin function "float.neq". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.neq" // 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 18bfced36cc3..c8889225a2b0 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: Invalid signature for builtin function "float.sub". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.sub" // 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: Invalid signature for builtin function "float.sub". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "float.sub" // 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: Invalid signature for builtin function "float.sub". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "float.sub" // 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 fa72169032c1..1a7a11974eb5 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: Invalid signature for builtin function "int.eq". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+3]]:1: error: invalid signature for builtin function "int.eq" // 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 d64afa18b016..036c8e062fd1 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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 10f63efd2729..8de12f277622 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: 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 // 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: 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 // 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: 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 // 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 c25127819dfb..c03c9536c5bc 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: 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 // 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: 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 // 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: 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 // 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 5af956319ccf..5c5432de29c2 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: 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 // 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: 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 // 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: 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 // 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 6847786f5b9d..319e98b307bd 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: Invalid signature for builtin function "int.sadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" // 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: Invalid signature for builtin function "int.sadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" // 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: Invalid signature for builtin function "int.sadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.sadd" // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant // 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: 3 argument(s) passed to function expecting 2 argument(s). +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 3 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: Calling function declared here. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: calling function declared here // 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: Integer overflow in calculation 2147483647 + 1. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 2147483647 + 1 // 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 f4f8f018ff7e..381fca524640 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: Integer overflow in calculation -2147483648 / -1. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 / -1 // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero // 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 a34a0618c8bf..269c7341ed98 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: Integer overflow in calculation -2147483648 % -1. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+4]]:14: error: integer overflow in calculation -2147483648 % -1 // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero // 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 6ce2d5f6d867..67904722720f 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: Integer overflow in calculation 32768 * 65536. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation 32768 * 65536 // 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 89bbc9e4fdfe..9b58a5843c9b 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: Invalid signature for builtin function "int.snegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" // 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: Invalid signature for builtin function "int.snegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" // 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: Invalid signature for builtin function "int.snegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.snegate" // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant // 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: 2 argument(s) passed to function expecting 1 argument(s). +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: Calling function declared here. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: calling function declared here // 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: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: calling function declared here // 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: 3 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: calling function declared here // 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: 2 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: calling function declared here // 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: Integer overflow in negation of -2147483648. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in negation of -2147483648 // 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 4baf7878e216..1bea35887db1 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: Integer overflow in calculation -2147483647 - 2. +// CHECK:STDERR: fail_overflow.carbon:[[@LINE+3]]:14: error: integer overflow in calculation -2147483647 - 2 // 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 0a689c42352b..fd365e59d9e4 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: Invalid signature for builtin function "int.uadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" // 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: Invalid signature for builtin function "int.uadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" // 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: Invalid signature for builtin function "int.uadd". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.uadd" // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant // 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: 3 argument(s) passed to function expecting 2 argument(s). +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:21: error: 3 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: Calling function declared here. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: calling function declared here // 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 5e8468e86ff2..d2cbf673a187 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero // 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 49e61afb58fc..70c79bde287c 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+4]]:14: error: division by zero // 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: Division by zero. +// CHECK:STDERR: fail_div_by_zero.carbon:[[@LINE+3]]:14: error: division by zero // 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 fe1f46014892..290dde45c903 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: Invalid signature for builtin function "int.unegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" // 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: Invalid signature for builtin function "int.unegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" // 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: Invalid signature for builtin function "int.unegate". +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:1: error: invalid signature for builtin function "int.unegate" // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:20: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:21: error: array bound is not a constant // 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: Array bound is not a constant. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+4]]:28: error: array bound is not a constant // 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: 2 argument(s) passed to function expecting 1 argument(s). +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:21: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)]; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: Calling function declared here. +// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: calling function declared here // 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: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: return TooFew(a); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: calling function declared here // 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: 3 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+7]]:10: error: 3 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return TooMany(a, b, c); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: calling function declared here // 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: 2 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE+6]]:10: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: return BadReturnType(a, b); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: Calling function declared here. + // CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: calling function declared here // 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 76895b6e424a..8335269b67a0 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: 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` // CHECK:STDERR: let radius: i32 = circle.radius; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-17]]:15: The private member `radius` is defined here. + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-17]]:15: the private member `radius` is defined here // 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: 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` // CHECK:STDERR: circle.radius = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-25]]:15: The private member `radius` is defined here. + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-25]]:15: the private member `radius` is defined here // CHECK:STDERR: private var radius: i32; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: circle.radius = 5; - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE+7]]:3: ERROR: 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` // CHECK:STDERR: circle.SOME_INTERNAL_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-32]]:15: The private member `SOME_INTERNAL_CONSTANT` is defined here. + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-32]]:15: the private member `SOME_INTERNAL_CONSTANT` is defined here // 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: 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` // CHECK:STDERR: circle.SomeInternalFunction(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-39]]:3: The private member `SomeInternalFunction` is defined here. + // CHECK:STDERR: fail_private_field_access.carbon:[[@LINE-39]]:3: the private member `SomeInternalFunction` is defined here // 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: 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` // CHECK:STDERR: let x: i32 = A.x; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE-7]]:17: The protected member `x` is defined here. + // CHECK:STDERR: fail_protected_field_access.carbon:[[@LINE-7]]:17: the protected member `x` is defined here // 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: 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` // CHECK:STDERR: let x: i32 = A.x; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_global_access.carbon:[[@LINE-7]]:17: The protected member `x` is defined here. +// CHECK:STDERR: fail_global_access.carbon:[[@LINE-7]]:17: the protected member `x` is defined here // 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: 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` // CHECK:STDERR: let y: i32 = A.y; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_global_access.carbon:[[@LINE-14]]:15: The private member `y` is defined here. +// CHECK:STDERR: fail_global_access.carbon:[[@LINE-14]]:15: the private member `y` is defined here // 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 e1947841ebbc..ac11debbec06 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: Name `F` not found. + // CHECK:STDERR: fail_not_extend.carbon:[[@LINE+3]]:3: error: name `F` not found // 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 a4079d9c7d32..7a3cdf4005a4 100644 --- a/toolchain/check/testdata/class/cross_package_import.carbon +++ b/toolchain/check/testdata/class/cross_package_import.carbon @@ -48,13 +48,13 @@ library "[[@TEST_NAME]]"; import Other library "other_extern"; -// CHECK:STDERR: fail_extern.carbon:[[@LINE+10]]:8: ERROR: Variable has incomplete type `C`. +// CHECK:STDERR: fail_extern.carbon:[[@LINE+10]]:8: error: Variable has incomplete type `C` // CHECK:STDERR: var c: Other.C = {}; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import Other library "other_extern"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_extern.carbon:4:1: Class was forward declared here. +// CHECK:STDERR: other_extern.carbon:4:1: class was forward declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -64,22 +64,22 @@ var c: Other.C = {}; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import Other library "other_define"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_extern.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: other_extern.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import Other library "other_define"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_define.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: other_define.carbon:4:1: name is previously declared here // 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: In name lookup for `C`. +// CHECK:STDERR: fail_todo_merge_define_extern.carbon:[[@LINE+4]]:8: in name lookup for `C` // CHECK:STDERR: var c: Other.C = {}; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -89,22 +89,22 @@ var c: Other.C = {}; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import Other library "other_define"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_conflict.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: other_conflict.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn C() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import Other library "other_define"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_define.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: other_define.carbon:4:1: name is previously declared here // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ import Other library "other_define"; import Other library "other_conflict"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+3]]:8: In name lookup for `C`. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+3]]:8: in name lookup for `C` // 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 bfd62196c069..8e5542222825 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: 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` // CHECK:STDERR: a.F(); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: Type `SomeClassAdapter` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE+7]]:3: type `SomeClassAdapter` does not implement interface `ImplicitAs` // CHECK:STDERR: a.F(); // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE-14]]:8: Initializing `self` parameter of method declared here. + // CHECK:STDERR: fail_todo_method_access.carbon:[[@LINE-14]]:8: initializing `self` parameter of method declared here // 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: 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` // CHECK:STDERR: return a.b; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: Type `SomeClassAdapter` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_todo_field_access.carbon:[[@LINE+4]]:10: type `SomeClassAdapter` does not implement interface `ImplicitAs` // 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: Semantics TODO: `extending non-class type`. + // CHECK:STDERR: fail_todo_adapt_non_class.carbon:[[@LINE+3]]:3: error: semantics TODO: `extending non-class type` // 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 c4ba94f9e273..0d7a5557d6b9 100644 --- a/toolchain/check/testdata/class/fail_abstract.carbon +++ b/toolchain/check/testdata/class/fail_abstract.carbon @@ -20,7 +20,7 @@ class Derived { fn Make() -> Derived { // TODO: This should be valid, and should construct an instance of `partial Abstract` as the base. - // CHECK:STDERR: fail_abstract.carbon:[[@LINE+3]]:19: ERROR: Cannot construct instance of abstract class. Consider using `partial Abstract` instead. + // CHECK:STDERR: fail_abstract.carbon:[[@LINE+3]]:19: error: cannot construct instance of abstract class; consider using `partial Abstract` instead // CHECK:STDERR: return {.base = {.a = 1}, .d = 7}; // CHECK:STDERR: ^~~~~~~~ return {.base = {.a = 1}, .d = 7}; diff --git a/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon b/toolchain/check/testdata/class/fail_adapt_bad_decl.carbon index ed109914262a..cf58f8dbbb94 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: Cannot implicitly convert from `i32` to `type`. + // CHECK:STDERR: fail_not_type.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: adapt 100; // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:3: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: adapt 100; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: adapt 100; } -// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:18: ERROR: Name `F` not found. +// CHECK:STDERR: fail_not_type.carbon:[[@LINE+4]]:18: error: name `F` not found // 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: 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` // CHECK:STDERR: extend adapt 100; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_extend_not_type.carbon:[[@LINE+4]]:3: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: extend adapt 100; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -53,7 +53,7 @@ library "[[@TEST_NAME]]"; class MultipleAdapts { adapt (); - // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: ERROR: Multiple `adapt` declarations in class. + // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error: Multiple `adapt` declarations in class. // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: Previous `adapt` declaration is here. @@ -65,7 +65,7 @@ class MultipleAdapts { class MultipleAdaptsSameType { adapt (); - // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: ERROR: Multiple `adapt` declarations in class. + // CHECK:STDERR: fail_repeated.carbon:[[@LINE+7]]:3: error: Multiple `adapt` declarations in class. // CHECK:STDERR: adapt (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_repeated.carbon:[[@LINE-4]]:3: Previous `adapt` declaration is here. @@ -79,14 +79,14 @@ class MultipleAdaptsSameType { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:1: ERROR: `adapt` declaration can only be used in a class. +// CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:1: error: `adapt` declaration can only be used in a class. // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: adapt {}; interface I { - // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:3: ERROR: `adapt` declaration can only be used in a class. + // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+4]]:3: error: `adapt` declaration can only be used in a class. // 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: `adapt` declaration can only be used in a class. + // CHECK:STDERR: fail_bad_scope.carbon:[[@LINE+3]]:5: error: `adapt` declaration can only be used in a class. // 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 81667f95e934..80da74081e27 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: Adapted type `Incomplete` is an incomplete type. + // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE+6]]:3: error: Adapted type `Incomplete` is an incomplete type. // CHECK:STDERR: adapt Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE-6]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete_type.carbon:[[@LINE-6]]:1: class was forward declared here // 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 02d0fd120c06..1082b8403267 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: `private` not allowed on `adapt` declaration. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `private` not allowed on `adapt` declaration // 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: `abstract` not allowed on `adapt` declaration. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `abstract` not allowed on `adapt` declaration // 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: `default` not allowed on `adapt` declaration. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `adapt` declaration // 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: `extend` repeated on declaration. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+7]]:10: error: `extend` repeated on declaration // CHECK:STDERR: extend extend adapt B; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: `extend` previously appeared here. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+4]]:3: `extend` previously appeared here // 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: `base` not allowed on declaration with `extend`. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+6]]:10: error: `base` not allowed on declaration with `extend` // CHECK:STDERR: extend base adapt B; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+3]]:3: `extend` previously appeared here. + // CHECK:STDERR: fail_adapt_modifiers.carbon:[[@LINE+3]]:3: `extend` previously appeared here // CHECK:STDERR: extend base adapt B; // CHECK:STDERR: ^~~~~~ extend base adapt B; diff --git a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon index c8bc3ccefecb..b00025a1949a 100644 --- a/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon +++ b/toolchain/check/testdata/class/fail_adapt_with_subobjects.carbon @@ -15,7 +15,7 @@ library "[[@TEST_NAME]]"; base class Base {} class AdaptWithBase { - // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+3]]:3: ERROR: Adapter cannot have a base class. + // CHECK:STDERR: fail_adapt_with_base.carbon:[[@LINE+3]]:3: error: Adapter cannot have a base class. // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; @@ -31,7 +31,7 @@ class AdaptWithBase { library "[[@TEST_NAME]]"; class AdaptWithField { - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: ERROR: Adapter cannot have fields. + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error: Adapter cannot have fields. // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; @@ -43,7 +43,7 @@ class AdaptWithField { } class AdaptWithFields { - // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: ERROR: Adapter cannot have fields. + // CHECK:STDERR: fail_adapt_with_fields.carbon:[[@LINE+3]]:3: error: Adapter cannot have fields. // CHECK:STDERR: adapt i32; // CHECK:STDERR: ^~~~~~~~~~ adapt i32; @@ -65,7 +65,7 @@ base class Base {} class AdaptWithBaseAndFields { extend base: Base; var n: i32; - // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE+6]]:3: ERROR: Adapter cannot have a base class. + // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE+6]]:3: error: Adapter cannot have a base class. // CHECK:STDERR: adapt {}; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_adapt_with_base_and_fields.carbon:[[@LINE-5]]:3: `base` declaration is here. diff --git a/toolchain/check/testdata/class/fail_addr_not_self.carbon b/toolchain/check/testdata/class/fail_addr_not_self.carbon index 3163ab640b91..c2b1fdfd504b 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: `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 // 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: `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 // 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 2b68e65e2774..fcb0575c4f62 100644 --- a/toolchain/check/testdata/class/fail_addr_self.carbon +++ b/toolchain/check/testdata/class/fail_addr_self.carbon @@ -14,19 +14,19 @@ class Class { } fn F(c: Class, p: Class*) { - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+7]]:6: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+7]]:6: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: c.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-8]]:13: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-8]]:13: initializing `addr self` parameter of method declared here // CHECK:STDERR: fn F[addr self: Class*](); // CHECK:STDERR: ^~~~ // CHECK:STDERR: c.F(); - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+7]]:6: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+7]]:6: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: c.G(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-16]]:13: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-16]]:13: initializing `addr self` parameter of method declared here // CHECK:STDERR: fn G[addr self: Class](); // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -35,13 +35,13 @@ fn F(c: Class, p: Class*) { // This call is OK. (*p).F(); - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+9]]:3: ERROR: Cannot implicitly convert from `Class*` to `Class`. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `Class*` to `Class` // CHECK:STDERR: (*p).G(); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+6]]:3: Type `Class*` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE+6]]:3: type `Class*` does not implement interface `ImplicitAs` // CHECK:STDERR: (*p).G(); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-31]]:13: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_addr_self.carbon:[[@LINE-31]]:13: initializing `addr self` parameter of method declared here // CHECK:STDERR: fn G[addr self: Class](); // CHECK:STDERR: ^~~~ (*p).G(); 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 d81edeffcdd5..297a51e05402 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: `.` should be followed by a name. +// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+7]]:6: error: `.` should be followed by a name // CHECK:STDERR: fn N.base() {} // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+3]]:6: ERROR: Semantics TODO: `HandleInvalidParse`. +// CHECK:STDERR: fail_base_as_declared_name.carbon:[[@LINE+3]]:6: error: semantics TODO: `HandleInvalidParse` // 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 7dc931f9113b..0836614919aa 100644 --- a/toolchain/check/testdata/class/fail_base_bad_type.carbon +++ b/toolchain/check/testdata/class/fail_base_bad_type.carbon @@ -14,7 +14,7 @@ class Final { } class DeriveFromError { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: ERROR: Name `error` not found. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: error: name `error` not found // CHECK:STDERR: extend base: error; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -25,10 +25,10 @@ class DeriveFromError { fn AccessMemberWithInvalidBaseError(p: DeriveFromError*) -> i32 { return (*p).n; } class DeriveFromNonType { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:16: ERROR: Cannot implicitly convert from `i32` to `type`. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:16: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: extend base: 32; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: extend base: 32; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -38,7 +38,7 @@ class DeriveFromNonType { fn AccessMemberWithInvalidBasNonType(p: DeriveFromNonType*) -> i32 { return (*p).n; } class DeriveFromi32 { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: ERROR: Deriving from final type `i32`. Base type must be an `abstract` or `base` class. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: error: Deriving from final type `i32`. Base type must be an `abstract` or `base` class. // CHECK:STDERR: extend base: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: @@ -47,10 +47,10 @@ class DeriveFromi32 { // It's not really important whether this conversion produces an error or not, // but it shouldn't crash. -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:53: ERROR: Cannot implicitly convert from `DeriveFromi32*` to `i32*`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:53: error: cannot implicitly convert from `DeriveFromi32*` to `i32*` // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:53: Type `DeriveFromi32*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:53: type `DeriveFromi32*` does not implement interface `ImplicitAs` // CHECK:STDERR: fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -59,17 +59,17 @@ fn ConvertToBadBasei32(p: DeriveFromi32*) -> i32* { return p; } fn AccessMemberWithInvalidBasei32(p: DeriveFromi32*) -> i32 { return (*p).n; } class DeriveFromTuple { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: ERROR: Deriving from final type `(Base,)`. Base type must be an `abstract` or `base` class. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: error: Deriving from final type `(Base,)`. Base type must be an `abstract` or `base` class. // CHECK:STDERR: extend base: (Base,); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: extend base: (Base,); } -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:61: ERROR: Cannot implicitly convert from `DeriveFromTuple*` to `(Base,)*`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:61: error: cannot implicitly convert from `DeriveFromTuple*` to `(Base,)*` // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:61: Type `DeriveFromTuple*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:61: type `DeriveFromTuple*` does not implement interface `ImplicitAs` // CHECK:STDERR: fn ConvertToBadBaseTuple(p: DeriveFromTuple*) -> (Base,)* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -80,17 +80,17 @@ 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_base_bad_type.carbon:[[@LINE+4]]:16: ERROR: Deriving from final type `{.a: i32, .b: i32}`. Base type must be an `abstract` or `base` class. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: error: Deriving from final type `{.a: i32, .b: i32}`. Base type must be an `abstract` or `base` class. // CHECK:STDERR: extend base: {.a: i32, .b: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: {.a: i32, .b: i32}; } -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:74: ERROR: Cannot implicitly convert from `DeriveFromStruct*` to `{.a: i32, .b: i32}*`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:74: error: cannot implicitly convert from `DeriveFromStruct*` to `{.a: i32, .b: i32}*` // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:74: Type `DeriveFromStruct*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:74: type `DeriveFromStruct*` does not implement interface `ImplicitAs` // CHECK:STDERR: fn ConvertToBadBaseStruct(p: DeriveFromStruct*) -> {.a: i32, .b: i32}* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -102,20 +102,20 @@ fn AccessMemberWithInvalidBaseStruct(p: DeriveFromStruct*) -> i32 { return (*p). base class Incomplete; class DeriveFromIncomplete { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:16: ERROR: Base `Incomplete` is an incomplete type. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:16: error: Base `Incomplete` is an incomplete type. // CHECK:STDERR: extend base: Incomplete; // CHECK:STDERR: ^~~~~~~~~~ - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE-6]]:1: Class was forward declared here. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE-6]]:1: class was forward declared here // CHECK:STDERR: base class Incomplete; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: Incomplete; } -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:74: ERROR: Cannot implicitly convert from `DeriveFromIncomplete*` to `Incomplete*`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+7]]:74: error: cannot implicitly convert from `DeriveFromIncomplete*` to `Incomplete*` // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:74: Type `DeriveFromIncomplete*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:74: type `DeriveFromIncomplete*` does not implement interface `ImplicitAs` // CHECK:STDERR: fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return p; } // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -124,7 +124,7 @@ fn ConvertToBadBaseIncomplete(p: DeriveFromIncomplete*) -> Incomplete* { return fn AccessMemberWithInvalidBaseIncomplete(p: DeriveFromIncomplete*) -> i32 { return (*p).n; } class DeriveFromFinal { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: ERROR: Deriving from final type `Final`. Base type must be an `abstract` or `base` class. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+4]]:16: error: Deriving from final type `Final`. Base type must be an `abstract` or `base` class. // CHECK:STDERR: extend base: Final; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: @@ -141,7 +141,7 @@ fn AccessMemberWithInvalidBaseFinal_WithMember(p: DeriveFromFinal*) -> i32 { } fn AccessMemberWithInvalidBaseFinal_NoMember(p: DeriveFromFinal*) -> i32 { - // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+3]]:10: ERROR: Name `b` not found. + // CHECK:STDERR: fail_base_bad_type.carbon:[[@LINE+3]]:10: error: name `b` not found // 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 b44b03cc34ac..5a46e0ec12dc 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: 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 // CHECK:STDERR: fn D.F() {} // CHECK:STDERR: ^ // CHECK:STDERR: fn D.F() {} -// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+3]]:6: ERROR: Name `C` not found. +// CHECK:STDERR: fail_base_method_define.carbon:[[@LINE+3]]:6: error: name `C` not found // 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 34b1107a7c85..9164de8aee8a 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: `base` declaration can only be used in a class. +// CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+4]]:1: error: `base` declaration can only be used in a class. // CHECK:STDERR: extend base: B; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: extend base: B; fn F() { - // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+7]]:3: ERROR: Expected expression. + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+7]]:3: error: expected expression // CHECK:STDERR: extend base: B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: ERROR: Semantics TODO: `HandleInvalidParse`. + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error: semantics TODO: `HandleInvalidParse` // 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 64025c787c7b..95ed651eb30c 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: `private` not allowed on `base` declaration. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error: `private` not allowed on `base` declaration // 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: `abstract` not allowed on `base` declaration. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+8]]:3: error: `abstract` not allowed on `base` declaration // CHECK:STDERR: abstract base: B; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: ERROR: Missing `extend` before `base` declaration in class. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: error: Missing `extend` before `base` declaration in class. // 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: `default` not allowed on declaration with `extend`. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+7]]:10: error: `default` not allowed on declaration with `extend` // CHECK:STDERR: extend default base: B; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: `extend` previously appeared here. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+4]]:3: `extend` previously appeared here // 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: `extend` repeated on declaration. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+6]]:10: error: `extend` repeated on declaration // CHECK:STDERR: extend extend base: B; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+3]]:3: `extend` previously appeared here. + // CHECK:STDERR: fail_base_modifiers.carbon:[[@LINE+3]]:3: `extend` previously appeared here // 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 0b6441fa741a..00e25dc29a56 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: Missing `extend` before `base` declaration in class. + // CHECK:STDERR: fail_base_no_extend.carbon:[[@LINE+3]]:3: error: Missing `extend` before `base` declaration in class. // 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 8601b581ace8..9c1398e139b0 100644 --- a/toolchain/check/testdata/class/fail_base_repeated.carbon +++ b/toolchain/check/testdata/class/fail_base_repeated.carbon @@ -13,7 +13,7 @@ base class B2 {} class C { extend base: B1; - // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE+7]]:3: ERROR: 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. // CHECK:STDERR: extend base: B2; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: Previous `base` declaration is here. @@ -26,7 +26,7 @@ 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: 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. // CHECK:STDERR: extend base: B1; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_base_repeated.carbon:[[@LINE-4]]:3: Previous `base` declaration is here. diff --git a/toolchain/check/testdata/class/fail_base_unbound.carbon b/toolchain/check/testdata/class/fail_base_unbound.carbon index 329a6909dbff..543e41f2d71a 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: Expression cannot be used as a value. +// CHECK:STDERR: fail_base_unbound.carbon:[[@LINE+3]]:12: error: expression cannot be used as a value // 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 728dc4c650aa..b9c3458e346d 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: 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` // CHECK:STDERR: return a.(B.b); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+3]]:10: Type `A` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_compound_type_mismatch.carbon:[[@LINE+3]]:10: type `A` does not implement interface `ImplicitAs` // 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 f53f2c4827e1..dac1d7b42048 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: Name `NoSuchType` not found. + // CHECK:STDERR: fail_convert_to_invalid.carbon:[[@LINE+3]]:10: error: name `NoSuchType` not found // 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 a38cfd132afd..67b042030b15 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: 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*` // CHECK:STDERR: fn ConvertUnrelated(p: B2*) -> A1* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: Type `B2*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+4]]:38: type `B2*` does not implement interface `ImplicitAs` // 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: 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*` // CHECK:STDERR: fn ConvertIncomplete(p: Incomplete*) -> A2* { return p; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:47: Type `Incomplete*` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_derived_to_base.carbon:[[@LINE+3]]:47: type `Incomplete*` does not implement interface `ImplicitAs` // 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 0aff72433059..0148685b1a9f 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: Redefinition of `class A`. +// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+7]]:1: error: redefinition of `class A` // CHECK:STDERR: base class A { // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE-11]]:1: Previously defined here. +// CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE-11]]:1: previously defined here // 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: Name `C` not found. + // CHECK:STDERR: fail_extend_cycle.carbon:[[@LINE+3]]:10: error: name `C` not found // 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 e8a148a1080a..5e9718f40760 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: `default` not allowed on `var` declaration. + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `var` declaration // CHECK:STDERR: default var j: i32; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default var j: i32; - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: ERROR: `final` not allowed on `var` declaration. + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `final` not allowed on `var` declaration // CHECK:STDERR: final var k: i32; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: final var k: i32; - // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: ERROR: `default` not allowed on `let` declaration outside of an interface. + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `let` declaration outside of an interface // 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: `final` not allowed on `let` declaration outside of an interface. + // CHECK:STDERR: fail_field_modifiers.carbon:[[@LINE+3]]:3: error: `final` not allowed on `let` declaration outside of an interface // 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 38c0b0592787..e812ab2d108e 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+14]]:10: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn Class(N:! i32).F[self: Self](n: T) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE-10]]:13: previous declaration's corresponding parameter here // CHECK:STDERR: class Class(T:! type) { // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+7]]:27: ERROR: Name `Self` not found. +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+7]]:27: error: name `Self` not found // 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: Name `T` not found. +// CHECK:STDERR: fail_generic_method.carbon:[[@LINE+3]]:36: error: name `T` not found // 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 b0dec50e156a..d3f94a20938b 100644 --- a/toolchain/check/testdata/class/fail_import_misuses.carbon +++ b/toolchain/check/testdata/class/fail_import_misuses.carbon @@ -23,26 +23,26 @@ library "[[@TEST_NAME]]"; import library "a"; -// CHECK:STDERR: fail_b.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `class Empty` is redundant. +// CHECK:STDERR: fail_b.carbon:[[@LINE+10]]:1: error: redeclaration of `class Empty` is redundant // CHECK:STDERR: class Empty { // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "a"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: a.carbon:4:1: Previously declared here. +// CHECK:STDERR: a.carbon:4:1: previously declared here // CHECK:STDERR: class Empty { // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: class Empty { } -// CHECK:STDERR: fail_b.carbon:[[@LINE+9]]:8: ERROR: Variable has incomplete type `Incomplete`. +// CHECK:STDERR: fail_b.carbon:[[@LINE+9]]:8: error: Variable has incomplete type `Incomplete` // CHECK:STDERR: var a: Incomplete; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-18]]:1: In import. +// CHECK:STDERR: fail_b.carbon:[[@LINE-18]]:1: in import // CHECK:STDERR: import library "a"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: a.carbon:7:1: Class was forward declared here. +// CHECK:STDERR: a.carbon:7:1: class was forward declared here // 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 11981ae13168..5c8700d0da77 100644 --- a/toolchain/check/testdata/class/fail_incomplete.carbon +++ b/toolchain/check/testdata/class/fail_incomplete.carbon @@ -10,49 +10,49 @@ class Class; -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:4: ERROR: Cannot declare a member of incomplete class `Class`. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:4: error: cannot declare a member of incomplete class `Class` // CHECK:STDERR: fn Class.Function() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-5]]:1: Class was forward declared here. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-5]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn Class.Function() {} fn CallClassFunction() { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:3: ERROR: Member access into incomplete class `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:3: error: member access into incomplete class `Class` // CHECK:STDERR: Class.Function(); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-15]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-15]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: Class.Function(); } -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: ERROR: Variable has incomplete type `Class`. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:17: error: Variable has incomplete type `Class` // CHECK:STDERR: var global_var: Class; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-25]]:1: Class was forward declared here. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-25]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: var global_var: Class; -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:24: ERROR: Function returns incomplete type `Class`. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:24: error: function returns incomplete type `Class` // CHECK:STDERR: fn ConvertFromStruct() -> Class { return {}; } // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-34]]:1: Class was forward declared here. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-34]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn ConvertFromStruct() -> Class { return {}; } fn G(p: Class*) -> i32 { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:10: ERROR: Member access into object of incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:10: error: member access into object of incomplete type `Class` // CHECK:STDERR: return p->n; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-44]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-44]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -60,20 +60,20 @@ fn G(p: Class*) -> i32 { } fn MemberAccess(p: Class*) -> i32 { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:11: ERROR: Member access into object of incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:11: error: member access into object of incomplete type `Class` // CHECK:STDERR: return (*p).n; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-55]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-55]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: return (*p).n; } -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:20: ERROR: Function returns incomplete type `Class`. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:20: error: function returns incomplete type `Class` // CHECK:STDERR: fn Copy(p: Class*) -> Class { // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-65]]:1: Class was forward declared here. +// CHECK:STDERR: fail_incomplete.carbon:[[@LINE-65]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -82,10 +82,10 @@ fn Copy(p: Class*) -> Class { } fn Let(p: Class*) { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:10: ERROR: `let` binding has incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+7]]:10: error: `let` binding has incomplete type `Class` // CHECK:STDERR: let c: Class = *p; // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-77]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-77]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: @@ -97,25 +97,25 @@ fn TakeIncomplete(c: Class); fn ReturnIncomplete() -> Class; fn CallTakeIncomplete(p: Class*) { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: ERROR: Forming value of incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: forming value of incomplete type `Class` // CHECK:STDERR: TakeIncomplete(*p); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-92]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-92]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-11]]:1: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-11]]:1: initializing parameter 1 of function declared here // CHECK:STDERR: fn TakeIncomplete(c: Class); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: TakeIncomplete(*p); - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: ERROR: Forming value of incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+10]]:3: error: forming value of incomplete type `Class` // CHECK:STDERR: TakeIncomplete({}); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-104]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-104]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-23]]:1: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-23]]:1: initializing parameter 1 of function declared here // CHECK:STDERR: fn TakeIncomplete(c: Class); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -123,13 +123,13 @@ fn CallTakeIncomplete(p: Class*) { } fn CallReturnIncomplete() { - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+9]]:3: ERROR: Function returns incomplete type `Class`. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE+9]]:3: error: function returns incomplete type `Class` // CHECK:STDERR: ReturnIncomplete(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-118]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-118]]:1: class was forward declared here // CHECK:STDERR: class Class; // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-35]]:23: Return type declared here. + // CHECK:STDERR: fail_incomplete.carbon:[[@LINE-35]]:23: return type declared here // CHECK:STDERR: fn ReturnIncomplete() -> Class; // CHECK:STDERR: ^~~~~~~~ ReturnIncomplete(); diff --git a/toolchain/check/testdata/class/fail_init.carbon b/toolchain/check/testdata/class/fail_init.carbon index eea5a5f5fa73..a0b8342210ce 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: Cannot initialize class with 2 field(s) from struct with 1 field(s). + // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: error: cannot initialize class with 2 field(s) from struct with 1 field(s). // CHECK:STDERR: {.a = 1} as Class; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: {.a = 1} as Class; - // CHECK:STDERR: fail_init.carbon:[[@LINE+4]]:3: ERROR: 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 // 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: Cannot initialize class with 2 field(s) from struct with 3 field(s). + // CHECK:STDERR: fail_init.carbon:[[@LINE+3]]:3: error: cannot initialize class with 2 field(s) from struct with 3 field(s). // 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 24a2bb658f12..7f14d77f6a4a 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: Cannot copy value of type `Class`. + // CHECK:STDERR: fail_init_as_inplace.carbon:[[@LINE+3]]:18: error: cannot copy value of type `Class` // 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 62f73d5314f4..0d695655fdba 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]]:8: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+7]]:8: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: s.a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-12]]:13: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-12]]:13: initializing `addr self` parameter of method declared here // 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]]:8: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE+6]]:8: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: b.a.F(); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-23]]:13: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_memaccess_category.carbon:[[@LINE-23]]:13: initializing `addr self` parameter of method declared here // 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 3e83d2ae0e2f..319e1ec900c2 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: 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 // CHECK:STDERR: fn T.F() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE-7]]:5: Referenced non-scope entity declared here. +// CHECK:STDERR: fail_member_of_let.carbon:[[@LINE-7]]:5: referenced non-scope entity declared here // 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 01400f89cf84..decfa0855056 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: Missing object argument in method call. + // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: missing object argument in method call // CHECK:STDERR: Class.WithSelf(); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-13]]:3: Calling function declared here. + // CHECK:STDERR: fail_method.carbon:[[@LINE-13]]:3: calling function declared here // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Class.WithSelf(); - // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: ERROR: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_method.carbon:[[@LINE+7]]:3: error: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: Class.WithSelf(c); // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: Calling function declared here. + // CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: calling function declared here // CHECK:STDERR: fn WithSelf[self: Class](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Class.WithSelf(c); - // CHECK:STDERR: fail_method.carbon:[[@LINE+6]]:3: ERROR: Missing object argument in method call. + // CHECK:STDERR: fail_method.carbon:[[@LINE+6]]:3: error: missing object argument in method call // CHECK:STDERR: A(); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_method.carbon:[[@LINE-30]]:3: Calling function declared here. + // CHECK:STDERR: fail_method.carbon:[[@LINE-30]]:3: calling function declared here // 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 18fde85e0e48..6960ac7414b9 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: `abstract` not allowed on `fn` declaration in a non-abstract `class` definition. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error: `abstract` not allowed on `fn` declaration in a non-abstract `class` definition // CHECK:STDERR: abstract fn Abstract[self: Self](); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: Containing definition here. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: containing definition here // CHECK:STDERR: class FinalClass { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: abstract fn Abstract[self: Self](); - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: ERROR: `virtual` not allowed on `fn` declaration in a non-abstract non-base `class` definition. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+7]]:3: error: `virtual` not allowed on `fn` declaration in a non-abstract non-base `class` definition // CHECK:STDERR: virtual fn Virtual[self: Self](); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-14]]:1: Containing definition here. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-14]]:1: containing definition here // 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: `default` not allowed on `fn` declaration outside of an interface. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error: `default` not allowed on `fn` declaration outside of an interface // 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: `final` not allowed on `fn` declaration outside of an interface. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+4]]:3: error: `final` not allowed on `fn` declaration outside of an interface // 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: `abstract` not allowed on `fn` declaration in a non-abstract `class` definition. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE+6]]:3: error: `abstract` not allowed on `fn` declaration in a non-abstract `class` definition // CHECK:STDERR: abstract fn Abstract[self: Self](); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: Containing definition here. + // CHECK:STDERR: fail_method_modifiers.carbon:[[@LINE-5]]:1: containing definition here // 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 4aa2eaab5399..12d4dfbece92 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: Redefinition of `fn F`. + // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE+6]]:3: error: redefinition of `fn F` // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE-4]]:3: Previously defined here. + // CHECK:STDERR: fail_method_redefinition.carbon:[[@LINE-4]]:3: previously defined here // 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 709fc63d5643..a3fb7b0cd6cf 100644 --- a/toolchain/check/testdata/class/fail_modifiers.carbon +++ b/toolchain/check/testdata/class/fail_modifiers.carbon @@ -8,63 +8,63 @@ // 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]]:18: ERROR: `private` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:18: error: `private` repeated on declaration // CHECK:STDERR: private abstract private class DuplicatePrivate; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here // CHECK:STDERR: private abstract private class DuplicatePrivate; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private abstract private class DuplicatePrivate; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:14: ERROR: `protected` not allowed on declaration with `private`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:14: error: `protected` not allowed on declaration with `private` // CHECK:STDERR: private base protected class TwoAccess {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here // CHECK:STDERR: private base protected class TwoAccess {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private base protected class TwoAccess {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: ERROR: `abstract` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `abstract` repeated on declaration // CHECK:STDERR: abstract abstract class TwoAbstract; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract abstract class TwoAbstract; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract abstract class TwoAbstract; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+15]]:1: ERROR: `protected` not allowed on `class` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+15]]:1: error: `protected` not allowed on `class` declaration at file scope, `protected` is only allowed on class members // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:11: ERROR: `virtual` not allowed on `class` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:11: error: `virtual` not allowed on `class` declaration // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:19: ERROR: `base` not allowed on declaration with `virtual`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:19: error: `base` not allowed on declaration with `virtual` // CHECK:STDERR: protected virtual base class Virtual {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:11: `virtual` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:11: `virtual` previously appeared here // 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: `protected` must appear before `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `protected` must appear before `abstract` // CHECK:STDERR: abstract protected class WrongOrder; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract protected class WrongOrder; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract protected class WrongOrder; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:10: ERROR: `base` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:10: error: `base` not allowed on declaration with `abstract` // CHECK:STDERR: abstract base class AbstractAndBase {} // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract base class AbstractAndBase {} // CHECK:STDERR: ^~~~~~~~ abstract base class AbstractAndBase {} 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 6f60150df346..9b19dab24fc8 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: 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 // CHECK:STDERR: fn C.F() {} // CHECK:STDERR: ^ fn C.F() {} diff --git a/toolchain/check/testdata/class/fail_redeclaration_introducer.carbon b/toolchain/check/testdata/class/fail_redeclaration_introducer.carbon index 56af7fb03f06..918e40a507b7 100644 --- a/toolchain/check/testdata/class/fail_redeclaration_introducer.carbon +++ b/toolchain/check/testdata/class/fail_redeclaration_introducer.carbon @@ -13,7 +13,7 @@ library "[[@TEST_NAME]]"; class A; -// CHECK:STDERR: fail_add_base.carbon:[[@LINE+7]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_add_base.carbon:[[@LINE+7]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: base class A {} // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_add_base.carbon:[[@LINE-4]]:1: Previously declared here. @@ -27,7 +27,7 @@ base class A {} library "[[@TEST_NAME]]"; class B; -// CHECK:STDERR: fail_add_abstract.carbon:[[@LINE+7]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_add_abstract.carbon:[[@LINE+7]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: abstract class B {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_add_abstract.carbon:[[@LINE-4]]:1: Previously declared here. @@ -41,7 +41,7 @@ abstract class B {} library "[[@TEST_NAME]]"; base class C; -// CHECK:STDERR: fail_remove_base.carbon:[[@LINE+7]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_remove_base.carbon:[[@LINE+7]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_remove_base.carbon:[[@LINE-4]]:1: Previously declared here. @@ -55,7 +55,7 @@ class C {} library "[[@TEST_NAME]]"; base class D; -// CHECK:STDERR: fail_base_to_abstract.carbon:[[@LINE+7]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_base_to_abstract.carbon:[[@LINE+7]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: abstract class D {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fail_base_to_abstract.carbon:[[@LINE-4]]:1: Previously declared here. @@ -69,7 +69,7 @@ abstract class D {} library "[[@TEST_NAME]]"; abstract class E; -// CHECK:STDERR: fail_remove_abstract.carbon:[[@LINE+7]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_remove_abstract.carbon:[[@LINE+7]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: class E {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: fail_remove_abstract.carbon:[[@LINE-4]]:1: Previously declared here. @@ -83,7 +83,7 @@ class E {} library "[[@TEST_NAME]]"; abstract class F; -// CHECK:STDERR: fail_abstract_to_base.carbon:[[@LINE+6]]:1: ERROR: Class redeclared with different inheritance kind. +// CHECK:STDERR: fail_abstract_to_base.carbon:[[@LINE+6]]:1: error: Class redeclared with different inheritance kind. // CHECK:STDERR: base class F {} // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fail_abstract_to_base.carbon:[[@LINE-4]]:1: Previously declared here. diff --git a/toolchain/check/testdata/class/fail_redeclaration_scope.carbon b/toolchain/check/testdata/class/fail_redeclaration_scope.carbon index 703870e39466..9c1e8a76209e 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: Name `A` not found. + // CHECK:STDERR: fail_redeclaration_scope.carbon:[[@LINE+3]]:9: error: name `A` not found // 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 2945292bc546..3b0e57f0e58c 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: Redefinition of `class Class`. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+7]]:1: error: redefinition of `class Class` // CHECK:STDERR: class Class { // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-9]]:1: Previously defined here. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-9]]:1: previously defined here // 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: 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 // CHECK:STDERR: fn Class.G() {} // CHECK:STDERR: ^ // CHECK:STDERR: fn Class.G() {} fn Class.H() {} -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: ERROR: Redefinition of `fn I`. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error: redefinition of `fn I` // CHECK:STDERR: fn Class.I() {} // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-26]]:3: Previously defined here. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-26]]:3: previously defined here // 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 85e2d87eb91c..9a0de15a65c2 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: Name `F` not found. + // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error: name `F` not found // 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 84b0e1f1e368..5c62d5bdd8d2 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: `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 // 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: `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 // 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: `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 // CHECK:STDERR: var self: Self; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: var self: Self; - // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: ERROR: Cannot copy value of type `Class`. + // CHECK:STDERR: fail_self.carbon:[[@LINE+4]]:10: error: cannot copy value of type `Class` // 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: Cannot implicitly convert from `WrongSelf` to `Class`. + // CHECK:STDERR: fail_self.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `WrongSelf` to `Class` // CHECK:STDERR: ws.F(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_self.carbon:[[@LINE+6]]:3: Type `WrongSelf` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_self.carbon:[[@LINE+6]]:3: type `WrongSelf` does not implement interface `ImplicitAs` // CHECK:STDERR: ws.F(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_self.carbon:[[@LINE-10]]:8: Initializing `self` parameter of method declared here. + // CHECK:STDERR: fail_self.carbon:[[@LINE-10]]:8: initializing `self` parameter of method declared here // CHECK:STDERR: fn F[self: Class](); // CHECK:STDERR: ^~~~ ws.F(); diff --git a/toolchain/check/testdata/class/fail_self_type_member.carbon b/toolchain/check/testdata/class/fail_self_type_member.carbon index 2a672cd438f4..b6f37df71e37 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: Expected identifier after `.`. + // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+7]]:17: error: expected identifier after `.` // CHECK:STDERR: var c2: Class.Self = c1; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_self_type_member.carbon:[[@LINE+3]]:17: ERROR: 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.` // 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 79ba85ba6c35..e3cb4c65a63f 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: Expected expression. + // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+7]]:5: error: expected expression // CHECK:STDERR: class B { // CHECK:STDERR: ^~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+3]]:5: ERROR: Semantics TODO: `HandleInvalidParse`. + // CHECK:STDERR: fail_todo_local_class.carbon:[[@LINE+3]]:5: error: semantics TODO: `HandleInvalidParse` // 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 b40d58ad6e8f..c17cadbffe7a 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: Expression cannot be used as a value. + // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+4]]:12: error: expression cannot be used as a value // 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: Expression cannot be used as a value. + // CHECK:STDERR: fail_unbound_field.carbon:[[@LINE+3]]:10: error: expression cannot be used as a value // 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 eacb9e0e4b0e..4d8ccce4e4c6 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: Name `something` not found. + // CHECK:STDERR: fail_unknown_member.carbon:[[@LINE+3]]:10: error: name `something` not found // 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 5235198533d1..3042d0a22a82 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: 1 argument(s) passed to generic class expecting 2 argument(s). +// CHECK:STDERR: fail_too_few.carbon:[[@LINE+7]]:8: error: 1 argument(s) passed to generic class expecting 2 argument(s). // CHECK:STDERR: var a: Class(i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: Calling generic class declared here. +// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: calling generic class declared here // 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: 3 argument(s) passed to generic class expecting 2 argument(s). +// CHECK:STDERR: fail_too_many.carbon:[[@LINE+7]]:8: error: 3 argument(s) passed to generic class expecting 2 argument(s). // CHECK:STDERR: var a: Class(i32*, 1, 2); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: Calling generic class declared here. +// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: calling generic class declared here // 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: Cannot implicitly convert from `i32` to `type`. +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+9]]:8: error: cannot implicitly convert from `i32` to `type` // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE+6]]:8: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: var a: Class(5, i32*); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: Initializing generic parameter `T` declared here. +// CHECK:STDERR: fail_no_conversion.carbon:[[@LINE-8]]:13: initializing generic parameter `T` declared here // 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 f9ef44835dea..a1a721d23daa 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: 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` // CHECK:STDERR: var v: CompleteClass(i32*) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: Type `CompleteClass` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_generic_arg_mismatch.carbon:[[@LINE+4]]:3: type `CompleteClass` does not implement interface `ImplicitAs` // CHECK:STDERR: var v: CompleteClass(i32*) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -69,18 +69,18 @@ fn Use() { impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+10]]:13: ERROR: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+10]]:13: error: redeclaration differs at parameter 1 // CHECK:STDERR: class Class(U:! type) { // CHECK:STDERR: ^ -// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_foo.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "foo"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: foo.carbon:4:13: Previous declaration's corresponding parameter here. +// CHECK:STDERR: foo.carbon:4:13: previous declaration's corresponding parameter here // CHECK:STDERR: class Class(T:! type); // CHECK:STDERR: ^ // CHECK:STDERR: class Class(U:! type) { - // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: ERROR: Name `T` not found. + // CHECK:STDERR: fail_foo.impl.carbon:[[@LINE+3]]:10: error: name `T` not found // 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 b3c8095b05da..8055048f5b7e 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: 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` // CHECK:STDERR: return Class(T).Make(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+3]]:3: Type `Class` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_todo_static_member_fn_call.carbon:[[@LINE+3]]:3: type `Class` does not implement interface `ImplicitAs` // 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 f3ea63c4b806..a4ff752cdc11 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: Expression cannot be used as a value. + // CHECK:STDERR: fail_member_inline.carbon:[[@LINE+3]]:5: error: expression cannot be used as a value // 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 ae2bbc78473d..08a7306f34d0 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: 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 // CHECK:STDERR: fn NotGeneric(T:! type).F() {} // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE-7]]:1: Previously declared without parameter list. +// CHECK:STDERR: fail_mismatched_not_generic_vs_generic.carbon:[[@LINE-7]]:1: previously declared without parameter list // 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: 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 // CHECK:STDERR: fn Generic().TooFew() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE-7]]:1: Previously declared with parameter count of 1. +// CHECK:STDERR: fail_mismatched_too_few_args.carbon:[[@LINE-7]]:1: previously declared with parameter count of 1 // 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: 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 // CHECK:STDERR: fn Generic(T:! type, U:! type).TooMany() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE-7]]:1: Previously declared with parameter count of 1. +// CHECK:STDERR: fail_mismatched_too_many_args.carbon:[[@LINE-7]]:1: previously declared with parameter count of 1 // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE+6]]:12: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn Generic(T:! ()).WrongType() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:15: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_mismatched_wrong_arg_type.carbon:[[@LINE-7]]:15: previous declaration's corresponding parameter here // 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 283a7214bce4..d7c2631f1282 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: Redeclaration differs because of parameter list. +// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list // CHECK:STDERR: class A(T:! type) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: Previously declared without parameter list. +// CHECK:STDERR: fail_mismatch_param_list.carbon:[[@LINE-4]]:1: previously declared without parameter list // 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: 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 // CHECK:STDERR: class B[T:! type](N:! T) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: Previously declared without implicit parameter list. +// CHECK:STDERR: fail_mismatch_implicit_param_list.carbon:[[@LINE-4]]:1: previously declared without implicit parameter list // 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: 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 // CHECK:STDERR: class C(T:! type, U:! i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: Previously declared with parameter count of 1. +// CHECK:STDERR: fail_mismatch_param_count.carbon:[[@LINE-4]]:1: previously declared with parameter count of 1 // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE+7]]:9: error: redeclaration differs at parameter 1 // CHECK:STDERR: class D(T:! i32) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_mismatch_param_type.carbon:[[@LINE-4]]:9: previous declaration's corresponding parameter here // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE+6]]:9: error: redeclaration differs at parameter 1 // CHECK:STDERR: class E(U:! type) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_mismatch_param_name.carbon:[[@LINE-4]]:9: previous declaration's corresponding parameter here // 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 0f209057f110..b17d0080721a 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: 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` // CHECK:STDERR: return self.y; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE-10]]:15: The private member `y` is defined here. + // CHECK:STDERR: fail_inherited_private_field_access.carbon:[[@LINE-10]]:15: the private member `y` is defined here // 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: 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` // CHECK:STDERR: fn G() { Self.F(); } // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE-8]]:3: The private member `F` is defined here. + // CHECK:STDERR: fail_noninstance_private_on_parent.carbon:[[@LINE-8]]:3: the private member `F` is defined here // 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: 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` // CHECK:STDERR: A.SOME_PRIVATE_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-14]]:15: The private member `SOME_PRIVATE_CONSTANT` is defined here. + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-14]]:15: the private member `SOME_PRIVATE_CONSTANT` is defined here // 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: 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` // CHECK:STDERR: return A.SOME_PROTECTED_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-24]]:17: The protected member `SOME_PROTECTED_CONSTANT` is defined here. + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-24]]:17: the protected member `SOME_PROTECTED_CONSTANT` is defined here // 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: 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` // CHECK:STDERR: return self.internal.INTERNAL_CONSTANT; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-30]]:17: The protected member `INTERNAL_CONSTANT` is defined here. + // CHECK:STDERR: fail_non_inherited_access.carbon:[[@LINE-30]]:17: the protected member `INTERNAL_CONSTANT` is defined here // 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: 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` // CHECK:STDERR: self.(A.x); // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE-9]]:15: The private member `x` is defined here. + // CHECK:STDERR: fail_compound_member_access.carbon:[[@LINE-9]]:15: the private member `x` is defined here // 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 6057f0f4fed7..ae9b187f43ac 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: Cannot implicitly convert from `C` to `AdaptC`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `C` to `AdaptC` // CHECK:STDERR: let b: AdaptC = a; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: Type `C` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: type `C` does not implement interface `ImplicitAs` // CHECK:STDERR: let b: AdaptC = a; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ // CHECK:STDERR: let b: AdaptC = a; -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: ERROR: Cannot implicitly convert from `AdaptC` to `C`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `AdaptC` to `C` // CHECK:STDERR: let c: C = b; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: Type `` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: type `` does not implement interface `ImplicitAs` // 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: Cannot implicitly convert from `C` to `AdaptC`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+7]]:1: error: cannot implicitly convert from `C` to `AdaptC` // CHECK:STDERR: var d: AdaptC = MakeC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: Type `C` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+4]]:1: type `C` does not implement interface `ImplicitAs` // CHECK:STDERR: var d: AdaptC = MakeC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: var d: AdaptC = MakeC(); -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+6]]:1: ERROR: Cannot implicitly convert from `AdaptC` to `C`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `AdaptC` to `C` // CHECK:STDERR: var e: C = MakeAdaptC(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+3]]:1: Type `AdaptC` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_not_implicit.carbon:[[@LINE+3]]:1: type `AdaptC` does not implement interface `ImplicitAs` // 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 fcf09803fbb9..67f60d043405 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: 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` // CHECK:STDERR: fn C.F(); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE-4]]:1: Class was forward declared here. +// CHECK:STDERR: fail_decl_fn_in_extern.carbon:[[@LINE-4]]:1: class was forward declared here // 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: 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 // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_extern_decl_after_extern_decl.carbon:[[@LINE-4]]:1: previously declared here // 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: Redeclaration of `class C` is redundant. +// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE+7]]:1: error: redeclaration of `class C` is redundant // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_decl_after_extern_decl.carbon:[[@LINE-4]]:1: previously declared here // 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: `extern` not allowed on `class` declaration that is a member. + // CHECK:STDERR: fail_extern_member_class.carbon:[[@LINE+4]]:3: error: `extern` not allowed on `class` declaration that is a member // 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: 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` // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_def_after_extern_decl.carbon:[[@LINE-4]]:1: previously declared here // 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: Redeclaration of `class C` is redundant. +// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE+7]]:1: error: redeclaration of `class C` is redundant // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_extern_decl_after_decl.carbon:[[@LINE-4]]:1: previously declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -132,16 +132,16 @@ extern class C; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: decl.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: decl.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_import_extern_decl_then_decl.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: name is previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -152,16 +152,16 @@ import library "decl"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_decl.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_import_decl_then_extern_decl.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: decl.carbon:4:1: name is previously declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -172,16 +172,16 @@ import library "extern_decl"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: def.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: def.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_import_extern_decl_then_def.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: name is previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -192,29 +192,29 @@ import library "def"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+26]]:1: In import. +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+26]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: decl.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: decl.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+20]]:1: In import. +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+20]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: name is previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: def.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: def.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_import_ownership_conflict.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: name is previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -226,16 +226,16 @@ import library "def"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl_copy.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_decl_copy.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_todo_import_extern_decl_copy.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: name is previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -248,13 +248,13 @@ library "[[@TEST_NAME]]"; import library "extern_decl"; -// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `class C` is redundant. +// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: error: redeclaration of `class C` is redundant // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_decl.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_decl.carbon:4:1: previously declared here // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -266,13 +266,13 @@ library "[[@TEST_NAME]]"; import library "decl"; -// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `class C` must match use of `extern`. +// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE+10]]:1: error: redeclarations of `class C` must match use of `extern` // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_decl_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "decl"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: decl.carbon:4:1: Previously declared here. +// CHECK:STDERR: decl.carbon:4:1: previously declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -284,13 +284,13 @@ library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `class C` must match use of `extern`. +// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE+10]]:1: error: redeclarations of `class C` must match use of `extern` // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_def_after_import_extern_decl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "def"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: def.carbon:4:1: Previously declared here. +// CHECK:STDERR: def.carbon:4:1: previously declared here // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -302,13 +302,13 @@ library "[[@TEST_NAME]]"; import library "def"; -// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE+9]]:1: ERROR: Redeclarations of `class C` must match use of `extern`. +// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE+9]]:1: error: redeclarations of `class C` must match use of `extern` // CHECK:STDERR: extern class C; // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_decl_after_import_def.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "def"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: def.carbon:4:1: Previously declared here. +// CHECK:STDERR: def.carbon:4:1: previously declared here // 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 7d3c54bd6152..b949d5a895f1 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: Semantics TODO: `extern library`. +// CHECK:STDERR: fail_todo.carbon:[[@LINE+3]]:1: error: semantics TODO: `extern library` // 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 b0b7a288d719..f156e2ce5fde 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: 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 // 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: 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 // 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 44c49dbf2332..7ab046ef1e5e 100644 --- a/toolchain/check/testdata/class/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/class/no_prelude/implicit_import.carbon @@ -30,13 +30,13 @@ class C {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `class C` is redundant. +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+10]]:1: error: redeclaration of `class C` is redundant // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "redecl_after_def"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: redecl_after_def.carbon:4:1: Previously declared here. +// CHECK:STDERR: redecl_after_def.carbon:4:1: previously declared here // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -52,13 +52,13 @@ class C {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+10]]:1: ERROR: Redefinition of `class C`. +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+10]]:1: error: redefinition of `class C` // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "redef_after_def"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: redef_after_def.carbon:4:1: Previously defined here. +// CHECK:STDERR: redef_after_def.carbon:4:1: previously defined here // CHECK:STDERR: class C {} // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -75,13 +75,13 @@ alias B = C; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+9]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class B {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "def_alias"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: def_alias.carbon:5:7: Name is previously declared here. +// CHECK:STDERR: def_alias.carbon:5:7: name is previously declared here // 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 3d6b864e31dc..9ceca505a5a8 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: Name `Def` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:8: error: name `Def` not found // 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: Name `Def` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:8: error: name `Def` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:8: error: name `ForwardWithDef` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:8: error: name `ForwardWithDef` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error: name `Forward` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error: name `Forward` not found // 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 cb0c445c21df..55152a900e7e 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: 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 // 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: 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 // 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 43ab03d5e821..9596d1c85146 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here // CHECK:STDERR: class Foo(a:! (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: Comparing with previous declaration here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:15: comparing with previous declaration here // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:11: error: redeclaration differs at parameter 1 // CHECK:STDERR: class Foo(b:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:11: previous declaration's corresponding parameter here // 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here // CHECK:STDERR: class Foo(a:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: Comparing with previous declaration here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:15: comparing with previous declaration here // 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:15: error: redeclaration syntax differs here // CHECK:STDERR: class Foo[a:! D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: Comparing with previous declaration here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:15: comparing with previous declaration here // 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: `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 // CHECK:STDERR: class Foo(a:! const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+7]]:21: error: redeclaration syntax differs here // CHECK:STDERR: class Foo(a:! const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: Comparing with previous declaration here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:21: comparing with previous declaration here // 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_self_type.carbon:[[@LINE+6]]:22: error: redeclaration syntax differs here // CHECK:STDERR: fn Base.F[addr self: Base*]() { // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_self_type.carbon:[[@LINE-6]]:19: Comparing with previous declaration here. +// CHECK:STDERR: fail_self_type.carbon:[[@LINE-6]]:19: comparing with previous declaration here // CHECK:STDERR: fn F[addr self: Self*](); // CHECK:STDERR: ^~~~ fn Base.F[addr self: Base*]() { diff --git a/toolchain/check/testdata/class/syntactic_merge_literal.carbon b/toolchain/check/testdata/class/syntactic_merge_literal.carbon index 030056713c83..f59c440260a0 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: Main//default previously provided by `int_match.carbon`. +// CHECK:STDERR: fail_int_mismatch.carbon: error: `Main//default` previously provided by `int_match.carbon` // 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE+6]]:15: error: redeclaration syntax differs here // CHECK:STDERR: class D(b:! C(1_000)) {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:15: Comparing with previous declaration here. +// CHECK:STDERR: fail_int_mismatch.carbon:[[@LINE-4]]:15: comparing with previous declaration here // CHECK:STDERR: class D(b:! C(1000)); // CHECK:STDERR: ^~~~ class D(b:! C(1_000)) {} diff --git a/toolchain/check/testdata/const/collapse.carbon b/toolchain/check/testdata/const/collapse.carbon index 40c48c50405b..739a936786c8 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: `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 // 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 b32d71502c0e..773faa5f03c0 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: `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 // 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: 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**` // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:3: Type `const i32**` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_collapse.carbon:[[@LINE+3]]:3: type `const i32**` does not implement interface `ImplicitAs` // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ return p; diff --git a/toolchain/check/testdata/eval/fail_aggregate.carbon b/toolchain/check/testdata/eval/fail_aggregate.carbon index 1dd3059b5544..cf6a1c6514b9 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: Array bound is not a constant. +// CHECK:STDERR: fail_aggregate.carbon:[[@LINE+3]]:43: error: array bound is not a constant // 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 a2df9f5f1280..3da1e252ac4c 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: Semantics TODO: `symbolic array bound`. + // CHECK:STDERR: fail_symbolic.carbon:[[@LINE+3]]:16: error: semantics TODO: `symbolic array bound` // 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 75a16c7408d3..7a743a57abfa 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: Redefinition of `fn A`. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `fn A` // CHECK:STDERR: fn A(n: i32, m: i32) -> i32 { return n; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: Previously defined here. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: previously defined here // 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: Redefinition of `fn B`. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+7]]:1: error: redefinition of `fn B` // CHECK:STDERR: fn B(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: Previously defined here. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: previously defined here // 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: Redefinition of `fn C`. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE+6]]:1: error: redefinition of `fn C` // CHECK:STDERR: fn C(n: i32, m: i32) -> i32 = "int.sadd"; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: Previously defined here. +// CHECK:STDERR: fail_redefined.carbon:[[@LINE-4]]:1: previously defined here // 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 a10dbc09e70a..627faa2fcc51 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: Unknown builtin function name "unknown.builtin.name". +// CHECK:STDERR: fail_unknown.carbon:[[@LINE+3]]:23: error: unknown builtin function name "unknown.builtin.name" // 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 b37b44ef401f..d06212f045af 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: Value of type `String` is not callable. + // CHECK:STDERR: fail_not_callable.carbon:[[@LINE+3]]:16: error: value of type `String` is not callable // 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 0e9110926b36..09758bbc3661 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: 1 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 1 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: Run0(1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: calling function declared here // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: Run0(1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 2 argument(s) passed to function expecting 0 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 argument(s) passed to function expecting 0 argument(s). // CHECK:STDERR: Run0(0, 1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: calling function declared here // CHECK:STDERR: fn Run0() {} // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: Run0(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 0 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: Run1(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: calling function declared here // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run1(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 2 argument(s) passed to function expecting 1 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 2 argument(s) passed to function expecting 1 argument(s). // CHECK:STDERR: Run1(0, 1); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: calling function declared here // CHECK:STDERR: fn Run1(a: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run1(0, 1); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: ERROR: 0 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+7]]:3: error: 0 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: Run2(); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: calling function declared here // CHECK:STDERR: fn Run2(a: i32, b: i32) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: Run2(); - // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: ERROR: 1 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_param_count.carbon:[[@LINE+6]]:3: error: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: Run2(0); // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: Calling function declared here. + // CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: calling function declared here // 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 aa4f5f21ba54..d0e60142964e 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]]:3: ERROR: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_param_type.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `f64` to `i32` // CHECK:STDERR: G(1.0); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:3: Type `f64` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_param_type.carbon:[[@LINE+6]]:3: type `f64` does not implement interface `ImplicitAs` // CHECK:STDERR: G(1.0); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:1: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_param_type.carbon:[[@LINE-9]]:1: initializing parameter 1 of function declared here // 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 2efef06a47af..7c04ffb1d8ba 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: 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` // CHECK:STDERR: var x: i32 = Foo(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: Type `f64` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_return_type_mismatch.carbon:[[@LINE+3]]:3: type `f64` does not implement interface `ImplicitAs` // CHECK:STDERR: var x: i32 = Foo(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ var x: i32 = Foo(); 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 73d6b73ab7ca..05fd5897907a 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: Array bound is not a constant. +// CHECK:STDERR: fail_param_in_type.carbon:[[@LINE+3]]:23: error: array bound is not a constant // 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 f1130a843d31..65f9192554f1 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: 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 // CHECK:STDERR: fn F(n: i32, n: i32); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+3]]:6: Name is previously declared here. +// CHECK:STDERR: fail_param_redecl.carbon:[[@LINE+3]]:6: name is previously declared here // 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 3a13afae5df0..2f3ff465b5e3 100644 --- a/toolchain/check/testdata/function/declaration/import.carbon +++ b/toolchain/check/testdata/function/declaration/import.carbon @@ -58,57 +58,57 @@ library "[[@TEST_NAME]]"; import library "api"; -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:4:1: Previously declared here. +// CHECK:STDERR: api.carbon:4:1: previously declared here // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: extern fn A(); -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn B` must match use of `extern`. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: error: redeclarations of `fn B` must match use of `extern` // CHECK:STDERR: extern fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-16]]:1: In import. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-16]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:5:1: Previously declared here. +// CHECK:STDERR: api.carbon:5:1: previously declared here // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: extern fn B(b: i32) -> i32; -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn C` must match use of `extern`. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: error: redeclarations of `fn C` must match use of `extern` // CHECK:STDERR: extern fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-27]]:1: In import. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-27]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:6:1: Previously declared here. +// CHECK:STDERR: api.carbon:6:1: previously declared here // 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+10]]:1: ERROR: Redeclaration of `fn D` is redundant. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: error: redeclaration of `fn D` is redundant // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-38]]:1: In import. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-38]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:7:1: Previously declared here. +// CHECK:STDERR: api.carbon:7:1: previously declared here // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: extern fn D(); -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn E` must match use of `extern`. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE+10]]:1: error: redeclarations of `fn E` must match use of `extern` // CHECK:STDERR: extern fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-49]]:1: In import. +// CHECK:STDERR: fail_redecl_api.carbon:[[@LINE-49]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:10:1: Previously declared here. +// CHECK:STDERR: api.carbon:10:1: previously declared here // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -142,68 +142,68 @@ var e: () = NS.E(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_merge.carbon:[[@LINE+65]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+65]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_api.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "redecl_extern_api" fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+59]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+59]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: api.carbon:4:1: name is previously declared here // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+52]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+52]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:5:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_api.carbon:5:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "redecl_extern_api" fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+46]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+46]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:5:1: Name is previously declared here. +// CHECK:STDERR: api.carbon:5:1: name is previously declared here // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+39]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+39]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:6:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_api.carbon:6:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "redecl_extern_api" fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+33]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+33]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:6:1: Name is previously declared here. +// CHECK:STDERR: api.carbon:6:1: name is previously declared here // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+26]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+26]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:7:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_api.carbon:7:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "redecl_extern_api" fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+20]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+20]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:7:1: Name is previously declared here. +// CHECK:STDERR: api.carbon:7:1: name is previously declared here // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:10:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_api.carbon:10:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "redecl_extern_api" fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_merge.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:10:1: Name is previously declared here. +// CHECK:STDERR: api.carbon:10:1: name is previously declared here // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: @@ -220,68 +220,68 @@ var e: () = NS.E(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+64]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+64]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: api.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+58]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+58]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_api.carbon:4:1: name is previously declared here // CHECK:STDERR: extern library "redecl_extern_api" fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+51]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+51]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:5:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: api.carbon:5:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+45]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+45]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:5:1: Name is previously declared here. +// CHECK:STDERR: extern_api.carbon:5:1: name is previously declared here // CHECK:STDERR: extern library "redecl_extern_api" fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+38]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+38]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:6:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: api.carbon:6:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+32]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+32]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:6:1: Name is previously declared here. +// CHECK:STDERR: extern_api.carbon:6:1: name is previously declared here // CHECK:STDERR: extern library "redecl_extern_api" fn C(c: (i32,)) -> {.c: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+25]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+25]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:7:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: api.carbon:7:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+19]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+19]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:7:1: Name is previously declared here. +// CHECK:STDERR: extern_api.carbon:7:1: name is previously declared here // CHECK:STDERR: extern library "redecl_extern_api" fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: api.carbon:10:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: api.carbon:10:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn NS.E(); // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_merge_reverse.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import library "extern_api"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_api.carbon:10:1: Name is previously declared here. +// CHECK:STDERR: extern_api.carbon:10:1: name is previously declared here // 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 9c3ca969936d..5a1de8f67ea7 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: Redeclaration of `fn F` is redundant. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously declared here // 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: Redeclaration of `fn F` is redundant. +// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_redecl_extern.carbon:[[@LINE-4]]:1: previously declared here // 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: `extern` not allowed on `fn` declaration that is a member. + // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+4]]:3: error: `extern` not allowed on `fn` declaration that is a member // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: extern fn F(); - // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+3]]:3: ERROR: `extern` not allowed on `fn` declaration that is a member. + // CHECK:STDERR: fail_member_extern.carbon:[[@LINE+3]]:3: error: `extern` not allowed on `fn` declaration that is a member // 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 d93da6b5c442..ac5734db2eef 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/extern_library.carbon @@ -28,13 +28,13 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE+10]]:1: ERROR: Declaration in library "extern_library_nonowner" doesn't match `extern library` declaration. +// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE+10]]:1: error: declaration in library "extern_library_nonowner" doesn't match `extern library` declaration // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_library_nonowner.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library.carbon:4:1: Previously declared with `extern library` here. +// CHECK:STDERR: extern_library.carbon:4:1: previously declared with `extern library` here // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -46,13 +46,13 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn F` must match use of `extern`. +// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE+10]]:1: error: redeclarations of `fn F` must match use of `extern` // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_library_nonextern.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_library.carbon:4:1: previously declared here // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -64,13 +64,13 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE+10]]:1: ERROR: Declaration in library "extern_library_redecl" doesn't match `extern library` declaration. +// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE+10]]:1: error: declaration in library "extern_library_redecl" doesn't match `extern library` declaration // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_library_redecl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library.carbon:4:1: Previously declared with `extern library` here. +// CHECK:STDERR: extern_library.carbon:4:1: previously declared with `extern library` here // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -86,16 +86,16 @@ extern library "extern_library_owner" fn F(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+13]]:1: In import. +// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+13]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library_copy.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: extern_library_copy.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+7]]:1: In import. +// CHECK:STDERR: fail_extern_library_collision.carbon:[[@LINE+7]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: extern_library.carbon:4:1: name is previously declared here // CHECK:STDERR: extern library "extern_library_owner" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -114,7 +114,7 @@ library "[[@TEST_NAME]]"; import library "extern_library_mismatch" -// CHECK:STDERR: fail_extern_library_mismatch_owner.carbon:[[@LINE+4]]:1: ERROR: `import` declarations must end with a `;`. +// CHECK:STDERR: fail_extern_library_mismatch_owner.carbon:[[@LINE+4]]:1: error: `import` declarations must end with a `;` // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -124,7 +124,7 @@ extern fn F(); library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_self_library.carbon:[[@LINE+4]]:1: ERROR: `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 // CHECK:STDERR: extern library "extern_self_library" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -142,13 +142,13 @@ library "[[@TEST_NAME]]"; import library "extern_of_import"; -// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE+9]]:1: ERROR: Redeclarations of `fn F` must match use of `extern`. +// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE+9]]:1: error: redeclarations of `fn F` must match use of `extern` // CHECK:STDERR: extern library "extern_of_import" fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_extern_of_import_redecl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_of_import"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_of_import.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_of_import.carbon:4:1: previously declared here // 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 005fe76642c3..de24722aa35b 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,13 +28,13 @@ package Foo library "[[@TEST_NAME]]"; import library default; -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+9]]:1: ERROR: Declaration in library "wrong_library" doesn't match `extern library` declaration. +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+9]]:1: error: declaration in library "wrong_library" doesn't match `extern library` declaration // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: default.carbon:4:1: Previously declared with `extern library` here. +// CHECK:STDERR: default.carbon:4:1: previously declared with `extern library` here // 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 8b2219a8e2ec..e2686711f83a 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,13 +26,13 @@ library "[[@TEST_NAME]]"; import library "extern_library"; -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+9]]:1: ERROR: Declaration in library "wrong_library" doesn't match `extern library` declaration. +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE+9]]:1: error: declaration in library "wrong_library" doesn't match `extern library` declaration // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_wrong_library.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern_library"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern_library.carbon:4:1: Previously declared with `extern library` here. +// CHECK:STDERR: extern_library.carbon:4:1: previously declared with `extern library` here // 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 fc3c0f4bf029..b450b77ba10f 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: Function returns incomplete type `C`. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error: function returns incomplete type `C` // CHECK:STDERR: ReturnCUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-12]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-12]]:1: class was forward declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-11]]:18: Return type declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-11]]:18: return type declared here // CHECK:STDERR: fn ReturnCUsed() -> C; // CHECK:STDERR: ^~~~ // CHECK:STDERR: ReturnCUsed(); - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: ERROR: Function returns incomplete type `D`. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE+10]]:3: error: function returns incomplete type `D` // CHECK:STDERR: ReturnDUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-22]]:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-22]]:1: class was forward declared here // CHECK:STDERR: class D; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-20]]:18: Return type declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:[[@LINE-20]]:18: return type declared here // CHECK:STDERR: fn ReturnDUsed() -> D; // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -54,36 +54,36 @@ library "[[@TEST_NAME]]"; import library "incomplete_return"; fn CallFAndGIncomplete() { - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+16]]:3: ERROR: Function returns incomplete type `C`. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+16]]:3: error: function returns incomplete type `C` // CHECK:STDERR: ReturnCUnused(); // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-6]]:1: In import. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-6]]:1: in import // CHECK:STDERR: import library "incomplete_return"; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:4:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:4:1: class was forward declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-12]]:1: In import. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-12]]:1: in import // CHECK:STDERR: import library "incomplete_return"; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:7:20: Return type declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:7:20: return type declared here // CHECK:STDERR: fn ReturnCUnused() -> C; // CHECK:STDERR: ^~~~ // CHECK:STDERR: ReturnCUnused(); - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+15]]:3: ERROR: Function returns incomplete type `C`. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE+15]]:3: error: function returns incomplete type `C` // CHECK:STDERR: ReturnCUsed(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-23]]:1: In import. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-23]]:1: in import // CHECK:STDERR: import library "incomplete_return"; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:4:1: Class was forward declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:4:1: class was forward declared here // CHECK:STDERR: class C; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-29]]:1: In import. + // CHECK:STDERR: fail_use_imported.carbon:[[@LINE-29]]:1: in import // CHECK:STDERR: import library "incomplete_return"; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_incomplete_return.carbon:8:18: Return type declared here. + // CHECK:STDERR: fail_incomplete_return.carbon:8:18: return type declared here // 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 8a770517264c..9709b3dbd881 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: `default` not allowed on `fn` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed on `fn` declaration outside of an interface // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `protected` must appear before `default`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` must appear before `default` // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here // CHECK:STDERR: default protected fn WrongOrder(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default protected fn WrongOrder(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: ERROR: `virtual` not allowed on `fn` declaration outside of a class. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `virtual` not allowed on `fn` declaration outside of a class // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `virtual` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `virtual` repeated on declaration // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `virtual` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `virtual` previously appeared here // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: virtual virtual fn DuplicateVirtual() {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `protected` not allowed on declaration with `private`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` not allowed on declaration with `private` // CHECK:STDERR: private protected fn TwoAccess(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here // CHECK:STDERR: private protected fn TwoAccess(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private protected fn TwoAccess(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: ERROR: `abstract` not allowed on `fn` declaration outside of a class. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `abstract` not allowed on `fn` declaration outside of a class // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: ERROR: `virtual` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:10: error: `virtual` not allowed on declaration with `abstract` // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `abstract` previously appeared here // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract virtual fn ModifiersConflict() {} -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: ERROR: `base` not allowed on `fn` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `base` not allowed on `fn` declaration // CHECK:STDERR: base fn InvalidModifier(); // CHECK:STDERR: ^~~~ // CHECK:STDERR: base fn InvalidModifier(); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: ERROR: `default` not allowed on `fn` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:1: error: `default` not allowed on `fn` declaration outside of an interface // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:9: ERROR: `final` not allowed on declaration with `default`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:9: error: `final` not allowed on declaration with `default` // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: `default` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: `default` previously appeared here // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:15: ERROR: `virtual` not allowed on declaration with `default`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:15: error: `virtual` not allowed on declaration with `default` // CHECK:STDERR: default final virtual fn ModifiersConflict2() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here // 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: `private` must appear before `extern`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:8: error: `private` must appear before `extern` // CHECK:STDERR: extern private fn ExternOrderAndConflict() {} // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `extern` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `extern` previously appeared here // 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 422034455004..e7569c43ab2d 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: Expected name in binding pattern. +// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+7]]:6: error: expected name in binding pattern // CHECK:STDERR: fn F((a: {}, b: {}), c: {}); // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_pattern_in_signature.carbon:[[@LINE+3]]:6: ERROR: 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.` // 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 9d43a458fd5f..4c7cc0f62c0b 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: Redeclaration of `fn A` is redundant. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn A` is redundant // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously declared here // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn A(); fn B(x: ()); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: ERROR: Redeclaration of `fn B` is redundant. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn B` is redundant // CHECK:STDERR: fn B(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously declared here // CHECK:STDERR: fn B(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: fn B(x: ()); fn C(); -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: ERROR: 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 // CHECK:STDERR: fn C(x: ()); // CHECK:STDERR: ^~~~~~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously declared with parameter count of 0. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously declared with parameter count of 0 // CHECK:STDERR: fn C(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn C(x: ()); fn D() {} -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: ERROR: Redeclaration of `fn D` is redundant. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+7]]:1: error: redeclaration of `fn D` is redundant // CHECK:STDERR: fn D(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously declared here // CHECK:STDERR: fn D() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn D(); fn E() {} -// CHECK:STDERR: fail_redecl.carbon:[[@LINE+6]]:1: ERROR: Redefinition of `fn E`. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE+6]]:1: error: redefinition of `fn E` // CHECK:STDERR: fn E() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: Previously defined here. +// CHECK:STDERR: fail_redecl.carbon:[[@LINE-4]]:1: previously defined here // 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 1aaaf4d99669..d6b1fced5240 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: Semantics TODO: `function with positional parameters`. +// CHECK:STDERR: fail_no_body.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` // 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: Semantics TODO: `function with positional parameters`. +// CHECK:STDERR: fail_todo_brace_body.carbon:[[@LINE+4]]:1: error: semantics TODO: `function with positional parameters` // 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: Semantics TODO: `function with positional parameters`. +// CHECK:STDERR: fail_todo_arrow_body.carbon:[[@LINE+7]]:1: error: semantics TODO: `function with positional parameters` // CHECK:STDERR: fn A => 0; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: -// 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. +// 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 // 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 b88bb4446cc6..0d55a85b5504 100644 --- a/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/declaration/no_prelude/implicit_import.carbon @@ -30,17 +30,17 @@ extern fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+14]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+14]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "extern_api"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: extern_api.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_api.carbon:4:1: previously declared here // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+4]]:1: ERROR: 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 // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -56,13 +56,13 @@ fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+9]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+9]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "extern_impl"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: extern_impl.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_impl.carbon:4:1: previously declared here // 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 5a2ed6d02e46..6da5ee625bc5 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: 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 // 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: 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 // 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 93034c3712ca..d82ad2da7ca9 100644 --- a/toolchain/check/testdata/function/definition/import.carbon +++ b/toolchain/check/testdata/function/definition/import.carbon @@ -47,24 +47,24 @@ library "[[@TEST_NAME]]"; import library "fns"; -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `fn A` is redundant. +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+10]]:1: error: redeclaration of `fn A` is redundant // CHECK:STDERR: fn A() {}; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "fns"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fns.carbon:4:1: Previously declared here. +// CHECK:STDERR: fns.carbon:4:1: previously declared here // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: fn A() {}; -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `fn B` is redundant. +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE+10]]:1: error: redeclaration of `fn B` is redundant // CHECK:STDERR: fn B(b: i32) -> i32; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-16]]:1: In import. +// CHECK:STDERR: fail_def_ownership.carbon:[[@LINE-16]]:1: in import // CHECK:STDERR: import library "fns"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fns.carbon:5:1: Previously declared here. +// CHECK:STDERR: fns.carbon:5:1: previously declared here // CHECK:STDERR: fn B(b: i32) -> i32 { return b; } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -76,25 +76,25 @@ library "[[@TEST_NAME]]"; import library "extern"; -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+10]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "extern"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern.carbon:4:1: previously declared here // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn A(); -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE+10]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-17]]:1: In import. +// CHECK:STDERR: fail_redecl_then_def.carbon:[[@LINE-17]]:1: in import // CHECK:STDERR: import library "extern"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: extern.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern.carbon:4:1: previously declared here // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -106,13 +106,13 @@ library "[[@TEST_NAME]]"; import library "fns"; -// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE+9]]:1: ERROR: Redeclarations of `fn D` must match use of `extern`. +// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE+9]]:1: error: redeclarations of `fn D` must match use of `extern` // CHECK:STDERR: extern fn D(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_mix_extern_decl.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "fns"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fns.carbon:7:1: Previously declared here. +// CHECK:STDERR: fns.carbon:7:1: previously declared here // 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 4209af15f694..7d86ef99a2c7 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: Name `Def` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:13: error: name `Def` not found // 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: Name `Def` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:13: error: name `Def` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:13: error: name `ForwardWithDef` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:13: error: name `ForwardWithDef` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:13: error: name `Forward` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:13: error: name `Forward` not found // 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 cb3c0e0c4589..6c55f238cbb1 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: 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` // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_def_extern_mismatch.carbon:[[@LINE-4]]:1: previously declared here // 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: 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` // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_def_extern_mismatch_reverse.carbon:[[@LINE-4]]:1: previously declared here // 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: Redeclaration of `fn F` is redundant. +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-4]]:1: previously declared here // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn F(); -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE+7]]:1: ERROR: 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` // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-12]]:1: Previously declared here. +// CHECK:STDERR: fail_extern_diag_suppressed.carbon:[[@LINE-12]]:1: previously declared here // 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: Redeclaration of `fn F` is redundant. +// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE+7]]:1: error: redeclaration of `fn F` is redundant // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE-4]]:1: Previously declared here. +// CHECK:STDERR: fail_extern_decl_after_def.carbon:[[@LINE-4]]:1: previously declared here // 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: `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 // 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 fc1be380eabd..87ab3f27d3f1 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/extern_library.carbon @@ -54,13 +54,13 @@ extern fn F(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn F` must match use of `extern`. +// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE+10]]:1: error: redeclarations of `fn F` must match use of `extern` // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_two_file_impl_mismatch.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "two_file_impl_mismatch"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: two_file_impl_mismatch.carbon:4:1: Previously declared here. +// CHECK:STDERR: two_file_impl_mismatch.carbon:4:1: previously declared here // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -82,7 +82,7 @@ import library "indirect_two_file_extern"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_indirect_two_file.impl.carbon:[[@LINE+4]]:1: ERROR: `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 // CHECK:STDERR: extern fn F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -104,7 +104,7 @@ impl library "[[@TEST_NAME]]"; import library "in_impl_extern"; -// CHECK:STDERR: fail_in_impl.impl.carbon:[[@LINE+3]]:1: ERROR: `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 // 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 d5006930eb40..5e08fb658d5e 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: 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 // CHECK:STDERR: fn F(x: ()) {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: Previously declared with parameter count of 0. +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: previously declared with parameter count of 0 // 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: 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 // CHECK:STDERR: fn G() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: Previously declared with parameter count of 1. +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: previously declared with parameter count of 1 // 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: 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 // 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: 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 `()` // CHECK:STDERR: fn I() -> () { return (); } // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: Previously declared with no return type. +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: previously declared with no return type // CHECK:STDERR: fn I(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn I() -> () { return (); } fn J() -> (); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+7]]:1: ERROR: 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 // CHECK:STDERR: fn J() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: Previously declared with return type `()`. +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: previously declared with return type `()` // CHECK:STDERR: fn J() -> (); // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: fn J() {} fn K() -> (); -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE+6]]:1: ERROR: 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 `{}` // CHECK:STDERR: fn K() -> {} { return {}; } // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: Previously declared with return type `()`. +// CHECK:STDERR: fail_decl_param_mismatch.carbon:[[@LINE-4]]:1: previously declared with return type `()` // 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 aa7fa5ecb601..faab2709109e 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: Redefinition of `fn F`. +// CHECK:STDERR: fail_redef.carbon:[[@LINE+6]]:1: error: redefinition of `fn F` // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redef.carbon:[[@LINE-4]]:1: Previously defined here. +// CHECK:STDERR: fail_redef.carbon:[[@LINE-4]]:1: previously defined here // 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 260461b990fc..00397ca24832 100644 --- a/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon +++ b/toolchain/check/testdata/function/definition/no_prelude/implicit_import.carbon @@ -30,13 +30,13 @@ extern fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE+10]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_extern_api.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "extern_api"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: extern_api.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_api.carbon:4:1: previously declared here // CHECK:STDERR: extern fn A(); // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: @@ -52,13 +52,13 @@ fn A(); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+10]]:1: ERROR: Redeclarations of `fn A` must match use of `extern`. +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE+10]]:1: error: redeclarations of `fn A` must match use of `extern` // CHECK:STDERR: extern fn A() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_extern_impl.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "extern_impl"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: extern_impl.carbon:4:1: Previously declared here. +// CHECK:STDERR: extern_impl.carbon:4:1: previously declared here // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -74,13 +74,13 @@ fn A() {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `fn A` is redundant. +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE+10]]:1: error: redeclaration of `fn A` is redundant // CHECK:STDERR: fn A(); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_redecl_after_def.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "redecl_after_def"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: redecl_after_def.carbon:4:1: Previously declared here. +// CHECK:STDERR: redecl_after_def.carbon:4:1: previously declared here // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -96,13 +96,13 @@ fn A() {} impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+10]]:1: ERROR: Redefinition of `fn A`. +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE+10]]:1: error: redefinition of `fn A` // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_redef_after_def.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "redef_after_def"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: redef_after_def.carbon:4:1: Previously defined here. +// CHECK:STDERR: redef_after_def.carbon:4:1: previously defined here // CHECK:STDERR: fn A() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -119,13 +119,13 @@ alias B = A; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE+9]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn B() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_def_alias.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "def_alias"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: def_alias.carbon:5:7: Name is previously declared here. +// CHECK:STDERR: def_alias.carbon:5:7: name is previously declared here // 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 010d81d25e3f..80512c7fff48 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here // CHECK:STDERR: fn Foo(a: (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:11: Comparing with previous declaration here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:11: comparing with previous declaration here // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:8: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn Foo(b: D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:8: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:8: previous declaration's corresponding parameter here // 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here // CHECK:STDERR: fn Foo(a: D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:11: Comparing with previous declaration here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:11: comparing with previous declaration here // 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]]:11: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:11: error: redeclaration syntax differs here // CHECK:STDERR: fn Foo[a: D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:11: Comparing with previous declaration here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:11: comparing with previous declaration here // 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: `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 // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:17: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:17: error: redeclaration syntax differs here // CHECK:STDERR: fn Foo(a: const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:17: Comparing with previous declaration here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:17: comparing with previous declaration here // 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 eb70a284ee28..17fcc66c6381 100644 --- a/toolchain/check/testdata/function/generic/deduce.carbon +++ b/toolchain/check/testdata/function/generic/deduce.carbon @@ -32,10 +32,10 @@ fn ExplicitAndAlsoDeduced(T:! type, x: T) -> T*; // TODO: This should presumably be accepted. We shouldn't deduce values for parameters with explicitly-specified values. fn CallExplicitAndAlsoDeduced(n: i32) -> i32* { - // CHECK:STDERR: fail_todo_explicit_vs_deduced.carbon:[[@LINE+7]]:10: ERROR: Inconsistent deductions for value of generic parameter `T`. + // CHECK:STDERR: fail_todo_explicit_vs_deduced.carbon:[[@LINE+7]]:10: error: inconsistent deductions for value of generic parameter `T` // CHECK:STDERR: return ExplicitAndAlsoDeduced(A, {}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_explicit_vs_deduced.carbon:[[@LINE-7]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_todo_explicit_vs_deduced.carbon:[[@LINE-7]]:1: while deducing parameters of generic declared here // CHECK:STDERR: fn ExplicitAndAlsoDeduced(T:! type, x: T) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -59,10 +59,10 @@ library "[[@TEST_NAME]]"; fn TupleParam[T:! type](x: (T, i32)); fn CallTupleParam() { - // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE+7]]:3: ERROR: Cannot deduce value for generic parameter `T`. + // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` // CHECK:STDERR: TupleParam((1, 2)); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE-6]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE-6]]:1: while deducing parameters of generic declared here // CHECK:STDERR: fn TupleParam[T:! type](x: (T, i32)); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -72,10 +72,10 @@ fn CallTupleParam() { fn StructParam[T:! type](x: {.a: T, .b: i32}); fn CallStructParam() { - // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE+7]]:3: ERROR: Cannot deduce value for generic parameter `T`. + // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `T` // CHECK:STDERR: StructParam({.a = 1, .b = 2}); // CHECK:STDERR: ^~~~~~~~~~~~ - // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE-6]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_todo_deduce_nested.carbon:[[@LINE-6]]:1: while deducing parameters of generic declared here // CHECK:STDERR: fn StructParam[T:! type](x: {.a: T, .b: i32}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -91,10 +91,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: Cannot deduce value for generic parameter `U`. + // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE+7]]:3: error: cannot deduce value for generic parameter `U` // CHECK:STDERR: ImplicitNotDeducible(42); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_deduce_incomplete.carbon:[[@LINE-6]]:1: while deducing parameters of generic declared here // CHECK:STDERR: fn ImplicitNotDeducible[T:! type, U:! type](x: T) -> U; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -108,10 +108,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: 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` // CHECK:STDERR: ImplicitNotDeducible(42, {.x = 12}); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: While deducing parameters of generic declared here. + // CHECK:STDERR: fail_deduce_inconsistent.carbon:[[@LINE-6]]:1: while deducing parameters of generic declared here // 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 9b6b270b82c8..5ee0d3109752 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: Semantics TODO: `symbolic array bound`. +// CHECK:STDERR: fail_todo_param_in_type.carbon:[[@LINE+3]]:24: error: semantics TODO: `symbolic array bound` // 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 33cc17d7a928..cb0fb9748116 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: 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 // 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 bdea341e8733..e324b0d10917 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: 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*` // CHECK:STDERR: fn F(T:! type, U:! type) -> U* { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-5]]:1: Previously declared with return type `T*`. +// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-5]]:1: previously declared with return type `T*` // 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: 1 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE+7]]:10: error: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: Calling function declared here. + // CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: calling function declared here // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:6: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn F(U:! type, T:! type) -> T* { // CHECK:STDERR: ^ -// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:6: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_reorder.carbon:[[@LINE-5]]:6: previous declaration's corresponding parameter here // 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: 1 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_reorder.carbon:[[@LINE+7]]:10: error: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: Calling function declared here. + // CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: calling function declared here // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_rename.carbon:[[@LINE+7]]:6: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn F(U:! type, T:! type) -> U* { // CHECK:STDERR: ^ -// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:6: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_rename.carbon:[[@LINE-5]]:6: previous declaration's corresponding parameter here // 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: 1 argument(s) passed to function expecting 2 argument(s). + // CHECK:STDERR: fail_rename.carbon:[[@LINE+6]]:10: error: 1 argument(s) passed to function expecting 2 argument(s). // CHECK:STDERR: return F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: Calling function declared here. + // CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: calling function declared here // CHECK:STDERR: fn F(T:! type, U:! type) -> T*; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ return F(T); diff --git a/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon b/toolchain/check/testdata/if/fail_reachable_fallthrough.carbon index c26de406fc7a..9e03eaee0e58 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: 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 // 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: 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 // 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: 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 // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/check/testdata/if/fail_scope.carbon b/toolchain/check/testdata/if/fail_scope.carbon index 8e38708fb2a7..7095251f29fd 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: Name `n` not found. + // CHECK:STDERR: fail_scope.carbon:[[@LINE+3]]:10: error: name `n` not found // 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 e209099aad76..061d4384f51c 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: 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.` // 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: 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.` // 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: 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.` // 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: 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.` // 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: 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.` // 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: 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.` // 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 7f6033a4a440..0bcdf3370d80 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_non_constant_condition.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression // 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression // 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression // 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 afd292f6d83e..1924b5aa5803 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: Name `Undeclared` not found. + // CHECK:STDERR: fail_call_invalid.carbon:[[@LINE+3]]:14: error: name `Undeclared` not found // 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 2eaedb74a934..facfcf2a9920 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: Cannot `extend` a parameterized `impl`. + // CHECK:STDERR: fail_extend_impl_forall.carbon:[[@LINE+3]]:3: error: cannot `extend` a parameterized `impl` // 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 dafb2aeeea16..f0ef855d9347 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: `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 // 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 32f64437de5c..cc40e986ede0 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: 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 // 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: 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 // CHECK:STDERR: extend impl D as I; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:15: Remove the explicit `Self` type here. + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+4]]:15: remove the explicit `Self` type here // 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: 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 // CHECK:STDERR: extend impl Self as I {} // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+3]]:15: Remove the explicit `Self` type here. + // CHECK:STDERR: fail_extend_impl_type_as.carbon:[[@LINE+3]]:15: remove the explicit `Self` type here // 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 cd633b481096..4cd118390ecd 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: Semantics TODO: `extending non-interface constraint`. + // CHECK:STDERR: fail_extend_non_interface.carbon:[[@LINE+3]]:3: error: semantics TODO: `extending non-interface constraint` // 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 d39ca356061c..872a40ac2b73 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: `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` // CHECK:STDERR: extend impl as I; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE-5]]:1: Interface is currently being defined. + // CHECK:STDERR: fail_extend_partially_defined_interface.carbon:[[@LINE-5]]:1: interface is currently being defined // 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 f28a57f0e91e..adfddcff3971 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: `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` // CHECK:STDERR: extend impl as I; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE-6]]:1: Interface was forward declared here. + // CHECK:STDERR: fail_extend_undefined_interface.carbon:[[@LINE-6]]:1: interface was forward declared here // 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 1d078b01be62..81d1ae79c907 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: `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 // 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 08e65962f60e..07189f730557 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: 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` // 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 a47b0dce6f19..38ab1bc35c9a 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: 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 // CHECK:STDERR: impl as I {} // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-6]]:15: Associated function F declared here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-6]]:15: associated function F declared here // 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: 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 // CHECK:STDERR: class F; // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-18]]:15: Associated function F declared here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-18]]:15: associated function F declared here // 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: 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 // CHECK:STDERR: alias F = PossiblyF; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-34]]:15: Associated function F declared here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-34]]:15: associated function F declared here // 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: 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 // CHECK:STDERR: fn F(b: bool); // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-47]]:15: Previously declared with parameter count of 0. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-47]]:15: previously declared with parameter count of 0 // 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: 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 // CHECK:STDERR: fn F[self: Self](); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-60]]:15: Previously declared without implicit parameter list. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-60]]:15: previously declared without implicit parameter list // 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: 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` // CHECK:STDERR: fn F() -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-74]]:15: Previously declared with no return type. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-74]]:15: previously declared with no return type // 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: 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 // CHECK:STDERR: fn F[self: bool]() -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-7]]:15: Previously declared with parameter count of 1. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-7]]:15: previously declared with parameter count of 1 // 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: 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 // CHECK:STDERR: fn F(b: bool) -> bool; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-20]]:15: Previously declared with implicit parameter list. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-20]]:15: previously declared with implicit parameter list // 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: 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 // CHECK:STDERR: fn F[self: bool](b: bool); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-33]]:15: Previously declared with return type `bool`. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-33]]:15: previously declared with return type `bool` // 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: Redeclaration differs at parameter 1. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn F[self: bool](b: Self) -> bool; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: Previous declaration's corresponding parameter here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-46]]:32: previous declaration's corresponding parameter here // 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: Redeclaration differs at implicit parameter 1. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at implicit parameter 1 // CHECK:STDERR: fn F[self: Self](b: bool) -> bool; // CHECK:STDERR: ^~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: Previous declaration's corresponding implicit parameter here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-59]]:20: previous declaration's corresponding implicit parameter here // 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: 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` // CHECK:STDERR: fn F[self: bool](b: bool) -> Self; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-72]]:15: Previously declared with return type `bool`. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-72]]:15: previously declared with return type `bool` // 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: Redeclaration differs at parameter 1. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:22: error: redeclaration differs at parameter 1 // CHECK:STDERR: fn F[self: bool](not_b: bool) -> bool; // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-86]]:32: Previous declaration's corresponding parameter here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-86]]:32: previous declaration's corresponding parameter here // 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: Redeclaration differs at parameter 1. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE+7]]:10: error: redeclaration differs at parameter 1 // 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: Previous declaration's corresponding parameter here. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-8]]:8: previous declaration's corresponding parameter here // 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: 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]` // 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: Previously declared with return type `[SelfNestedBadReturnType; 4]`. + // CHECK:STDERR: fail_impl_bad_assoc_fn.carbon:[[@LINE-21]]:3: previously declared with return type `[SelfNestedBadReturnType; 4]` // 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 54602adfc887..2f63ad428f22 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: Semantics TODO: `impl as non-interface`. +// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+10]]:1: error: semantics TODO: `impl as non-interface` // CHECK:STDERR: impl i32 as false {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+6]]:13: ERROR: 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` // CHECK:STDERR: impl i32 as false {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+3]]:13: Type `bool` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_impl_bad_interface.carbon:[[@LINE+3]]:13: type `bool` does not implement interface `ImplicitAs` // 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 ad9f7479cc2a..0f2964464db7 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: Redefinition of `impl i32 as I`. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE+6]]:1: error: redefinition of `impl i32 as I` // CHECK:STDERR: impl i32 as I {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-5]]:1: Previous definition was here. +// CHECK:STDERR: fail_redefinition.carbon:[[@LINE-5]]:1: previous definition was here // 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 0f424e53edb3..9f99d151f22c 100644 --- a/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon +++ b/toolchain/check/testdata/impl/fail_todo_impl_assoc_const.carbon @@ -10,7 +10,7 @@ interface I { let T:! type; } -// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+3]]:14: ERROR: Semantics TODO: `HandleWhereOperand`. +// CHECK:STDERR: fail_todo_impl_assoc_const.carbon:[[@LINE+3]]:14: error: semantics TODO: `HandleWhereOperand` // 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 30754ddd64b9..748bc8cea4f8 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: 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 // CHECK:STDERR: C.F(); // CHECK:STDERR: ^~~ // CHECK:STDERR: C.F(); - // 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. + // 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 // 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 24150ca5965a..ca5ec67a874f 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: 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 // CHECK:STDERR: return C.F(); // CHECK:STDERR: ^~~ return C.F(); 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 3f34039b9f8c..64c5a62ea631 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: 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 // CHECK:STDERR: impl true as I {} // CHECK:STDERR: ^~~~ impl true as I {} diff --git a/toolchain/check/testdata/impl/no_prelude/interface_args.carbon b/toolchain/check/testdata/impl/no_prelude/interface_args.carbon index 91d56bce6c9b..d65de71d0ce1 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: 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 // 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: 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 // 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 c0462d46c21b..9796a16d2c52 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: 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 // 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: 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 // 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 572aeb7edb2b..2736b9650c78 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: 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]` // 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: 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]` // 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 4761b296e58b..e8e045c7c83e 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: 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` // CHECK:STDERR: var b: i32 = a[2.6]; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: Type `f64` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_array_non_int_indexing.carbon:[[@LINE+3]]:16: type `f64` does not implement interface `ImplicitAs` // 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 79e5b57d255e..b0fb96292511 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: 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]` // 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 64152ed266f2..cf331cd68210 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: 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 // 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: Expression is not assignable. + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+4]]:3: error: expression is not assignable // 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: 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 // 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: Expression is not assignable. + // CHECK:STDERR: fail_expr_category.carbon:[[@LINE+3]]:3: error: expression is not assignable // 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 5b99bff629f5..abd686ca2835 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: Expression cannot be used as a value. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error: expression cannot be used as a value // 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: Expression cannot be used as a value. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+4]]:14: error: expression cannot be used as a value // 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: 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 // 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: Type `type` does not support indexing. +// CHECK:STDERR: fail_invalid_base.carbon:[[@LINE+3]]:14: error: type `type` does not support indexing // 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 d51f29a85b6b..521fa2043bdf 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: Name `a` not found. + // CHECK:STDERR: fail_name_not_found.carbon:[[@LINE+3]]:16: error: name `a` not found // 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 9fff5c3f159d..4f5f77d6ba24 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: 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 // 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 2b6d33bb9a55..2c4c3a4fa284 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: Type `i32` does not support indexing. + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+3]]:3: error: type `i32` does not support indexing // 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 2808b4f7fd2c..fc31dec40b68 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: 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` // CHECK:STDERR: let T:! type = 42; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ - // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_assoc_const_bad_default.carbon:[[@LINE+3]]:3: type `i32` does not implement interface `ImplicitAs` // 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 f7be47c4e9ae..04a71bd3e713 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` // 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_assoc_const_default.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` // 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 ebd8e1d917c5..b6179bb88e93 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` // 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_define_default_fn_inline.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` // 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 09e4944e4d0b..65e1d70be078 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` // 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` // 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: 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 // CHECK:STDERR: fn Interface.F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: Name is previously declared here. +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-12]]:3: name is previously declared here // 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: 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 // 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: Name is previously declared here. +// CHECK:STDERR: fail_todo_define_default_fn_out_of_line.carbon:[[@LINE-15]]:3: name is previously declared here // 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 5727fa06d231..c2fbf5b60c76 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: 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 // 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: Name `Outer` not found. + // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+4]]:8: error: name `Outer` not found // CHECK:STDERR: fn Outer.F(); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fn Outer.F(); } - // CHECK:STDERR: fail_add_member_outside_definition.carbon:[[@LINE+3]]:12: ERROR: 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 // 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 386e094720c7..3492670e26b7 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: 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` // 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 761e8059c6fd..e00029fc47f9 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: 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 // CHECK:STDERR: let a: i32; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_assoc_const_not_constant.carbon:[[@LINE+3]]:10: ERROR: 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 // 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 497f29f65d53..2a588fdac67c 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: Semantics TODO: `HandleTemplate`. + // CHECK:STDERR: fail_assoc_const_template.carbon:[[@LINE+3]]:7: error: semantics TODO: `HandleTemplate` // 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 bb460f9bb5ab..7d7e9ee1e470 100644 --- a/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon +++ b/toolchain/check/testdata/interface/no_prelude/fail_definition_imported.carbon @@ -19,13 +19,13 @@ interface I; library "[[@TEST_NAME]]"; import library "a"; -// CHECK:STDERR: fail_b.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_b.carbon:[[@LINE+9]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: interface I {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_b.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "a"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: a.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: a.carbon:4:1: name is previously declared here // 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 88183e0a0f4d..0956acf41a6b 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: Redefinition of `interface Interface`. +// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` // CHECK:STDERR: interface Interface { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: Previously defined here. +// CHECK:STDERR: fail_redefine_without_dependents.carbon:[[@LINE-5]]:1: previously defined here // 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: Redefinition of `interface Interface`. +// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE+7]]:1: error: redefinition of `interface Interface` // CHECK:STDERR: interface Interface { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: Previously defined here. +// CHECK:STDERR: fail_redefine_with_dependents.carbon:[[@LINE-5]]:1: previously defined here // 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: 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 // CHECK:STDERR: interface Function; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: Name is previously declared here. +// CHECK:STDERR: fail_name_conflict_with_fn.carbon:[[@LINE-5]]:1: name is previously declared here // 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: 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 // CHECK:STDERR: interface Class { } // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: Name is previously declared here. +// CHECK:STDERR: fail_name_conflict_with_class.carbon:[[@LINE-5]]:1: name is previously declared here // 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 dd5d11057882..ef813502237d 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: Redeclaration differs because of parameter list. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of parameter list // CHECK:STDERR: interface NotGeneric(T:! type) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: Previously declared without parameter list. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: previously declared without parameter list // 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: Redeclaration differs because of missing parameter list. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+7]]:1: error: redeclaration differs because of missing parameter list // CHECK:STDERR: interface Generic {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: Previously declared with parameter list. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:1: previously declared with parameter list // 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: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE+6]]:27: error: redeclaration differs at parameter 1 // CHECK:STDERR: interface DifferentParams(T:! ()) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_generic_redeclaration.carbon:[[@LINE-4]]:27: previous declaration's corresponding parameter here // 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 57556582dc03..403dfcd1e5a6 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: 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` // CHECK:STDERR: fn Undefined.F(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: Interface was forward declared here. +// CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-5]]:1: interface was forward declared here // CHECK:STDERR: interface Undefined; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: fn Undefined.F(); fn Test() { - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: ERROR: Member access into undefined interface `Undefined`. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+7]]:3: error: member access into undefined interface `Undefined` // CHECK:STDERR: Undefined.G(); // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: Interface was forward declared here. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-15]]:1: interface was forward declared here // 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: Member access into undefined interface `BeingDefined`. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+11]]:13: error: member access into undefined interface `BeingDefined` // CHECK:STDERR: fn H() -> BeingDefined.T; // CHECK:STDERR: ^~~~~~~~~~~~~~ - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: Interface is currently being defined. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE-4]]:1: interface is currently being defined // CHECK:STDERR: interface BeingDefined { // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: ERROR: Name `T` not found. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+4]]:13: error: name `T` not found // CHECK:STDERR: fn H() -> BeingDefined.T; // CHECK:STDERR: ^~~~~~~~~~~~~~ // CHECK:STDERR: fn H() -> BeingDefined.T; - // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: ERROR: Name `BeingDefined` not found. + // CHECK:STDERR: fail_lookup_undefined.carbon:[[@LINE+3]]:6: error: name `BeingDefined` not found // 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 1d22bbf0ade0..c634153de07d 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: 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 // CHECK:STDERR: Interface.F(); // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: Interface.F(); - // CHECK:STDERR: fail_member_lookup.carbon:[[@LINE+3]]:10: ERROR: 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 // 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 146d99cf44dd..5d7566b4dcde 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: `abstract` not allowed on `interface` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `abstract` not allowed on `interface` declaration // CHECK:STDERR: abstract interface Abstract { // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: abstract interface Abstract { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: ERROR: `default` not allowed on `interface` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `default` not allowed on `interface` declaration // CHECK:STDERR: default interface Default; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default interface Default; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: ERROR: `virtual` not allowed on `interface` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `interface` declaration // CHECK:STDERR: virtual interface Virtual { // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: virtual interface Virtual { } -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: ERROR: `protected` not allowed on `interface` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `protected` not allowed on `interface` declaration at file scope, `protected` is only allowed on class members // 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 98304d08d751..f89ed760424b 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: 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 // CHECK:STDERR: fn F(); // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: Name is previously declared here. + // CHECK:STDERR: fail_redeclare_member.carbon:[[@LINE-4]]:3: name is previously declared here // 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 51c70ba0d2e4..164b05acac0e 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: 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 // 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: 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 // 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 8a20f77bc15a..a5081732ef23 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: 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 // 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: Name is previously declared here. +// CHECK:STDERR: fail_todo_generic_default_fn.carbon:[[@LINE-6]]:3: name is previously declared here // 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 a63f39dee3fa..c3e9a7319697 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: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+4]]:3: error: semantics TODO: `interface modifier` // CHECK:STDERR: final fn Final() { } // CHECK:STDERR: ^~~~~ // CHECK:STDERR: final fn Final() { } - // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: ERROR: Semantics TODO: `interface modifier`. + // CHECK:STDERR: fail_todo_modifiers.carbon:[[@LINE+3]]:3: error: semantics TODO: `interface modifier` // 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 f588fa9cfb03..a953106a79c9 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: 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 // CHECK:STDERR: F(T); // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:6: Initializing generic parameter `T` declared here. + // CHECK:STDERR: fail_mismatched_args.carbon:[[@LINE-6]]:6: initializing generic parameter `T` declared here // 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 25ab474bbf58..5eb685772fde 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: 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 // 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: 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 // 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 4f72b9769948..25b7e375497c 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: Name `Def` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:9: error: name `Def` not found // 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: Name `Def` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+4]]:9: error: name `Def` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_local_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found // 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: Name `ForwardWithDef` not found. +// CHECK:STDERR: fail_other_forward_with_def.carbon:[[@LINE+4]]:9: error: name `ForwardWithDef` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_todo_forward.impl.carbon:[[@LINE+4]]:9: error: name `Forward` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_local_forward.carbon:[[@LINE+4]]:9: error: name `Forward` not found // 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: Name `Forward` not found. +// CHECK:STDERR: fail_other_forward.carbon:[[@LINE+3]]:9: error: name `Forward` not found // 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 5069fe824523..83a8fe2b5e1f 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: Redeclaration syntax differs here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here // CHECK:STDERR: interface Foo(a:! (C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: Comparing with previous declaration here. +// CHECK:STDERR: fail_parens.carbon:[[@LINE-4]]:19: comparing with previous declaration here // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -69,24 +69,24 @@ interface Bar(a:! D); impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: interface Foo(a:! C) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "two_file"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: two_file.carbon:7:1: Name is previously declared here. +// CHECK:STDERR: two_file.carbon:7:1: name is previously declared here // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: interface Foo(a:! C) {} -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: interface Bar(a:! D) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-16]]:6: In import. +// CHECK:STDERR: fail_todo_two_file.impl.carbon:[[@LINE-16]]:6: in import // CHECK:STDERR: impl library "two_file"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: two_file.carbon:8:1: Name is previously declared here. +// CHECK:STDERR: two_file.carbon:8:1: name is previously declared here // CHECK:STDERR: interface Bar(a:! D); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -100,10 +100,10 @@ class C {} alias D = C; interface Foo(a:! C); -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: ERROR: Redeclaration differs at parameter 1. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE+7]]:15: error: redeclaration differs at parameter 1 // CHECK:STDERR: interface Foo(b:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: Previous declaration's corresponding parameter here. +// CHECK:STDERR: fail_name_mismatch.carbon:[[@LINE-4]]:15: previous declaration's corresponding parameter here // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -117,10 +117,10 @@ class C {} alias D = C; interface Foo(a:! C); -// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here // CHECK:STDERR: interface Foo(a:! D) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: Comparing with previous declaration here. +// CHECK:STDERR: fail_alias.carbon:[[@LINE-4]]:19: comparing with previous declaration here // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -134,10 +134,10 @@ class C {} alias D = C; interface Foo[a:! C](); -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE+7]]:19: error: redeclaration syntax differs here // CHECK:STDERR: interface Foo[a:! D]() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: Comparing with previous declaration here. +// CHECK:STDERR: fail_deduced_alias.carbon:[[@LINE-4]]:19: comparing with previous declaration here // CHECK:STDERR: interface Foo[a:! C](); // CHECK:STDERR: ^ // CHECK:STDERR: @@ -160,13 +160,13 @@ 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+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: interface Foo(a:! D) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6: In import. +// CHECK:STDERR: fail_alias_two_file.impl.carbon:[[@LINE-10]]:6: in import // CHECK:STDERR: impl library "alias_two_file"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: alias_two_file.carbon:6:1: Name is previously declared here. +// CHECK:STDERR: alias_two_file.carbon:6:1: name is previously declared here // CHECK:STDERR: interface Foo(a:! C); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: @@ -179,14 +179,14 @@ library "[[@TEST_NAME]]"; class C {} interface Foo(a:! const C); -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+10]]:19: WARNING: `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 // CHECK:STDERR: interface Foo(a:! const (const C)) {} // CHECK:STDERR: ^~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: ERROR: Redeclaration syntax differs here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE+6]]:25: error: redeclaration syntax differs here // CHECK:STDERR: interface Foo(a:! const (const C)) {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: Comparing with previous declaration here. +// CHECK:STDERR: fail_repeat_const.carbon:[[@LINE-8]]:25: comparing with previous declaration here // CHECK:STDERR: interface Foo(a:! const C); // CHECK:STDERR: ^ interface Foo(a:! const (const C)) {} diff --git a/toolchain/check/testdata/let/fail_duplicate_decl.carbon b/toolchain/check/testdata/let/fail_duplicate_decl.carbon index 41a1491598d0..1d40b74dbbb6 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: 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 // CHECK:STDERR: let a: i32 = 2; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: Name is previously declared here. + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: name is previously declared here // 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 b0e2213a2b67..f644f40e9144 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: Cannot implicitly convert from `i32` to `T`. + // CHECK:STDERR: fail_generic.carbon:[[@LINE+7]]:3: error: cannot implicitly convert from `i32` to `T` // CHECK:STDERR: let x: T = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ - // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:3: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_generic.carbon:[[@LINE+4]]:3: type `i32` does not implement interface `ImplicitAs` // CHECK:STDERR: let x: T = 5; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: let x: T = 5; - // CHECK:STDERR: fail_generic.carbon:[[@LINE+6]]:3: ERROR: Cannot implicitly convert from `T` to `i32`. + // CHECK:STDERR: fail_generic.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `T` to `i32` // CHECK:STDERR: return x; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:3: Type `` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_generic.carbon:[[@LINE+3]]:3: type `` does not implement interface `ImplicitAs` // 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 87671e84d427..757d9194f737 100644 --- a/toolchain/check/testdata/let/fail_generic_import.carbon +++ b/toolchain/check/testdata/let/fail_generic_import.carbon @@ -19,10 +19,10 @@ let T:! type = i32; impl package Implicit; // TODO: Should this be valid? -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+6]]:1: ERROR: Cannot implicitly convert from `i32` to `T`. +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+6]]:1: error: cannot implicitly convert from `i32` to `T` // CHECK:STDERR: let a: T = 0; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:1: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:1: type `i32` does not implement interface `ImplicitAs` // 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 b7837c0008d1..c98fe70f9d88 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: Expected `=`; `let` declaration must have an initializer. +// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+4]]:11: error: expected `=`; `let` declaration must have an initializer // CHECK:STDERR: let n: i32; // CHECK:STDERR: ^ // CHECK:STDERR: let n: i32; fn F() { - // CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:13: ERROR: Expected `=`; `let` declaration must have an initializer. + // CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:13: error: expected `=`; `let` declaration must have an initializer // 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 17ba612fcb74..59df1ef75aa8 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: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members // 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: `default` not allowed on `let` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `default` not allowed on `let` declaration outside of an interface // 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: `final` not allowed on `let` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `final` not allowed on `let` declaration outside of an interface // 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: `virtual` not allowed on `let` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `let` declaration // 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: `default` not allowed on `let` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed on `let` declaration outside of an interface // CHECK:STDERR: default final let f: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `final` not allowed on declaration with `default`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `final` not allowed on declaration with `default` // CHECK:STDERR: default final let f: i32 = 1; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here // 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: `default` not allowed on `let` declaration outside of an interface. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `default` not allowed on `let` declaration outside of an interface // CHECK:STDERR: default default let g: i32 = 1; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `default` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `default` repeated on declaration // CHECK:STDERR: default default let g: i32 = 1; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `default` previously appeared here // 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: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members // CHECK:STDERR: protected private let h: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: ERROR: `private` not allowed on declaration with `protected`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error: `private` not allowed on declaration with `protected` // CHECK:STDERR: protected private let h: i32 = 1; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `protected` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `protected` previously appeared here // 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: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+10]]:1: error: `protected` not allowed on `let` declaration at file scope, `protected` is only allowed on class members // CHECK:STDERR: protected protected let i: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:11: ERROR: `protected` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+6]]:11: error: `protected` repeated on declaration // CHECK:STDERR: protected protected let i: i32 = 1; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `protected` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: `protected` previously appeared here // 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 dda4189519f3..83d6fdb30dca 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: Name `a` not found. + // CHECK:STDERR: fail_use_in_init.carbon:[[@LINE+3]]:16: error: name `a` not found // CHECK:STDERR: let a: i32 = a; // CHECK:STDERR: ^ let a: i32 = a; diff --git a/toolchain/check/testdata/let/no_prelude/import_access.carbon b/toolchain/check/testdata/let/no_prelude/import_access.carbon index 17f4123e6c60..c2b451cf46f2 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: Name `v` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error: name `v` not found // 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: Name `v` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error: name `v` not found // 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 a7c2d07ef2e0..c671aa1897da 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_after_merge.carbon @@ -24,13 +24,13 @@ import library "namespace"; // imported declaration. namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-9]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-9]]:1: in import // CHECK:STDERR: import library "namespace"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: namespace.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: namespace.carbon:4:1: name is previously declared here // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -40,13 +40,13 @@ fn NS(); // we don't move it. namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-25]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-25]]:1: in import // CHECK:STDERR: import library "namespace"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: namespace.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: namespace.carbon:4:1: name is previously declared here // 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 3dbd62b6d9c2..774c09594755 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_first.carbon @@ -20,13 +20,13 @@ package Example; import library "namespace"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "namespace"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: namespace.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: namespace.carbon:4:1: name is previously declared here // 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 0687e227580c..e4c20dbd745a 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_nested.carbon @@ -16,21 +16,21 @@ namespace Nested; // --- fail_conflict.carbon import Other; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+7]]:1: ERROR: 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 // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-4]]:1: Name is previously declared here. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-4]]:1: name is previously declared here // CHECK:STDERR: import Other; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: namespace Other; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:10: ERROR: Imported packages cannot be used for declarations. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:10: error: imported packages cannot be used for declarations // CHECK:STDERR: fn Other.Nested.F(); // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-12]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-12]]:1: in import // CHECK:STDERR: import Other; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:3:1: Package imported here. +// CHECK:STDERR: fn.carbon:3:1: package imported here // 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 7720ced879de..91496bf841cc 100644 --- a/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon +++ b/toolchain/check/testdata/namespace/fail_conflict_imported_namespace_second.carbon @@ -20,25 +20,25 @@ package Example; import library "fn"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: fn.carbon:4:1: name is previously declared here // CHECK:STDERR: fn NS(); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: namespace NS; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:4: ERROR: Name qualifiers are only allowed for entities that provide a scope. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+9]]:4: error: name qualifiers are only allowed for entities that provide a scope // CHECK:STDERR: fn NS.Foo(); // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE-17]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE-17]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:4:1: Referenced non-scope entity declared here. +// CHECK:STDERR: fn.carbon:4:1: referenced non-scope entity declared here // 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 f2f2a4f93038..571146f4afc0 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,16 +25,16 @@ fn NS() {} package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import library "namespace"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fn.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn NS() {} // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import library "namespace"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: namespace.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: namespace.carbon:4:1: name is previously declared here // 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 5a4bdcf6c2a8..eeb3a57fd8d1 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,16 +25,16 @@ fn NS.Foo() {} package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: namespace.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: namespace.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: fn.carbon:4:1: name is previously declared here // 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 13357c314aca..51c9989142e1 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: 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 // CHECK:STDERR: fn ns.A() -> i32 { return 0; } // CHECK:STDERR: ^~ -// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE-6]]:7: Referenced non-scope entity declared here. +// CHECK:STDERR: fail_decl_in_alias.carbon:[[@LINE-6]]:7: referenced non-scope entity declared here // 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 6c543f51928e..f43401601a49 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: Redefinition of `fn Baz`. +// CHECK:STDERR: fail_duplicate.carbon:[[@LINE+6]]:1: error: redefinition of `fn Baz` // CHECK:STDERR: fn Foo.Baz() { // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_duplicate.carbon:[[@LINE-6]]:1: Previously defined here. +// CHECK:STDERR: fail_duplicate.carbon:[[@LINE-6]]:1: previously defined here // 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 51542f215387..06299919e854 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: `private` not allowed on `namespace` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+33]]:1: error: `private` not allowed on `namespace` declaration // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+29]]:9: ERROR: `extern` not allowed on `namespace` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+29]]:9: error: `extern` not allowed on `namespace` declaration // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:16: ERROR: `abstract` not allowed on `namespace` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+25]]:16: error: `abstract` not allowed on `namespace` declaration // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:25: ERROR: `base` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+21]]:25: error: `base` not allowed on declaration with `abstract` // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:16: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+18]]:16: `abstract` previously appeared here // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:30: ERROR: `default` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+14]]:30: error: `default` not allowed on declaration with `abstract` // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:16: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:16: `abstract` previously appeared here // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:38: ERROR: `final` not allowed on declaration with `abstract`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:38: error: `final` not allowed on declaration with `abstract` // CHECK:STDERR: private extern abstract base default final namespace A; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:16: `abstract` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:16: `abstract` previously appeared here // 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: `impl` not allowed on `namespace` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `impl` not allowed on `namespace` declaration // CHECK:STDERR: impl namespace B; // CHECK:STDERR: ^~~~ // CHECK:STDERR: impl namespace B; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: ERROR: `extern` not allowed on `namespace` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `extern` not allowed on `namespace` declaration // 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 049d75502318..f47078e3a16e 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: `namespace` declaration cannot have parameters. +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters // 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: `namespace` declaration cannot have parameters. +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters // CHECK:STDERR: namespace B(n: i32); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: namespace B(n: i32); -// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: ERROR: `namespace` declaration cannot have parameters. +// CHECK:STDERR: fail_params.carbon:[[@LINE+4]]:12: error: `namespace` declaration cannot have parameters // 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: Redeclaration differs because of parameter list. +// CHECK:STDERR: fail_params.carbon:[[@LINE+6]]:4: error: redeclaration differs because of parameter list // CHECK:STDERR: fn D(T:! type).F() {} // CHECK:STDERR: ^ -// CHECK:STDERR: fail_params.carbon:[[@LINE-4]]:1: Previously declared without parameter list. +// CHECK:STDERR: fail_params.carbon:[[@LINE-4]]:1: previously declared without parameter list // 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 1eb2872e323e..d8750b098629 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: Name `Foo` not found. +// CHECK:STDERR: fail_unresolved_scope.carbon:[[@LINE+3]]:4: error: name `Foo` not found // 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 ec5ef6eb284d..46db4938c922 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+12]]:11: error: cannot evaluate type expression // 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: 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.` // 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: 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.` // 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_and_or_not_in_function.carbon:[[@LINE+11]]:10: error: cannot evaluate type expression // 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: 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.` // 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: 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.` // 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 cb75d0735bfe..5b2eec34b721 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression // 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_non_constant_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression // 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+4]]:10: error: cannot evaluate type expression // 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: Cannot evaluate type expression. + // CHECK:STDERR: fail_despite_known_result.carbon:[[@LINE+3]]:10: error: cannot evaluate type expression // 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 7f38ec7e3c8e..50c3bd144ce9 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: Name `undeclared` not found. + // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+4]]:3: error: name `undeclared` not found // CHECK:STDERR: undeclared = 42; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: undeclared = 42; - // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+3]]:4: ERROR: Name `also_undeclared` not found. + // CHECK:STDERR: fail_assignment_to_error.carbon:[[@LINE+3]]:4: error: name `also_undeclared` not found // 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 33f4af64824a..ca2c8a420682 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: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // CHECK:STDERR: 1 = 2; // CHECK:STDERR: ^ // CHECK:STDERR: 1 = 2; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: ERROR: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // CHECK:STDERR: F() = 1; // CHECK:STDERR: ^~~ // CHECK:STDERR: F() = 1; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: ERROR: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // 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: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // 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: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // CHECK:STDERR: i32 = i32*; // CHECK:STDERR: ^~~ // CHECK:STDERR: i32 = i32*; - // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: ERROR: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // 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: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+4]]:3: error: expression is not assignable // 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: Expression is not assignable. + // CHECK:STDERR: fail_assignment_to_non_assignable.carbon:[[@LINE+3]]:3: error: expression is not assignable // 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 9df9dd73f5b2..2806fb69998e 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: 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 // CHECK:STDERR: a = a.(a); // CHECK:STDERR: ^~~~~ // CHECK:STDERR: a = a.(a); - // 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. + // 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 // 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 599bb8b88e62..9764e11174bb 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: Cannot implicitly convert from `i32` to `bool`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:17: error: cannot implicitly convert from `i32` to `bool` // CHECK:STDERR: var x: bool = not 12; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:17: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:17: type `i32` does not implement interface `ImplicitAs` // 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 19f9b2903691..e78631b1e6d3 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: 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` // CHECK:STDERR: a = 5.6; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:3: Type `f64` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_type_mismatch_assignment.carbon:[[@LINE+3]]:3: type `f64` does not implement interface `ImplicitAs` // 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 0af5fcb5882e..371829335083 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: 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 // CHECK:STDERR: return 12 + 3.4 + 12; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: - // 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. + // 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 // 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 50c84f357402..450463495ec4 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: 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 // 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 174a55b9917c..68213563f1d2 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: 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 // 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: 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 // 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]]:10: ERROR: Cannot implicitly convert from `D` to `C`. + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+10]]:10: error: cannot implicitly convert from `D` to `C` // CHECK:STDERR: return a == b; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+7]]:10: Type `D` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE+7]]:10: type `D` does not implement interface `ImplicitAs` // CHECK:STDERR: return a == b; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE-11]]:3: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_no_impl_for_args.carbon:[[@LINE-11]]:3: initializing parameter 1 of function declared here // 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: 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 // 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 71bd4c588e19..a7c65de7b7b1 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]]:3: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+7]]:3: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: ++a; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-10]]:14: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-10]]:14: initializing `addr self` parameter of method declared here // 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]]:5: ERROR: `addr self` method cannot be invoked on a value. + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE+6]]:5: error: `addr self` method cannot be invoked on a value // CHECK:STDERR: a += b; // CHECK:STDERR: ^~ - // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-18]]:14: Initializing `addr self` parameter of method declared here. + // CHECK:STDERR: fail_assign_non_ref.carbon:[[@LINE-18]]:14: initializing `addr self` parameter of method declared here // 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 53b76dc45aae..7f750ce4420a 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: 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 // 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: 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 // 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: 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 // CHECK:STDERR: a += b; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: a += b; - // 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. + // 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 // 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 7ed217656b5a..2cedd2b2506e 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]]:10: ERROR: Cannot implicitly convert from `D` to `C`. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+10]]:10: error: cannot implicitly convert from `D` to `C` // CHECK:STDERR: return a + b; // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:10: Type `D` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+7]]:10: type `D` does not implement interface `ImplicitAs` // CHECK:STDERR: return a + b; // CHECK:STDERR: ^~~~~ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-13]]:3: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-13]]:3: initializing parameter 1 of function declared here // 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]]:3: ERROR: Cannot implicitly convert from `D` to `C`. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+9]]:3: error: cannot implicitly convert from `D` to `C` // CHECK:STDERR: a += b; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+6]]:3: Type `D` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE+6]]:3: type `D` does not implement interface `ImplicitAs` // CHECK:STDERR: a += b; // CHECK:STDERR: ^~~~~~ - // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-25]]:3: Initializing parameter 1 of function declared here. + // CHECK:STDERR: fail_no_impl_for_arg.carbon:[[@LINE-25]]:3: initializing parameter 1 of function declared here // 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 bc3cc616ef6c..01a8b513d72b 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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 27ba0e420428..9af6c13f5d3a 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: Name `x` not found. + // CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:16: error: name `x` not found // 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 b719211ccabf..17846b621ca0 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: Corresponding API for 'Foo' not found. +// CHECK:STDERR: fail_no_api.impl.carbon:[[@LINE+4]]:6: error: corresponding API for 'Foo' not found // 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: 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 // 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: 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 // 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 ec337f779ccc..868628b1036d 100644 --- a/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon +++ b/toolchain/check/testdata/packages/fail_conflict_no_namespaces.carbon @@ -24,16 +24,16 @@ var Foo: i32; package Example library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: var.carbon:4:5: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: var.carbon:4:5: error: duplicate name being declared in the same scope // CHECK:STDERR: var Foo: i32; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_conflict.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import library "fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fn.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: fn.carbon:4:1: name is previously declared here // 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 4a83070fc46f..c67865a5ce01 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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 d2c3090b4073..5f9029a3847a 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: Main//default previously provided by `main1.carbon`. +// CHECK:STDERR: fail_main2.carbon: error: `Main//default` previously provided by `main1.carbon` // CHECK:STDERR: // --- main1.carbon @@ -20,7 +20,7 @@ library "lib"; // --- fail_main_lib2.carbon -// CHECK:STDERR: fail_main_lib2.carbon:[[@LINE+4]]:1: ERROR: 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` // 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: 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` // 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: 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` // 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 352640cf5af5..da7f2ee72111 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: File extension of `.carbon` required for `api`. +// CHECK:STDERR: fail_main.incorrect: error: file extension of `.carbon` required for `api` // CHECK:STDERR: -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: ERROR: 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` // CHECK:STDERR: -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: ERROR: File extension of `.carbon` required for `api`. -// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: 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` +// CHECK:STDERR: fail_main_redundant_with_swapped_ext.impl.carbon: file extension of `.impl.carbon` only allowed for `impl` // CHECK:STDERR: // --- fail_main.incorrect @@ -21,7 +21,7 @@ // --- fail_main_lib.incorrect -// CHECK:STDERR: fail_main_lib.incorrect:[[@LINE+4]]:1: ERROR: File extension of `.carbon` required for `api`. +// CHECK:STDERR: fail_main_lib.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for `api` // 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: 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` // 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: File extension of `.carbon` required for `api`. +// CHECK:STDERR: fail_package.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for `api` // 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: 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` // 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: File extension of `.carbon` required for `api`. +// CHECK:STDERR: fail_package_lib.incorrect:[[@LINE+4]]:1: error: file extension of `.carbon` required for `api` // 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: 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` // 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: 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` // CHECK:STDERR: package SwappedExt; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_swapped_ext.impl.carbon: File extension of `.impl.carbon` only allowed for `impl`. +// CHECK:STDERR: fail_swapped_ext.impl.carbon: file extension of `.impl.carbon` only allowed for `impl` // CHECK:STDERR: package SwappedExt; // --- fail_swapped_ext.carbon -// CHECK:STDERR: fail_swapped_ext.carbon:[[@LINE+3]]:6: ERROR: 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` // 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 1fcbc82fb023..45a226c631f9 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: File cannot import itself. +// CHECK:STDERR: fail_default_api.carbon:[[@LINE+4]]:1: error: file cannot import itself // 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: 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 // 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: 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 // 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: Cannot import `Main//default`. +// CHECK:STDERR: fail_main_lib_import_default.carbon:[[@LINE+3]]:1: error: cannot import `Main//default` // 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 181ad0ef756b..820205fd10d7 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: 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 // CHECK:STDERR: import Main; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Main; -// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: ERROR: 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 // 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: Cannot import `Main` from other packages. +// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error: cannot import `Main` from other packages // CHECK:STDERR: import Main; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Main; -// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: ERROR: Cannot import `Main` from other packages. +// CHECK:STDERR: fail_not_main.carbon:[[@LINE+4]]:1: error: cannot import `Main` from other packages // 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: File cannot import itself. +// CHECK:STDERR: fail_this.carbon:[[@LINE+4]]:1: error: file cannot import itself // 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: File cannot import itself. +// CHECK:STDERR: fail_this_lib.carbon:[[@LINE+4]]:1: error: file cannot import itself // 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: 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 // 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: 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 // 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: Imported API 'ImportNotFound' not found. +// CHECK:STDERR: fail_not_found.carbon:[[@LINE+3]]:1: error: imported API 'ImportNotFound' not found // 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 eaa540a46d49..4bf397dbade9 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: Library imported more than once. +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once // CHECK:STDERR: import Api; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: First import here. +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: first import here // CHECK:STDERR: import Api; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: import Api; import Api library "api_lib"; -// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: ERROR: Library imported more than once. +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once // CHECK:STDERR: import Api library "api_lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: First import here. +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: first import here // 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: Library imported more than once. +// CHECK:STDERR: fail_import.carbon:[[@LINE+7]]:1: error: library imported more than once // CHECK:STDERR: import library "main_lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: First import here. +// CHECK:STDERR: fail_import.carbon:[[@LINE-4]]:1: first import here // 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: Library imported more than once. +// CHECK:STDERR: fail_default_import.carbon:[[@LINE+6]]:1: error: library imported more than once // CHECK:STDERR: import library default; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_default_import.carbon:[[@LINE-4]]:1: First import here. +// CHECK:STDERR: fail_default_import.carbon:[[@LINE-4]]:1: first import here // 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 ad098c15a069..1c26b0d02faa 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: Name `x` not found. +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:12: error: name `x` not found // CHECK:STDERR: var a_ref: x; // CHECK:STDERR: ^ // CHECK:STDERR: var a_ref: x; -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:18: ERROR: Name `x` not found. +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:18: error: name `x` not found // 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: Name `x` not found. +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+4]]:13: error: name `x` not found // CHECK:STDERR: var c_ref: (x,); // CHECK:STDERR: ^ // CHECK:STDERR: var c_ref: (x,); -// CHECK:STDERR: fail_implicit.carbon:[[@LINE+3]]:12: ERROR: Name `x` not found. +// CHECK:STDERR: fail_implicit.carbon:[[@LINE+3]]:12: error: name `x` not found // 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 ff81fcbef4f4..788a39a8b146 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: Corresponding API for 'Implicit' not found. +// CHECK:STDERR: fail_implicit.impl.carbon:[[@LINE+3]]:6: error: corresponding API for 'Implicit' not found // 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 21bc1a37b149..e6522df8f56f 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: `Main//default` must omit `package` declaration. +// CHECK:STDERR: fail_main.carbon:[[@LINE+4]]:1: error: `Main//default` must omit `package` declaration // 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: `Main//default` must omit `package` declaration. +// CHECK:STDERR: fail_main_impl.carbon:[[@LINE+4]]:6: error: `Main//default` must omit `package` declaration // 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: `Main//default` must omit `package` declaration. +// CHECK:STDERR: fail_raw_main.carbon:[[@LINE+4]]:1: error: `Main//default` must omit `package` declaration // 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: Use `library` declaration in `Main` package libraries. +// CHECK:STDERR: fail_main_lib.carbon:[[@LINE+3]]:1: error: use `library` declaration in `Main` package libraries // 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 98d8de79216b..99a9a22671eb 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_export.carbon @@ -153,22 +153,22 @@ import Other library "conflict"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import Other library "export_import"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: base.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: base.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import Other library "export_import"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: conflict.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: conflict.carbon:4:1: name is previously declared here // 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: In name lookup for `C`. +// CHECK:STDERR: fail_conflict_on_export_import.carbon:[[@LINE+4]]:11: in name lookup for `C` // CHECK:STDERR: alias C = Other.C; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -178,25 +178,25 @@ alias C = Other.C; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+15]]:1: In import. +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+15]]:1: in import // CHECK:STDERR: import Other library "export_name"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: conflict.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: conflict.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn C() {} // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+9]]:1: In import. +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+9]]:1: in import // CHECK:STDERR: import Other library "export_name"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: export_name.carbon:4:1: In import. +// CHECK:STDERR: export_name.carbon:4:1: in import // CHECK:STDERR: import library "base"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: base.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: base.carbon:4:1: name is previously declared here // 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: In name lookup for `C`. +// CHECK:STDERR: fail_conflict_on_export_name.carbon:[[@LINE+3]]:11: in name lookup for `C` // 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 fe950e7dbbdc..754168d567dd 100644 --- a/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon +++ b/toolchain/check/testdata/packages/no_prelude/cross_package_import.carbon @@ -70,23 +70,23 @@ fn Run() { library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_fn_extern.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: other_fn_extern.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: extern fn F(); // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_fn.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: other_fn.carbon:4:1: name is previously declared here // 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: In name lookup for `F`. + // CHECK:STDERR: fail_todo_main_use_other_extern.carbon:[[@LINE+4]]:3: in name lookup for `F` // CHECK:STDERR: Other.F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -104,23 +104,23 @@ import Other library "other_fn_conflict"; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+12]]:1: In import. +// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+12]]:1: in import // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_fn_conflict.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: other_fn_conflict.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: fn F(x: ()) {} // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+6]]:1: In import. +// CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+6]]:1: in import // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_fn.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: other_fn.carbon:4:1: name is previously declared here // 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: In name lookup for `F`. + // CHECK:STDERR: fail_main_use_other_ambiguous.carbon:[[@LINE+4]]:3: in name lookup for `F` // CHECK:STDERR: Other.F(); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: @@ -132,25 +132,25 @@ fn Run() { library "[[@TEST_NAME]]"; import library "main_other_ns"; -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+10]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+10]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-4]]:1: In import. +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-4]]:1: in import // CHECK:STDERR: import library "main_other_ns"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: main_other_ns.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: main_other_ns.carbon:4:1: name is previously declared here // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ // CHECK:STDERR: import Other library "other_fn"; -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+10]]:1: ERROR: Redeclaration of `fn F` is redundant. +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE+10]]:1: error: redeclaration of `fn F` is redundant // CHECK:STDERR: fn Other.F() {} // CHECK:STDERR: ^~~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_main_namespace_conflict.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: other_fn.carbon:4:1: Previously declared here. +// CHECK:STDERR: other_fn.carbon:4:1: previously declared here // CHECK:STDERR: fn F() {} // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: @@ -162,10 +162,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE+7]]:1: ERROR: 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 // CHECK:STDERR: namespace Other; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE-5]]:1: Name is previously declared here. +// CHECK:STDERR: fail_main_reopen_other.carbon:[[@LINE-5]]:1: name is previously declared here // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -180,10 +180,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE+7]]:11: ERROR: 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 // CHECK:STDERR: namespace Other.Nested; // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE-5]]:1: Package imported here. +// CHECK:STDERR: fail_main_reopen_other_nested.carbon:[[@LINE-5]]:1: package imported here // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -198,10 +198,10 @@ library "[[@TEST_NAME]]"; import Other library "other_fn"; -// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE+7]]:4: ERROR: 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 // CHECK:STDERR: fn Other.G() {} // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE-5]]:1: Package imported here. +// CHECK:STDERR: fail_main_add_to_other.carbon:[[@LINE-5]]:1: package imported here // CHECK:STDERR: import Other library "other_fn"; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -213,7 +213,7 @@ library "[[@TEST_NAME]]"; import Other library "other_fn_use"; -// CHECK:STDERR: fail_use_other_fn_use.carbon:[[@LINE+3]]:13: ERROR: Name `F` not found. +// CHECK:STDERR: fail_use_other_fn_use.carbon:[[@LINE+3]]:13: error: name `F` not found // 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 0fcd046fa847..3196ab2a3798 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: `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 // 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: Name `C` not found. +// CHECK:STDERR: fail_use_non_export.carbon:[[@LINE+3]]:15: error: name `C` not found // 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 e07332ad0a46..a505ad129049 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: Name `D` not found. +// CHECK:STDERR: fail_nonexport_use_both.carbon:[[@LINE+3]]:8: error: name `D` not found // 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 c61a1594da3d..d9c7a7062866 100644 --- a/toolchain/check/testdata/packages/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/packages/no_prelude/export_name.carbon @@ -87,13 +87,13 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_export_ns.carbon:[[@LINE+10]]:1: ERROR: Only imported entities are valid for `export`. +// CHECK:STDERR: fail_export_ns.carbon:[[@LINE+10]]:1: error: only imported entities are valid for `export` // CHECK:STDERR: export NS; // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_export_ns.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_export_ns.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "base"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: base.carbon:8:1: Name is declared here. +// CHECK:STDERR: base.carbon:8:1: name is declared here // CHECK:STDERR: namespace NS; // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -105,10 +105,10 @@ library "[[@TEST_NAME]]"; class Local {} -// CHECK:STDERR: fail_export_decl.carbon:[[@LINE+7]]:1: ERROR: Only imported entities are valid for `export`. +// CHECK:STDERR: fail_export_decl.carbon:[[@LINE+7]]:1: error: only imported entities are valid for `export` // CHECK:STDERR: export Local; // CHECK:STDERR: ^~~~~~~~~~~~~ -// CHECK:STDERR: fail_export_decl.carbon:[[@LINE-5]]:1: Name is declared here. +// CHECK:STDERR: fail_export_decl.carbon:[[@LINE-5]]:1: name is declared here // CHECK:STDERR: class Local {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -120,13 +120,13 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_export_member.carbon:[[@LINE+10]]:8: ERROR: Name qualifiers are only allowed for entities that provide a scope. +// CHECK:STDERR: fail_export_member.carbon:[[@LINE+10]]:8: error: name qualifiers are only allowed for entities that provide a scope // CHECK:STDERR: export C.x; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_export_member.carbon:[[@LINE-5]]:1: In import. +// CHECK:STDERR: fail_export_member.carbon:[[@LINE-5]]:1: in import // CHECK:STDERR: import library "base"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: base.carbon:4:1: Referenced non-scope entity declared here. +// CHECK:STDERR: base.carbon:4:1: referenced non-scope entity declared here // CHECK:STDERR: class C { // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -158,12 +158,12 @@ library "[[@TEST_NAME]]"; import library "not_reexporting"; -// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:15: ERROR: Name `C` not found. +// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:15: error: name `C` not found // CHECK:STDERR: alias Local = C; // CHECK:STDERR: ^ // CHECK:STDERR: alias Local = C; -// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:17: ERROR: Name `NS` not found. +// CHECK:STDERR: fail_use_not_reexporting.carbon:[[@LINE+4]]:17: error: name `NS` not found // CHECK:STDERR: alias NSLocal = NS.NSC; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -176,10 +176,10 @@ library "[[@TEST_NAME]]"; import library "base"; export C; -// CHECK:STDERR: repeat_export.carbon:[[@LINE+7]]:1: WARNING: `export` matches previous `export`. +// CHECK:STDERR: repeat_export.carbon:[[@LINE+7]]:1: warning: `export` matches previous `export` // CHECK:STDERR: export C; // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: repeat_export.carbon:[[@LINE-4]]:1: Previous `export` here. +// CHECK:STDERR: repeat_export.carbon:[[@LINE-4]]:1: previous `export` here // CHECK:STDERR: export C; // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: @@ -199,7 +199,7 @@ library "[[@TEST_NAME]]"; import library "base"; -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: ERROR: `private` not allowed on `export` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `private` not allowed on `export` declaration // 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 2bf8e60d9c29..b39963b38e3e 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,13 +24,13 @@ 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+9]]:8: ERROR: Name qualifiers are only allowed for entities that provide a scope. +// CHECK:STDERR: fail_b.carbon:[[@LINE+9]]:8: error: name qualifiers are only allowed for entities that provide a scope // CHECK:STDERR: export C.n; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_b.carbon:[[@LINE-7]]:1: In import. +// CHECK:STDERR: fail_b.carbon:[[@LINE-7]]:1: in import // CHECK:STDERR: import library "a"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: a.carbon:4:1: Referenced non-scope entity declared here. +// CHECK:STDERR: a.carbon:4:1: referenced non-scope entity declared here // 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 5aa7aad5106a..5a8e846834dc 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: `export` declaration cannot have parameters. +// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:10: error: `export` declaration cannot have parameters // 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 58731eec34aa..c31fbad70fac 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: `export` not allowed on `package` declaration. +// CHECK:STDERR: fail_export_package.carbon:[[@LINE+4]]:1: error: `export` not allowed on `package` declaration // 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: `extend` not allowed on `package` declaration. +// CHECK:STDERR: fail_extend_package.carbon:[[@LINE+4]]:1: error: `extend` not allowed on `package` declaration // 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: `virtual` not allowed on `package` declaration. +// CHECK:STDERR: fail_virtual_package.carbon:[[@LINE+4]]:1: error: `virtual` not allowed on `package` declaration // 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: `private` not allowed on `package` declaration. +// CHECK:STDERR: fail_private_package.carbon:[[@LINE+4]]:1: error: `private` not allowed on `package` declaration // 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: `export` not allowed on `library` declaration. +// CHECK:STDERR: fail_export_library.carbon:[[@LINE+4]]:1: error: `export` not allowed on `library` declaration // 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: `impl` not allowed on `import` declaration. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `impl` not allowed on `import` declaration // CHECK:STDERR: impl import ImplImport; // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: ERROR: Imported API 'ImplImport' not found. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error: imported API 'ImplImport' not found // CHECK:STDERR: impl import ImplImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl import ImplImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: ERROR: `extend` not allowed on `import` declaration. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `extend` not allowed on `import` declaration // CHECK:STDERR: extend import ExtendImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:8: ERROR: Imported API 'ExtendImport' not found. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:8: error: imported API 'ExtendImport' not found // CHECK:STDERR: extend import ExtendImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: extend import ExtendImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: ERROR: `virtual` not allowed on `import` declaration. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `virtual` not allowed on `import` declaration // CHECK:STDERR: virtual import VirtualImport; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:9: ERROR: Imported API 'VirtualImport' not found. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:9: error: imported API 'VirtualImport' not found // CHECK:STDERR: virtual import VirtualImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: virtual import VirtualImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: ERROR: `base` not allowed on `import` declaration. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+8]]:1: error: `base` not allowed on `import` declaration // CHECK:STDERR: base import BaseImport; // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: ERROR: Imported API 'BaseImport' not found. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+4]]:6: error: imported API 'BaseImport' not found // CHECK:STDERR: base import BaseImport; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: base import BaseImport; -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+7]]:1: ERROR: `private` not allowed on `import` declaration. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+7]]:1: error: `private` not allowed on `import` declaration // CHECK:STDERR: private import PrivateImport; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+3]]:9: ERROR: Imported API 'PrivateImport' not found. +// CHECK:STDERR: fail_import_modifiers.carbon:[[@LINE+3]]:9: error: imported API 'PrivateImport' not found // 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 b23a1c3a2b94..c6a4c9eaa945 100644 --- a/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon +++ b/toolchain/check/testdata/packages/no_prelude/implicit_imports_entities.carbon @@ -131,16 +131,16 @@ import Other library "o1"; // --- fail_import_conflict.impl.carbon -// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+13]]:6: In import. +// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+13]]:6: in import // CHECK:STDERR: impl library "import_conflict"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: import_conflict.carbon:4:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: import_conflict.carbon:4:1: error: duplicate name being declared in the same scope // CHECK:STDERR: import Other library "o1"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+7]]:6: In import. +// CHECK:STDERR: fail_import_conflict.impl.carbon:[[@LINE+7]]:6: in import // CHECK:STDERR: impl library "import_conflict"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: local_other.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: local_other.carbon:4:1: name is previously declared here // CHECK:STDERR: class Other {} // CHECK:STDERR: ^~~~~~~~~~~~~ // CHECK:STDERR: @@ -158,16 +158,16 @@ import library "local_other"; impl library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE+12]]:1: ERROR: Duplicate name being declared in the same scope. +// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE+12]]:1: error: duplicate name being declared in the same scope // CHECK:STDERR: import Other library "o1"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_import_conflict_reverse.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl library "import_conflict_reverse"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: import_conflict_reverse.carbon:4:1: In import. +// CHECK:STDERR: import_conflict_reverse.carbon:4:1: in import // CHECK:STDERR: import library "local_other"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: local_other.carbon:4:1: Name is previously declared here. +// CHECK:STDERR: local_other.carbon:4:1: name is previously declared here // 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 a93664dc50fc..9d3368796bf7 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: 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 // 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: 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 // 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: 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 // 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 4b72c05caadc..308a8e6ce30f 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: Name `undeclared` not found. + // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+4]]:4: error: name `undeclared` not found // CHECK:STDERR: &undeclared; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: &undeclared; - // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+7]]:3: ERROR: 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 // CHECK:STDERR: &(&undeclared); // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+3]]:6: ERROR: Name `undeclared` not found. + // CHECK:STDERR: fail_address_of_error.carbon:[[@LINE+3]]:6: error: name `undeclared` not found // 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 cb3e278f9574..3499669e27a3 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: 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 // CHECK:STDERR: &0; // CHECK:STDERR: ^ // CHECK:STDERR: &0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // CHECK:STDERR: &true; // CHECK:STDERR: ^ // CHECK:STDERR: &true; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // CHECK:STDERR: &1.0; // CHECK:STDERR: ^ // CHECK:STDERR: &1.0; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // CHECK:STDERR: &"Hello"; // CHECK:STDERR: ^ // CHECK:STDERR: &"Hello"; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // CHECK:STDERR: &(1, 2); // CHECK:STDERR: ^ // CHECK:STDERR: &(1, 2); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // 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: 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 // CHECK:STDERR: &(true and false); // CHECK:STDERR: ^ // CHECK:STDERR: &(true and false); - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // CHECK:STDERR: &H().a; // CHECK:STDERR: ^ // CHECK:STDERR: &H().a; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // 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: 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 // 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: 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 // CHECK:STDERR: &i32; // CHECK:STDERR: ^ // CHECK:STDERR: &i32; - // CHECK:STDERR: fail_address_of_value.carbon:[[@LINE+4]]:3: ERROR: 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 // 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: 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 // 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: 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 // 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 b43e42298ac5..f06c49669e83 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: Name `undeclared` not found. +// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+4]]:15: error: name `undeclared` not found // CHECK:STDERR: let n: i32 = *undeclared; // CHECK:STDERR: ^~~~~~~~~~ // CHECK:STDERR: let n: i32 = *undeclared; -// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+3]]:15: ERROR: Name `undeclared` not found. +// CHECK:STDERR: fail_deref_error.carbon:[[@LINE+3]]:15: error: name `undeclared` not found // 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 389e1662c799..c283e8a78a77 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: Expression cannot be used as a value. + // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+4]]:4: error: expression cannot be used as a value // CHECK:STDERR: *A; // CHECK:STDERR: ^ // CHECK:STDERR: *A; - // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+3]]:3: ERROR: Expression cannot be used as a value. + // CHECK:STDERR: fail_deref_function.carbon:[[@LINE+3]]:3: error: expression cannot be used as a value // 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 7e4efc72f942..bb3a98dea088 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: Expression cannot be used as a value. + // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+4]]:4: error: expression cannot be used as a value // CHECK:STDERR: *A; // CHECK:STDERR: ^ // CHECK:STDERR: *A; - // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+3]]:3: ERROR: Expression cannot be used as a value. + // CHECK:STDERR: fail_deref_namespace.carbon:[[@LINE+3]]:3: error: expression cannot be used as a value // 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 cc7f660a6391..29fa90136f2e 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: 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` // CHECK:STDERR: *n; // CHECK:STDERR: ^ // CHECK:STDERR: *n; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:4: ERROR: 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` // CHECK:STDERR: n->foo; // CHECK:STDERR: ^~ // CHECK:STDERR: n->foo; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: ERROR: 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 `()` // CHECK:STDERR: *(); // CHECK:STDERR: ^ // CHECK:STDERR: *(); - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:5: ERROR: 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 `()` // CHECK:STDERR: ()->foo; // CHECK:STDERR: ^~ // CHECK:STDERR: ()->foo; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+4]]:3: ERROR: 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 `{}` // CHECK:STDERR: *{}; // CHECK:STDERR: ^ // CHECK:STDERR: *{}; - // CHECK:STDERR: fail_deref_not_pointer.carbon:[[@LINE+3]]:5: ERROR: 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 `{}` // 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 1722a050d694..855b5208911c 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: 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` // CHECK:STDERR: var p: *i32; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+4]]:8: To form a pointer type, write the `*` after the pointee type. +// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+4]]:8: to form a pointer type, write the `*` after the pointee type // CHECK:STDERR: var p: *i32; // CHECK:STDERR: ^ // CHECK:STDERR: var p: *i32; -// CHECK:STDERR: fail_deref_type.carbon:[[@LINE+3]]:12: ERROR: 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` // 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 0bd1b16abb54..b407dd1ba424 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: Cannot implicitly convert from `const {}*` to `const ({}*)`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `const {}*` to `const ({}*)` // CHECK:STDERR: return p; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: Type `const {}*` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: type `const {}*` does not implement interface `ImplicitAs` // 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 8ae46614a017..2704612d8542 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_call_in_type.carbon:[[@LINE+3]]:13: error: cannot evaluate type expression // 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 0c15bfbc81c1..adcd5d96d5d5 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: Name `x` not found. +// CHECK:STDERR: fail_error_in_type.carbon:[[@LINE+3]]:13: error: name `x` not found // 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 bfd2f2da86fa..b8d5d59efc65 100644 --- a/toolchain/check/testdata/return/fail_let_in_type.carbon +++ b/toolchain/check/testdata/return/fail_let_in_type.carbon @@ -9,7 +9,7 @@ // 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:13: error: cannot evaluate type expression // CHECK:STDERR: fn Six() -> x { return 6; } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -17,17 +17,17 @@ fn Six() -> x { return 6; } // TODO: This should probably work. let y:! type = i32; -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+7]]:23: ERROR: Cannot implicitly convert from `i32` to `y`. +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+7]]:23: error: cannot implicitly convert from `i32` to `y` // CHECK:STDERR: fn HalfDozen() -> y { return 6; } // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:23: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+4]]:23: type `i32` does not implement interface `ImplicitAs` // 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+3]]:5: ERROR: Semantics TODO: `HandleTemplate`. +// CHECK:STDERR: fail_let_in_type.carbon:[[@LINE+3]]:5: error: semantics TODO: `HandleTemplate` // 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 6d89af63a107..dc2b88a31d74 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: 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 // 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 1358fb210e32..5a59f1374042 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: 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 // 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 029b7becb871..3569faa2fcea 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: `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 // 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 fba773c885bc..38c6e57ab747 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: 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` // CHECK:STDERR: return 1; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: `returned var` was declared here. + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: `returned var` was declared here // 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: 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` // CHECK:STDERR: return c; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: `returned var` was declared here. + // CHECK:STDERR: fail_return_with_returned_var.carbon:[[@LINE-4]]:16: `returned var` was declared here // 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 9d2907acb11e..66d4f0eb86f8 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: 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 // CHECK:STDERR: returned var v: () = (); // CHECK:STDERR: ^~~~~~~~ - // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE-4]]:1: There was no return type provided. + // CHECK:STDERR: fail_returned_var_no_return_type.carbon:[[@LINE-4]]:1: there was no return type provided // 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 2e69a6712f1a..cbc6e62529a8 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: 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` // CHECK:STDERR: returned var w: i32 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-4]]:18: `returned var` was declared here. + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-4]]:18: `returned var` was declared here // 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: 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` // CHECK:STDERR: returned var w: i32 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-5]]:18: `returned var` was declared here. + // CHECK:STDERR: fail_returned_var_shadow.carbon:[[@LINE-5]]:18: `returned var` was declared here // 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 5a2a064b9814..42b3fdbd52ca 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: 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 // CHECK:STDERR: returned var v: f64 = 0.0; // CHECK:STDERR: ^~~ - // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE-4]]:15: Return type of function is `i32`. + // CHECK:STDERR: fail_returned_var_type.carbon:[[@LINE-4]]:15: return type of function is `i32` // 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 025261fb2bb1..daa62a933578 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: Cannot implicitly convert from `f64` to `i32`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+6]]:3: error: cannot implicitly convert from `f64` to `i32` // CHECK:STDERR: return 1.0; // CHECK:STDERR: ^~~~~~~~~~~ - // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: Type `f64` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_type_mismatch.carbon:[[@LINE+3]]:3: type `f64` does not implement interface `ImplicitAs` // 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 0a025b84e7ec..b126930a30f8 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: 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 // CHECK:STDERR: return 0; // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE-4]]:1: There was no return type provided. + // CHECK:STDERR: fail_value_disallowed.carbon:[[@LINE-4]]:1: there was no return type provided // 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 54b4037d9903..8844490218c3 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: Missing return value. + // CHECK:STDERR: fail_value_missing.carbon:[[@LINE+6]]:3: error: missing return value // CHECK:STDERR: return; // CHECK:STDERR: ^~~~~~~ - // CHECK:STDERR: fail_value_missing.carbon:[[@LINE-4]]:11: Return type of function is `i32`. + // CHECK:STDERR: fail_value_missing.carbon:[[@LINE-4]]:11: return type of function is `i32` // 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 a33e06624fa1..f59dfc1249be 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: Cannot evaluate type expression. +// CHECK:STDERR: fail_var_in_type.carbon:[[@LINE+3]]:13: error: cannot evaluate type expression // 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 51ad996742b2..f556ba804595 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: Name `a` not found. +// CHECK:STDERR: fail_access_into_invalid.carbon:[[@LINE+3]]:10: error: name `a` not found // 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 4267ad901a5f..31430d5c151a 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: Cannot initialize struct with 1 field(s) from struct with 0 field(s). +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:20: error: cannot initialize struct with 1 field(s) from struct with 0 field(s). // 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 6e1f5bcec653..64f204259179 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: Cannot initialize struct with 0 field(s) from struct with 1 field(s). +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error: cannot initialize struct with 0 field(s) from struct with 1 field(s). // 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 a64a60896eb8..9fbb3d3a1947 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: 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 // 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: Field with the same name here. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: field with the same name here // 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: 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 // CHECK:STDERR: let v: {.a: i32, .a: i32} = {.a = 1}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:10: Field with the same name here. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:10: field with the same name here // 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: Duplicated field name `def` in struct literal. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:26: error: duplicated field name `def` in struct literal // CHECK:STDERR: let w: i32 = {.def = 1, .def = 2}.def; // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:16: Field with the same name here. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:16: field with the same name here // 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: Duplicated field name `a` in struct literal. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+7]]:30: error: duplicated field name `a` in struct literal // CHECK:STDERR: var x: {.a: i32} = {.a = 1, .a = 2}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: Field with the same name here. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+4]]:22: field with the same name here // 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: Duplicated field name `b` in struct literal. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+6]]:39: error: duplicated field name `b` in struct literal // CHECK:STDERR: var y: {.b: i32, .c: i32} = {.b = 3, .b = 4}; // CHECK:STDERR: ^ -// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+3]]:31: Field with the same name here. +// CHECK:STDERR: fail_duplicate_name.carbon:[[@LINE+3]]:31: field with the same name here // 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 b9402346a39d..ecdeba217548 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: 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 // 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: 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 // 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 4a8e5f73ea51..d2b9a53cbe4f 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: 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 // 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 169b3e9b209b..c092a9803065 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: Expected identifier after `.`. +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+8]]:13: error: expected identifier after `.` // CHECK:STDERR: fn F() -> {.class: i32}; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+4]]:13: ERROR: Semantics TODO: `Error recovery from keyword name.`. +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+4]]:13: error: semantics TODO: `Error recovery from keyword name.` // CHECK:STDERR: fn F() -> {.class: i32}; // CHECK:STDERR: ^~~~~ // CHECK:STDERR: fn F() -> {.class: i32}; -// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+3]]:19: ERROR: Expected identifier after `.`. +// CHECK:STDERR: fail_keyword_name.carbon:[[@LINE+3]]:19: error: expected identifier after `.` // 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 cdf7056a0e2f..93166472066a 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: 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` // 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 bb03bb4476bc..5509bc5772e8 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: 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 // 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 c0ae3069c7b2..362135546ee2 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: 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` // 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 fb5df11f5068..dfe15031d364 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: Cannot initialize struct with 2 field(s) from struct with 1 field(s). +// CHECK:STDERR: fail_too_few_values.carbon:[[@LINE+3]]:29: error: cannot initialize struct with 2 field(s) from struct with 1 field(s). // 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 712bfd57020b..350bcaa15a54 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: 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}` // CHECK:STDERR: var x: {.a: i32} = {.a: i32}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:1: Type `type` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:1: type `type` does not implement interface `ImplicitAs` // 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 7cbd18438625..c1e885943caf 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: 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` // CHECK:STDERR: var x: {.a = 1}; // CHECK:STDERR: ^~~~~~~~ -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: Type `{.a: i32}` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: type `{.a: i32}` does not implement interface `ImplicitAs` // 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 0c25f8869457..7534e2a68e0a 100644 --- a/toolchain/check/testdata/struct/import.carbon +++ b/toolchain/check/testdata/struct/import.carbon @@ -30,13 +30,13 @@ var c: C({.a = 1, .b = 2}) = F(); // --- fail_bad_type.impl.carbon impl package Implicit; -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+10]]:14: ERROR: Missing value for field `a` in struct initialization. +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+10]]:14: error: missing value for field `a` in struct initialization // CHECK:STDERR: var c_bad: C({.c = 1, .d = 2}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: In import. +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-4]]:6: in import // CHECK:STDERR: impl package Implicit; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: implicit.carbon:8:9: Initializing generic parameter `S` declared here. +// CHECK:STDERR: implicit.carbon:8:9: initializing generic parameter `S` declared here // CHECK:STDERR: class C(S:! {.a: i32, .b: i32}) {} // CHECK:STDERR: ^ // CHECK:STDERR: @@ -45,10 +45,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: 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` // CHECK:STDERR: var c_bad: C({.a = 3, .b = 4}) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: Type `C` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: type `C` does not implement interface `ImplicitAs` // 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 3e4fa00fcea0..c37037734f97 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: 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 // 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 9c84bef02523..fd178e5a9a9a 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: Variable has incomplete type `{.a: Incomplete}`. +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error: Variable has incomplete type `{.a: Incomplete}` // CHECK:STDERR: var s: {.a: Incomplete}; // CHECK:STDERR: ^~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: Class was forward declared here. +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: class was forward declared here // 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 935446598f31..87e794ee9fd5 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: Name `oops` not found. +// CHECK:STDERR: fail_access_error.carbon:[[@LINE+3]]:17: error: name `oops` not found // 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 5da79d8e92c8..d0ab6c334c02 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: 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 `()` // 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 a64378454554..177687fa9f9b 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: 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,)` // 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: 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,)` // 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 e3619c53250a..851737197e70 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: 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 // 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 7fcdf76b28f6..13d5261e3252 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: Tuple index must be a constant. +// CHECK:STDERR: fail_non_deterministic_type.carbon:[[@LINE+3]]:14: error: tuple index must be a constant // 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 f568ae819e57..bb84b8861b1d 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: 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` // CHECK:STDERR: var b: i32 = a.(2.6); // CHECK:STDERR: ^~~ -// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+3]]:17: Type `f64` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_non_int_indexing.carbon:[[@LINE+3]]:17: type `f64` does not implement interface `ImplicitAs` // 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 07d01a21b8ca..ab46330d5c6f 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: Type `i32` does not support indexing. + // CHECK:STDERR: fail_non_tuple_access.carbon:[[@LINE+4]]:3: error: type `i32` does not support indexing // 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: 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 // 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 9b7c07e92a4d..f1c603882b8f 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: 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)` // 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 ebf127091d6e..4a99b26e6699 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: 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)` // 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 3a72cadbddc7..04b259a424ad 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: Cannot initialize tuple of 2 element(s) from tuple with 3 element(s). +// CHECK:STDERR: fail_assign_nested.carbon:[[@LINE+3]]:36: error: cannot initialize tuple of 2 element(s) from tuple with 3 element(s). // 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 41df1f0e5192..31babc84b66b 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: 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` // CHECK:STDERR: var x: (i32, i32) = (2, 65.89); // CHECK:STDERR: ^~~~~~~~~~ -// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:21: Type `f64` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_element_type_mismatch.carbon:[[@LINE+3]]:21: type `f64` does not implement interface `ImplicitAs` // 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 b76b062121cc..0d435f341ab8 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: Variable has incomplete type `(i32, Incomplete)`. +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE+6]]:8: error: Variable has incomplete type `(i32, Incomplete)` // CHECK:STDERR: var t: (i32, Incomplete); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: Class was forward declared here. +// CHECK:STDERR: fail_nested_incomplete.carbon:[[@LINE-5]]:1: class was forward declared here // 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 18ce6f28e3cc..9c5abe72a8d9 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: Cannot initialize tuple of 2 element(s) from tuple with 1 element(s). +// CHECK:STDERR: fail_too_few_element.carbon:[[@LINE+3]]:21: error: cannot initialize tuple of 2 element(s) from tuple with 1 element(s). // 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 12b555ead626..01512b890557 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: Cannot implicitly convert from `type` to `i32`. +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+6]]:18: error: cannot implicitly convert from `type` to `i32` // CHECK:STDERR: var x: (i32, ) = (i32, ); // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:18: Type `type` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_type_assign.carbon:[[@LINE+3]]:18: type `type` does not implement interface `ImplicitAs` // 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 a75d753dfe39..e74f6b2c8064 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: 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` // CHECK:STDERR: var x: (1, ); // CHECK:STDERR: ^~~~~ -// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: Type `i32` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_value_as_type.carbon:[[@LINE+3]]:8: type `i32` does not implement interface `ImplicitAs` // 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 07dc6e6c7d27..f66f29844bde 100644 --- a/toolchain/check/testdata/tuple/import.carbon +++ b/toolchain/check/testdata/tuple/import.carbon @@ -31,13 +31,13 @@ var c: C((1, 2)) = F(); impl package Implicit; -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+10]]:14: ERROR: Cannot initialize tuple of 2 element(s) from tuple with 3 element(s). +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE+10]]:14: error: cannot initialize tuple of 2 element(s) from tuple with 3 element(s). // CHECK:STDERR: var c_bad: C((1, 2, 3)) = F(); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:6: In import. +// CHECK:STDERR: fail_bad_type.impl.carbon:[[@LINE-5]]:6: in import // CHECK:STDERR: impl package Implicit; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: implicit.carbon:7:9: Initializing generic parameter `X` declared here. +// CHECK:STDERR: implicit.carbon:7:9: initializing generic parameter `X` declared here // CHECK:STDERR: class C(X:! (i32, i32)) {} // CHECK:STDERR: ^ // CHECK:STDERR: @@ -47,10 +47,10 @@ var c_bad: C((1, 2, 3)) = F(); impl package Implicit; -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+6]]:1: ERROR: 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` // CHECK:STDERR: var c_bad: C((3, 4)) = F(); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~~~~ -// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: Type `C` does not implement interface `ImplicitAs`. +// CHECK:STDERR: fail_bad_value.impl.carbon:[[@LINE+3]]:1: type `C` does not implement interface `ImplicitAs` // 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 ff6c894e1d35..575a17c71d6f 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: Cannot initialize tuple of 1 element(s) from tuple with 0 element(s). +// CHECK:STDERR: fail_assign_empty.carbon:[[@LINE+3]]:16: error: cannot initialize tuple of 1 element(s) from tuple with 0 element(s). // 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 3d2199958fe8..228c3308e0d4 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: Cannot initialize tuple of 0 element(s) from tuple with 1 element(s). +// CHECK:STDERR: fail_assign_to_empty.carbon:[[@LINE+3]]:13: error: cannot initialize tuple of 0 element(s) from tuple with 1 element(s). // 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 63cfa4b31747..0a8370865d80 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: Cannot copy value of type `String`. + // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+4]]:19: error: cannot copy value of type `String` // 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: Cannot copy value of type `X`. + // CHECK:STDERR: fail_not_copyable.carbon:[[@LINE+3]]:14: error: cannot copy value of type `X` // 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 d7b7ac31a523..c1383c25b4fd 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: 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` // CHECK:STDERR: var x: 1 = 1; // CHECK:STDERR: ^ - // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: Type `i32` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_storage_is_literal.carbon:[[@LINE+3]]:10: type `i32` does not implement interface `ImplicitAs` // 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 0e6393cb548d..7149039333a7 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: 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.` // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:13: ERROR: 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.` // CHECK:STDERR: var x: () = if true then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:21: ERROR: 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.` // 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: 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.` // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+8]]:14: ERROR: 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.` // CHECK:STDERR: var x2: () = if false then () else (); // CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:23: ERROR: 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.` // 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: 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.` // CHECK:STDERR: var y: bool = true or false; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+4]]:15: ERROR: 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.` // 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: 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.` // CHECK:STDERR: var y2: bool = false or true; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_todo_control_flow_init.carbon:[[@LINE+3]]:16: ERROR: 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.` // 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 587499b9381b..0c44b135e8ea 100644 --- a/toolchain/check/testdata/var/no_prelude/export_name.carbon +++ b/toolchain/check/testdata/var/no_prelude/export_name.carbon @@ -34,13 +34,13 @@ export v; library "[[@TEST_NAME]]"; -// CHECK:STDERR: fail_todo_use_export.carbon:[[@LINE+9]]:1: In import. +// CHECK:STDERR: fail_todo_use_export.carbon:[[@LINE+9]]:1: in import // CHECK:STDERR: import library "export"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: export.carbon:4:1: In import. +// CHECK:STDERR: export.carbon:4:1: in import // CHECK:STDERR: import library "base"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: base.carbon:4:5: ERROR: Semantics TODO: `Non-constant ImportRefLoaded (comes up with var)`. +// CHECK:STDERR: base.carbon:4:5: error: semantics TODO: `Non-constant ImportRefLoaded (comes up with var)` // 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 16b710446314..85873746ebc6 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: 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 // CHECK:STDERR: var x: () = (); // CHECK:STDERR: ^ - // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: Name is previously declared here. + // CHECK:STDERR: fail_duplicate_decl.carbon:[[@LINE-4]]:7: name is previously declared here // 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 74cf89cb8dca..df490538c51c 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: `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 // 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 ade64a54f35e..5d707fea0212 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: 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 // 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 4bbade0171da..cc3815ddec31 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: Name `x` not found. + // CHECK:STDERR: fail_init_with_self.carbon:[[@LINE+3]]:15: error: name `x` not found // 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 d9908208907b..fc0b8de67f68 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: Name `x` not found. +// CHECK:STDERR: fail_lookup_outside_scope.carbon:[[@LINE+3]]:13: error: name `x` not found // 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 4ad8ae1bbe13..abc6de74947c 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: `protected` not allowed on `var` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: error: `protected` not allowed on `var` declaration at file scope, `protected` is only allowed on class members // CHECK:STDERR: protected var b: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected var b: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: ERROR: `protected` not allowed on declaration with `private`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:9: error: `protected` not allowed on declaration with `private` // CHECK:STDERR: private protected var c: (); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `private` previously appeared here // CHECK:STDERR: private protected var c: (); // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: private protected var c: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: ERROR: `protected` not allowed on `var` declaration at file scope, `protected` is only allowed on class members. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+11]]:1: error: `protected` not allowed on `var` declaration at file scope, `protected` is only allowed on class members // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: ERROR: `protected` repeated on declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:11: error: `protected` repeated on declaration // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `protected` previously appeared here. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+4]]:1: `protected` previously appeared here // CHECK:STDERR: protected protected var d: (); // CHECK:STDERR: ^~~~~~~~~ // CHECK:STDERR: protected protected var d: (); -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: ERROR: `abstract` not allowed on `var` declaration. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:1: error: `abstract` not allowed on `var` declaration // 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 774075da3747..26c46b63a011 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: 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 // CHECK:STDERR: var A: (); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-5]]:1: Name is previously declared here. +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-5]]:1: name is previously declared here // CHECK:STDERR: namespace A; // CHECK:STDERR: ^~~~~~~~~~~~ // CHECK:STDERR: var A: (); -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE+6]]:5: ERROR: 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 // CHECK:STDERR: var A: () = (); // CHECK:STDERR: ^ -// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-14]]:1: Name is previously declared here. +// CHECK:STDERR: fail_namespace_conflict.carbon:[[@LINE-14]]:1: name is previously declared here // 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 15fd086e20da..d071696e155f 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: Name `v` not found. +// CHECK:STDERR: fail_local_def.carbon:[[@LINE+4]]:14: error: name `v` not found // 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: Name `v` not found. +// CHECK:STDERR: fail_other_def.carbon:[[@LINE+3]]:14: error: name `v` not found // CHECK:STDERR: var v2: () = Test.v; // CHECK:STDERR: ^~~~~~ var v2: () = Test.v; diff --git a/toolchain/check/testdata/where_expr/no_prelude/fail_designator.carbon b/toolchain/check/testdata/where_expr/no_prelude/fail_designator.carbon index 74312758b836..e084fd6ab9c3 100644 --- a/toolchain/check/testdata/where_expr/no_prelude/fail_designator.carbon +++ b/toolchain/check/testdata/where_expr/no_prelude/fail_designator.carbon @@ -14,7 +14,7 @@ library "[[@TEST_NAME]]"; fn Foo() -> () { var x: (); - // CHECK:STDERR: fail_designator_matches_var.carbon:[[@LINE+4]]:10: ERROR: Semantics TODO: `HandleDesignatorExpr`. + // CHECK:STDERR: fail_designator_matches_var.carbon:[[@LINE+4]]:10: error: semantics TODO: `HandleDesignatorExpr` // CHECK:STDERR: return .x; // CHECK:STDERR: ^~ // CHECK:STDERR: @@ -26,7 +26,7 @@ fn Foo() -> () { library "[[@TEST_NAME]]"; fn Bar() -> () { - // CHECK:STDERR: fail_unknown_designator.carbon:[[@LINE+4]]:10: ERROR: Semantics TODO: `HandleDesignatorExpr`. + // CHECK:STDERR: fail_unknown_designator.carbon:[[@LINE+4]]:10: error: semantics TODO: `HandleDesignatorExpr` // CHECK:STDERR: return .undef; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -38,7 +38,7 @@ fn Bar() -> () { library "[[@TEST_NAME]]"; class C { - // CHECK:STDERR: fail_dot_self_method_return_value.carbon:[[@LINE+4]]:28: ERROR: Semantics TODO: `HandleSelfTypeName`. + // CHECK:STDERR: fail_dot_self_method_return_value.carbon:[[@LINE+4]]:28: error: semantics TODO: `HandleSelfTypeName` // CHECK:STDERR: fn F() -> Self { return .Self; } // CHECK:STDERR: ^~~~ // CHECK:STDERR: @@ -50,7 +50,7 @@ class C { library "[[@TEST_NAME]]"; class D { - // CHECK:STDERR: fail_dot_self_method_return_type.carbon:[[@LINE+3]]:14: ERROR: Semantics TODO: `HandleSelfTypeName`. + // CHECK:STDERR: fail_dot_self_method_return_type.carbon:[[@LINE+3]]:14: error: semantics TODO: `HandleSelfTypeName` // CHECK:STDERR: fn G() -> .Self { return Self; } // CHECK:STDERR: ^~~~ fn G() -> .Self { return Self; } diff --git a/toolchain/check/testdata/while/fail_bad_condition.carbon b/toolchain/check/testdata/while/fail_bad_condition.carbon index dcf73f19ccf0..ba997323172e 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: Cannot implicitly convert from `String` to `bool`. + // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+6]]:9: error: cannot implicitly convert from `String` to `bool` // CHECK:STDERR: while ("Hello") {} // CHECK:STDERR: ^~~~~~~~~ - // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+3]]:9: Type `String` does not implement interface `ImplicitAs`. + // CHECK:STDERR: fail_bad_condition.carbon:[[@LINE+3]]:9: type `String` does not implement interface `ImplicitAs` // 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 3447012de006..ca784a4c2838 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: `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 // CHECK:STDERR: continue; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: continue; - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+4]]:3: ERROR: `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 // 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: `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 // CHECK:STDERR: continue; // CHECK:STDERR: ^~~~~~~~ // CHECK:STDERR: continue; - // CHECK:STDERR: fail_break_continue.carbon:[[@LINE+3]]:3: ERROR: `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 // CHECK:STDERR: break; // CHECK:STDERR: ^~~~~ break; diff --git a/toolchain/codegen/codegen.cpp b/toolchain/codegen/codegen.cpp index 9d63b30d38a7..ad0de8fb0733 100644 --- a/toolchain/codegen/codegen.cpp +++ b/toolchain/codegen/codegen.cpp @@ -20,7 +20,7 @@ auto CodeGen::Make(llvm::Module& module, llvm::StringRef target_triple, llvm::TargetRegistry::lookupTarget(target_triple, error); if (!target) { - errors << "ERROR: Invalid target: " << error << "\n"; + errors << "error: invalid target: " << error << "\n"; return {}; } module.setTargetTriple(target_triple); @@ -53,7 +53,7 @@ auto CodeGen::EmitCode(llvm::raw_pwrite_stream& out, llvm::legacy::PassManager pass; // Note that this returns true on an error. if (target_machine_->addPassesToEmitFile(pass, out, nullptr, file_type)) { - errors_ << "ERROR: Unable to emit to this file.\n"; + errors_ << "error: unable to emit to this file\n"; return false; } diff --git a/toolchain/codegen/testdata/fail_target_triple.carbon b/toolchain/codegen/testdata/fail_target_triple.carbon index 3c9f35cc733a..dcceae7684a4 100644 --- a/toolchain/codegen/testdata/fail_target_triple.carbon +++ b/toolchain/codegen/testdata/fail_target_triple.carbon @@ -9,6 +9,6 @@ // To dump output, run: // bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/codegen/testdata/fail_target_triple.carbon // NOAUTOUPDATE -// CHECK:STDERR: ERROR: Invalid target: {{.*}}x86_687{{.*}} +// CHECK:STDERR: error: invalid target: {{.*}}x86_687{{.*}} fn Main() {} diff --git a/toolchain/diagnostics/diagnostic.h b/toolchain/diagnostics/diagnostic.h index 44c62174e68d..98b2426f28e8 100644 --- a/toolchain/diagnostics/diagnostic.h +++ b/toolchain/diagnostics/diagnostic.h @@ -28,8 +28,8 @@ enum class DiagnosticLevel : int8_t { }; // Provides a definition of a diagnostic. For example: -// CARBON_DIAGNOSTIC(MyDiagnostic, Error, "Invalid code!"); -// CARBON_DIAGNOSTIC(MyDiagnostic, Warning, "Found {0}, expected {1}.", +// CARBON_DIAGNOSTIC(MyDiagnostic, Error, "invalid code!"); +// CARBON_DIAGNOSTIC(MyDiagnostic, Warning, "found {0}, expected {1}", // std::string, std::string); // // Arguments are passed to llvm::formatv; see: diff --git a/toolchain/diagnostics/diagnostic_consumer.cpp b/toolchain/diagnostics/diagnostic_consumer.cpp index 8e5e3e40f6a7..b4bf3a353c9a 100644 --- a/toolchain/diagnostics/diagnostic_consumer.cpp +++ b/toolchain/diagnostics/diagnostic_consumer.cpp @@ -21,10 +21,10 @@ auto StreamDiagnosticConsumer::HandleDiagnostic(Diagnostic diagnostic) -> void { *stream_ << ": "; switch (message.level) { case DiagnosticLevel::Error: - *stream_ << "ERROR: "; + *stream_ << "error: "; break; case DiagnosticLevel::Warning: - *stream_ << "WARNING: "; + *stream_ << "warning: "; break; case DiagnosticLevel::Note: break; diff --git a/toolchain/diagnostics/testdata/fail_multiline_token.carbon b/toolchain/diagnostics/testdata/fail_multiline_token.carbon index 83f428e51b8c..75ae95b0983f 100644 --- a/toolchain/diagnostics/testdata/fail_multiline_token.carbon +++ b/toolchain/diagnostics/testdata/fail_multiline_token.carbon @@ -10,7 +10,7 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/diagnostics/testdata/fail_multiline_token.carbon -// CHECK:STDERR: fail_multiline_token.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. +// CHECK:STDERR: fail_multiline_token.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer // CHECK:STDERR: ''' // CHECK:STDERR: ^~~ ''' diff --git a/toolchain/docs/diagnostics.md b/toolchain/docs/diagnostics.md index fef7428850dd..2f6399307fd0 100644 --- a/toolchain/docs/diagnostics.md +++ b/toolchain/docs/diagnostics.md @@ -71,7 +71,7 @@ Diagnostics are used to surface issues from compilation. A simple diagnostic looks like: ```cpp -CARBON_DIAGNOSTIC(InvalidCode, Error, "Code is invalid"); +CARBON_DIAGNOSTIC(InvalidCode, Error, "code is invalid"); emitter.Emit(location, InvalidCode); ``` @@ -85,7 +85,7 @@ the `DiagnosticEmitter`. A diagnostic with an argument looks like: ```cpp -CARBON_DIAGNOSTIC(InvalidCharacter, Error, "Invalid character {0}.", char); +CARBON_DIAGNOSTIC(InvalidCharacter, Error, "invalid character {0}", char); emitter.Emit(location, InvalidCharacter, invalid_char); ``` @@ -127,7 +127,7 @@ CARBON_DIAGNOSTIC(CallArgCountMismatch, Error, "{1} argument(s).", int, int); CARBON_DIAGNOSTIC(InCallToFunction, Note, - "Calling function declared here."); + "calling function declared here"); context.emitter() .Build(call_parse_node, CallArgCountMismatch, arg_refs.size(), param_refs.size()) @@ -147,7 +147,7 @@ DiagnosticAnnotationScope annotate_diagnostics( &context.emitter(), [&](auto& builder) { CARBON_DIAGNOSTIC( InCallToFunctionParam, Note, - "Initializing parameter {0} of function declared here.", int); + "initializing parameter {0} of function declared here", int); builder.Note(param_parse_node, InCallToFunctionParam, diag_param_index + 1); }); diff --git a/toolchain/docs/parse.md b/toolchain/docs/parse.md index 397fc208739b..50465bdf994a 100644 --- a/toolchain/docs/parse.md +++ b/toolchain/docs/parse.md @@ -718,7 +718,7 @@ if (auto as = context.ConsumeIf(Lex::TokenKind::As)) { } else { if (!state.has_error) { CARBON_DIAGNOSTIC(ImplExpectedAs, Error, - "Expected `as` in `impl` declaration."); + "expected `as` in `impl` declaration"); context.emitter().Emit(*context.position(), ImplExpectedAs); } context.ReturnErrorOnState(); diff --git a/toolchain/driver/compile_subcommand.cpp b/toolchain/driver/compile_subcommand.cpp index 98891e1e34c2..d944795cfa2b 100644 --- a/toolchain/driver/compile_subcommand.cpp +++ b/toolchain/driver/compile_subcommand.cpp @@ -270,27 +270,27 @@ auto CompileSubcommand::ValidateOptions(DriverEnv& driver_env) const -> bool { case Phase::Lex: if (options_.dump_parse_tree) { driver_env.error_stream - << "ERROR: Requested dumping the parse tree but compile " + << "error: requested dumping the parse tree but compile " "phase is limited to '" - << options_.phase << "'.\n"; + << options_.phase << "'\n"; return false; } [[fallthrough]]; case Phase::Parse: if (options_.dump_sem_ir) { driver_env.error_stream - << "ERROR: Requested dumping the SemIR but compile phase " + << "error: requested dumping the SemIR but compile phase " "is limited to '" - << options_.phase << "'.\n"; + << options_.phase << "'\n"; return false; } [[fallthrough]]; case Phase::Check: if (options_.dump_llvm_ir) { driver_env.error_stream - << "ERROR: Requested dumping the LLVM IR but compile " + << "error: requested dumping the LLVM IR but compile " "phase is limited to '" - << options_.phase << "'.\n"; + << options_.phase << "'\n"; return false; } [[fallthrough]]; @@ -521,8 +521,8 @@ class CompilationUnit { if (!source_->is_regular_file()) { // Don't invent file names like `-.o` or `/dev/stdin.o`. driver_env_->error_stream - << "ERROR: Output file name must be specified for input '" - << input_filename_ << "' that is not a regular file.\n"; + << "error: output file name must be specified for input '" + << input_filename_ << "' that is not a regular file\n"; return false; } output_filename = input_filename_; @@ -541,7 +541,7 @@ class CompilationUnit { llvm::raw_fd_ostream output_file(output_filename, ec, llvm::sys::fs::OF_None); if (ec) { - driver_env_->error_stream << "ERROR: Could not open output file '" + driver_env_->error_stream << "error: could not open output file '" << output_filename << "': " << ec.message() << "\n"; return false; @@ -628,7 +628,7 @@ auto CompileSubcommand::Run(DriverEnv& driver_env) -> DriverResult { if (auto find = driver_env.installation->ReadPreludeManifest(); find.ok()) { prelude = std::move(*find); } else { - driver_env.error_stream << "ERROR: " << find.error() << "\n"; + driver_env.error_stream << "error: " << find.error() << "\n"; return {.success = false}; } } diff --git a/toolchain/driver/driver_fuzzer.cpp b/toolchain/driver/driver_fuzzer.cpp index 4cb9b7b6a252..a5e145aea9a8 100644 --- a/toolchain/driver/driver_fuzzer.cpp +++ b/toolchain/driver/driver_fuzzer.cpp @@ -83,7 +83,10 @@ extern "C" auto LLVMFuzzerTestOneInput(const unsigned char* data, size_t size) llvm::raw_null_ostream dest; Driver d(fs, install_paths, dest, error_stream); if (!d.RunCommand(args).success) { - if (error_stream.TakeStr().find("ERROR:") == std::string::npos) { + auto str = error_stream.TakeStr(); + // TODO: Fix command_line to use `error`, switch back to `find`. + if (llvm::StringRef(str).find_insensitive("error:") == + llvm::StringRef::npos) { llvm::errs() << "No error message on a failure!\n"; return 1; } diff --git a/toolchain/driver/driver_test.cpp b/toolchain/driver/driver_test.cpp index 2fbe05cdf046..a051d9ab6c1d 100644 --- a/toolchain/driver/driver_test.cpp +++ b/toolchain/driver/driver_test.cpp @@ -129,7 +129,7 @@ TEST_F(DriverTest, CompileCommandErrors) { "--output=/dev/empty", empty_file}) .success); EXPECT_THAT(test_error_stream_.TakeStr(), - ContainsRegex("ERROR: .*/dev/empty.*")); + ContainsRegex("error: .*/dev/empty.*")); } TEST_F(DriverTest, DumpTokens) { diff --git a/toolchain/driver/testdata/fail_errors_in_two_files.carbon b/toolchain/driver/testdata/fail_errors_in_two_files.carbon index 56d0b1423d33..7b4f0ad14f4a 100644 --- a/toolchain/driver/testdata/fail_errors_in_two_files.carbon +++ b/toolchain/driver/testdata/fail_errors_in_two_files.carbon @@ -12,7 +12,7 @@ // --- fail_file1.carbon -// CHECK:STDERR: fail_file1.carbon:[[@LINE+4]]:24: ERROR: Opening symbol without a corresponding closing symbol. +// CHECK:STDERR: fail_file1.carbon:[[@LINE+4]]:24: error: opening symbol without a corresponding closing symbol // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ // CHECK:STDERR: @@ -21,7 +21,7 @@ fn run(String program) { // --- fail_file2.carbon -// CHECK:STDERR: fail_file2.carbon:[[@LINE+3]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: fail_file2.carbon:[[@LINE+3]]:10: error: invalid digit 'a' in decimal numeric literal // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_errors_sorted.carbon b/toolchain/driver/testdata/fail_errors_sorted.carbon index 256d7168a7f0..4b5da0d0efde 100644 --- a/toolchain/driver/testdata/fail_errors_sorted.carbon +++ b/toolchain/driver/testdata/fail_errors_sorted.carbon @@ -10,14 +10,14 @@ // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_errors_sorted.carbon -// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+4]]:24: ERROR: Opening symbol without a corresponding closing symbol. +// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+4]]:24: error: opening symbol without a corresponding closing symbol // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ // CHECK:STDERR: fn run(String program) { return True; -// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: fail_errors_sorted.carbon:[[@LINE+3]]:10: error: invalid digit 'a' in decimal numeric literal // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_errors_streamed.carbon b/toolchain/driver/testdata/fail_errors_streamed.carbon index a052c0e7a399..0a842c256d43 100644 --- a/toolchain/driver/testdata/fail_errors_streamed.carbon +++ b/toolchain/driver/testdata/fail_errors_streamed.carbon @@ -13,11 +13,11 @@ fn run(String program) { return True; -// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+7]]:10: ERROR: Invalid digit 'a' in decimal numeric literal. +// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE+7]]:10: error: invalid digit 'a' in decimal numeric literal // CHECK:STDERR: var x = 3a; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-7]]:24: ERROR: Opening symbol without a corresponding closing symbol. +// CHECK:STDERR: fail_errors_streamed.carbon:[[@LINE-7]]:24: error: opening symbol without a corresponding closing symbol // CHECK:STDERR: fn run(String program) { // CHECK:STDERR: ^ var x = 3a; diff --git a/toolchain/driver/testdata/fail_flush_errors.carbon b/toolchain/driver/testdata/fail_flush_errors.carbon index 8245ac5749b7..df34d16feb9e 100644 --- a/toolchain/driver/testdata/fail_flush_errors.carbon +++ b/toolchain/driver/testdata/fail_flush_errors.carbon @@ -13,7 +13,7 @@ fn F() { // Create diagnostics containing string references, and trigger reallocation // of the string table. - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+4]]:3: ERROR: Name `undeclared1` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+4]]:3: error: name `undeclared1` not found // CHECK:STDERR: undeclared1; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: @@ -23,7 +23,7 @@ fn F() { // literal storage. Use a hex escape to ensure that the tokenized buffer // allocates separate storage for the result. "undec\x6Cared2"; - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+4]]:3: ERROR: Name `undeclared2` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+4]]:3: error: name `undeclared2` not found // CHECK:STDERR: undeclared2; // CHECK:STDERR: ^~~~~~~~~~~ // CHECK:STDERR: @@ -31,7 +31,7 @@ fn F() { // Add the name into the string table via a declaration rather than an expression. if (true) { var undeclared3: () = (); } - // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: ERROR: Name `undeclared3` not found. + // CHECK:STDERR: fail_flush_errors.carbon:[[@LINE+3]]:3: error: name `undeclared3` not found // CHECK:STDERR: undeclared3; // CHECK:STDERR: ^~~~~~~~~~~ undeclared3; diff --git a/toolchain/driver/testdata/fail_input_is_directory.carbon b/toolchain/driver/testdata/fail_input_is_directory.carbon index 1425b976c64c..725e27bd5f4a 100644 --- a/toolchain/driver/testdata/fail_input_is_directory.carbon +++ b/toolchain/driver/testdata/fail_input_is_directory.carbon @@ -9,4 +9,4 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_input_is_directory.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_input_is_directory.carbon -// CHECK:STDERR: .: ERROR: Error opening file for read: Invalid argument +// CHECK:STDERR: .: error: error opening file for read: Invalid argument diff --git a/toolchain/driver/testdata/fail_missing_file.carbon b/toolchain/driver/testdata/fail_missing_file.carbon index 9aabadeaa904..8c1ddaf795d2 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: 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 diff --git a/toolchain/driver/testdata/fail_missing_stdin_output.carbon b/toolchain/driver/testdata/fail_missing_stdin_output.carbon index 6dd31bdbead9..bda372a084d9 100644 --- a/toolchain/driver/testdata/fail_missing_stdin_output.carbon +++ b/toolchain/driver/testdata/fail_missing_stdin_output.carbon @@ -9,4 +9,4 @@ // TIP: bazel test //toolchain/testing:file_test --test_arg=--file_tests=toolchain/driver/testdata/fail_missing_stdin_output.carbon // TIP: To dump output, run: // TIP: bazel run //toolchain/testing:file_test -- --dump_output --file_tests=toolchain/driver/testdata/fail_missing_stdin_output.carbon -// CHECK:STDERR: ERROR: Output file name must be specified for input '-' that is not a regular file. +// CHECK:STDERR: error: output file name must be specified for input '-' that is not a regular file diff --git a/toolchain/lex/helpers.cpp b/toolchain/lex/helpers.cpp index b147302d1b47..df6499fee005 100644 --- a/toolchain/lex/helpers.cpp +++ b/toolchain/lex/helpers.cpp @@ -20,8 +20,8 @@ auto CanLexInt(DiagnosticEmitter& emitter, llvm::StringRef text) if (text.size() > DigitLimit) { CARBON_DIAGNOSTIC( TooManyDigits, Error, - "Found a sequence of {0} digits, which is greater than the " - "limit of {1}.", + "found a sequence of {0} digits, which is greater than the " + "limit of {1}", size_t, size_t); emitter.Emit(text.begin(), TooManyDigits, text.size(), DigitLimit); return false; diff --git a/toolchain/lex/lex.cpp b/toolchain/lex/lex.cpp index c7461d8817c3..b3fe55c1eec3 100644 --- a/toolchain/lex/lex.cpp +++ b/toolchain/lex/lex.cpp @@ -820,11 +820,11 @@ auto Lexer::LexCR(llvm::StringRef source_text, ssize_t& position) -> void { } CARBON_DIAGNOSTIC(UnsupportedLFCRLineEnding, Error, - "The LF+CR line ending is not supported, only LF and CR+LF " - "are supported."); + "the LF+CR line ending is not supported, only LF and CR+LF " + "are supported"); CARBON_DIAGNOSTIC(UnsupportedCRLineEnding, Error, - "A raw CR line ending is not supported, only LF and CR+LF " - "are supported."); + "a raw CR line ending is not supported, only LF and CR+LF " + "are supported"); bool is_lfcr = position > 0 && source_text[position - 1] == '\n'; // TODO: This diagnostic has an unfortunate snippet -- we should tweak the // snippet rendering to gracefully handle CRs. @@ -865,7 +865,7 @@ auto Lexer::LexComment(llvm::StringRef source_text, ssize_t& position) -> void { const auto* line_info = current_line_info(); if (LLVM_UNLIKELY(position != line_info->start + line_info->indent)) { CARBON_DIAGNOSTIC(TrailingComment, Error, - "Trailing comments are not permitted."); + "trailing comments are not permitted"); emitter_.Emit(source_text.begin() + position, TrailingComment); @@ -882,7 +882,7 @@ auto Lexer::LexComment(llvm::StringRef source_text, ssize_t& position) -> void { if (position + 2 < static_cast(source_text.size()) && LLVM_UNLIKELY(!IsSpace(source_text[position + 2]))) { CARBON_DIAGNOSTIC(NoWhitespaceAfterCommentIntroducer, Error, - "Whitespace is required after '//'."); + "whitespace is required after '//'"); emitter_.Emit(source_text.begin() + position + 2, NoWhitespaceAfterCommentIntroducer); @@ -1052,7 +1052,7 @@ auto Lexer::LexStringLiteral(llvm::StringRef source_text, ssize_t& position) byte_offset); } else { CARBON_DIAGNOSTIC(UnterminatedString, Error, - "String is missing a terminator."); + "string is missing a terminator"); emitter_.Emit(literal->text().begin(), UnterminatedString); return LexTokenWithPayload(TokenKind::Error, literal_size, byte_offset); } @@ -1295,7 +1295,7 @@ auto Lexer::LexError(llvm::StringRef source_text, ssize_t& position) auto token = LexTokenWithPayload(TokenKind::Error, error_text.size(), position); CARBON_DIAGNOSTIC(UnrecognizedCharacters, Error, - "Encountered unrecognized characters while parsing."); + "encountered unrecognized characters while parsing"); emitter_.Emit(error_text.begin(), UnrecognizedCharacters); position += error_text.size(); @@ -1454,7 +1454,7 @@ class Lexer::ErrorRecoveryBuffer { static auto DiagnoseUnmatchedOpening(TokenDiagnosticEmitter& emitter, TokenIndex opening_token) -> void { CARBON_DIAGNOSTIC(UnmatchedOpening, Error, - "Opening symbol without a corresponding closing symbol."); + "opening symbol without a corresponding closing symbol"); emitter.Emit(opening_token, UnmatchedOpening); } @@ -1501,7 +1501,7 @@ auto Lexer::DiagnoseAndFixMismatchedBrackets() -> void { if (opening_it == open_groups_.rend()) { CARBON_DIAGNOSTIC( UnmatchedClosing, Error, - "Closing symbol without a corresponding opening symbol."); + "closing symbol without a corresponding opening symbol"); token_emitter_.Emit(token, UnmatchedClosing); fixes.ReplaceWithError(token); continue; diff --git a/toolchain/lex/numeric_literal.cpp b/toolchain/lex/numeric_literal.cpp index 8b78e2b01a68..f528a679eeb3 100644 --- a/toolchain/lex/numeric_literal.cpp +++ b/toolchain/lex/numeric_literal.cpp @@ -301,7 +301,7 @@ auto NumericLiteral::Parser::CheckDigitSequence(llvm::StringRef text, if (!allow_digit_separators || i == 0 || text[i - 1] == '_' || i + 1 == n) { CARBON_DIAGNOSTIC(InvalidDigitSeparator, Error, - "Misplaced digit separator in numeric literal."); + "misplaced digit separator in numeric literal"); emitter_.Emit(text.begin() + 1, InvalidDigitSeparator); } ++num_digit_separators; @@ -309,7 +309,7 @@ auto NumericLiteral::Parser::CheckDigitSequence(llvm::StringRef text, } CARBON_DIAGNOSTIC(InvalidDigit, Error, - "Invalid digit '{0}' in {1} numeric literal.", char, + "invalid digit '{0}' in {1} numeric literal", char, NumericLiteral::Radix); emitter_.Emit(text.begin() + i, InvalidDigit, c, radix); return {.ok = false}; @@ -317,7 +317,7 @@ auto NumericLiteral::Parser::CheckDigitSequence(llvm::StringRef text, if (num_digit_separators == static_cast(text.size())) { CARBON_DIAGNOSTIC(EmptyDigitSequence, Error, - "Empty digit sequence in numeric literal."); + "empty digit sequence in numeric literal"); emitter_.Emit(text.begin(), EmptyDigitSequence); return {.ok = false}; } @@ -334,7 +334,7 @@ auto NumericLiteral::Parser::CheckLeadingZero() -> bool { if (radix_ == Radix::Decimal && int_part_.starts_with("0") && int_part_ != "0") { CARBON_DIAGNOSTIC(UnknownBaseSpecifier, Error, - "Unknown base specifier in numeric literal."); + "unknown base specifier in numeric literal"); emitter_.Emit(int_part_.begin(), UnknownBaseSpecifier); return false; } @@ -357,7 +357,7 @@ auto NumericLiteral::Parser::CheckFractionalPart() -> bool { if (radix_ == Radix::Binary) { CARBON_DIAGNOSTIC(BinaryRealLiteral, Error, - "Binary real number literals are not supported."); + "binary real number literals are not supported"); emitter_.Emit(literal_.text_.begin() + literal_.radix_point_, BinaryRealLiteral); // Carry on and parse the binary real literal anyway. @@ -380,7 +380,7 @@ auto NumericLiteral::Parser::CheckExponentPart() -> bool { char expected_exponent_kind = (radix_ == Radix::Decimal ? 'e' : 'p'); if (literal_.text_[literal_.exponent_] != expected_exponent_kind) { CARBON_DIAGNOSTIC(WrongRealLiteralExponent, Error, - "Expected '{0}' to introduce exponent.", char); + "expected '{0}' to introduce exponent", char); emitter_.Emit(literal_.text_.begin() + literal_.exponent_, WrongRealLiteralExponent, expected_exponent_kind); return false; diff --git a/toolchain/lex/string_literal.cpp b/toolchain/lex/string_literal.cpp index f32ff8b5c31f..aff5c1d85859 100644 --- a/toolchain/lex/string_literal.cpp +++ b/toolchain/lex/string_literal.cpp @@ -213,8 +213,8 @@ static auto CheckIndent(LexerDiagnosticEmitter& emitter, llvm::StringRef text, if (indent.end() != content.end()) { CARBON_DIAGNOSTIC( ContentBeforeStringTerminator, Error, - "Only whitespace is permitted before the closing `'''` of a " - "multi-line string."); + "only whitespace is permitted before the closing `'''` of a " + "multi-line string"); emitter.Emit(indent.end(), ContentBeforeStringTerminator); } @@ -231,16 +231,16 @@ static auto ExpandUnicodeEscapeSequence(LexerDiagnosticEmitter& emitter, } if (digits.getAsInteger(16, code_point) || code_point > 0x10FFFF) { CARBON_DIAGNOSTIC(UnicodeEscapeTooLarge, Error, - "Code point specified by `\\u{{...}}` escape is greater " - "than 0x10FFFF."); + "code point specified by `\\u{{...}}` escape is greater " + "than 0x10FFFF"); emitter.Emit(digits.begin(), UnicodeEscapeTooLarge); return false; } if (code_point >= 0xD800 && code_point < 0xE000) { CARBON_DIAGNOSTIC(UnicodeEscapeSurrogate, Error, - "Code point specified by `\\u{{...}}` escape is a " - "surrogate character."); + "code point specified by `\\u{{...}}` escape is a " + "surrogate character"); emitter.Emit(digits.begin(), UnicodeEscapeSurrogate); return false; } @@ -310,8 +310,8 @@ static auto ExpandAndConsumeEscapeSequence(LexerDiagnosticEmitter& emitter, if (!content.empty() && IsDecimalDigit(content.front())) { CARBON_DIAGNOSTIC( DecimalEscapeSequence, Error, - "Decimal digit follows `\\0` escape sequence. Use `\\x00` instead " - "of `\\0` if the next character is a digit."); + "decimal digit follows `\\0` escape sequence. Use `\\x00` instead " + "of `\\0` if the next character is a digit"); emitter.Emit(content.begin(), DecimalEscapeSequence); return; } @@ -325,8 +325,8 @@ static auto ExpandAndConsumeEscapeSequence(LexerDiagnosticEmitter& emitter, return; } CARBON_DIAGNOSTIC(HexadecimalEscapeMissingDigits, Error, - "Escape sequence `\\x` must be followed by two " - "uppercase hexadecimal digits, for example `\\x0F`."); + "escape sequence `\\x` must be followed by two " + "uppercase hexadecimal digits, for example `\\x0F`"); emitter.Emit(content.begin(), HexadecimalEscapeMissingDigits); break; case 'u': { @@ -344,14 +344,14 @@ static auto ExpandAndConsumeEscapeSequence(LexerDiagnosticEmitter& emitter, } CARBON_DIAGNOSTIC( UnicodeEscapeMissingBracedDigits, Error, - "Escape sequence `\\u` must be followed by a braced sequence of " - "uppercase hexadecimal digits, for example `\\u{{70AD}}`."); + "escape sequence `\\u` must be followed by a braced sequence of " + "uppercase hexadecimal digits, for example `\\u{{70AD}}`"); emitter.Emit(content.begin(), UnicodeEscapeMissingBracedDigits); break; } default: CARBON_DIAGNOSTIC(UnknownEscapeSequence, Error, - "Unrecognized escape sequence `{0}`.", char); + "unrecognized escape sequence `{0}`", char); emitter.Emit(content.begin() - 1, UnknownEscapeSequence, first); break; } @@ -382,8 +382,8 @@ static auto ExpandEscapeSequencesAndRemoveIndent( if (!contents.starts_with("\n")) { CARBON_DIAGNOSTIC( MismatchedIndentInString, Error, - "Indentation does not match that of the closing `'''` in " - "multi-line string literal."); + "indentation does not match that of the closing `'''` in " + "multi-line string literal"); emitter.Emit(line_start, MismatchedIndentInString); } } @@ -433,8 +433,8 @@ static auto ExpandEscapeSequencesAndRemoveIndent( // `contents.begin() + after_space` in the diagnostic. CARBON_DIAGNOSTIC( InvalidHorizontalWhitespaceInString, Error, - "Whitespace other than plain space must be expressed with an " - "escape sequence in a string literal."); + "whitespace other than plain space must be expressed with an " + "escape sequence in a string literal"); emitter.Emit(contents.begin(), InvalidHorizontalWhitespaceInString); // Include the whitespace in the string contents for error recovery. AppendFrontOfContents(buffer_cursor, contents, after_space); @@ -472,7 +472,7 @@ auto StringLiteral::ComputeValue(llvm::BumpPtrAllocator& allocator, if (multi_line_ == MultiLineWithDoubleQuotes) { CARBON_DIAGNOSTIC( MultiLineStringWithDoubleQuotes, Error, - "Use `'''` delimiters for a multi-line string literal, not `\"\"\"`."); + "use `'''` delimiters for a multi-line string literal, not `\"\"\"`"); emitter.Emit(text_.begin(), MultiLineStringWithDoubleQuotes); } llvm::StringRef indent = diff --git a/toolchain/lex/testdata/fail_bad_comment_introducers.carbon b/toolchain/lex/testdata/fail_bad_comment_introducers.carbon index b9e648fb2c47..f1ce40843f9a 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: Whitespace is required after '//'. +// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error: whitespace is required after '//' // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: //abc - // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:7: ERROR: Whitespace is required after '//'. + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:7: error: whitespace is required after '//' // 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: Whitespace is required after '//'. +// CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:3: error: whitespace is required after '//' // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: @@ -36,7 +36,7 @@ //123 //dce - // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:11: ERROR: Whitespace is required after '//'. + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+4]]:11: error: whitespace is required after '//' // 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: Whitespace is required after '//'. + // CHECK:STDERR: fail_bad_comment_introducers.carbon:[[@LINE+3]]:83: error: whitespace is required after '//' // 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 258180b29bd6..7a624b8f2f03 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: Whitespace is required after '//'. +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-17]]:3: error: whitespace is required after '//' // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-18]]:5: ERROR: Whitespace is required after '//'. +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-18]]:5: error: whitespace is required after '//' // CHECK:STDERR: //abc // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-19]]:3: ERROR: Whitespace is required after '//'. +// CHECK:STDERR: fail_bad_comment_introducers_mid_block_indent_change.carbon:[[@LINE-19]]:3: error: whitespace is required after '//' // 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 ce369822d2d3..09370934763f 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:2: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:4: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_bad_raw_identifier.carbon:[[@LINE+4]]:3: error: encountered unrecognized characters while parsing // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_hash_at_start_of_file.carbon:[[@LINE+3]]:1: error: encountered unrecognized characters while parsing // 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 01caf32c49ea..7fa8f18eae5a 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: 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 // 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 b65746fba8e4..bb926015abb9 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: Closing symbol without a corresponding opening symbol. +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:1: error: closing symbol without a corresponding opening symbol // 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: Closing symbol without a corresponding opening symbol. +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+4]]:3: error: closing symbol without a corresponding opening symbol // 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: Opening symbol without a corresponding closing symbol. +// CHECK:STDERR: fail_mismatched_brackets.carbon:[[@LINE+3]]:1: error: opening symbol without a corresponding closing symbol // 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 2af5cdaa9962..a25990c7a640 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: 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 // 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 644983a69ace..aa14954282c0 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: Empty digit sequence in numeric literal. +// CHECK:STDERR: fail_a.carbon:[[@LINE+4]]:3: error: empty digit sequence in numeric literal // 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: Empty digit sequence in numeric literal. +// CHECK:STDERR: fail_b.carbon:[[@LINE+3]]:3: error: empty digit sequence in numeric literal // 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 77b27c5bcf04..e5a862b95507 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: Trailing comments are not permitted. +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-11]]:19: error: trailing comments are not permitted // CHECK:STDERR: var a: i32 = 1; // trailing comment // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-14]]:19: ERROR: Trailing comments are not permitted. +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-14]]:19: error: trailing comments are not permitted // CHECK:STDERR: var b: 32 = 13; // more trailing comment // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-17]]:19: ERROR: Trailing comments are not permitted. +// CHECK:STDERR: fail_trailing_comments.carbon:[[@LINE-17]]:19: error: trailing comments are not permitted // CHECK:STDERR: var c: i32 = 0.4; // still more trailing comment // CHECK:STDERR: ^ // CHECK:STDOUT: - filename: fail_trailing_comments.carbon diff --git a/toolchain/lower/testdata/basics/fail_before_lowering.carbon b/toolchain/lower/testdata/basics/fail_before_lowering.carbon index 6053a57f0da0..ec9099c79d5d 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: Unrecognized declaration introducer. +// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+7]]:1: error: unrecognized declaration introducer // CHECK:STDERR: a; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: ERROR: Semantics TODO: `HandleInvalidParseStart`. +// CHECK:STDERR: fail_before_lowering.carbon:[[@LINE+3]]:1: error: semantics TODO: `HandleInvalidParseStart` // CHECK:STDERR: a; // CHECK:STDERR: ^ a; diff --git a/toolchain/parse/context.cpp b/toolchain/parse/context.cpp index 31312fd42f48..0daead8f9a26 100644 --- a/toolchain/parse/context.cpp +++ b/toolchain/parse/context.cpp @@ -85,7 +85,7 @@ auto Context::ConsumeAndAddOpenParen(Lex::TokenIndex default_token, AddLeafNode(start_kind, *open_paren, /*has_error=*/false); return open_paren; } else { - CARBON_DIAGNOSTIC(ExpectedParenAfter, Error, "Expected `(` after `{0}`.", + CARBON_DIAGNOSTIC(ExpectedParenAfter, Error, "expected `(` after `{0}`", Lex::TokenKind); emitter_->Emit(*position_, ExpectedParenAfter, tokens().GetKind(default_token)); @@ -107,7 +107,7 @@ auto Context::ConsumeAndAddCloseSymbol(Lex::TokenIndex expected_open, // TODO: Include the location of the matching opening delimiter in the // diagnostic. CARBON_DIAGNOSTIC(ExpectedCloseSymbol, Error, - "Unexpected tokens before `{0}`.", llvm::StringLiteral); + "unexpected tokens before `{0}`", llvm::StringLiteral); emitter_->Emit(*position_, ExpectedCloseSymbol, open_token_kind.closing_symbol().fixed_spelling()); @@ -309,7 +309,7 @@ auto Context::DiagnoseOperatorFixity(OperatorFixity fixity) -> void { // Infix operators must satisfy the infix operator rules. if (!IsLexicallyValidInfixOperator()) { CARBON_DIAGNOSTIC(BinaryOperatorRequiresWhitespace, Error, - "Whitespace missing {0} binary operator.", RelativeLoc); + "whitespace missing {0} binary operator", RelativeLoc); emitter_->Emit(*position_, BinaryOperatorRequiresWhitespace, tokens().HasLeadingWhitespace(*position_) ? RelativeLoc::After @@ -325,14 +325,14 @@ auto Context::DiagnoseOperatorFixity(OperatorFixity fixity) -> void { if ((prefix ? tokens().HasTrailingWhitespace(*position_) : tokens().HasLeadingWhitespace(*position_))) { CARBON_DIAGNOSTIC(UnaryOperatorHasWhitespace, Error, - "Whitespace is not allowed {0} this unary operator.", + "whitespace is not allowed {0} this unary operator", RelativeLoc); emitter_->Emit(*position_, UnaryOperatorHasWhitespace, prefix ? RelativeLoc::After : RelativeLoc::Before); } else if (IsLexicallyValidInfixOperator()) { // Pre/postfix operators must not satisfy the infix operator rules. CARBON_DIAGNOSTIC(UnaryOperatorRequiresWhitespace, Error, - "Whitespace is required {0} this unary operator.", + "whitespace is required {0} this unary operator", RelativeLoc); emitter_->Emit(*position_, UnaryOperatorRequiresWhitespace, prefix ? RelativeLoc::Before : RelativeLoc::After); @@ -346,7 +346,7 @@ auto Context::ConsumeListToken(NodeKind comma_kind, Lex::TokenKind close_kind, // Don't error a second time on the same element. if (!already_has_error) { CARBON_DIAGNOSTIC(UnexpectedTokenAfterListElement, Error, - "Expected `,` or `{0}`.", Lex::TokenKind); + "expected `,` or `{0}`", Lex::TokenKind); emitter_->Emit(*position_, UnexpectedTokenAfterListElement, close_kind); ReturnErrorOnState(); } @@ -421,9 +421,9 @@ auto Context::ParseLibraryName(bool accept_default) CARBON_DIAGNOSTIC( ExpectedLibraryNameOrDefault, Error, - "Expected `default` or a string literal to specify the library name."); + "expected `default` or a string literal to specify the library name"); CARBON_DIAGNOSTIC(ExpectedLibraryName, Error, - "Expected a string literal to specify the library name."); + "expected a string literal to specify the library name"); emitter().Emit(*position(), accept_default ? ExpectedLibraryNameOrDefault : ExpectedLibraryName); return std::nullopt; @@ -442,7 +442,7 @@ auto Context::ParseLibrarySpecifier(bool accept_default) auto Context::DiagnoseExpectedDeclSemi(Lex::TokenKind expected_kind) -> void { CARBON_DIAGNOSTIC(ExpectedDeclSemi, Error, - "`{0}` declarations must end with a `;`.", Lex::TokenKind); + "`{0}` declarations must end with a `;`", Lex::TokenKind); emitter().Emit(*position(), ExpectedDeclSemi, expected_kind); } @@ -450,7 +450,7 @@ auto Context::DiagnoseExpectedDeclSemiOrDefinition(Lex::TokenKind expected_kind) -> void { CARBON_DIAGNOSTIC(ExpectedDeclSemiOrDefinition, Error, "`{0}` declarations must either end with a `;` or " - "have a `{{ ... }` block for a definition.", + "have a `{{ ... }` block for a definition", Lex::TokenKind); emitter().Emit(*position(), ExpectedDeclSemiOrDefinition, expected_kind); } diff --git a/toolchain/parse/handle_alias.cpp b/toolchain/parse/handle_alias.cpp index e92279431fca..7c977c448686 100644 --- a/toolchain/parse/handle_alias.cpp +++ b/toolchain/parse/handle_alias.cpp @@ -33,7 +33,7 @@ auto HandleAliasAfterName(Context& context) -> void { context.PushState(State::Expr); } else { CARBON_DIAGNOSTIC(ExpectedAliasInitializer, Error, - "`alias` requires a `=` for the source."); + "`alias` requires a `=` for the source"); context.emitter().Emit(*context.position(), ExpectedAliasInitializer); context.RecoverFromDeclError(state, NodeKind::Alias, /*skip_past_likely_end=*/true); diff --git a/toolchain/parse/handle_array_expr.cpp b/toolchain/parse/handle_array_expr.cpp index 52197f8341af..4bcfbc4fb4f5 100644 --- a/toolchain/parse/handle_array_expr.cpp +++ b/toolchain/parse/handle_array_expr.cpp @@ -25,7 +25,7 @@ auto HandleArrayExprSemi(Context& context) -> void { auto semi = context.ConsumeIf(Lex::TokenKind::Semi); if (!semi) { context.AddNode(NodeKind::ArrayExprSemi, *context.position(), true); - CARBON_DIAGNOSTIC(ExpectedArraySemi, Error, "Expected `;` in array type."); + CARBON_DIAGNOSTIC(ExpectedArraySemi, Error, "expected `;` in array type"); context.emitter().Emit(*context.position(), ExpectedArraySemi); state.has_error = true; } else { diff --git a/toolchain/parse/handle_base.cpp b/toolchain/parse/handle_base.cpp index c66198656b65..c96a18cec354 100644 --- a/toolchain/parse/handle_base.cpp +++ b/toolchain/parse/handle_base.cpp @@ -17,7 +17,7 @@ auto HandleBaseAfterIntroducer(Context& context) -> void { // based on whether we're in a class, whether we have an `extend` // modifier, and the following tokens. CARBON_DIAGNOSTIC(ExpectedAfterBase, Error, - "`class` or `:` expected after `base`."); + "`class` or `:` expected after `base`"); context.emitter().Emit(*context.position(), ExpectedAfterBase); context.RecoverFromDeclError(state, NodeKind::BaseDecl, /*skip_past_likely_end=*/true); diff --git a/toolchain/parse/handle_binding_pattern.cpp b/toolchain/parse/handle_binding_pattern.cpp index 8a50ce7d29f9..d77063f3bb0b 100644 --- a/toolchain/parse/handle_binding_pattern.cpp +++ b/toolchain/parse/handle_binding_pattern.cpp @@ -28,8 +28,7 @@ auto HandleBindingPattern(Context& context) -> void { auto on_error = [&](llvm::StringLiteral expected) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedBindingPattern, Error, - "Expected {0} in binding pattern.", - llvm::StringLiteral); + "expected {0} in binding pattern", llvm::StringLiteral); context.emitter().Emit(*context.position(), ExpectedBindingPattern, expected); state.has_error = true; diff --git a/toolchain/parse/handle_brace_expr.cpp b/toolchain/parse/handle_brace_expr.cpp index b0f1ba9b517a..42a0829a78b5 100644 --- a/toolchain/parse/handle_brace_expr.cpp +++ b/toolchain/parse/handle_brace_expr.cpp @@ -26,7 +26,7 @@ static auto HandleBraceExprParamError(Context& context, bool is_value = param_finish_state == State::BraceExprParamFinishAsValue; bool is_unknown = param_finish_state == State::BraceExprParamFinishAsUnknown; CARBON_CHECK(is_type || is_value || is_unknown); - CARBON_DIAGNOSTIC(ExpectedStructLiteralField, Error, "Expected {0}{1}{2}.", + CARBON_DIAGNOSTIC(ExpectedStructLiteralField, Error, "expected {0}{1}{2}", llvm::StringLiteral, llvm::StringLiteral, llvm::StringLiteral); context.emitter().Emit( diff --git a/toolchain/parse/handle_choice.cpp b/toolchain/parse/handle_choice.cpp index 7ea27e492c33..af011615fa80 100644 --- a/toolchain/parse/handle_choice.cpp +++ b/toolchain/parse/handle_choice.cpp @@ -19,7 +19,7 @@ auto HandleChoiceDefinitionStart(Context& context) -> void { if (!context.PositionIs(Lex::TokenKind::OpenCurlyBrace)) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedChoiceDefinition, Error, - "Choice definition expected."); + "choice definition expected"); context.emitter().Emit(*context.position(), ExpectedChoiceDefinition); } @@ -54,7 +54,7 @@ auto HandleChoiceAlternative(Context& context) -> void { NodeKind::IdentifierName)) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedChoiceAlternativeName, Error, - "Expected choice alternative name."); + "expected choice alternative name"); context.emitter().Emit(*context.position(), ExpectedChoiceAlternativeName); } diff --git a/toolchain/parse/handle_code_block.cpp b/toolchain/parse/handle_code_block.cpp index ca8974eecdd4..88405c6dbfd1 100644 --- a/toolchain/parse/handle_code_block.cpp +++ b/toolchain/parse/handle_code_block.cpp @@ -19,7 +19,7 @@ auto HandleCodeBlock(Context& context) -> void { /*has_error=*/true); // Recover by parsing a single statement. - CARBON_DIAGNOSTIC(ExpectedCodeBlock, Error, "Expected braced code block."); + CARBON_DIAGNOSTIC(ExpectedCodeBlock, Error, "expected braced code block"); context.emitter().Emit(*context.position(), ExpectedCodeBlock); context.PushState(State::Statement); diff --git a/toolchain/parse/handle_decl_name_and_params.cpp b/toolchain/parse/handle_decl_name_and_params.cpp index b9cc659300c8..24cba5d5c592 100644 --- a/toolchain/parse/handle_decl_name_and_params.cpp +++ b/toolchain/parse/handle_decl_name_and_params.cpp @@ -20,11 +20,11 @@ auto HandleDeclNameAndParams(Context& context) -> void { } if (state.token == *context.position()) { CARBON_DIAGNOSTIC(ExpectedDeclNameAfterPeriod, Error, - "`.` should be followed by a name."); + "`.` should be followed by a name"); context.emitter().Emit(token, ExpectedDeclNameAfterPeriod); } else { CARBON_DIAGNOSTIC(ExpectedDeclName, Error, - "`{0}` introducer should be followed by a name.", + "`{0}` introducer should be followed by a name", Lex::TokenKind); context.emitter().Emit(token, ExpectedDeclName, context.tokens().GetKind(state.token)); @@ -68,7 +68,7 @@ auto HandleDeclNameAndParamsAfterImplicit(Context& context) -> void { if (!context.PositionIs(Lex::TokenKind::OpenParen)) { CARBON_DIAGNOSTIC( ParamsRequiredAfterImplicit, Error, - "A `(` for parameters is required after implicit parameters."); + "a `(` for parameters is required after implicit parameters"); context.emitter().Emit(*context.position(), ParamsRequiredAfterImplicit); context.ReturnErrorOnState(); return; diff --git a/toolchain/parse/handle_decl_scope_loop.cpp b/toolchain/parse/handle_decl_scope_loop.cpp index 2f6dc305930d..81b16ae55b34 100644 --- a/toolchain/parse/handle_decl_scope_loop.cpp +++ b/toolchain/parse/handle_decl_scope_loop.cpp @@ -25,7 +25,7 @@ static auto FinishAndSkipInvalidDecl(Context& context, int32_t subtree_start) static auto HandleUnrecognizedDecl(Context& context, int32_t subtree_start) -> void { CARBON_DIAGNOSTIC(UnrecognizedDecl, Error, - "Unrecognized declaration introducer."); + "unrecognized declaration introducer"); context.emitter().Emit(*context.position(), UnrecognizedDecl); FinishAndSkipInvalidDecl(context, subtree_start); } diff --git a/toolchain/parse/handle_expr.cpp b/toolchain/parse/handle_expr.cpp index 91b53c658dd0..489ad8ec1603 100644 --- a/toolchain/parse/handle_expr.cpp +++ b/toolchain/parse/handle_expr.cpp @@ -10,7 +10,7 @@ namespace Carbon::Parse { static auto DiagnoseStatementOperatorAsSubExpr(Context& context) -> void { CARBON_DIAGNOSTIC(StatementOperatorAsSubExpr, Error, - "Operator `{0}` can only be used as a complete statement.", + "operator `{0}` can only be used as a complete statement", Lex::TokenKind); context.emitter().Emit(*context.position(), StatementOperatorAsSubExpr, context.PositionKind()); @@ -32,7 +32,7 @@ auto HandleExpr(Context& context) -> void { OperatorPriority::RightFirst) { CARBON_DIAGNOSTIC( UnaryOperatorRequiresParentheses, Error, - "Parentheses are required around this unary `{0}` operator.", + "parentheses are required around this unary `{0}` operator", Lex::TokenKind); context.emitter().Emit(*context.position(), UnaryOperatorRequiresParentheses, @@ -182,7 +182,7 @@ auto HandleExprInPostfix(Context& context) -> void { // OK, `.Self`. } else { CARBON_DIAGNOSTIC(ExpectedIdentifierOrSelfAfterPeriod, Error, - "Expected identifier or `Self` after `.`."); + "expected identifier or `Self` after `.`"); context.emitter().Emit(*context.position(), ExpectedIdentifierOrSelfAfterPeriod); // Only consume if it is a number or word. @@ -211,7 +211,7 @@ auto HandleExprInPostfix(Context& context) -> void { // Add a node to keep the parse tree balanced. context.AddLeafNode(NodeKind::InvalidParse, *context.position(), /*has_error=*/true); - CARBON_DIAGNOSTIC(ExpectedExpr, Error, "Expected expression."); + CARBON_DIAGNOSTIC(ExpectedExpr, Error, "expected expression"); context.emitter().Emit(*context.position(), ExpectedExpr); context.ReturnErrorOnState(); break; @@ -292,7 +292,7 @@ auto HandleExprLoop(Context& context) -> void { OperatorPriority::RightFirst) { CARBON_DIAGNOSTIC( OperatorRequiresParentheses, Error, - "Parentheses are required to disambiguate operator precedence."); + "parentheses are required to disambiguate operator precedence"); context.emitter().Emit(*context.position(), OperatorRequiresParentheses); } else { // This operator wouldn't be allowed even if parenthesized. @@ -424,7 +424,7 @@ auto HandleExprStatementFinish(Context& context) -> void { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedExprSemi, Error, - "Expected `;` after expression statement."); + "expected `;` after expression statement"); context.emitter().Emit(*context.position(), ExpectedExprSemi); } diff --git a/toolchain/parse/handle_function.cpp b/toolchain/parse/handle_function.cpp index 6d4e9caaddc8..adfc061e4218 100644 --- a/toolchain/parse/handle_function.cpp +++ b/toolchain/parse/handle_function.cpp @@ -57,7 +57,7 @@ auto HandleFunctionSignatureFinish(Context& context) -> void { if (!context.ConsumeAndAddLeafNodeIf(Lex::TokenKind::StringLiteral, NodeKind::BuiltinName)) { CARBON_DIAGNOSTIC(ExpectedBuiltinName, Error, - "Expected builtin function name after `=`."); + "expected builtin function name after `=`"); context.emitter().Emit(*context.position(), ExpectedBuiltinName); state.has_error = true; } diff --git a/toolchain/parse/handle_if_expr.cpp b/toolchain/parse/handle_if_expr.cpp index 830f13b8435b..577c2f54251a 100644 --- a/toolchain/parse/handle_if_expr.cpp +++ b/toolchain/parse/handle_if_expr.cpp @@ -20,7 +20,7 @@ auto HandleIfExprFinishCondition(Context& context) -> void { } else { // TODO: Include the location of the `if` token. CARBON_DIAGNOSTIC(ExpectedThenAfterIf, Error, - "Expected `then` after `if` condition."); + "expected `then` after `if` condition"); if (!state.has_error) { context.emitter().Emit(*context.position(), ExpectedThenAfterIf); } @@ -45,7 +45,7 @@ auto HandleIfExprFinishThen(Context& context) -> void { } else { // TODO: Include the location of the `if` token. CARBON_DIAGNOSTIC(ExpectedElseAfterIf, Error, - "Expected `else` after `if ... then ...`."); + "expected `else` after `if ... then ...`"); if (!state.has_error) { context.emitter().Emit(*context.position(), ExpectedElseAfterIf); } diff --git a/toolchain/parse/handle_impl.cpp b/toolchain/parse/handle_impl.cpp index bd1a7b49a3be..922e39b64f88 100644 --- a/toolchain/parse/handle_impl.cpp +++ b/toolchain/parse/handle_impl.cpp @@ -32,7 +32,7 @@ auto HandleImplAfterIntroducer(Context& context) -> void { context.PushState(State::PatternListAsImplicit); } else { CARBON_DIAGNOSTIC(ImplExpectedAfterForall, Error, - "Expected `[` after `forall` in `impl` declaration."); + "expected `[` after `forall` in `impl` declaration"); context.emitter().Emit(*context.position(), ImplExpectedAfterForall); context.ReturnErrorOnState(); // If we aren't producing a node from the PatternListAsImplicit state, @@ -69,7 +69,7 @@ auto HandleImplBeforeAs(Context& context) -> void { } else { if (!state.has_error) { CARBON_DIAGNOSTIC(ImplExpectedAs, Error, - "Expected `as` in `impl` declaration."); + "expected `as` in `impl` declaration"); context.emitter().Emit(*context.position(), ImplExpectedAs); } context.ReturnErrorOnState(); diff --git a/toolchain/parse/handle_import_and_package.cpp b/toolchain/parse/handle_import_and_package.cpp index 7b14fcde0c04..29815b1f9d69 100644 --- a/toolchain/parse/handle_import_and_package.cpp +++ b/toolchain/parse/handle_import_and_package.cpp @@ -50,7 +50,7 @@ static auto HandleDeclContent(Context& context, Context::StateStackEntry state, state.has_error = true; CARBON_DIAGNOSTIC(ExportImportPackage, Error, - "`export` cannot be used when importing a package."); + "`export` cannot be used when importing a package"); context.emitter().Emit(*package_name_token, ExportImportPackage); } names.package_id = context.tokens().GetIdentifier(*package_name_token); @@ -58,9 +58,9 @@ static auto HandleDeclContent(Context& context, Context::StateStackEntry state, } else if (declaration == NodeKind::PackageDecl || !context.PositionIs(Lex::TokenKind::Library)) { CARBON_DIAGNOSTIC(ExpectedIdentifierAfterPackage, Error, - "Expected identifier after `package`."); + "expected identifier after `package`"); CARBON_DIAGNOSTIC(ExpectedIdentifierAfterImport, Error, - "Expected identifier or `library` after `import`."); + "expected identifier or `library` after `import`"); context.emitter().Emit(*context.position(), declaration == NodeKind::PackageDecl ? ExpectedIdentifierAfterPackage @@ -94,7 +94,7 @@ static auto HandleDeclContent(Context& context, Context::StateStackEntry state, // "..."` yet, then most probably the user forgot to add `library` // before the library name. CARBON_DIAGNOSTIC(MissingLibraryKeyword, Error, - "Missing `library` keyword."); + "missing `library` keyword"); context.emitter().Emit(*context.position(), MissingLibraryKeyword); on_parse_error(); return; @@ -134,8 +134,8 @@ static auto VerifyInImports(Context& context, Lex::TokenIndex intro_token) CARBON_DIAGNOSTIC(ImportTooLate, Error, "`import` declarations must come after the `package` " "declaration (if present) and before any other " - "entities in the file."); - CARBON_DIAGNOSTIC(FirstDecl, Note, "First declaration is here."); + "entities in the file"); + CARBON_DIAGNOSTIC(FirstDecl, Note, "first declaration is here"); context.emitter() .Build(intro_token, ImportTooLate) .Note(context.first_non_packaging_token(), FirstDecl) @@ -158,7 +158,7 @@ static auto RestrictExportToApi(Context& context, auto packaging = context.tree().packaging_decl(); if (!packaging || packaging->is_impl) { CARBON_DIAGNOSTIC(ExportFromImpl, Error, - "`export` is only allowed in API files."); + "`export` is only allowed in API files"); context.emitter().Emit(state.token, ExportFromImpl); state.has_error = true; } @@ -214,10 +214,10 @@ static auto HandlePackageAndLibraryDecls(Context& context, if (state.token != Lex::TokenIndex::FirstNonCommentToken) { CARBON_DIAGNOSTIC( PackageTooLate, Error, - "The `{0}` declaration must be the first non-comment line.", + "the `{0}` declaration must be the first non-comment line", Lex::TokenKind); CARBON_DIAGNOSTIC(FirstNonCommentLine, Note, - "First non-comment line is here."); + "first non-comment line is here"); context.emitter() .Build(state.token, PackageTooLate, intro_token_kind) .Note(Lex::TokenIndex::FirstNonCommentToken, FirstNonCommentLine) diff --git a/toolchain/parse/handle_match.cpp b/toolchain/parse/handle_match.cpp index d026eb69835c..345412c7eb77 100644 --- a/toolchain/parse/handle_match.cpp +++ b/toolchain/parse/handle_match.cpp @@ -12,7 +12,7 @@ namespace Carbon::Parse { // have a larger look at this code and how it produces parse errors. This may be // good to re-examine when someone is working on implementing match checking. static auto DiagnoseMatchParseTODO(Context& context) -> void { - CARBON_DIAGNOSTIC(MatchParseTODO, Error, "TODO: Improve match parsing."); + CARBON_DIAGNOSTIC(MatchParseTODO, Error, "TODO: improve match parsing"); context.emitter().Emit(*context.position(), MatchParseTODO); } @@ -24,7 +24,7 @@ static auto HandleStatementsBlockStart(Context& context, State finish, if (!context.PositionIs(Lex::TokenKind::EqualGreater)) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedMatchCaseArrow, Error, - "Expected `=>` introducing statement block."); + "expected `=>` introducing statement block"); context.emitter().Emit(*context.position(), ExpectedMatchCaseArrow); } @@ -40,7 +40,7 @@ static auto HandleStatementsBlockStart(Context& context, State finish, if (!context.PositionIs(Lex::TokenKind::OpenCurlyBrace)) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedMatchCaseBlock, Error, - "Expected `{{` after `=>`."); + "expected `{{` after `=>`"); context.emitter().Emit(*context.position(), ExpectedMatchCaseBlock); } @@ -57,7 +57,7 @@ static auto HandleStatementsBlockStart(Context& context, State finish, static auto EmitUnexpectedTokenAndRecover(Context& context) -> void { CARBON_DIAGNOSTIC(UnexpectedTokenInMatchCasesBlock, Error, - "Unexpected `{0}`; expected `case`, `default` or `}`.", + "unexpected `{0}`; expected `case`, `default` or `}`", Lex::TokenKind); context.emitter().Emit(*context.position(), UnexpectedTokenInMatchCasesBlock, context.PositionKind()); @@ -81,7 +81,7 @@ auto HandleMatchConditionFinish(Context& context) -> void { if (!context.PositionIs(Lex::TokenKind::OpenCurlyBrace)) { if (!state.has_error) { CARBON_DIAGNOSTIC(ExpectedMatchCasesBlock, Error, - "Expected `{{` starting block with cases."); + "expected `{{` starting block with cases"); context.emitter().Emit(*context.position(), ExpectedMatchCasesBlock); } @@ -98,7 +98,7 @@ auto HandleMatchConditionFinish(Context& context) -> void { state.has_error = false; if (context.PositionIs(Lex::TokenKind::CloseCurlyBrace)) { - CARBON_DIAGNOSTIC(ExpectedMatchCases, Error, "Expected cases."); + CARBON_DIAGNOSTIC(ExpectedMatchCases, Error, "expected cases"); context.emitter().Emit(*context.position(), ExpectedMatchCases); state.has_error = true; } @@ -127,10 +127,10 @@ auto HandleMatchCaseLoopAfterDefault(Context& context) -> void { Lex::TokenKind kind = context.PositionKind(); if (kind == Lex::TokenKind::Case or kind == Lex::TokenKind::Default) { - CARBON_DIAGNOSTIC(UnreachableMatchCase, Error, "Unreachable case; `{0}{1}", - Lex::TokenKind, std::string); - context.emitter().Emit(*context.position(), UnreachableMatchCase, kind, - "` occurs after the `default`"); + CARBON_DIAGNOSTIC(UnreachableMatchCase, Error, + "unreachable case; `{0}` occurs after the `default`", + Lex::TokenKind); + context.emitter().Emit(*context.position(), UnreachableMatchCase, kind); context.ReturnErrorOnState(); context.PushState(State::MatchCaseLoopAfterDefault); diff --git a/toolchain/parse/handle_paren_expr.cpp b/toolchain/parse/handle_paren_expr.cpp index 888027c5bcb2..ee698a7131e7 100644 --- a/toolchain/parse/handle_paren_expr.cpp +++ b/toolchain/parse/handle_paren_expr.cpp @@ -30,7 +30,7 @@ auto HandleOnlyParenExprFinish(Context& context) -> void { if (!context.PositionIs(Lex::TokenKind::CloseParen)) { if (!state.has_error) { CARBON_DIAGNOSTIC(UnexpectedTokenInCompoundMemberAccess, Error, - "Expected `)`."); + "expected `)`"); context.emitter().Emit(*context.position(), UnexpectedTokenInCompoundMemberAccess); state.has_error = true; diff --git a/toolchain/parse/handle_period.cpp b/toolchain/parse/handle_period.cpp index d620c9437a08..1e4d7500ceea 100644 --- a/toolchain/parse/handle_period.cpp +++ b/toolchain/parse/handle_period.cpp @@ -36,7 +36,7 @@ static auto HandlePeriodOrArrow(Context& context, NodeKind node_kind, return; } else { CARBON_DIAGNOSTIC(ExpectedIdentifierAfterPeriodOrArrow, Error, - "Expected identifier after `{0}`.", llvm::StringLiteral); + "expected identifier after `{0}`", llvm::StringLiteral); context.emitter().Emit( *context.position(), ExpectedIdentifierAfterPeriodOrArrow, is_arrow ? llvm::StringLiteral("->") : llvm::StringLiteral(".")); diff --git a/toolchain/parse/handle_requirement.cpp b/toolchain/parse/handle_requirement.cpp index 394bba49a0b9..e5345ff57339 100644 --- a/toolchain/parse/handle_requirement.cpp +++ b/toolchain/parse/handle_requirement.cpp @@ -43,7 +43,7 @@ auto HandleRequirementOperator(Context& context) -> void { if (!state.has_error) { CARBON_DIAGNOSTIC( RequirementEqualAfterNonDesignator, Error, - "Requirement can only use `=` after `.member` designator."); + "requirement can only use `=` after `.member` designator"); context.emitter().Emit(*context.position(), RequirementEqualAfterNonDesignator); } @@ -54,7 +54,7 @@ auto HandleRequirementOperator(Context& context) -> void { if (!state.has_error) { CARBON_DIAGNOSTIC( ExpectedRequirementOperator, Error, - "Requirement should use `impls`, `=`, or `==` operator."); + "requirement should use `impls`, `=`, or `==` operator"); context.emitter().Emit(*context.position(), ExpectedRequirementOperator); } diff --git a/toolchain/parse/handle_statement.cpp b/toolchain/parse/handle_statement.cpp index 4cfeb7822a07..4243d3e5a10f 100644 --- a/toolchain/parse/handle_statement.cpp +++ b/toolchain/parse/handle_statement.cpp @@ -78,7 +78,7 @@ static auto HandleStatementKeywordFinish(Context& context, NodeKind node_kind) auto semi = context.ConsumeIf(Lex::TokenKind::Semi); if (!semi) { CARBON_DIAGNOSTIC(ExpectedStatementSemi, Error, - "`{0}` statements must end with a `;`.", Lex::TokenKind); + "`{0}` statements must end with a `;`", Lex::TokenKind); context.emitter().Emit(*context.position(), ExpectedStatementSemi, context.tokens().GetKind(state.token)); state.has_error = true; @@ -112,7 +112,7 @@ auto HandleStatementForHeader(Context& context) -> void { context.AddLeafNode(NodeKind::VariableIntroducer, context.Consume()); } else { CARBON_DIAGNOSTIC(ExpectedVariableDecl, Error, - "Expected `var` declaration."); + "expected `var` declaration"); context.emitter().Emit(*context.position(), ExpectedVariableDecl); if (auto next_in = context.FindNextOf({Lex::TokenKind::In})) { diff --git a/toolchain/parse/handle_var.cpp b/toolchain/parse/handle_var.cpp index 8b4c0e6ca175..fd2a5be9806e 100644 --- a/toolchain/parse/handle_var.cpp +++ b/toolchain/parse/handle_var.cpp @@ -34,7 +34,7 @@ auto HandleVarAsReturned(Context& context) -> void { if (!context.PositionIs(Lex::TokenKind::Var)) { CARBON_DIAGNOSTIC(ExpectedVarAfterReturned, Error, - "Expected `var` after `returned`."); + "expected `var` after `returned`"); context.emitter().Emit(*context.position(), ExpectedVarAfterReturned); context.AddLeafNode(NodeKind::EmptyDecl, context.SkipPastLikelyEnd(returned_token), @@ -96,13 +96,13 @@ auto HandleVarFinishAsFor(Context& context) -> void { end_token = context.Consume(); } else if (context.PositionIs(Lex::TokenKind::Colon)) { CARBON_DIAGNOSTIC(ExpectedInNotColon, Error, - "`:` should be replaced by `in`."); + "`:` should be replaced by `in`"); context.emitter().Emit(*context.position(), ExpectedInNotColon); state.has_error = true; end_token = context.Consume(); } else { CARBON_DIAGNOSTIC(ExpectedIn, Error, - "Expected `in` after loop `var` declaration."); + "expected `in` after loop `var` declaration"); context.emitter().Emit(*context.position(), ExpectedIn); state.has_error = true; } diff --git a/toolchain/parse/testdata/alias/fail_syntax.carbon b/toolchain/parse/testdata/alias/fail_syntax.carbon index 9779d034d64a..9273fd07f063 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: `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 // CHECK:STDERR: alias = b; // CHECK:STDERR: ^ // CHECK:STDERR: alias = b; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: ERROR: `alias` requires a `=` for the source. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error: `alias` requires a `=` for the source // CHECK:STDERR: alias a b; // CHECK:STDERR: ^ // CHECK:STDERR: alias a b; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:10: ERROR: Expected expression. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:10: error: expected expression // CHECK:STDERR: alias a =; // CHECK:STDERR: ^ // CHECK:STDERR: alias a =; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: ERROR: `alias` requires a `=` for the source. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:8: error: `alias` requires a `=` for the source // CHECK:STDERR: alias a; // CHECK:STDERR: ^ // CHECK:STDERR: alias a; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:7: ERROR: `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 // CHECK:STDERR: alias =; // CHECK:STDERR: ^ // CHECK:STDERR: alias =; -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: ERROR: `alias` requires a `=` for the source. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:9: error: `alias` requires a `=` for the source // 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: `alias` declarations must end with a `;`. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:13: error: `alias` declarations must end with a `;` // 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: `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 // CHECK:STDERR: alias; // CHECK:STDERR: ^ // CHECK:STDERR: alias; - // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:12: ERROR: Expected expression. + // CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:12: error: expected expression // CHECK:STDERR: alias a =; // CHECK:STDERR: ^ // CHECK:STDERR: alias a =; alias a = -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:1: ERROR: Expected expression. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+4]]:1: error: expected expression // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: @@ -72,7 +72,7 @@ fn F() { alias a = b -// CHECK:STDERR: fail_syntax.carbon:[[@LINE+56]]:21: ERROR: `alias` declarations must end with a `;`. +// CHECK:STDERR: fail_syntax.carbon:[[@LINE+56]]:21: error: `alias` declarations must end with a `;` // 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 16af719a5a1e..d98b8aa6b031 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: 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 // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:8: ERROR: Expected expression. +// CHECK:STDERR: fail_require_close_bracket.carbon:[[@LINE+3]]:8: error: expected expression // 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 0754ff04843e..dfcfa306e9ce 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: Expected `;` in array type. +// CHECK:STDERR: fail_require_semi.carbon:[[@LINE+3]]:12: error: expected `;` in array type // 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 4df2f5a5fe54..456a9d09ea09 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: Expected `;` in array type. +// CHECK:STDERR: fail_type.carbon:[[@LINE+4]]:12: error: expected `;` in array type // 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: Expected expression. +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+16]]:12: error: expected expression // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+12]]:12: ERROR: Expected `;` in array type. +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+12]]:12: error: expected `;` in array type // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+8]]:12: ERROR: Expected expression. +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+8]]:12: error: expected expression // CHECK:STDERR: fn X() -> [:]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+4]]:12: ERROR: Unexpected tokens before `]`. +// CHECK:STDERR: fail_invalid_char.carbon:[[@LINE+4]]:12: error: unexpected tokens before `]` // 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: Encountered unrecognized characters while parsing. +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+20]]:9: error: encountered unrecognized characters while parsing // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+16]]:9: ERROR: Expected expression. +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+16]]:9: error: expected expression // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+12]]:9: ERROR: Expected `;` in array type. +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+12]]:9: error: expected `;` in array type // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+8]]:9: ERROR: Expected expression. +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+8]]:9: error: expected expression // CHECK:STDERR: var y: [`]; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+4]]:9: ERROR: Unexpected tokens before `]`. +// CHECK:STDERR: fail_unlexed_expr.carbon:[[@LINE+4]]:9: error: unexpected tokens before `]` // 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: 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 // CHECK:STDERR: var x: [i32;; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+4]]:8: ERROR: Expected expression. +// CHECK:STDERR: fail_no_close_bracket.carbon:[[@LINE+4]]:8: error: expected expression // 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: Expected `;` in array type. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:12: error: expected `;` in array type // 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 77596e0c9987..1a01898f5202 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: Opening symbol without a corresponding closing symbol. + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+4]]:11: error: opening symbol without a corresponding closing symbol // 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: Opening symbol without a corresponding closing symbol. + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+11]]:15: error: opening symbol without a corresponding closing symbol // CHECK:STDERR: var x: {.y: (} = {.y = ((}; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+7]]:26: ERROR: Opening symbol without a corresponding closing symbol. + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+7]]:26: error: opening symbol without a corresponding closing symbol // CHECK:STDERR: var x: {.y: (} = {.y = ((}; // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+3]]:27: ERROR: Opening symbol without a corresponding closing symbol. + // CHECK:STDERR: fail_bracket_recovery.carbon:[[@LINE+3]]:27: error: opening symbol without a corresponding closing symbol // 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 56e0e358d091..dbfda443dd48 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: Expected identifier after `.`. + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+4]]:5: error: expected identifier after `.` // CHECK:STDERR: a.; // CHECK:STDERR: ^ // CHECK:STDERR: a.; - // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: ERROR: Expected identifier after `.`. + // CHECK:STDERR: fail_invalid_designators.carbon:[[@LINE+3]]:5: error: expected identifier after `.` // 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 b402e2dd4ab1..9f56e4cc74b3 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: Unrecognized declaration introducer. +// CHECK:STDERR: fail_modifiers_before_semi.carbon:[[@LINE+3]]:18: error: unrecognized declaration introducer // 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 06fddaa882fe..3c08b2ab8aee 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: Unrecognized declaration introducer. +// CHECK:STDERR: fail_no_intro_with_semi.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer // 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 0a2262f5cb37..2e0d99da3019 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: Unrecognized declaration introducer. +// CHECK:STDERR: fail_no_intro_without_semi.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer // 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 f7d687cdd407..325fae833bf3 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: Expected name in binding pattern. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+8]]:5: error: expected name in binding pattern // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+4]]:12: ERROR: Expected `,` or `)`. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+4]]:12: error: expected `,` or `)` // CHECK:STDERR: var = (foo {}) // CHECK:STDERR: ^ // CHECK:STDERR: var = (foo {}) -// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+16]]:21: ERROR: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_paren_match_regression.carbon:[[@LINE+16]]:21: error: `var` declarations must end with a `;` // 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 70f88f3ccaf5..fe00fbcceb11 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: Expected `,` or `}`. + // CHECK:STDERR: fail_alternative_with_implicit_params.carbon:[[@LINE+3]]:4: error: expected `,` or `}` // 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 dca47d89b3e5..5371354d2250 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: Expected choice alternative name. + // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+4]]:5: error: expected choice alternative name // CHECK:STDERR: ,Some, // CHECK:STDERR: ^ // CHECK:STDERR: ,Some, - // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+3]]:5: ERROR: Expected choice alternative name. + // CHECK:STDERR: fail_invalid_alternative_identifier.carbon:[[@LINE+3]]:5: error: expected choice alternative name // 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 1bfb0ffb6f0c..2d51cd8c1ba3 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: Choice definition expected. +// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+4]]:22: error: choice definition expected // CHECK:STDERR: choice InvalidBraces | // CHECK:STDERR: ^ // CHECK:STDERR: choice InvalidBraces | Some -// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+3]]:1: ERROR: Unrecognized declaration introducer. +// CHECK:STDERR: fail_invalid_braces.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer // 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 b570bd299c01..cd440caca33d 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: Choice definition expected. +// CHECK:STDERR: fail_missing_definition.carbon:[[@LINE+3]]:25: error: choice definition expected // 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 b0f1bd8d343c..05101b679732 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: Choice definition expected. +// CHECK:STDERR: fail_missing_definition_parameterized.carbon:[[@LINE+3]]:35: error: choice definition expected // 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 634c71d8a7f7..b266e787a85a 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: Expected `,` or `}`. + // CHECK:STDERR: fail_qualified_alternative_name.carbon:[[@LINE+3]]:4: error: expected `,` or `}` // 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 0d79cf70454d..89714bc89d75 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: `adapt` declarations must end with a `;`. + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:11: error: `adapt` declarations must end with a `;` // 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: Expected expression. + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:8: error: expected expression // 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: Expected expression. +// CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:1: error: expected expression // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: } class D { - // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:9: ERROR: Expected expression. + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+4]]:9: error: expected expression // 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: Expected expression. + // CHECK:STDERR: fail_bad_syntax.carbon:[[@LINE+3]]:3: error: expected expression // 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 1268b1fd931e..9cf46f049a48 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: `class` or `:` expected after `base`. + // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:7: error: `class` or `:` expected after `base` // CHECK:STDERR: base; // CHECK:STDERR: ^ // CHECK:STDERR: base; - // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:9: ERROR: Expected expression. + // CHECK:STDERR: fail_base.carbon:[[@LINE+4]]:9: error: expected expression // 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: `base` declarations must end with a `;`. + // CHECK:STDERR: fail_base.carbon:[[@LINE+7]]:3: error: `base` declarations must end with a `;` // CHECK:STDERR: var n: i32; // CHECK:STDERR: ^~~ // CHECK:STDERR: - // CHECK:STDERR: fail_base.carbon:[[@LINE+3]]:7: ERROR: Unrecognized declaration introducer. + // CHECK:STDERR: fail_base.carbon:[[@LINE+3]]:7: error: unrecognized declaration introducer // 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 551fc27976b2..97e238904c53 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: Expected expression. + // CHECK:STDERR: fail_base_misplaced.carbon:[[@LINE+3]]:3: error: expected expression // 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 863932b9a8d0..3a10dc6b3e2d 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: `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 // CHECK:STDERR: // CHECK:STDERR: ^ // CHECK:STDERR: // --- fail_impl_class.carbon -// CHECK:STDERR: fail_impl_class.carbon:[[@LINE+4]]:1: ERROR: `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 // 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: Expected expression. + // CHECK:STDERR: fail_extend_adapt_base.carbon:[[@LINE+3]]:16: error: expected expression // 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 a887d09fe9fe..3ea688082e47 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: `:` should be replaced by `in`. + // CHECK:STDERR: fail_colon_instead_of_in.carbon:[[@LINE+3]]:19: error: `:` should be replaced by `in` // 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 ed416009d04b..590a7eeb105a 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: Expected `(` after `for`. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+8]]:7: error: expected `(` after `for` // CHECK:STDERR: for { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+4]]:7: ERROR: Expected `var` declaration. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+4]]:7: error: expected `var` declaration // CHECK:STDERR: for { // CHECK:STDERR: ^ // CHECK:STDERR: for { } -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+7]]:1: ERROR: Expected braced code block. +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+7]]:1: error: expected braced code block // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: ERROR: Expected expression. +// CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:1: error: expected expression // 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 90d074b24d4e..7865876d1242 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: Expected `in` after loop `var` declaration. + // CHECK:STDERR: fail_missing_in.carbon:[[@LINE+3]]:19: error: expected `in` after loop `var` declaration // 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 5a0b89add7e6..69379f2c8167 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: Expected `var` declaration. + // CHECK:STDERR: fail_missing_var.carbon:[[@LINE+3]]:8: error: expected `var` declaration // 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 ab24884804ec..143f19178f71 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: Expected `var` declaration. + // CHECK:STDERR: fail_returned_var.carbon:[[@LINE+3]]:8: error: expected `var` declaration // 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 f9f21e6bb628..30f89312e829 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: Expected `(` after `for`. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+15]]:7: error: expected `(` after `for` // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:7: ERROR: Expected `var` declaration. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:7: error: expected `var` declaration // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:8: ERROR: Expected expression. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:8: error: expected expression // CHECK:STDERR: for [] { // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: ERROR: Expected `;` in array type. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:8: error: expected `;` in array type // 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 4e9ebcab0966..a2ca9892a22d 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: 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 // 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: 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 // CHECK:STDERR: extern library foo fn G(); // CHECK:STDERR: ^~~ // CHECK:STDERR: -// CHECK:STDERR: fail_identifier.carbon:[[@LINE+3]]:16: ERROR: Unrecognized declaration introducer. +// CHECK:STDERR: fail_identifier.carbon:[[@LINE+3]]:16: error: unrecognized declaration introducer // 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 f06c59fd52f4..b8f7f922f3ef 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: `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 // 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 aa08ed2c1d36..441965b45ae3 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: 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 // CHECK:STDERR: fn Div[(); // CHECK:STDERR: ^ // CHECK:STDERR: -// 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. +// 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 // 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 b9407b7c2c9e..c5eba8612b7a 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: `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 // 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 ebb055d8fd90..a1c56e3eebf9 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: `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 // 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 d7662234261c..1e7edd33a418 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: `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 // 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 ce1e8859963a..f316cd2e9219 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: `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 // 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 070bb007957c..8ecdaad6123c 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: `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 // 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 451a198cb448..8c1bc943ba0f 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: `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 // 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 2602e8fc87d1..67f9fda454d9 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: `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 // 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 11d69d7cdd82..6b0afe63f12f 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: `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 // 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 dad928424e01..9b37c23bcd34 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: Unrecognized declaration introducer. +// CHECK:STDERR: fail_skip_without_semi_to_curly.carbon:[[@LINE+3]]:1: error: unrecognized declaration introducer // 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 4271e80a04c9..b06a1a56ec9c 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: Expected `:` or `:!` in binding pattern. +// CHECK:STDERR: fail_with_identifier_as_param.carbon:[[@LINE+3]]:11: error: expected `:` or `:!` in binding pattern // 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 e82c80fe21d9..8329e737e43b 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: `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 // 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 a4e7fa5223b2..8e26d047628b 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: Expected builtin function name after `=`. +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:18: error: expected builtin function name after `=` // CHECK:STDERR: fn NotString() = banana; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: fn NotString() = banana; -// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:32: ERROR: `fn` declarations must end with a `;`. +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+4]]:32: error: `fn` declarations must end with a `;` // CHECK:STDERR: fn JunkAfterString() = "hello" "world"; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: fn JunkAfterString() = "hello" "world"; -// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:23: ERROR: Expected builtin function name after `=`. +// CHECK:STDERR: fail_builtin.carbon:[[@LINE+3]]:23: error: expected builtin function name after `=` // 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 cdd7b3de02b2..2f19aa29ea80 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: Expected `;` after expression statement. +// CHECK:STDERR: fail_identifier_in_statements.carbon:[[@LINE+3]]:1: error: expected `;` after expression statement // 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 de5ebd4fb097..68d17e4f4f34 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: 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 // CHECK:STDERR: class Foo[]; // CHECK:STDERR: ^ // CHECK:STDERR: class Foo[]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:18: ERROR: 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 // CHECK:STDERR: class Foo[a: i32]; // CHECK:STDERR: ^ // CHECK:STDERR: class Foo[a: i32]; -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+4]]:17: ERROR: 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 // CHECK:STDERR: interface Bar[] {} // CHECK:STDERR: ^ // CHECK:STDERR: interface Bar[] {} -// CHECK:STDERR: fail_no_parens.carbon:[[@LINE+3]]:23: ERROR: 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 // 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 a78cab279fa7..cd59f5a70964 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: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:10: error: expected `as` in `impl` declaration // CHECK:STDERR: impl foo bar; // CHECK:STDERR: ^~~ // CHECK:STDERR: impl foo bar; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:12: ERROR: Expected expression. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:12: error: expected expression // CHECK:STDERR: impl i32 as; // CHECK:STDERR: ^ // CHECK:STDERR: impl i32 as; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:18: ERROR: `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 // 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: Expected expression. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error: expected expression // CHECK:STDERR: impl return as A; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl return as A; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: ERROR: Expected expression. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:6: error: expected expression // CHECK:STDERR: impl return B; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: impl return B; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:13: ERROR: Expected `[` after `forall` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:13: error: expected `[` after `forall` in `impl` declaration // CHECK:STDERR: impl forall f32; // CHECK:STDERR: ^~~ // CHECK:STDERR: -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:16: ERROR: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:16: error: expected `as` in `impl` declaration // CHECK:STDERR: impl forall f32; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall f32; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:19: ERROR: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:19: error: expected `as` in `impl` declaration // CHECK:STDERR: impl forall [] u32; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall [] u32; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:21: ERROR: Expected `:` or `:!` in binding pattern. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+8]]:21: error: expected `:` or `:!` in binding pattern // CHECK:STDERR: impl forall [invalid] i8; // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:25: ERROR: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:25: error: expected `as` in `impl` declaration // CHECK:STDERR: impl forall [invalid] i8; // CHECK:STDERR: ^ // CHECK:STDERR: impl forall [invalid] i8; -// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:13: ERROR: Expected `[` after `forall` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:13: error: expected `[` after `forall` in `impl` declaration // 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: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:30: error: expected `as` in `impl` declaration // 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: Expected `as` in `impl` declaration. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:26: error: expected `as` in `impl` declaration // 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: `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 // 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: Expected expression. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+4]]:5: error: expected expression // CHECK:STDERR: impl; // CHECK:STDERR: ^ // CHECK:STDERR: @@ -96,7 +96,7 @@ impl; impl -// CHECK:STDERR: fail_impl.carbon:[[@LINE+88]]:21: ERROR: Expected expression. +// CHECK:STDERR: fail_impl.carbon:[[@LINE+88]]:21: error: expected expression // 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 fa3c41a2da8f..b99cb079f9d2 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: `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 // 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: `.` should be followed by a name. +// CHECK:STDERR: fail_out_of_line_member.carbon:[[@LINE+3]]:6: error: `.` should be followed by a name // 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 5cbce33a464e..5c8fb2168822 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: `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 // 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 1ca5f4953f50..8263cd392cd6 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: `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 // 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: `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 // 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 c80522c7f12d..fac843fb1154 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: Expected `:` or `:!` in binding pattern. + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+4]]:13: error: expected `:` or `:!` in binding pattern // 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: Expected name in binding pattern. + // CHECK:STDERR: fail_self_param_syntax.carbon:[[@LINE+3]]:10: error: expected name in binding pattern // 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 8c47dd29f176..714302410311 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: `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 // CHECK:STDERR: constraint "Foo" // CHECK:STDERR: ^~~~~ // CHECK:STDERR: constraint "Foo" -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+3]]:1: ERROR: `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 // 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 3b47f6432554..8ae2b14dcf5a 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: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:5: error: expected braced code block // CHECK:STDERR: if (b) // CHECK:STDERR: ^~ // CHECK:STDERR: if (b) - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: ERROR: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block // CHECK:STDERR: c; // CHECK:STDERR: ^ // CHECK:STDERR: c; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: ERROR: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block // CHECK:STDERR: d; // CHECK:STDERR: ^ // CHECK:STDERR: d; else - // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: ERROR: Expected braced code block. + // CHECK:STDERR: fail_else_unbraced.carbon:[[@LINE+3]]:5: error: expected braced code block // 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 77b75eb39cf2..c059b9409efb 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: Expected `(` after `if`. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:6: error: expected `(` after `if` // CHECK:STDERR: if a {} // CHECK:STDERR: ^ // CHECK:STDERR: if a {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:7: ERROR: Expected expression. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:7: error: expected expression // CHECK:STDERR: if () {} // CHECK:STDERR: ^ // CHECK:STDERR: if () {} - // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:9: ERROR: Unexpected tokens before `)`. + // CHECK:STDERR: fail_errors.carbon:[[@LINE+4]]:9: error: unexpected tokens before `)` // CHECK:STDERR: if (b c) {} // CHECK:STDERR: ^ // CHECK:STDERR: if (b c) {} if (d) -// CHECK:STDERR: fail_errors.carbon:[[@LINE+7]]:1: ERROR: Expected braced code block. +// CHECK:STDERR: fail_errors.carbon:[[@LINE+7]]:1: error: expected braced code block // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: ERROR: Expected expression. +// CHECK:STDERR: fail_errors.carbon:[[@LINE+3]]:1: error: expected expression // 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 af38aa5e7d78..964e29aa13bd 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: Expected `(` after `if`. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:6: error: expected `(` after `if` // 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 018fb92241c4..b9ee1fb08791 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: Expected `(` after `if`. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+11]]:6: error: expected `(` after `if` // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:7: ERROR: Expected expression. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+7]]:7: error: expected expression // CHECK:STDERR: if [] {} // CHECK:STDERR: ^ // CHECK:STDERR: - // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: ERROR: Expected `;` in array type. + // CHECK:STDERR: fail_square_brackets.carbon:[[@LINE+3]]:7: error: expected `;` in array type // 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 c715e85d1248..4ce3f345ffa9 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: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:5: error: expected braced code block // CHECK:STDERR: if (b) // CHECK:STDERR: ^~ // CHECK:STDERR: if (b) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:7: ERROR: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+4]]:7: error: expected braced code block // CHECK:STDERR: if (c) // CHECK:STDERR: ^~ // CHECK:STDERR: if (c) - // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: ERROR: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:9: error: expected braced code block // 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 e7822a054362..6a5372762d95 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: Expected expression. + // CHECK:STDERR: fail_condition_missing.carbon:[[@LINE+3]]:18: error: expected expression // 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 493d1e44f052..7229486e1a7b 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: Expected expression. + // CHECK:STDERR: fail_else_expr_missing.carbon:[[@LINE+3]]:35: error: expected expression // 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 31a9b7f1c6ca..34d30296aeea 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: Expected `else` after `if ... then ...`. + // CHECK:STDERR: fail_else_missing.carbon:[[@LINE+3]]:30: error: expected `else` after `if ... then ...` // 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 7babebc1080b..6eeccdc9f35f 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: Expected expression. + // CHECK:STDERR: fail_then_expr_missing.carbon:[[@LINE+3]]:28: error: expected expression // 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 f076d8c2600c..fb10a8e3d476 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: Expected `then` after `if` condition. + // CHECK:STDERR: fail_then_missing.carbon:[[@LINE+3]]:23: error: expected `then` after `if` condition // 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 c3db5d26f138..026597de02bb 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: Expected `(` after `if`. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+11]]:6: error: expected `(` after `if` // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+7]]:11: ERROR: Expected braced code block. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+7]]:11: error: expected braced code block // CHECK:STDERR: if true then 1 else 2; // CHECK:STDERR: ^~~~ // CHECK:STDERR: - // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: ERROR: Expected expression. + // CHECK:STDERR: fail_top_level_if.carbon:[[@LINE+3]]:11: error: expected expression // 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 2567b3720e3b..2655bba39679 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: Expected expression. +// CHECK:STDERR: fail_empty_expr.carbon:[[@LINE+3]]:16: error: expected expression // 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 034e1638810f..420e10fff0e5 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: Unexpected tokens before `]`. +// CHECK:STDERR: fail_malformed_expr.carbon:[[@LINE+3]]:17: error: unexpected tokens before `]` // 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 77a8f92c6495..832b802bb706 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: Expected name in binding pattern. +// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error: expected name in binding pattern // 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 d19a83dc5391..62fd6c334ee0 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: Expected name in binding pattern. +// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error: expected name in binding pattern // 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 c5c232d64daf..4f5e1ffd65d3 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: Expected name in binding pattern. +// CHECK:STDERR: fail_runtime_binding.carbon:[[@LINE+4]]:5: error: expected name in binding pattern // 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: Expected name in binding pattern. +// CHECK:STDERR: fail_complietime_binding.carbon:[[@LINE+3]]:5: error: expected name in binding pattern // 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 5084a7282e43..cfee20a9518e 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: Expected `:` or `:!` in binding pattern. +// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:7: error: expected `:` or `:!` in binding pattern // 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 b67d63d32919..1e31d901465b 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: Expected name in binding pattern. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error: expected name in binding pattern // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: ERROR: `let` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error: `let` declarations must end with a `;` // 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 bc8335ddaa87..048b15fedf9d 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: 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` // 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: 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` // CHECK:STDERR: default => { return 3; } // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: default => { return 3; } - // CHECK:STDERR: fail_cases_after_default.carbon:[[@LINE+3]]:5: ERROR: 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` // 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 26e930b94951..dcb87bb6e56d 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: Expected `=>` introducing statement block. + // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+4]]:17: error: expected `=>` introducing statement block // 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: Expected `=>` introducing statement block. + // CHECK:STDERR: fail_missing_case_arrow.carbon:[[@LINE+3]]:29: error: expected `=>` introducing statement block // 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 ee71d4cd95a5..30e251fa2f42 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: Expected name in binding pattern. + // CHECK:STDERR: fail_missing_case_pattern.carbon:[[@LINE+3]]:10: error: expected name in binding pattern // 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 7fcf7723be35..8331610e5a53 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: Expected `{` after `=>`. + // CHECK:STDERR: fail_missing_case_statements_block.carbon:[[@LINE+3]]:5: error: expected `{` after `=>` // 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 86974d9452dd..6eb456fd9fb5 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: Expected cases. + // CHECK:STDERR: fail_missing_cases.carbon:[[@LINE+3]]:14: error: expected cases // 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 240cad926208..7b0f2b60bc36 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: Expected `{` starting block with cases. + // CHECK:STDERR: fail_missing_cases_block.carbon:[[@LINE+3]]:3: error: expected `{` starting block with cases // 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 e0a8c34b929b..055b8568b320 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: Expected `=>` introducing statement block. + // CHECK:STDERR: fail_missing_default_arrow.carbon:[[@LINE+3]]:13: error: expected `=>` introducing statement block // 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 d402067d8209..10bd6134a7f8 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: Expected `{` after `=>`. + // CHECK:STDERR: fail_missing_default_statements_block.carbon:[[@LINE+3]]:3: error: expected `{` after `=>` // 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 2b547cdcebac..7564f4aba178 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: 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 // 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: TODO: Improve match parsing. + // CHECK:STDERR: fail_missing_guard_close_paren.carbon:[[@LINE+3]]:28: error: TODO: improve match parsing // 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 fa659ac5dc0c..74f52411fd61 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: TODO: Improve match parsing. + // CHECK:STDERR: fail_missing_guard_open_paren.carbon:[[@LINE+7]]:21: error: TODO: improve match parsing // 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: 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 // 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 c3f6d5b9b191..f3de2dcdcf5b 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: Expected `(` after `match`. + // CHECK:STDERR: fail_missing_matched_expr.carbon:[[@LINE+3]]:9: error: expected `(` after `match` // 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 5a4eab54f2a4..a47d817d433f 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: 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 `}` // 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: 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 `}` // 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: 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 `}` // 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: Unexpected `{`; expected `case`, `default` or `}`. + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+4]]:5: error: unexpected `{`; expected `case`, `default` or `}` // 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: 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 `}` // CHECK:STDERR: return 1; // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: return 1; - // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+3]]:5: ERROR: Unexpected `(`; expected `case`, `default` or `}`. + // CHECK:STDERR: fail_unexpected_tokens_in_cases_block.carbon:[[@LINE+3]]:5: error: unexpected `(`; expected `case`, `default` or `}` // 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 6cbee85c71bb..0cf38144a032 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: Expected identifier after `.`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` // CHECK:STDERR: a.self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: a.self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: ERROR: Expected identifier after `.`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` // CHECK:STDERR: a.Self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: a.Self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: ERROR: Expected identifier after `.`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:5: error: expected identifier after `.` // CHECK:STDERR: a.for; // CHECK:STDERR: ^~~ // CHECK:STDERR: a.for; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: ERROR: Expected identifier after `->`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error: expected identifier after `->` // CHECK:STDERR: p->self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: p->self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: ERROR: Expected identifier after `->`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+4]]:6: error: expected identifier after `->` // CHECK:STDERR: p->Self; // CHECK:STDERR: ^~~~ // CHECK:STDERR: p->Self; - // CHECK:STDERR: fail_keyword.carbon:[[@LINE+3]]:6: ERROR: Expected identifier after `->`. + // CHECK:STDERR: fail_keyword.carbon:[[@LINE+3]]:6: error: expected identifier after `->` // 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 ad5f8e4f98b9..cd020acb0118 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: `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 // 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 f4725da061ac..2d6a7be5d250 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: `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 // CHECK:STDERR: namespace 123 // CHECK:STDERR: ^~~ // CHECK:STDERR: namespace 123 -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: ERROR: `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 // CHECK:STDERR: namespace "" // CHECK:STDERR: ^~ // CHECK:STDERR: namespace "" -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: ERROR: `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 // CHECK:STDERR: namespace + // CHECK:STDERR: ^ // CHECK:STDERR: namespace + -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: ERROR: `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 // CHECK:STDERR: namespace bool // CHECK:STDERR: ^~~~ // CHECK:STDERR: namespace bool -// CHECK:STDERR: fail_incomplete.carbon:[[@LINE+4]]:11: ERROR: `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 // 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: `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 // 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 a3d86daceae9..eec62bff6bd6 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: `.` should be followed by a name. +// CHECK:STDERR: fail_incomplete_name.carbon:[[@LINE+3]]:15: error: `.` should be followed by a name // 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 bd49765c47a3..edca7db78aca 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: `namespace` declarations must end with a `;`. +// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+7]]:1: error: `namespace` declarations must end with a `;` // CHECK:STDERR: impl namespace // CHECK:STDERR: ^~~~ // CHECK:STDERR: -// CHECK:STDERR: fail_modifiers.carbon:[[@LINE+3]]:6: ERROR: `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 // 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 71ac7cd32231..3604f32ae509 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: `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 // 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 34d7e4b7b040..58722842476d 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: 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 // 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 ee650c6d62bf..f9c7ff8e42d3 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: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_infix_uneven_space_after.carbon:[[@LINE+3]]:16: error: `var` declarations must end with a `;` // 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 3ef371f7b301..5bfa6535ff90 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: Whitespace missing after binary operator. +// CHECK:STDERR: fail_infix_uneven_space_before.carbon:[[@LINE+3]]:15: error: whitespace missing after binary operator // 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 43d91d75c9d6..328058a59170 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: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:19: error: expected expression // CHECK:STDERR: var a: i32 = n == ; // CHECK:STDERR: ^ // CHECK:STDERR: var a: i32 = n == ; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:14: ERROR: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+4]]:14: error: expected expression // CHECK:STDERR: var b: i32 = == n; // CHECK:STDERR: ^~ // CHECK:STDERR: var b: i32 = == n; -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+7]]:14: ERROR: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+7]]:14: error: expected expression // CHECK:STDERR: var c: i32 = == ; // CHECK:STDERR: ^~ // CHECK:STDERR: -// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: ERROR: Expected expression. +// CHECK:STDERR: fail_invalid_infix.carbon:[[@LINE+3]]:17: error: expected expression // 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 b7b02435ce3b..375e699d4678 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: 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 // 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 96378673ecbe..95a8b13a47de 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: 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 // 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 2cd0004a4f6d..b31da2a7af4e 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: 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 // 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 e3ba50e910d3..acbb30868b77 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: 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 // 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 0752a21d4578..f539c4c85f6a 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: Expected `;` after expression statement. + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+4]]:4: error: expected `;` after expression statement // CHECK:STDERR: n++; // CHECK:STDERR: ^~ // CHECK:STDERR: n++; - // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: ERROR: Expected `;` after expression statement. + // CHECK:STDERR: fail_postincrement.carbon:[[@LINE+3]]:4: error: expected `;` after expression statement // 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 5f0f70bf8972..be56acc3f61f 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: 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 // 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 f767842bf3d6..58b18ae37de4 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error: parentheses are required to disambiguate operator precedence // CHECK:STDERR: 1 + 1 as i32; // CHECK:STDERR: ^~ // CHECK:STDERR: 1 + 1 as i32; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: ERROR: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:9: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:14: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+4]]:12: error: parentheses are required to disambiguate operator precedence // CHECK:STDERR: 6 as i32 == 7; // CHECK:STDERR: ^~ // CHECK:STDERR: 6 as i32 == 7; - // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:10: ERROR: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_precedence_as.carbon:[[@LINE+3]]:10: error: parentheses are required to disambiguate operator precedence // 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 24485d7f876a..e6805a40a9c3 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: Expected `,` or `)`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:10: error: expected `,` or `)` // CHECK:STDERR: 1 + (a = 1); // CHECK:STDERR: ^ // CHECK:STDERR: 1 + (a = 1); - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+8]]:19: ERROR: Expected `else` after `if ... then ...`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+8]]:19: error: expected `else` after `if ... then ...` // CHECK:STDERR: (if true then a += 1 else a /= 2); // CHECK:STDERR: ^~ // CHECK:STDERR: - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:19: ERROR: Expected `,` or `)`. + // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+4]]:19: error: expected `,` or `)` // 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: 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 // CHECK:STDERR: a + ++a; // CHECK:STDERR: ^~ // CHECK:STDERR: a + ++a; - // CHECK:STDERR: fail_precedence_assign.carbon:[[@LINE+3]]:5: ERROR: 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 // 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 c23b117e6dda..8beaf3bceeb3 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: 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 // 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 10aaba3a3640..8c2b37ba3493 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_and_where.carbon:[[@LINE+4]]:14: error: parentheses are required to disambiguate operator precedence // 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: Expected `;` after expression statement. + // CHECK:STDERR: fail_where_or.carbon:[[@LINE+4]]:22: error: expected `;` after expression statement // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_equals_where.carbon:[[@LINE+4]]:10: error: parentheses are required to disambiguate operator precedence // 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: Expected `;` after expression statement. + // CHECK:STDERR: fail_where_neq.carbon:[[@LINE+4]]:21: error: expected `;` after expression statement // 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: Requirement should use `impls`, `=`, or `==` operator. + // CHECK:STDERR: fail_less_requirement.carbon:[[@LINE+4]]:14: error: requirement should use `impls`, `=`, or `==` operator // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_as_where.carbon:[[@LINE+4]]:10: error: parentheses are required to disambiguate operator precedence // 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: Expected `;` after expression statement. + // CHECK:STDERR: fail_where_as.carbon:[[@LINE+4]]:21: error: expected `;` after expression statement // 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: Requirement should use `impls`, `=`, or `==` operator. + // CHECK:STDERR: fail_as_in_argument.carbon:[[@LINE+4]]:14: error: requirement should use `impls`, `=`, or `==` operator // 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: Requirement should use `impls`, `=`, or `==` operator. + // CHECK:STDERR: fail_greater_in_argument.carbon:[[@LINE+3]]:15: error: requirement should use `impls`, `=`, or `==` operator // 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 470218e2c6a5..3daa7a0ce6c4 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: 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 // 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 1aa603f273b0..f450185a540d 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: 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 // 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 149eb9451816..89faab0f4484 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: 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 // 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 8c1dc6aa698a..22792f5aa237 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: Whitespace missing after binary operator. +// CHECK:STDERR: fail_star_minus.carbon:[[@LINE+3]]:16: error: whitespace missing after binary operator // 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 8703d2596ad7..496bc8225af5 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: Whitespace missing after binary operator. +// CHECK:STDERR: fail_star_star.carbon:[[@LINE+3]]:16: error: whitespace missing after binary operator // 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 aef4e42b3d3c..e55133c8694c 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: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_star_star_no_space.carbon:[[@LINE+3]]:16: error: `var` declarations must end with a `;` // 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 46ea4d53086f..706d25c8be25 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: 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 // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+15]]:29: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+11]]:34: error: parentheses are required to disambiguate operator precedence // 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: Parentheses are required to disambiguate operator precedence. + // CHECK:STDERR: fail_variety.carbon:[[@LINE+7]]:38: error: parentheses are required to disambiguate operator precedence // 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: 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 // 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 611989348694..8b391283b85c 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: Expected name in binding pattern. +// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:5: error: expected name in binding pattern // CHECK:STDERR: var package.val: i32; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: var package.val: i32; -// CHECK:STDERR: fail_in_name.carbon:[[@LINE+4]]:11: ERROR: `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 // CHECK:STDERR: namespace package.NS; // CHECK:STDERR: ^~~~~~~ // CHECK:STDERR: namespace package.NS; -// CHECK:STDERR: fail_in_name.carbon:[[@LINE+3]]:7: ERROR: `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 // 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 ce0de9887547..c79383fa5c51 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: `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 // 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: `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 // 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: `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 // CHECK:STDERR: export // CHECK:STDERR: ^~~~~~ // CHECK:STDERR: @@ -58,7 +58,7 @@ export package Pkg; -// CHECK:STDERR: fail_no_name.carbon:[[@LINE+4]]:8: ERROR: `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 // 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: `export` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:1: error: `export` declarations must end with a `;` // 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: `.` should be followed by a name. +// CHECK:STDERR: fail_incomplete_qual_name.carbon:[[@LINE+4]]:12: error: `.` should be followed by a name // 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: `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 // 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: `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 // CHECK:STDERR: import library "lib"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: First declaration is here. +// CHECK:STDERR: fail_before_import.carbon:[[@LINE-5]]:1: first declaration is here // 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: `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 // 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: `export` is only allowed in API files. +// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files // 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 bca0c93d6045..e378e94b25da 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: `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 // 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: `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 // CHECK:STDERR: export import library "b"; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: First declaration is here. +// CHECK:STDERR: fail_order.carbon:[[@LINE-5]]:1: first declaration is here // 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: `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 // 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: `export` is only allowed in API files. +// CHECK:STDERR: fail_in_impl.carbon:[[@LINE+3]]:1: error: `export` is only allowed in API files // 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 746b03be0066..ce1d3aaa28dc 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: `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 // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: First declaration is here. +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: first declaration is here // 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 27e19adac5ab..d192436c4be9 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: `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 // CHECK:STDERR: import B; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: First declaration is here. +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-5]]:1: first declaration is here // 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: 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 // CHECK:STDERR: package D; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: First non-comment line is here. +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-16]]:1: first non-comment line is here // 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: `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 // CHECK:STDERR: import F; // CHECK:STDERR: ^~~~~~ -// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: First declaration is here. +// CHECK:STDERR: fail_after_decl_repeated.carbon:[[@LINE-27]]:1: first declaration is here // 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 17867e0f6608..d87628d54685 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: `import` declarations must end with a `;`. +// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:26: error: `import` declarations must end with a `;` // 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 de2d019caa76..8be5617b08de 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: 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 // 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 06b1bb52e325..8ca4c0686458 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: Expected identifier or `library` after `import`. +// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:8: error: expected identifier or `library` after `import` // 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 eca368456de0..c0436e010efe 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: Expected identifier or `library` after `import`. +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:7: error: expected identifier or `library` after `import` // 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 582be4217676..b0f6913c9745 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: `import` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `import` declarations must end with a `;` // 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 e8a36376c9fa..6dbb4947044f 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: Missing `library` keyword. +// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:17: error: missing `library` keyword // 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 a7a08999d450..cca3d921c857 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: `import` declarations must end with a `;`. +// CHECK:STDERR: fail_type.carbon:[[@LINE+3]]:17: error: `import` declarations must end with a `;` // 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 549d16f611ec..a5bdcc0255d2 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: 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 // 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: 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 // 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: 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 // 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: 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 // 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: `library` declarations must end with a `;`. +// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+4]]:25: error: `library` declarations must end with a `;` // 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: `library` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+46]]:21: error: `library` declarations must end with a `;` // 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 3a684f4c9a7c..753dbbd08f8f 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: 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 // CHECK:STDERR: library "semi_before"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: First non-comment line is here. +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: first non-comment line is here // 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 641126afdcf8..094f221a90b9 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: 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 // CHECK:STDERR: library "too_late"; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: First non-comment line is here. +// CHECK:STDERR: fail_too_late.carbon:[[@LINE-5]]:1: first non-comment line is here // 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 a9e2091e158f..68343815297c 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: 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 // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: First non-comment line is here. +// CHECK:STDERR: fail_after_decl.carbon:[[@LINE-5]]:1: first non-comment line is here // 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 edd8d66235ff..3b4ad86497ab 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: 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 // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: First non-comment line is here. +// CHECK:STDERR: fail_after_import.carbon:[[@LINE-5]]:1: first non-comment line is here // 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 d87568478497..fa01df6048ab 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: 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 // CHECK:STDERR: package B; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: First non-comment line is here. +// CHECK:STDERR: fail_after_package.carbon:[[@LINE-4]]:1: first non-comment line is here // 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 0bdbc3501ae6..1c980444ef54 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: `package` declarations must end with a `;`. +// CHECK:STDERR: fail_extra_string.carbon:[[@LINE+3]]:27: error: `package` declarations must end with a `;` // 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 456d5c68ea73..ebcff05e61cc 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: 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 // 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 56124481eb7f..2aea5f8e6db3 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: Expected identifier after `package`. +// CHECK:STDERR: fail_library_skips_name.carbon:[[@LINE+3]]:9: error: expected identifier after `package` // 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 4ccac09654c0..e17ec94413f2 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: Expected identifier after `package`. +// CHECK:STDERR: fail_name_is_keyword.carbon:[[@LINE+3]]:9: error: expected identifier after `package` // 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 d81b05bda8fd..cc78d664a3fc 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: Expected identifier after `package`. +// CHECK:STDERR: fail_no_name.carbon:[[@LINE+3]]:8: error: expected identifier after `package` // 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 f1728321edf4..9c1211ed89ea 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: `package` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+10]]:21: error: `package` declarations must end with a `;` // 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 059e5980fa61..7d0c372da8cf 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: Missing `library` keyword. +// CHECK:STDERR: fail_omit_library_keyword.carbon:[[@LINE+3]]:18: error: missing `library` keyword // 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 b31cce5c3124..b9a32e2036c7 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: 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 // CHECK:STDERR: package Geometry; // CHECK:STDERR: ^~~~~~~ -// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: First non-comment line is here. +// CHECK:STDERR: fail_semi_before.carbon:[[@LINE-5]]:1: first non-comment line is here // 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 3a45194061b8..a5f986d72e1e 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: `package` declarations must end with a `;`. +// CHECK:STDERR: fail_trailing_impl.carbon:[[@LINE+3]]:18: error: `package` declarations must end with a `;` // 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 0a2cfd23dd26..d8bcd0dd0d0e 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: 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 // 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 41461008893a..918735659855 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: Expected expression. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:6: error: expected expression // CHECK:STDERR: x.(); // CHECK:STDERR: ^ // CHECK:STDERR: x.(); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: ERROR: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected `)` // CHECK:STDERR: y.(1,); // CHECK:STDERR: ^ // CHECK:STDERR: y.(1,); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: ERROR: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected `)` // 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: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` // 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: Expected expression. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:7: error: expected expression // CHECK:STDERR: v->(); // CHECK:STDERR: ^ // CHECK:STDERR: v->(); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: ERROR: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` // CHECK:STDERR: u->(f,); // CHECK:STDERR: ^ // CHECK:STDERR: u->(f,); - // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: ERROR: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+4]]:8: error: expected `)` // 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: Expected `)`. + // CHECK:STDERR: fail_tuple_instead_of_compound_member_access.carbon:[[@LINE+3]]:9: error: expected `)` // 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 a7c98efb1741..c91c8678d75d 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: `return` statements must end with a `;`. +// CHECK:STDERR: fail_expr_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` // 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 2b0e20bd77fb..804d57e01bf5 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: Expected expression. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+7]]:1: error: expected expression // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: ERROR: `return` statements must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` // 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 384736c975fd..007290f0c0b8 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: Expected `var` after `returned`. + // CHECK:STDERR: fail_returned_no_var.carbon:[[@LINE+3]]:12: error: expected `var` after `returned` // 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 08ef701a1d7e..5bda39483847 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: `return` statements must end with a `;`. +// CHECK:STDERR: fail_var_no_semi.carbon:[[@LINE+3]]:1: error: `return` statements must end with a `;` // 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 0d5a5faba461..dbe52a09dd6f 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: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_comma_only.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` // 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 c397cf2222b9..f942e44bd132 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: Expected `.field: field_type`. +// CHECK:STDERR: fail_comma_repeat_in_type.carbon:[[@LINE+3]]:17: error: expected `.field: field_type` // 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 e24343778662..a3d80938583e 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: Expected `.field = value`. +// CHECK:STDERR: fail_comma_repeat_in_value.carbon:[[@LINE+3]]:16: error: expected `.field = value` // 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 1534f3fd171d..4a7112875c5f 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: Expected `,` or `}`. +// CHECK:STDERR: fail_extra_token_in_type.carbon:[[@LINE+3]]:17: error: expected `,` or `}` // 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 fad657d3e6b0..a79a0f21ea60 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: Expected `,` or `}`. +// CHECK:STDERR: fail_extra_token_in_value.carbon:[[@LINE+3]]:28: error: expected `,` or `}` // 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 22ab8783af80..62dcc4067400 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: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_colon.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` // 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 cf7c8592cd7c..46ff9769cbf7 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: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_equals.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` // 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 10a5d8b4692b..375f9342be93 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: Expected `.field: field_type` or `.field = value`. +// CHECK:STDERR: fail_identifier_only.carbon:[[@LINE+3]]:9: error: expected `.field: field_type` or `.field = value` // 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 c2c5c6a3cd8e..36da1916eec4 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: Expected identifier after `.`. +// CHECK:STDERR: fail_invalid_struct_designator.carbon:[[@LINE+3]]:16: error: expected identifier after `.` // 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 068ff69ba78f..491810ef6b2d 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: Expected expression. +// CHECK:STDERR: fail_missing_type.carbon:[[@LINE+3]]:12: error: expected expression // 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 206dc980c197..ac41cea75248 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: Expected expression. +// CHECK:STDERR: fail_missing_value.carbon:[[@LINE+3]]:12: error: expected expression // 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 f030a50224bd..78c0bb4d0ba5 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: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_type_and_value.carbon:[[@LINE+3]]:21: error: expected `.field: field_type` // 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 a243648fe649..73c9270cd97f 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: Expected `.field = value`. +// CHECK:STDERR: fail_mix_value_and_type.carbon:[[@LINE+3]]:17: error: expected `.field = value` // 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 382e59a2a9d6..836dfc2935c5 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: Expected `.field = value`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+8]]:25: error: expected `.field = value` // 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: Expected `.field = value`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+4]]:29: error: expected `.field = value` // 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: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+7]]:26: error: expected `.field: field_type` // 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: Expected `.field: field_type`. +// CHECK:STDERR: fail_mix_with_unknown.carbon:[[@LINE+3]]:31: error: expected `.field: field_type` // 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 642ba026e84f..4fc06e2372e8 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: 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` // 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 7b491126689e..e953de6760d1 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: Expected identifier after `.`. +// CHECK:STDERR: fail_period_only.carbon:[[@LINE+3]]:10: error: expected identifier after `.` // 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 0d2d121cc9f1..0d4ef238394a 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: Expected identifier after `.`. +// CHECK:STDERR: fail_period_paren.carbon:[[@LINE+3]]:10: error: expected identifier after `.` // 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 b0be9b6a1887..07aa55e7b4c1 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: Expected identifier after `.`. +// CHECK:STDERR: fail_period_string_colon.carbon:[[@LINE+3]]:10: error: expected identifier after `.` // 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 41484b8c8dcd..15b7152c8798 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: Expected identifier after `.`. +// CHECK:STDERR: fail_period_string_equals.carbon:[[@LINE+3]]:10: error: expected identifier after `.` // 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 a5a322b2f8ec..575a8d64701a 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: 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` // 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 0610bf5639b4..56ca25255480 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: Expected name in binding pattern. +// CHECK:STDERR: fail_bad_name.carbon:[[@LINE+3]]:5: error: expected name in binding pattern // 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 99402577d6a3..412b97118f53 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: Expected name in binding pattern. +// CHECK:STDERR: fail_empty.carbon:[[@LINE+3]]:4: error: expected name in binding pattern // 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 8daed5a8732e..ffb4a0dfc0d1 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: Expected name in binding pattern. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+16]]:21: error: expected name in binding pattern // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: ERROR: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_no_semi.carbon:[[@LINE+12]]:21: error: `var` declarations must end with a `;` // 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 9095bcb4112a..ae3c257cf96e 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: Expected identifier or `Self` after `.`. + // CHECK:STDERR: fail_numeric_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` // 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: Expected identifier or `Self` after `.`. + // CHECK:STDERR: fail_keyword_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` // 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: Expected identifier or `Self` after `.`. + // CHECK:STDERR: fail_empty_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` // 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: Expected identifier or `Self` after `.`. + // CHECK:STDERR: fail_star_designator.carbon:[[@LINE+4]]:4: error: expected identifier or `Self` after `.` // 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: Expected identifier or `Self` after `.`. +// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+93]]:21: error: expected identifier or `Self` after `.` // CHECK:STDERR: // CHECK:STDOUT: ] // CHECK:STDERR: ^ // CHECK:STDERR: -// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+89]]:21: ERROR: `var` declarations must end with a `;`. +// CHECK:STDERR: fail_designator_eof.carbon:[[@LINE+89]]:21: error: `var` declarations must end with a `;` // 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 81cc9b5edc3d..911d60b97129 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: Requirement can only use `=` after `.member` designator. +// CHECK:STDERR: fail_not_designator.carbon:[[@LINE+4]]:37: error: requirement can only use `=` after `.member` designator // 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: 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 // 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: Requirement can only use `=` after `.member` designator. +// CHECK:STDERR: fail_dot_self.carbon:[[@LINE+4]]:30: error: requirement can only use `=` after `.member` designator // 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: Expected identifier or `Self` after `.`. +// CHECK:STDERR: fail_dot_keyword.carbon:[[@LINE+4]]:28: error: expected identifier or `Self` after `.` // 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: 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 // 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: 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 // 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: Requirement can only use `=` after `.member` designator. +// CHECK:STDERR: fail_after_and.carbon:[[@LINE+3]]:43: error: requirement can only use `=` after `.member` designator // 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 b7e850d5dfe8..d52820549327 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: Expected expression. +// CHECK:STDERR: fail_and_prefix.carbon:[[@LINE+4]]:29: error: expected expression // 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: Expected expression. +// CHECK:STDERR: fail_and_suffix.carbon:[[@LINE+4]]:40: error: expected expression // 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: Requirement should use `impls`, `=`, or `==` operator. +// CHECK:STDERR: fail_and_early.carbon:[[@LINE+3]]:28: error: requirement should use `impls`, `=`, or `==` operator // 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 a4735ea8202c..d8cd219a6aff 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: Expected `(` after `while`. + // CHECK:STDERR: fail_missing_cond.carbon:[[@LINE+3]]:9: error: expected `(` after `while` // 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 db79b6567a5f..f51349a009fc 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: `break` statements must end with a `;`. + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+4]]:5: error: `break` statements must end with a `;` // CHECK:STDERR: } // CHECK:STDERR: ^ // CHECK:STDERR: } if (c) { continue - // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: ERROR: `continue` statements must end with a `;`. + // CHECK:STDERR: fail_no_semi.carbon:[[@LINE+3]]:5: error: `continue` statements must end with a `;` // CHECK:STDERR: } // CHECK:STDERR: ^ } diff --git a/toolchain/parse/testdata/while/fail_unbraced.carbon b/toolchain/parse/testdata/while/fail_unbraced.carbon index 00c1156c5a33..38fc968b8593 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: Expected braced code block. + // CHECK:STDERR: fail_unbraced.carbon:[[@LINE+3]]:5: error: expected braced code block // CHECK:STDERR: break; // CHECK:STDERR: ^~~~~ break; diff --git a/toolchain/source/source_buffer.cpp b/toolchain/source/source_buffer.cpp index ee340385bc4a..9edfce557db3 100644 --- a/toolchain/source/source_buffer.cpp +++ b/toolchain/source/source_buffer.cpp @@ -36,14 +36,14 @@ auto SourceBuffer::MakeFromFile(llvm::vfs::FileSystem& fs, fs.openFileForRead(filename); if (file.getError()) { CARBON_DIAGNOSTIC(ErrorOpeningFile, Error, - "Error opening file for read: {0}", std::string); + "error opening file for read: {0}", std::string); emitter.Emit(filename, ErrorOpeningFile, file.getError().message()); return std::nullopt; } llvm::ErrorOr status = (*file)->status(); if (status.getError()) { - CARBON_DIAGNOSTIC(ErrorStattingFile, Error, "Error statting file: {0}", + CARBON_DIAGNOSTIC(ErrorStattingFile, Error, "error statting file: {0}", std::string); emitter.Emit(filename, ErrorStattingFile, file.getError().message()); return std::nullopt; @@ -68,7 +68,7 @@ auto SourceBuffer::MakeFromMemoryBuffer( DiagnosticEmitter emitter(converter, consumer); if (buffer.getError()) { - CARBON_DIAGNOSTIC(ErrorReadingFile, Error, "Error reading file: {0}", + CARBON_DIAGNOSTIC(ErrorReadingFile, Error, "error reading file: {0}", std::string); emitter.Emit(filename, ErrorReadingFile, buffer.getError().message()); return std::nullopt; @@ -76,7 +76,7 @@ auto SourceBuffer::MakeFromMemoryBuffer( if (buffer.get()->getBufferSize() >= std::numeric_limits::max()) { CARBON_DIAGNOSTIC(FileTooLarge, Error, - "File is over the 2GiB input limit; size is {0} bytes.", + "file is over the 2GiB input limit; size is {0} bytes", int64_t); emitter.Emit(filename, FileTooLarge, buffer.get()->getBufferSize()); return std::nullopt;