-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Passing a non-const
trait function item value to a const fn
is no longer allowed in a constant context
#104155
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Comments
This became an error due to #100982 (@fee1-dead, @oli-obk). Bisect infosearched nightlies: from nightly-2022-09-18 to nightly-2022-11-07 bisected with cargo-bisect-rustc v0.6.4 Host triple: I used const _: () = core::mem::forget(Box::<u32>::default);
fn main(){} |
Assigning priority as discussed by the Prioritization Working Group. |
awaiting beta backport |
…Definer::init` Work-around for [rust-lang/rust#104155][1]. [1]: rust-lang/rust#104155
…to `BindDefiner::init`" This reverts commit fd8a537. The upstream issue [rust-lang/rust#104155][1] was fixed. [1]: rust-lang/rust#104155
Can this be closed now that beta backport (#104447) is complete? |
Code
I tried this code:
(Playground)
I expected to see this happen: Successful compilation
Instead, this happened:
Version it worked on
It most recently worked on: 1.65.0
Version with regression
rustc --version --verbose
:@rustbot modify labels: +regression-from-stable-to-beta -regression-untriaged
The text was updated successfully, but these errors were encountered: