Skip to content

Commit a84656e

Browse files
committed
Tweak wording of "missing stability attribute" error
1 parent ebee8e1 commit a84656e

7 files changed

+9
-9
lines changed

compiler/rustc_passes/src/stability.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -587,7 +587,7 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
587587
if is_error {
588588
let def_id = self.tcx.hir().local_def_id(hir_id);
589589
let descr = self.tcx.def_kind(def_id).descr(def_id.to_def_id());
590-
self.tcx.sess.span_err(span, &format!("{} has missing stability attribute", descr));
590+
self.tcx.sess.span_err(span, &format!("{} is missing a stability attribute", descr));
591591
}
592592
}
593593

src/test/ui/missing/missing-stability.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
#![stable(feature = "stable_test_feature", since = "1.0.0")]
77

88
pub fn unmarked() {
9-
//~^ ERROR function has missing stability attribute
9+
//~^ ERROR function is missing a stability attribute
1010
()
1111
}
1212

@@ -20,5 +20,5 @@ pub mod foo {
2020
pub mod bar {
2121
// #[stable] is not inherited
2222
pub fn unmarked() {}
23-
//~^ ERROR function has missing stability attribute
23+
//~^ ERROR function is missing a stability attribute
2424
}

src/test/ui/missing/missing-stability.stderr

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: function has missing stability attribute
1+
error: function is missing a stability attribute
22
--> $DIR/missing-stability.rs:8:1
33
|
44
LL | / pub fn unmarked() {
@@ -7,7 +7,7 @@ LL | | ()
77
LL | | }
88
| |_^
99

10-
error: function has missing stability attribute
10+
error: function is missing a stability attribute
1111
--> $DIR/missing-stability.rs:22:5
1212
|
1313
LL | pub fn unmarked() {}
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#![feature(staged_api)]
2-
//~^ ERROR module has missing stability attribute
2+
//~^ ERROR module is missing a stability attribute
33

44
fn main() {}

src/test/ui/stability-attribute/missing-stability-attr-at-top-level.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: module has missing stability attribute
1+
error: module is missing a stability attribute
22
--> $DIR/missing-stability-attr-at-top-level.rs:1:1
33
|
44
LL | / #![feature(staged_api)]

src/test/ui/stability-attribute/stability-attribute-sanity-3.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![stable(feature = "stable_test_feature", since = "1.0.0")]
66

77
#[macro_export]
8-
macro_rules! mac { //~ ERROR macro has missing stability attribute
8+
macro_rules! mac { //~ ERROR macro is missing a stability attribute
99
() => ()
1010
}
1111

src/test/ui/stability-attribute/stability-attribute-sanity-3.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error: macro has missing stability attribute
1+
error: macro is missing a stability attribute
22
--> $DIR/stability-attribute-sanity-3.rs:8:1
33
|
44
LL | / macro_rules! mac {

0 commit comments

Comments
 (0)