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/github.com-1ecc6299db9ec823/bytes-0.5.4/src/bytes.rs:911:1
    |
911 | const _: [(); 0 - mem::align_of::<Shared>() % 2] = []; // Assert that the alignment of `Shared` is divisible by 2.
    | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: for more information, see https://github.com/rust-lang/rust/issues/54912

See the SO question here too:
https://stackoverflow.com/questions/60907811/how-to-resolve-e0658-underscore-naming-in-rusts-cargo-check

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

2 Likes

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.

Thanks!

1 Like

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