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

Nightly Regression on Feature Gate Missing for "const_fn_trait_bounds" #84977

Closed
HTGAzureX1212 opened this issue May 6, 2021 · 1 comment
Closed
Labels
C-bug Category: This is a bug.

Comments

@HTGAzureX1212
Copy link
Contributor

HTGAzureX1212 commented May 6, 2021

Code

I tried this code:

// this was related to the `x86_64` crate so I am providing a link to the corresponding lines:
// https://github.com/rust-osdev/x86_64/blob/master/src/structures/paging/frame.rs#L18
// https://github.com/rust-osdev/x86_64/blob/master/src/structures/paging/page.rs#L62
// https://github.com/rust-osdev/x86_64/blob/master/src/structures/paging/page.rs#L150

I expected to see this happen:

The compilation should be completed successfully without any errors being emitted by the compiler.

Instead, this happened:

The compilation failed with several errors mentioning about the "const_fn_trait_bounds" feature:

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> <path redacted>\x86_64-0.14.0\src\structures\paging\frame.rs:18:6
   |
18 | impl<S: PageSize> PhysFrame<S> {
   |      ^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
  --> <path redacted>\x86_64-0.14.0\src\structures\paging\page.rs:62:6
   |
62 | impl<S: PageSize> Page<S> {
   |      ^
   |
   = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
   = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
   --> <path redacted>\x86_64-0.14.0\src\structures\paging\page.rs:150:6
    |
150 | impl<S: NotGiantPageSize> Page<S> {
    |      ^
    |
    = note: see issue #57563 <https://github.com/rust-lang/rust/issues/57563> for more information
    = help: add `#![feature(const_fn_trait_bound)]` to the crate attributes to enable

error: aborting due to 3 previous errors

Version it worked on

It most recently worked on (taken from the x86_64 crate's GitHub CI):

rustc --version --verbose

rustc 1.53.0-nightly (968425893 2021-04-26)
binary: rustc
commit-hash: 9684258936dabda2ba49d4c67f041a6baf388348
commit-date: 2021-04-26
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Version with regression

rustc --version --verbose:

rustc 1.53.0-nightly (478a07df0 2021-04-29)
binary: rustc
commit-hash: 478a07df05e3fe8df964291d8b25dd80b7e0e76b
commit-date: 2021-04-29
host: x86_64-unknown-linux-gnu
release: 1.53.0-nightly
LLVM version: 12.0.0

Backtrace

Backtrace

None

@rustbot modify labels: +regression-from-nightly-to-nightly -regression-untriaged

@HTGAzureX1212 HTGAzureX1212 added C-bug Category: This is a bug. regression-untriaged Untriaged performance or correctness regression. labels May 6, 2021
@rustbot rustbot added I-prioritize Issue: Indicates that prioritization has been requested for this issue. and removed I-prioritize Issue: Indicates that prioritization has been requested for this issue. regression-untriaged Untriaged performance or correctness regression. labels May 6, 2021
@HTGAzureX1212
Copy link
Contributor Author

HTGAzureX1212 commented May 6, 2021

This is solved by updating to the new 0.14.1-beta version of the x86_64 crate (reference: rust-osdev/x86_64#250)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug.
Projects
None yet
Development

No branches or pull requests

2 participants