-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Only allow using the atomic intrinsics on integer types #32647
Conversation
Can you add a compile-fail test for the errors? |
b572125
to
9cc968a
Compare
Done (and fixed a few bugs) |
9cc968a
to
2f492d8
Compare
Updated to fix make check complaints about line length |
2f492d8
to
c3668f9
Compare
Fixed more line lengths... |
@bors r+ |
📌 Commit c3668f9 has been approved by |
⌛ Testing commit c3668f9 with merge 434c58e... |
💔 Test failed - auto-mac-64-nopt-t |
c3668f9
to
d96bacc
Compare
Fixed the test |
@bors: r+ d96bacce0752868994e168dcdd8b7e0d9f934f35 |
⌛ Testing commit d96bacc with merge 8bbd3d5... |
💔 Test failed - auto-linux-64-opt-mir |
@Amanieu ah, you're hitting the issue where MIR lacked precise spans. Now they're there, but not used. |
d96bacc
to
598e122
Compare
@eddyb I went with the easy option for now... |
type Bar = &'static Fn(); | ||
type Quux = [u8; 100]; | ||
|
||
#[rustc_no_mir] // FIXME #27840 MIR doesn't provide precise spans for calls. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You need #[feature(rustc_attrs)]
to use this attribute.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops, fixed.
598e122
to
8620bba
Compare
@bors r+ |
📌 Commit 8620bba has been approved by |
Only allow using the atomic intrinsics on integer types Using these with non-integer types results in LLVM asserts. Atomic operations on non-integer types will require values be transmuted into an integer type of suitable size. This doesn't affect the standard library since `AtomicBool` and `AtomicPtr` currently use `usize` for atomic operations. r? @eddyb
💔 Test failed - auto-win-msvc-64-opt-mir |
@bors p=1 retry |
@bors force |
💥 Test timed out |
@bors: retry clean |
⌛ Testing commit 8620bba with merge b207e22... |
💔 Test failed - auto-win-msvc-64-opt-rustbuild |
@bors: retry On Mon, Apr 4, 2016 at 11:41 AM, bors [email protected] wrote:
|
⌛ Testing commit 8620bba with merge 144f980... |
@bors: retry force clean |
Only allow using the atomic intrinsics on integer types Using these with non-integer types results in LLVM asserts. Atomic operations on non-integer types will require values be transmuted into an integer type of suitable size. This doesn't affect the standard library since `AtomicBool` and `AtomicPtr` currently use `usize` for atomic operations. r? @eddyb
Using these with non-integer types results in LLVM asserts. Atomic operations on non-integer types will require values be transmuted into an integer type of suitable size.
This doesn't affect the standard library since
AtomicBool
andAtomicPtr
currently useusize
for atomic operations.r? @eddyb