this post was submitted on 07 Aug 2024
1 points (100.0% liked)
Rust Programming
8159 readers
1 users here now
founded 5 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
If you're using an LLM to "learn", stop. Otherwise, I don't understand what
lazy_static
has to do with anything.It's hard to tell what you're asking. But maybe you're confused because
println!
(it's a macro btw) expands to code that involvesformat_args!
which is a compiler built-in that doesn't take ownership of the token expressions that get passed to it. Notice how the bottom of theformat_args!
page has this to say:So, it's kind of a feature and a limitation at the same time.
@BB_C disclaimer - no llm , I am following a book
Good.
Can you formulate your question better, with a minimal example and properly formatted code?