cmse: add test for async and const functions by folkertdev · Pull Request #148536 · rust-lang/rust (original) (raw)

tracking issue: #81391
tracking issue: #75835

Some additional tests that seemed useful while working on the RFC text.

async functions are disallowed (because -> impl Trait is not supported).

const entry functions are allowed, nonsecure-call does not make sense, because this abi can only be used on function pointers, which cannot be evaluated during constant evaluation.

The async test is in the c-variadic.rs file because it has the minicore-compatible machinery for defining an async function. Splitting that logic out (like minisimd.rs) turns out to be complicated because the async stuff relies on types defined by minicore.

r? @davidtwco