1
2
Fork
You've already forked spin
0

Failing lint for thumbv6m-none-eabi #173

Open
opened 2025年04月14日 22:35:10 +02:00 by ofluffydev · 1 comment
ofluffydev commented 2025年04月14日 22:35:10 +02:00 (Migrated from github.com)
Copy link

When you do

cargo clippy --target thumbv6m-none-eabi

It says:

error[E0599]: no method named `compare_exchange` found for struct `core::sync::atomic::AtomicU8` in the current scope
 --> /home/fluffy/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spin-0.9.8/src/once.rs:114:18
 |
112 | match self
 | ___________________-
113 | | .0
114 | | .compare_exchange(old as u8, new as u8, success, failure)
 | | -^^^^^^^^^^^^^^^^ method not found in `AtomicU8`
 | |_________________|
 |

Issue seems to be on this line.

When you do ``` cargo clippy --target thumbv6m-none-eabi ``` It says: ``` error[E0599]: no method named `compare_exchange` found for struct `core::sync::atomic::AtomicU8` in the current scope --> /home/fluffy/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/spin-0.9.8/src/once.rs:114:18 | 112 | match self | ___________________- 113 | | .0 114 | | .compare_exchange(old as u8, new as u8, success, failure) | | -^^^^^^^^^^^^^^^^ method not found in `AtomicU8` | |_________________| | ``` Issue seems to be on [this line](https://github.com/zesterer/spin-rs/blob/master/src/once.rs#L115).
zesterer commented 2025年04月15日 08:23:18 +02:00 (Migrated from github.com)
Copy link

Have you taken note of the information in the README about support for platforms that don't have atomic intrinsics? I think that should solve this problem.

Have you taken note of the information in the README about support for platforms that don't have atomic intrinsics? I think that should solve this problem.
Sign in to join this conversation.
No Branch/Tag specified
master
fixes
fix-ub
revert-127-ci
spinlock
No results found.
Milestone
Clear milestone
No items
No milestone
Projects
Clear projects
No items
No project
Assignees
Clear assignees
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
zesterer/spin#173
Reference in a new issue
zesterer/spin
No description provided.
Delete branch "%!s()"

Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?