Open shiftagain opened 3 years ago
Did you solved it? I have the same issue.
@naythanN : I'd be curious to know why you might be interested in using this crate now, since Rust 1.58 introduced identifier capture for format strings. IMO, Rust 1.58 basically reduced this crate to:
use std::format as s;
use std::println as p;
I suppose this crate did support interpolating expressions, which isn't supported by format strings, but I had my hesitations, so I mostly agree with the Rust team choosing to only support identifiers.
That said, bringing this crate back to my attention caused me to revisit an original idea around prefixing string literals (e.g. f"Hello, {name}"
), so I quickly hacked together an experimental implementation. Not sure if I'll do anything with it, but I thought I'd share.
Cheers!
If I run the example from the documentation in a new crate:
I get the error
error: expected one of `!` or `[`, found `fmt`
If I run
cargo expand
, it shows that it expands to:Am I doing something wrong, or is it broken? I'd love to use this macro in my projects :)