dnsl48 / fraction

[Rust] Lossless fractions and decimals; drop-in float replacement
Apache License 2.0
83 stars 25 forks source link

Error: trait bounds other than `Sized` on const fn parameters are unstable #73

Closed Niraj-Kamdar closed 2 years ago

Niraj-Kamdar commented 2 years ago
#24 64.60 error[E0658]: trait bounds other than `Sized` on const fn parameters are unstable
#24 64.60    --> /usr/local/cargo/registry/src/github.com-1ecc6299db9ec823/fraction-0.12.1/src/fraction/generic_fraction.rs:164:6
#24 64.60     |
#24 64.60 164 | impl<T> GenericFraction<T>
#24 64.60     |      ^
#24 64.60 ...
#24 64.60 275 |     pub const fn new_raw(num: T, den: T) -> GenericFraction<T> {

#24 64.60     |     ---------------------------------------------------------- function declared as const here
#24 64.60     |
#24 64.60     = note: see issue #93706 <https://github.com/rust-lang/rust/issues/93706> for more information
dnsl48 commented 2 years ago

Hi @Niraj-Kamdar thanks for reporting the issue! That seems to have been stabilised about 9 months ago - https://github.com/rust-lang/rust/pull/93827 My guess is you might use an old compiler version. Otherwise, we would appreciate more details about how to reproduce it.

Niraj-Kamdar commented 2 years ago

@dnsl48 We were having this issue since we are suing the old version of rust but I currently fixed it by downgrading fraction version.