-
Notifications
You must be signed in to change notification settings - Fork 13k
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
Allow raw pointers in SIMD types #85919
Conversation
(rust-highfive has picked a reviewer for you, use r? to override) |
what happens when you try to use |
That likely will produce a monomorphization-time error, which is already reachable via the open-ended |
afaict references have exactly the same "scalarness" guarantees as raw pointers -- both of them can be fat pointers (e.g. |
submitted a pull request adding the requested test case: workingjubilee#1 |
Ah, I meant if you could find something that does pass and doesn't error... a monomorphization time error (which is currently what happens) is the expected result. It's ugly and undesirable but the status quo, and improving on that is left for later work. |
force pushed my pull request since github's working again. added passing test as requested. |
@workingjubilee |
Is this good? workingjubilee@c0ca382 |
@programmerjake |
added: workingjubilee@4dbe392 |
build-fail test for simd type with an element type that's a wide pointer test for SIMD element type of optional nonnull ptr to extern type test that wide ptr simd element type of *mut [u8] fails
Updated appropriately~ And looks like CI passes! |
@bors r+ |
📌 Commit d9a5df6 has been approved by |
☀️ Test successful - checks-actions |
Closes #85915 by loosening the strictness in typechecking and adding a test to guarantee it passes.
This still might be too strict, as references currently do pass monomorphization, but my understanding is that they are not guaranteed to be "scalar" in the same way.