Skip to content

Commit 4e3be7c

Browse files
committed
Use standard formatting for "rust-call" ABI message
Nearly all error messages start with a lowercase letter and don't use articles - instead they refer to the plural case.
1 parent c8915ee commit 4e3be7c

File tree

5 files changed

+7
-7
lines changed

5 files changed

+7
-7
lines changed

compiler/rustc_typeck/src/check/check.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pub(super) fn check_fn<'a, 'tcx>(
109109
};
110110

111111
if let Some(header) = item {
112-
tcx.sess.span_err(header.span, "A function with the \"rust-call\" ABI must take a single non-self argument that is a tuple")
112+
tcx.sess.span_err(header.span, "functions with the \"rust-call\" ABI must take a single non-self argument that is a tuple")
113113
}
114114
};
115115

src/test/ui/abi/issues/issue-22565-rust-call.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#![feature(unboxed_closures)]
22

33
extern "rust-call" fn b(_i: i32) {}
4-
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument that is a tuple
4+
//~^ ERROR functions with the "rust-call" ABI must take a single non-self argument that is a tuple
55

66
fn main () {
77
b(10);

src/test/ui/abi/issues/issue-22565-rust-call.stderr

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: A function with the "rust-call" ABI must take a single non-self argument that is a tuple
1+
error: functions with the "rust-call" ABI must take a single non-self argument that is a tuple
22
--> $DIR/issue-22565-rust-call.rs:3:1
33
|
44
LL | extern "rust-call" fn b(_i: i32) {}

src/test/ui/overloaded-calls-nontuple.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ impl FnMut<isize> for S {
1111
extern "rust-call" fn call_mut(&mut self, z: isize) -> isize {
1212
self.x + self.y + z
1313
}
14-
//~^^^ ERROR A function with the "rust-call" ABI must take a single non-self argument
14+
//~^^^ ERROR functions with the "rust-call" ABI must take a single non-self argument
1515
}
1616

1717
impl FnOnce<isize> for S {
1818
type Output = isize;
1919
extern "rust-call" fn call_once(mut self, z: isize) -> isize { self.call_mut(z) }
20-
//~^ ERROR A function with the "rust-call" ABI must take a single non-self argument
20+
//~^ ERROR functions with the "rust-call" ABI must take a single non-self argument
2121
}
2222

2323
fn main() {

src/test/ui/overloaded-calls-nontuple.stderr

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
error: A function with the "rust-call" ABI must take a single non-self argument that is a tuple
1+
error: functions with the "rust-call" ABI must take a single non-self argument that is a tuple
22
--> $DIR/overloaded-calls-nontuple.rs:11:5
33
|
44
LL | extern "rust-call" fn call_mut(&mut self, z: isize) -> isize {
55
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
66

7-
error: A function with the "rust-call" ABI must take a single non-self argument that is a tuple
7+
error: functions with the "rust-call" ABI must take a single non-self argument that is a tuple
88
--> $DIR/overloaded-calls-nontuple.rs:19:5
99
|
1010
LL | extern "rust-call" fn call_once(mut self, z: isize) -> isize { self.call_mut(z) }

0 commit comments

Comments
 (0)