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

Inconsistent build failures across supported Rust versions #5

Closed
Anders429 opened this issue Jan 28, 2021 · 3 comments
Closed

Inconsistent build failures across supported Rust versions #5

Anders429 opened this issue Jan 28, 2021 · 3 comments

Comments

@Anders429
Copy link
Contributor

The inclusion of the edition = "2018" line in the Cargo.toml manifest is causing builds to fail on rustc 1.30.0. Attempting to use claim on this compiler version results in the following error:

   Compiling claim v0.4.0                                                                                                                              
error: Edition 2018 is unstable and only available for nightly builds of rustc.                                                                        
                                                                                                                                                       
error: Could not compile `claim`.

The solution is to drop the edition tag completely. That seems to be best, since it isn't really a 2018 edition crate anyways, if you're targeting and testing against compiler versions from before 2018.

A similar problem is that the crate doesn't build on anything before rustc 1.6.0, despite your version compatibility badge claiming support all the way to 1.0.0. This is because of the use of #![no_std], which wasn't stable before 1.6.0. This can be resolved using autocfg, similar to what I've done in similar situations. The error message when building on rustc 1.0.0 supports this:

claim-0.4.0/src/lib.rs:1:1: 1:11 error: no_std is experimental
claim-0.4.0/src/lib.rs:1 #![no_std]
                         ^~~~~~~~~~

I can put together a PR with my suggested fixes for these issues.

@svartalf
Copy link
Owner

Hi, @Anders429!

That sounds about right, these specific Rust versions are not included in CI and I guess that's how these issues were missed.

I can put together a PR with my suggested fixes for these issues.

It would be really helpful, thank you.

@svartalf
Copy link
Owner

Update: I added more rustc versions into CI into 54b97fb (already in master branch), that should help checking these cases.

@svartalf
Copy link
Owner

svartalf commented Feb 4, 2021

Closed by #6

@svartalf svartalf closed this as completed Feb 4, 2021
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