Skip to content
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

Upcoming compilation error (in rust nightly) #8

Closed
huitseeker opened this issue Jun 19, 2023 · 1 comment
Closed

Upcoming compilation error (in rust nightly) #8

huitseeker opened this issue Jun 19, 2023 · 1 comment

Comments

@huitseeker
Copy link
Contributor

See: rust-lang/rust#111567

Benches also present this issue, but see tests (observed with rustc 1.72.0-nightly (2d0aa5768 2023-06-18)):

error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
  --> src/tests.rs:81:29
   |
81 | / ...                   *(&ret[work] as *const pallas::Scalar
82 | | ...                       as *mut pallas::Scalar) =
   | |_________________________________________________^
   |
   = note: `#[deny(cast_ref_to_mut)]` on by default

error: casting `&T` to `&mut T` is undefined behavior, even if the reference is unused, consider instead using an `UnsafeCell`
   --> src/tests.rs:119:25
    |
119 | /                         *(&rets[tid.fetch_add(1, Ordering::Relaxed)]
120 | |                             as *const pallas::Point
121 | |                             as *mut pallas::Point) = ret
    | |__________________________________________________^

error: could not compile `pasta-msm` (lib test) due to 2 previous errors
@huitseeker huitseeker changed the title Upcoming compilation error (in rust nightly, at ) Upcoming compilation error (in rust nightly) Jun 19, 2023
@dot-asm
Copy link
Collaborator

dot-asm commented Jun 20, 2023

Thanks! I'll look into it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants