-
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
Unsafe block is overlooked #61365
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. |
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: