Skip to content

cmse: test returning MaybeUninit<T>#155522

Merged
rust-bors[bot] merged 2 commits intorust-lang:mainfrom
folkertdev:cmse-test-maybe-uninit
Apr 25, 2026
Merged

cmse: test returning MaybeUninit<T>#155522
rust-bors[bot] merged 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
Copy link
Copy Markdown
Member

@WaffleLapkin WaffleLapkin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me with(out) the nit

View changes since this review

Comment thread tests/ui/cmse-nonsecure/cmse-nonsecure-call/return-via-stack.rs
@folkertdev
Copy link
Copy Markdown
Contributor Author

@bors r=WaffleLapkin rollup

@rust-bors
Copy link
Copy Markdown
Contributor

rust-bors Bot commented Apr 24, 2026

📌 Commit 640c4b4 has been approved by WaffleLapkin

It is now in the queue for this repository.

@rust-bors rust-bors Bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Apr 24, 2026
rust-bors Bot pushed a commit that referenced this pull request Apr 25, 2026
…uwer

Rollup of 3 pull requests

Successful merges:

 - #155754 (make the `core::ffi::va_list` module private)
 - #155522 (cmse: test returning `MaybeUninit<T>`)
 - #155741 (std: Refactor BufWriter::flush to use the `?` operator)
@rust-bors rust-bors Bot merged commit 39d8424 into rust-lang:main Apr 25, 2026
11 checks passed
@rustbot rustbot added this to the 1.97.0 milestone Apr 25, 2026
rust-timer added a commit that referenced this pull request Apr 25, 2026
Rollup merge of #155522 - folkertdev:cmse-test-maybe-uninit, r=WaffleLapkin

cmse: test returning `MaybeUninit<T>`

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
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-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 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.

4 participants