Skip to content

Commit

Permalink
Tweak wording of "missing stability attribute" error
Browse files Browse the repository at this point in the history
  • Loading branch information
camelid committed Jul 22, 2021
1 parent ebee8e1 commit a84656e
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion compiler/rustc_passes/src/stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ impl<'tcx> MissingStabilityAnnotations<'tcx> {
if is_error {
let def_id = self.tcx.hir().local_def_id(hir_id);
let descr = self.tcx.def_kind(def_id).descr(def_id.to_def_id());
self.tcx.sess.span_err(span, &format!("{} has missing stability attribute", descr));
self.tcx.sess.span_err(span, &format!("{} is missing a stability attribute", descr));
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/test/ui/missing/missing-stability.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#![stable(feature = "stable_test_feature", since = "1.0.0")]

pub fn unmarked() {
//~^ ERROR function has missing stability attribute
//~^ ERROR function is missing a stability attribute
()
}

Expand All @@ -20,5 +20,5 @@ pub mod foo {
pub mod bar {
// #[stable] is not inherited
pub fn unmarked() {}
//~^ ERROR function has missing stability attribute
//~^ ERROR function is missing a stability attribute
}
4 changes: 2 additions & 2 deletions src/test/ui/missing/missing-stability.stderr
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: function has missing stability attribute
error: function is missing a stability attribute
--> $DIR/missing-stability.rs:8:1
|
LL | / pub fn unmarked() {
Expand All @@ -7,7 +7,7 @@ LL | | ()
LL | | }
| |_^

error: function has missing stability attribute
error: function is missing a stability attribute
--> $DIR/missing-stability.rs:22:5
|
LL | pub fn unmarked() {}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#![feature(staged_api)]
//~^ ERROR module has missing stability attribute
//~^ ERROR module is missing a stability attribute

fn main() {}
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
error: module has missing stability attribute
error: module is missing a stability attribute
--> $DIR/missing-stability-attr-at-top-level.rs:1:1
|
LL | / #![feature(staged_api)]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#![stable(feature = "stable_test_feature", since = "1.0.0")]

#[macro_export]
macro_rules! mac { //~ ERROR macro has missing stability attribute
macro_rules! mac { //~ ERROR macro is missing a stability attribute
() => ()
}

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

0 comments on commit a84656e

Please sign in to comment.