Skip to content

use min_const_generics to avoid incomplete_features #976

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

Merged
merged 1 commit into from
Feb 14, 2021
Merged

use min_const_generics to avoid incomplete_features #976

merged 1 commit into from
Feb 14, 2021

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented Jan 2, 2021

Cc @lcnr

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@RalfJung
Copy link
Member Author

RalfJung commented Jan 2, 2021

Fixing the build failure would require cfg(bootstrap) which, as I understand it, should not be used in stdarch... how is this usually handled?

error: the feature `min_const_generics` has been stable since 1.51.0 and no longer requires an attribute to enable
 --> crates/core_arch/src/lib.rs:9:5
  |
9 |     min_const_generics,
  |     ^^^^^^^^^^^^^^^^^^
  |
  = note: `-D stable-features` implied by `-D warnings`

@Amanieu
Copy link
Member

Amanieu commented Jan 2, 2021

We try to avoid cfg(bootstrap) here if possible, but it's fine to add it if it is really necessary.

In this particular case I think we can just wait until the min_const_generics stabilization hits beta so that the bootstrap compiler uses it.

@RalfJung
Copy link
Member Author

RalfJung commented Jan 2, 2021

Then we better hope that nobody adds non-"min" uses of const_generics in the mean time.

@pthariensflame
Copy link
Contributor

In this particular case I think we can just wait until the min_const_generics stabilization hits beta so that the bootstrap compiler uses it.

This has happened now, right?

@Amanieu
Copy link
Member

Amanieu commented Feb 13, 2021

@RalfJung Can you rebase so CI passes?

@RalfJung
Copy link
Member Author

Okay, done that.

@RalfJung
Copy link
Member Author

There's a "Check Style" failure in code that I did not even touch.

@Amanieu
Copy link
Member

Amanieu commented Feb 14, 2021

Just run rustfmt from the latest nightly.

@RalfJung
Copy link
Member Author

When I do cargo +nightly fmt, there is a huge diff.

I think it'd be better if someone with more knowledge of this code would fix CI here first (and possibly adjust the CI setup so that PRs are not rejected for unrelated failures...).

@Amanieu
Copy link
Member

Amanieu commented Feb 14, 2021

Try rebasing now.

@Amanieu
Copy link
Member

Amanieu commented Feb 14, 2021

Since min_const_generics is stable you can just remove the feature.

@RalfJung
Copy link
Member Author

Looks like CI passes now, thanks for the help. :)

@Amanieu Amanieu merged commit ee716d4 into rust-lang:master Feb 14, 2021
@RalfJung RalfJung deleted the no-incomplete-features branch May 7, 2021 16:48
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

Successfully merging this pull request may close these issues.

4 participants