about summary refs log tree commit diff
diff options
context:
space:
mode:
authorHirochika Matsumoto <git@hkmatsumoto.com>2021-10-03 14:28:39 +0900
committerHirochika Matsumoto <git@hkmatsumoto.com>2021-10-03 14:28:39 +0900
commitfb0b1a54663ca96dd406847b9268cda547f0d8d6 (patch)
treea42eaff96faef8ccc749ad7cf4e5b69b0502464d
parentb27661eb33c74cb514dba059b47d86b6582ac1c2 (diff)
downloadrust-fb0b1a54663ca96dd406847b9268cda547f0d8d6.tar.gz
rust-fb0b1a54663ca96dd406847b9268cda547f0d8d6.zip
Follow the diagnostic output style guide
-rw-r--r--compiler/rustc_const_eval/src/transform/check_consts/ops.rs2
-rw-r--r--compiler/rustc_typeck/src/check/check.rs2
-rw-r--r--src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr2
-rw-r--r--src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr2
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr6
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr6
-rw-r--r--src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr6
-rw-r--r--src/test/ui/rfc-2632-const-trait-impl/stability.stderr2
8 files changed, 14 insertions, 14 deletions
diff --git a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
index 1d0ee949a22..c24e9c2df7d 100644
--- a/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
+++ b/compiler/rustc_const_eval/src/transform/check_consts/ops.rs
@@ -102,7 +102,7 @@ impl NonConstOp for FnCallUnstable {
         );
 
         if ccx.is_const_stable_const_fn() {
-            err.help("Const-stable functions can only call other const-stable functions");
+            err.help("const-stable functions can only call other const-stable functions");
         } else if ccx.tcx.sess.is_nightly_build() {
             if let Some(feature) = feature {
                 err.help(&format!(
diff --git a/compiler/rustc_typeck/src/check/check.rs b/compiler/rustc_typeck/src/check/check.rs
index 47da8e9572b..db50c5d891e 100644
--- a/compiler/rustc_typeck/src/check/check.rs
+++ b/compiler/rustc_typeck/src/check/check.rs
@@ -58,7 +58,7 @@ pub(super) fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ab
             tcx.sess,
             span,
             E0781,
-            "the `\"C-cmse-nonsecure-call\"` ABI is only allowed on function pointers."
+            "the `\"C-cmse-nonsecure-call\"` ABI is only allowed on function pointers"
         )
         .emit()
     }
diff --git a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
index 3564ab4b6cd..08b763b2608 100644
--- a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
+++ b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr
@@ -1,4 +1,4 @@
-error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
+error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
   --> $DIR/wrong-abi-location-1.rs:8:1
    |
 LL | pub extern "C-cmse-nonsecure-call" fn test() {}
diff --git a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
index 76073f54884..3ade9891e48 100644
--- a/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
+++ b/src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr
@@ -1,4 +1,4 @@
-error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
+error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
   --> $DIR/wrong-abi-location-2.rs:8:1
    |
 LL | / extern "C-cmse-nonsecure-call" {
diff --git a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
index d3017c5602a..778b0e55f66 100644
--- a/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr
@@ -4,7 +4,7 @@ error: `foo` is not yet stable as a const fn
 LL | const fn bar() -> u32 { foo() }
    |                         ^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: `foo2` is not yet stable as a const fn
   --> $DIR/min_const_fn_libstd_stability.rs:24:26
@@ -12,7 +12,7 @@ error: `foo2` is not yet stable as a const fn
 LL | const fn bar2() -> u32 { foo2() }
    |                          ^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]`
   --> $DIR/min_const_fn_libstd_stability.rs:29:26
@@ -35,7 +35,7 @@ error: `foo2_gated` is not yet stable as a const fn
 LL | const fn bar2_gated() -> u32 { foo2_gated() }
    |                                ^^^^^^^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
index 53a59467e3d..0174cb77f33 100644
--- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr
@@ -4,7 +4,7 @@ error: `foo` is not yet stable as a const fn
 LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
    |                                         ^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: `foo2` is not yet stable as a const fn
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:24:42
@@ -12,7 +12,7 @@ error: `foo2` is not yet stable as a const fn
 LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
    |                                          ^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]`
   --> $DIR/min_const_unsafe_fn_libstd_stability.rs:29:33
@@ -35,7 +35,7 @@ error: `foo2_gated` is not yet stable as a const fn
 LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
    |                                                ^^^^^^^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: aborting due to 4 previous errors
 
diff --git a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
index 891c34a888a..e90ba9b912f 100644
--- a/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
+++ b/src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr
@@ -4,7 +4,7 @@ error: `foo` is not yet stable as a const fn
 LL | const unsafe fn bar() -> u32 { foo() }
    |                                ^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: `foo2` is not yet stable as a const fn
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:24:33
@@ -12,7 +12,7 @@ error: `foo2` is not yet stable as a const fn
 LL | const unsafe fn bar2() -> u32 { foo2() }
    |                                 ^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: `foo2_gated` is not yet stable as a const fn
   --> $DIR/min_const_unsafe_fn_libstd_stability2.rs:33:39
@@ -20,7 +20,7 @@ error: `foo2_gated` is not yet stable as a const fn
 LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
    |                                       ^^^^^^^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: aborting due to 3 previous errors
 
diff --git a/src/test/ui/rfc-2632-const-trait-impl/stability.stderr b/src/test/ui/rfc-2632-const-trait-impl/stability.stderr
index 86b685959a6..5649f688fe7 100644
--- a/src/test/ui/rfc-2632-const-trait-impl/stability.stderr
+++ b/src/test/ui/rfc-2632-const-trait-impl/stability.stderr
@@ -13,7 +13,7 @@ error: `<Int as Add>::add` is not yet stable as a const fn
 LL |     Int(1i32) + Int(2i32)
    |     ^^^^^^^^^^^^^^^^^^^^^
    |
-   = help: Const-stable functions can only call other const-stable functions
+   = help: const-stable functions can only call other const-stable functions
 
 error: aborting due to 2 previous errors