Add more tests and check for ABI
Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit is contained in:
parent
1aaafac6ff
commit
2588287def
13 changed files with 92 additions and 5 deletions
|
@ -459,6 +459,7 @@ E0771: include_str!("./error_codes/E0771.md"),
|
|||
E0773: include_str!("./error_codes/E0773.md"),
|
||||
E0774: include_str!("./error_codes/E0774.md"),
|
||||
E0775: include_str!("./error_codes/E0775.md"),
|
||||
E0776: include_str!("./error_codes/E0776.md"),
|
||||
;
|
||||
// E0006, // merged with E0005
|
||||
// E0008, // cannot bind by-move into a pattern guard
|
||||
|
|
|
@ -7,7 +7,7 @@ Erroneous code example:
|
|||
#![feature(cmse_nonsecure_entry)]
|
||||
|
||||
#[cmse_nonsecure_entry]
|
||||
fn toto() {}
|
||||
pub extern "C" fn entry_function() {}
|
||||
```
|
||||
|
||||
To fix this error, compile your code for a Rust target that supports the
|
||||
|
|
13
compiler/rustc_error_codes/src/error_codes/E0776.md
Normal file
13
compiler/rustc_error_codes/src/error_codes/E0776.md
Normal file
|
@ -0,0 +1,13 @@
|
|||
`#[cmse_nonsecure_entry]` functions require a C ABI
|
||||
|
||||
Erroneous code example:
|
||||
|
||||
```compile_fail,E0776
|
||||
#![feature(cmse_nonsecure_entry)]
|
||||
|
||||
#[no_mangle]
|
||||
#[cmse_nonsecure_entry]
|
||||
pub fn entry_function(input: Vec<u32>) {}
|
||||
```
|
||||
|
||||
To fix this error, declare your entry function with a C ABI, using `extern "C"`.
|
Loading…
Add table
Add a link
Reference in a new issue