Skip to content

Check that #[cmse_nonsecure_entry] is applied to a function definition #86622

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 26, 2021

Conversation

FabianWolff
Copy link
Contributor

This PR fixes #83475. The compiler currently neglects to check whether #[cmse_nonsecure_entry] is applied to a function (and not, say, a struct) definition, leading to an ICE later on when the type checker attempts to retrieve the function signature. I have fixed this problem by adding an appropriate check to the check_attr pass, so that an error is reported instead of an ICE.

@rust-highfive
Copy link
Contributor

r? @varkor

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 25, 2021
@rust-log-analyzer

This comment has been minimized.

@jonas-schievink
Copy link
Contributor

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Jun 25, 2021

📌 Commit 499afcd has been approved by jonas-schievink

@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 Jun 25, 2021
@bors
Copy link
Collaborator

bors commented Jun 26, 2021

⌛ Testing commit 499afcd with merge bca6d9b...

@bors
Copy link
Collaborator

bors commented Jun 26, 2021

☀️ Test successful - checks-actions
Approved by: jonas-schievink
Pushing bca6d9b to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Jun 26, 2021
@bors bors merged commit bca6d9b into rust-lang:master Jun 26, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ICE: compiler/rustc_typeck/src/collect.rs:1777:13: unexpected sort of node in fn_sig()
7 participants