You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Incomplete warning min_const_fn for unstable trait bounds other than Sized #54469
Compiling playground v0.0.1 (/playground)
error: trait bounds other than `Sized` on const fn parameters are unstable
--> src/main.rs:5:6
|
5 | impl<T: Bar> Foo<T> {
| ^
error: aborting due to previous error
error: Could not compile `playground`.
To learn more, run the command again with --verbose.
The error should mention which feature has to be enabled to make use of this. The feature is const_fn.
FWIW I think that the bigger issue is that the message says that the feature is unstable, but doesn't mention how the feature is actually called. I guessed, and happened to guess just fine, but if min_const_fn becomes stable at some point, the error should properly mention which features users have to enable for this on nightly.
Activity
eddyb commentedon Sep 22, 2018
Also, it should point at the
Bar, I would think?oli-obk commentedon Oct 1, 2018
Pointing at the
Baris hard. It might be multiple bound spread out through where bounds and generics.We can change the message to "this generic parameter has nontrivial bounds which is not permitted in const fn"
gnzlbg commentedon Oct 1, 2018
FWIW I think that the bigger issue is that the message says that the feature is unstable, but doesn't mention how the feature is actually called. I guessed, and happened to guess just fine, but if
min_const_fnbecomes stable at some point, the error should properly mention which features users have to enable for this on nightly.Rollup merge of rust-lang#58196 - varkor:const-fn-feature-gate-error,…
Rollup merge of rust-lang#58196 - varkor:const-fn-feature-gate-error,…
Rollup merge of rust-lang#58196 - varkor:const-fn-feature-gate-error,…