Skip to content

Conversation

@folkertdev
Copy link
Contributor

@folkertdev folkertdev commented Nov 24, 2025

tracking issue: #81391
tracking issue: #75835
fixes #130104

Don't calculate the layout of a type with an infer type (_). This now emits LayoutError::Unknown, causing an error similar to when any other calling convention is used in this location.

The tests use separate functions because only the first such error in a function body is reported.

r? @davidtwco (might need some T-types assistance)

@folkertdev folkertdev added the F-abi_cmse_nonsecure_call `#![feature(abi_cmse_nonsecure_call)]` label Nov 24, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2025

HIR ty lowering was modified

cc @fmease

@rustbot rustbot added 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 Nov 24, 2025
@folkertdev folkertdev added the F-cmse_nonsecure_entry `#![feature(cmse_nonsecure_entry)]` label Nov 24, 2025
@rust-log-analyzer

This comment has been minimized.

@rustbot
Copy link
Collaborator

rustbot commented Nov 24, 2025

This PR changes a file inside tests/crashes. If a crash was fixed, please move into the corresponding ui subdir and add 'Fixes #' to the PR description to autoclose the issue upon merge.

@davidtwco
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Dec 1, 2025

📌 Commit 06658ab has been approved by davidtwco

It is now in the queue for this repository.

@bors bors 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 Dec 1, 2025
bors added a commit that referenced this pull request Dec 1, 2025
Rollup of 9 pull requests

Successful merges:

 - #148690 (Implement `clamp_magnitude` method for primitive floats & signed integers)
 - #149102 (stabilize maybe_uninit_slice)
 - #149269 (cmse: do not calculate the layout of a type with infer types)
 - #149299 (Fudge infer vars in the cause code of `Obligation` intentionally)
 - #149344 (Don't suggest unwrap for Result in const)
 - #149358 (fix(parse): Limit frontmatter fences to 255 dashes )
 - #149445 (make assoc fn inherit const stability from inherent `const impl` blocks)
 - #149479 (Fix indent in E0591.md)
 - #149496 (Fix #148889: Add label rib when visiting delegation body)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 6e5661e into rust-lang:main Dec 1, 2025
11 checks passed
@rustbot rustbot added this to the 1.93.0 milestone Dec 1, 2025
rust-timer added a commit that referenced this pull request Dec 1, 2025
Rollup merge of #149269 - folkertdev:cmse-infer, r=davidtwco

cmse: do not calculate the layout of a type with infer types

tracking issue: #81391
tracking issue: #75835
fixes #130104

Don't calculate the layout of a type with an infer type (`_`). This now emits `LayoutError::Unknown`, causing an error similar to when any other calling convention is used in this location.

The tests use separate functions because only the first such error in a function body is reported.

r? `@davidtwco` (might need some T-types assistance)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

F-abi_cmse_nonsecure_call `#![feature(abi_cmse_nonsecure_call)]` F-cmse_nonsecure_entry `#![feature(cmse_nonsecure_entry)]` 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.

ICE: Layout::compute: unexpected type _

5 participants