Skip to content

Commit 21cdcac

Browse files
authored
Rollup merge of rust-lang#89482 - hkmatsumoto:patch-diagnostics, r=joshtriplett
Follow the diagnostic output style guide Detected by rust-lang#89455.
2 parents ace4d36 + fb0b1a5 commit 21cdcac

File tree

8 files changed

+14
-14
lines changed

8 files changed

+14
-14
lines changed

compiler/rustc_const_eval/src/transform/check_consts/ops.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl NonConstOp for FnCallUnstable {
102102
);
103103

104104
if ccx.is_const_stable_const_fn() {
105-
err.help("Const-stable functions can only call other const-stable functions");
105+
err.help("const-stable functions can only call other const-stable functions");
106106
} else if ccx.tcx.sess.is_nightly_build() {
107107
if let Some(feature) = feature {
108108
err.help(&format!(

compiler/rustc_typeck/src/check/check.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ pub(super) fn check_abi(tcx: TyCtxt<'_>, hir_id: hir::HirId, span: Span, abi: Ab
5858
tcx.sess,
5959
span,
6060
E0781,
61-
"the `\"C-cmse-nonsecure-call\"` ABI is only allowed on function pointers."
61+
"the `\"C-cmse-nonsecure-call\"` ABI is only allowed on function pointers"
6262
)
6363
.emit()
6464
}

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-1.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
1+
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
22
--> $DIR/wrong-abi-location-1.rs:8:1
33
|
44
LL | pub extern "C-cmse-nonsecure-call" fn test() {}

src/test/ui/cmse-nonsecure/cmse-nonsecure-call/wrong-abi-location-2.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers.
1+
error[E0781]: the `"C-cmse-nonsecure-call"` ABI is only allowed on function pointers
22
--> $DIR/wrong-abi-location-2.rs:8:1
33
|
44
LL | / extern "C-cmse-nonsecure-call" {

src/test/ui/consts/min_const_fn/min_const_fn_libstd_stability.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ error: `foo` is not yet stable as a const fn
44
LL | const fn bar() -> u32 { foo() }
55
| ^^^^^
66
|
7-
= help: Const-stable functions can only call other const-stable functions
7+
= help: const-stable functions can only call other const-stable functions
88

99
error: `foo2` is not yet stable as a const fn
1010
--> $DIR/min_const_fn_libstd_stability.rs:24:26
1111
|
1212
LL | const fn bar2() -> u32 { foo2() }
1313
| ^^^^^^
1414
|
15-
= help: Const-stable functions can only call other const-stable functions
15+
= help: const-stable functions can only call other const-stable functions
1616

1717
error: const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]`
1818
--> $DIR/min_const_fn_libstd_stability.rs:29:26
@@ -35,7 +35,7 @@ error: `foo2_gated` is not yet stable as a const fn
3535
LL | const fn bar2_gated() -> u32 { foo2_gated() }
3636
| ^^^^^^^^^^^^
3737
|
38-
= help: Const-stable functions can only call other const-stable functions
38+
= help: const-stable functions can only call other const-stable functions
3939

4040
error: aborting due to 4 previous errors
4141

src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,15 @@ error: `foo` is not yet stable as a const fn
44
LL | const unsafe fn bar() -> u32 { unsafe { foo() } }
55
| ^^^^^
66
|
7-
= help: Const-stable functions can only call other const-stable functions
7+
= help: const-stable functions can only call other const-stable functions
88

99
error: `foo2` is not yet stable as a const fn
1010
--> $DIR/min_const_unsafe_fn_libstd_stability.rs:24:42
1111
|
1212
LL | const unsafe fn bar2() -> u32 { unsafe { foo2() } }
1313
| ^^^^^^
1414
|
15-
= help: Const-stable functions can only call other const-stable functions
15+
= help: const-stable functions can only call other const-stable functions
1616

1717
error: const-stable function cannot use `#[feature(const_fn_floating_point_arithmetic)]`
1818
--> $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
3535
LL | const unsafe fn bar2_gated() -> u32 { unsafe { foo2_gated() } }
3636
| ^^^^^^^^^^^^
3737
|
38-
= help: Const-stable functions can only call other const-stable functions
38+
= help: const-stable functions can only call other const-stable functions
3939

4040
error: aborting due to 4 previous errors
4141

src/test/ui/consts/min_const_fn/min_const_unsafe_fn_libstd_stability2.stderr

+3-3
Original file line numberDiff line numberDiff line change
@@ -4,23 +4,23 @@ error: `foo` is not yet stable as a const fn
44
LL | const unsafe fn bar() -> u32 { foo() }
55
| ^^^^^
66
|
7-
= help: Const-stable functions can only call other const-stable functions
7+
= help: const-stable functions can only call other const-stable functions
88

99
error: `foo2` is not yet stable as a const fn
1010
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:24:33
1111
|
1212
LL | const unsafe fn bar2() -> u32 { foo2() }
1313
| ^^^^^^
1414
|
15-
= help: Const-stable functions can only call other const-stable functions
15+
= help: const-stable functions can only call other const-stable functions
1616

1717
error: `foo2_gated` is not yet stable as a const fn
1818
--> $DIR/min_const_unsafe_fn_libstd_stability2.rs:33:39
1919
|
2020
LL | const unsafe fn bar2_gated() -> u32 { foo2_gated() }
2121
| ^^^^^^^^^^^^
2222
|
23-
= help: Const-stable functions can only call other const-stable functions
23+
= help: const-stable functions can only call other const-stable functions
2424

2525
error: aborting due to 3 previous errors
2626

src/test/ui/rfc-2632-const-trait-impl/stability.stderr

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ error: `<Int as Add>::add` is not yet stable as a const fn
1313
LL | Int(1i32) + Int(2i32)
1414
| ^^^^^^^^^^^^^^^^^^^^^
1515
|
16-
= help: Const-stable functions can only call other const-stable functions
16+
= help: const-stable functions can only call other const-stable functions
1717

1818
error: aborting due to 2 previous errors
1919

0 commit comments

Comments
 (0)