-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Unsafe block is overlooked #61365
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
cc @oli-obk |
Slightly reduced:
note that |
oh oh. That's bad. That shouldn't happen. (As unions are not ok in |
Note that with a feature gate you can get this without |
Yeah IIRC we wanted to ban union field accesses in all |
Oh.. wait, the |
Related to #59729 maybe? |
The code in the OP compiles in the latest nightly. Closing. |
Uh oh!
There was an error while loading. Please reload this page.
I know this code horribly wrong, and it doesnt compile. Even when I expect it to compile:
It complains that we need an unsafe block:
but we wrapped it in an unsafe block!
Changing the function signature to
const *unsafe* fn transpose(n: usize) -> Example
does compile, and then we can leave out the inner unsafe block.The text was updated successfully, but these errors were encountered: