Skip to content

Commit 49976d2

Browse files
compiler: Trim the misleading C of C-cmse from errors
1 parent ad5d698 commit 49976d2

File tree

7 files changed

+13
-13
lines changed

7 files changed

+13
-13
lines changed

compiler/rustc_error_codes/src/error_codes/E0775.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Erroneous code example:
88
```ignore (no longer emitted)
99
#![feature(cmse_nonsecure_entry)]
1010
11-
pub extern "C-cmse-nonsecure-entry" fn entry_function() {}
11+
pub extern "cmse-nonsecure-entry" fn entry_function() {}
1212
```
1313

1414
To fix this error, compile your code for a Rust target that supports the
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
The `C-cmse-nonsecure-call` ABI can only be used with function pointers.
1+
The `cmse-nonsecure-call` ABI can only be used with function pointers.
22

33
Erroneous code example:
44

55
```compile_fail,E0781
66
#![feature(abi_c_cmse_nonsecure_call)]
77
8-
pub extern "C-cmse-nonsecure-call" fn test() {}
8+
pub extern "cmse-nonsecure-call" fn test() {}
99
```
1010

11-
The `C-cmse-nonsecure-call` ABI should be used by casting function pointers to
11+
The `cmse-nonsecure-call` ABI should be used by casting function pointers to
1212
specific addresses.

compiler/rustc_error_codes/src/error_codes/E0798.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Functions marked as `C-cmse-nonsecure-call` place restrictions on their
1+
Functions marked as `cmse-nonsecure-call` place restrictions on their
22
inputs and outputs.
33

44
- inputs must fit in the 4 available 32-bit argument registers. Alignment
@@ -17,7 +17,7 @@ Erroneous code example:
1717
1818
#[no_mangle]
1919
pub fn test(
20-
f: extern "C-cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32,
20+
f: extern "cmse-nonsecure-call" fn(u32, u32, u32, u32, u32) -> u32,
2121
) -> u32 {
2222
f(1, 2, 3, 4, 5)
2323
}
@@ -32,7 +32,7 @@ room left for the final `f32` argument
3232
3333
#[no_mangle]
3434
pub fn test(
35-
f: extern "C-cmse-nonsecure-call" fn(u32, u64, f32) -> u32,
35+
f: extern "cmse-nonsecure-call" fn(u32, u64, f32) -> u32,
3636
) -> u32 {
3737
f(1, 2, 3.0)
3838
}

compiler/rustc_error_codes/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,5 +690,5 @@ E0805: 0805,
690690
// E0723, // unstable feature in `const` context
691691
// E0738, // Removed; errored on `#[track_caller] fn`s in `extern "Rust" { ... }`.
692692
// E0744, // merged into E0728
693-
// E0776, // Removed; cmse_nonsecure_entry is now `C-cmse-nonsecure-entry`
693+
// E0776, // Removed; `#[cmse_nonsecure_entry]` is now `extern "cmse-nonsecure-entry"`
694694
// E0796, // unused error code. We use `static_mut_refs` lint instead.

compiler/rustc_feature/src/unstable.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -353,7 +353,7 @@ declare_features! (
353353

354354
/// Allows `extern "avr-interrupt" fn()` and `extern "avr-non-blocking-interrupt" fn()`.
355355
(unstable, abi_avr_interrupt, "1.45.0", Some(69664)),
356-
/// Allows `extern "C-cmse-nonsecure-call" fn()`.
356+
/// Allows `extern "cmse-nonsecure-call" fn()`.
357357
(unstable, abi_c_cmse_nonsecure_call, "1.51.0", Some(81391)),
358358
/// Allows `extern "custom" fn()`.
359359
(unstable, abi_custom, "CURRENT_RUSTC_VERSION", Some(140829)),
@@ -431,7 +431,7 @@ declare_features! (
431431
(unstable, closure_lifetime_binder, "1.64.0", Some(97362)),
432432
/// Allows `#[track_caller]` on closures and coroutines.
433433
(unstable, closure_track_caller, "1.57.0", Some(87417)),
434-
/// Allows `extern "C-cmse-nonsecure-entry" fn()`.
434+
/// Allows `extern "cmse-nonsecure-entry" fn()`.
435435
(unstable, cmse_nonsecure_entry, "1.48.0", Some(75835)),
436436
/// Allows `async {}` expressions in const contexts.
437437
(unstable, const_async_blocks, "1.53.0", Some(85368)),

compiler/rustc_hir_analysis/messages.ftl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,10 @@ hir_analysis_closure_implicit_hrtb = implicit types in closure signatures are fo
7373
.label = `for<...>` is here
7474
7575
hir_analysis_cmse_call_generic =
76-
function pointers with the `"C-cmse-nonsecure-call"` ABI cannot contain generics in their type
76+
function pointers with the `"cmse-nonsecure-call"` ABI cannot contain generics in their type
7777
7878
hir_analysis_cmse_entry_generic =
79-
functions with the `"C-cmse-nonsecure-entry"` ABI cannot contain generics in their type
79+
functions with the `"cmse-nonsecure-entry"` ABI cannot contain generics in their type
8080
8181
hir_analysis_cmse_inputs_stack_spill =
8282
arguments for `{$abi}` function too large to pass via registers

compiler/rustc_hir_analysis/src/hir_ty_lowering/cmse.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ pub(crate) fn validate_cmse_abi<'tcx>(
3838
dcx,
3939
span,
4040
E0781,
41-
"the `\"C-cmse-nonsecure-call\"` ABI is only allowed on function pointers"
41+
"the `\"cmse-nonsecure-call\"` ABI is only allowed on function pointers"
4242
)
4343
.emit();
4444
return;

0 commit comments

Comments
 (0)