Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions toolchain/check/call.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "toolchain/check/convert.h"
#include "toolchain/check/deduce.h"
#include "toolchain/check/function.h"
#include "toolchain/diagnostics/format_providers.h"
#include "toolchain/sem_ir/builtin_function_kind.h"
#include "toolchain/sem_ir/builtin_inst_kind.h"
#include "toolchain/sem_ir/entity_with_params_base.h"
Expand Down Expand Up @@ -42,9 +43,9 @@ static auto ResolveCalleeInCall(Context& context, SemIR::LocId loc_id,
auto params = context.inst_blocks().GetOrEmpty(callee_info.param_refs_id);
if (arg_ids.size() != params.size()) {
CARBON_DIAGNOSTIC(CallArgCountMismatch, Error,
"{0} argument(s) passed to {1} expecting "
"{2} argument(s).",
int, llvm::StringLiteral, int);
"{0} argument{0:s} passed to {1} expecting "
"{2} argument{2:s}",
IntAsSelect, llvm::StringLiteral, IntAsSelect);
CARBON_DIAGNOSTIC(InCallToEntity, Note, "calling {0} declared here",
llvm::StringLiteral);
context.emitter()
Expand Down
22 changes: 11 additions & 11 deletions toolchain/check/convert.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,12 +236,12 @@ 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)",
uint64_t, size_t);
"cannot initialize array of {0} element{0:s} from {1} initializer{1:s}",
IntAsSelect, IntAsSelect);
CARBON_DIAGNOSTIC(ArrayInitFromExprArgCountMismatch, Error,
"cannot initialize array of {0} element(s) from tuple "
"with {1} element(s).",
uint64_t, size_t);
"cannot initialize array of {0} element{0:s} from tuple "
"with {1} element{1:s}",
IntAsSelect, IntAsSelect);
context.emitter().Emit(value_loc_id,
literal_elems.empty()
? ArrayInitFromExprArgCountMismatch
Expand Down Expand Up @@ -320,9 +320,9 @@ 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 "
"with {1} element(s).",
size_t, size_t);
"cannot initialize tuple of {0} element{0:s} from tuple "
"with {1} element{1:s}",
IntAsSelect, IntAsSelect);
context.emitter().Emit(value_loc_id, TupleInitElementCountMismatch,
dest_elem_types.size(), src_elem_types.size());
return SemIR::InstId::BuiltinError;
Expand Down Expand Up @@ -414,9 +414,9 @@ static auto ConvertStructToStructOrClass(Context& context,
if (src_elem_fields.size() != dest_elem_fields.size()) {
CARBON_DIAGNOSTIC(
StructInitElementCountMismatch, Error,
"cannot initialize {0:class|struct} with {1} field(s) from struct "
"with {2} field(s).",
BoolAsSelect, size_t, size_t);
"cannot initialize {0:class|struct} with {1} field{1:s} from struct "
"with {2} field{2:s}",
BoolAsSelect, IntAsSelect, IntAsSelect);
context.emitter().Emit(value_loc_id, StructInitElementCountMismatch,
ToClass, dest_elem_fields.size(),
src_elem_fields.size());
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/array/fail_out_of_bound.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -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 from 3 initializers
// CHECK:STDERR: var a: [i32; 1] = (1, 2, 3);
// CHECK:STDERR: ^~~~~~~~~
var a: [i32; 1] = (1, 2, 3);
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/array/fail_type_mismatch.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,14 @@ var t1: (i32, String, String);
// 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 elements from 2 initializers
// 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 elements from tuple with 2 elements
// CHECK:STDERR: var d: [i32; 3] = t2;
// CHECK:STDERR: ^~
var d: [i32; 3] = t2;
Expand Down
6 changes: 3 additions & 3 deletions toolchain/check/testdata/builtins/float/negate.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ 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 passed to function expecting 0 arguments
// CHECK:STDERR: return TooFew(a);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-17]]:1: note: calling function declared here
Expand All @@ -51,7 +51,7 @@ 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: return TooMany(a, b, c);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-23]]:1: note: calling function declared here
Expand All @@ -62,7 +62,7 @@ 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: return BadReturnType(a, b);
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-29]]:1: note: calling function declared here
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/builtins/int/sadd.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var too_many: [i32; TooMany(1, 2, 3)];
// 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)];
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here
Expand Down
8 changes: 4 additions & 4 deletions toolchain/check/testdata/builtins/int/snegate.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var too_many: [i32; TooMany(1, 2)];
// 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)];
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here
Expand All @@ -68,7 +68,7 @@ var bad_return_type: [i32; BadReturnType(1)];
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 passed to function expecting 0 arguments
// CHECK:STDERR: return TooFew(a);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here
Expand All @@ -79,7 +79,7 @@ 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: return TooMany(a, b, c);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here
Expand All @@ -90,7 +90,7 @@ 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: return BadReturnType(a, b);
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/builtins/int/uadd.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ var too_many: [i32; TooMany(1, 2, 3)];
// 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: var bad_call: [i32; JustRight(1, 2, 3)];
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here
Expand Down
8 changes: 4 additions & 4 deletions toolchain/check/testdata/builtins/int/unegate.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var too_many: [i32; TooMany(1, 2)];
// 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: var bad_call: [i32; JustRight(1, 2)];
// CHECK:STDERR: ^~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-21]]:1: note: calling function declared here
Expand All @@ -68,7 +68,7 @@ var bad_return_type: [i32; BadReturnType(1)];
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 passed to function expecting 0 arguments
// CHECK:STDERR: return TooFew(a);
// CHECK:STDERR: ^~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-42]]:1: note: calling function declared here
Expand All @@ -79,7 +79,7 @@ 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: return TooMany(a, b, c);
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-48]]:1: note: calling function declared here
Expand All @@ -90,7 +90,7 @@ 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: return BadReturnType(a, b);
// CHECK:STDERR: ^~~~~~~~~~~~~~
// CHECK:STDERR: fail_bad_decl.carbon:[[@LINE-54]]:1: note: calling function declared here
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/class/fail_init.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ 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 fields from struct with 1 field
// CHECK:STDERR: {.a = 1} as Class;
// CHECK:STDERR: ^~~~~~~~
// CHECK:STDERR:
Expand All @@ -24,7 +24,7 @@ fn F() {
// 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 fields from struct with 3 fields
// CHECK:STDERR: {.a = 1, .b = 2, .c = 3} as Class;
// CHECK:STDERR: ^~~~~~~~~~~~~~~~~~~~~~~~
{.a = 1, .b = 2, .c = 3} as Class;
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/class/fail_method.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ fn F(c: 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 passed to function expecting 0 arguments
// CHECK:STDERR: Class.WithSelf(c);
// CHECK:STDERR: ^~~~~~~~~~~~~~~
// CHECK:STDERR: fail_method.carbon:[[@LINE-21]]:3: note: calling function declared here
Expand Down
4 changes: 2 additions & 2 deletions toolchain/check/testdata/class/generic/call.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ 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 passed to generic class expecting 2 arguments
// CHECK:STDERR: var a: Class(i32*);
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_too_few.carbon:[[@LINE-5]]:1: note: calling generic class declared here
Expand All @@ -40,7 +40,7 @@ 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 arguments passed to generic class expecting 2 arguments
// CHECK:STDERR: var a: Class(i32*, 1, 2);
// CHECK:STDERR: ^~~~~~
// CHECK:STDERR: fail_too_many.carbon:[[@LINE-5]]:1: note: calling generic class declared here
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/class/virtual_modifiers.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ import Modifiers;

fn F() {
// TODO: The vptr shouldn't be counted for programmer-facing behavior.
// CHECK:STDERR: fail_todo_init.carbon:[[@LINE+3]]:27: error: cannot initialize class with 1 field(s) from struct with 0 field(s).
// CHECK:STDERR: fail_todo_init.carbon:[[@LINE+3]]:27: error: cannot initialize class with 1 field from struct with 0 fields
// CHECK:STDERR: var v: Modifiers.Base = {};
// CHECK:STDERR: ^~
var v: Modifiers.Base = {};
Expand Down
12 changes: 6 additions & 6 deletions toolchain/check/testdata/function/call/fail_param_count.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@ 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 passed to function expecting 0 arguments
// CHECK:STDERR: Run0(1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-8]]:1: note: 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 arguments passed to function expecting 0 arguments
// CHECK:STDERR: Run0(0, 1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-16]]:1: note: calling function declared here
Expand All @@ -30,15 +30,15 @@ fn Main() {
// 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: Run1();
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-24]]:1: note: 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 arguments passed to function expecting 1 argument
// CHECK:STDERR: Run1(0, 1);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-32]]:1: note: calling function declared here
Expand All @@ -47,15 +47,15 @@ fn Main() {
// 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 arguments passed to function expecting 2 arguments
// CHECK:STDERR: Run2();
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-40]]:1: note: 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 passed to function expecting 2 arguments
// CHECK:STDERR: Run2(0);
// CHECK:STDERR: ^~~~~
// CHECK:STDERR: fail_param_count.carbon:[[@LINE-48]]:1: note: calling function declared here
Expand Down
6 changes: 3 additions & 3 deletions toolchain/check/testdata/function/generic/redeclare.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ 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 passed to function expecting 2 arguments
// CHECK:STDERR: return F(T);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_different_return_type.carbon:[[@LINE-13]]:1: note: calling function declared here
Expand All @@ -56,7 +56,7 @@ 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 passed to function expecting 2 arguments
// CHECK:STDERR: return F(T);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_reorder.carbon:[[@LINE-13]]:1: note: calling function declared here
Expand All @@ -80,7 +80,7 @@ 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 passed to function expecting 2 arguments
// CHECK:STDERR: return F(T);
// CHECK:STDERR: ^~
// CHECK:STDERR: fail_rename.carbon:[[@LINE-13]]:1: note: calling function declared here
Expand Down
2 changes: 1 addition & 1 deletion toolchain/check/testdata/struct/fail_assign_empty.carbon
Original file line number Diff line number Diff line change
Expand Up @@ -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 from struct with 0 fields
// CHECK:STDERR: var x: {.a: i32} = {};
// CHECK:STDERR: ^~
var x: {.a: i32} = {};
Expand Down
Loading
Loading