It seems that dec!() is not working on the latest rust release.
extern crate rust_decimal;
extern crate rust_decimal_macros;
use rust_decimal_macros::*;
fn main() {
let num = dec!(3.14);
}
produces this error:
error[E0658]: procedural macros cannot be expanded to expressions (see issue #38356)
--> examples/decimal.rs:5:15
|
5 | let num = dec!(3.14);
| ^^^^^^^^^^
error: aborting due to previous error
- rustc 1.30.0 (da5f414c2 2018-10-24)
- rust_decimal = "0.10.2"
- rust_decimal_macros = "0.10.2"
Btw, I tried with #![feature(proc_macro)] with no luck...
Am i missing something?
It seems that
dec!()is not working on the latest rust release.produces this error:
Btw, I tried with
#![feature(proc_macro)]with no luck...Am i missing something?