@@ -943,7 +943,7 @@ impl<'db> BodyDiag<'db> {
943
943
Self :: DuplicatedBinding { name, .. } => {
944
944
format ! ( "duplicate binding `{}` in pattern" , name. data( db) )
945
945
}
946
- Self :: DuplicatedRestPat ( _) => "duplicate `..` found " . to_string ( ) ,
946
+ Self :: DuplicatedRestPat ( _) => "duplicate `..` in pattern " . to_string ( ) ,
947
947
Self :: InvalidPathDomainInPat { .. } => "invalid item is given here" . to_string ( ) ,
948
948
Self :: UnitVariantExpected { .. } => "expected unit variant" . to_string ( ) ,
949
949
Self :: TupleVariantExpected { .. } => "expected tuple variant" . to_string ( ) ,
@@ -952,7 +952,7 @@ impl<'db> BodyDiag<'db> {
952
952
Self :: DuplicatedRecordFieldBind { .. } => "duplicated record field binding" . to_string ( ) ,
953
953
Self :: RecordFieldNotFound { .. } => "specified field not found" . to_string ( ) ,
954
954
Self :: ExplicitLabelExpectedInRecord { .. } => "explicit label is required" . to_string ( ) ,
955
- Self :: MissingRecordFields { .. } => "all fields are not given " . to_string ( ) ,
955
+ Self :: MissingRecordFields { .. } => "missing fields in record pattern " . to_string ( ) ,
956
956
Self :: UndefinedVariable ( ..) => "undefined variable" . to_string ( ) ,
957
957
Self :: ReturnedTypeMismatch { .. } => "returned type mismatch" . to_string ( ) ,
958
958
Self :: TypeMustBeKnown ( ..) => "type must be known here" . to_string ( ) ,
@@ -978,14 +978,14 @@ impl<'db> BodyDiag<'db> {
978
978
format ! ( "`{}` needs to be implemented for {ty}" , trait_name. data( db) )
979
979
}
980
980
981
- Self :: NotCallable ( .. ) => "not callable type is given in call expression" . to_string ( ) ,
981
+ Self :: NotCallable ( _ , ty ) => format ! ( "expected function, found `{ty}`" ) ,
982
982
983
983
Self :: CallGenericArgNumMismatch { .. } => {
984
984
"given generic argument number mismatch" . to_string ( )
985
985
}
986
986
987
- Self :: CallArgNumMismatch { .. } => "given argument number mismatch" . to_string ( ) ,
988
- Self :: CallArgLabelMismatch { .. } => "given argument label mismatch" . to_string ( ) ,
987
+ Self :: CallArgNumMismatch { .. } => "argument number mismatch" . to_string ( ) ,
988
+ Self :: CallArgLabelMismatch { .. } => "argument label mismatch" . to_string ( ) ,
989
989
990
990
Self :: AmbiguousInherentMethodCall { .. } => "ambiguous method call" . to_string ( ) ,
991
991
@@ -1164,7 +1164,7 @@ impl<'db> BodyDiag<'db> {
1164
1164
vec ! [
1165
1165
SubDiagnostic :: new(
1166
1166
LabelStyle :: Primary ,
1167
- format!( "duplicated field binding `{}`" , name) ,
1167
+ format!( "duplicate field binding `{}`" , name) ,
1168
1168
primary. resolve( db) ,
1169
1169
) ,
1170
1170
SubDiagnostic :: new(
@@ -1314,7 +1314,7 @@ impl<'db> BodyDiag<'db> {
1314
1314
vec ! [
1315
1315
SubDiagnostic :: new(
1316
1316
LabelStyle :: Primary ,
1317
- format!( "`{}` cant be applied to `{}`" , op, ty) ,
1317
+ format!( "`{}` can't be applied to `{}`" , op, ty) ,
1318
1318
span. resolve( db) ,
1319
1319
) ,
1320
1320
SubDiagnostic :: new(
@@ -1381,7 +1381,7 @@ impl<'db> BodyDiag<'db> {
1381
1381
Self :: NotCallable ( primary, ty) => {
1382
1382
vec ! [ SubDiagnostic :: new(
1383
1383
LabelStyle :: Primary ,
1384
- format!( "`{ty}` is not callable" ) ,
1384
+ format!( "call expression requires function; `{ty}` is not callable" ) ,
1385
1385
primary. resolve( db) ,
1386
1386
) ]
1387
1387
}
0 commit comments