How to resolve E0658 (underscore naming) in Rust's Cargo Check?

I am getting an error running cargo check with the rust-s3 crate. All of the documentation I have found seems to indicate this is a settled issue.

Am I missing a setting or an option or something in Cargo.toml?

This is the check error:

error[E0658]: naming constants with `_` is unstable
   --> /Users/andrevan/.cargo/registry/src/
911 | const _: [(); 0 - mem::align_of::<Shared>() % 2] = []; // Assert that the alignment of `Shared` is divisible by 2.
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    = note: for more information, see

See the SO question here too:

Update to the current version of Rust. This feature became stable in Rust 1.37, which was released in August 2019.


Yea, I found that I was using two versions of Rust simultaneously.
The brew version was 1.36.0 while the rustup version was 1.42.0.
I nuked everything and reinstalled the rustup version.


1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.