Skip to content

Use type alias for UnsafeCell and AtomicBool#88

Merged
dtolnay merged 1 commit intodtolnay:masterfrom
ekxide:use-type-alias-for-unsafecell-and-atomic-bool
Mar 28, 2026
Merged

Use type alias for UnsafeCell and AtomicBool#88
dtolnay merged 1 commit intodtolnay:masterfrom
ekxide:use-type-alias-for-unsafecell-and-atomic-bool

Conversation

@elBoberido
Copy link
Copy Markdown
Contributor

Due to loom, we disallow the direct usage of UnsafeCell and Atomic* in our code and require to use a type alias which switches the types at a central location.

Since the __submit macro contains these two types, clippy warns when we use the inventory crate to collect all of our test cases for a custom test harness.

The PR introduces type aliases for UnsafeCell and AtomicBool. This keeps clippy happy and does not generate warnings in the user code.

@elBoberido elBoberido force-pushed the use-type-alias-for-unsafecell-and-atomic-bool branch from ed51c9e to 5177486 Compare March 27, 2026 19:55
Copy link
Copy Markdown
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit 219ba5a into dtolnay:master Mar 28, 2026
12 checks passed
@elBoberido elBoberido deleted the use-type-alias-for-unsafecell-and-atomic-bool branch March 28, 2026 16:57
@elBoberido
Copy link
Copy Markdown
Contributor Author

Thanks for the quick merge. I'll probably create another PR on Monday or Tuesday to add vxworks as target OS. The to verify it's the only thing to do, though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants