Skip to content

cmse: test returning MaybeUninit<T>#155522

Open
folkertdev wants to merge 2 commits intorust-lang:mainfrom
folkertdev:cmse-test-maybe-uninit
Open

cmse: test returning MaybeUninit<T>#155522
folkertdev wants to merge 2 commits intorust-lang:mainfrom
folkertdev:cmse-test-maybe-uninit

Conversation

@folkertdev
Copy link
Copy Markdown
Contributor

tracking issue: #81391
tracking issue: #75835

Some tests from #147697 that already work and are useful. Extracting them shrinks that (currently blocked) PR.

The code in tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs checks that MaybeUninit<T> is considered abi-compatible with T. The code in tests/ui/cmse-nonsecure/cmse-nonsecure-entry/params-via-stack.rs really only tests that no errors/warnings are emitted.

r? davidtwco

The `MaybeUninit` type is `repr(transparent)`, so returning a `MaybeUninit<u64>` should work. The same is not true when using C or rust union types.
@rustbot
Copy link
Copy Markdown
Collaborator

rustbot commented Apr 19, 2026

This PR modifies tests/auxiliary/minicore.rs.

cc @jieyouxu

@rustbot rustbot added A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Apr 19, 2026
@folkertdev folkertdev changed the title Cmse test maybe uninit cmse: test returning MaybeUninit<T> Apr 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-test-infra-minicore Area: `minicore` test auxiliary and `//@ add-core-stubs` S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants