Add more tests and check for ABI

Signed-off-by: Hugues de Valon <hugues.devalon@arm.com>
This commit is contained in:
Hugues de Valon 2020-09-30 18:10:17 +01:00
parent 1aaafac6ff
commit 2588287def
13 changed files with 92 additions and 5 deletions

View file

@ -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

View file

@ -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

View 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"`.