• BB_C
    link
    fedilink
    arrow-up
    2
    ·
    3 months ago

    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 involves format_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 the format_args! page has this to say:

    Lifetime limitation

    Except when no formatting arguments are used, the produced fmt::Arguments value borrows temporary values, which means it can only be used within the same expression and cannot be stored for later use. This is a known limitation, see #92698.

    So, it’s kind of a feature and a limitation at the same time.

      • BB_C
        link
        fedilink
        arrow-up
        1
        ·
        3 months ago

        Good.

        Can you formulate your question better, with a minimal example and properly formatted code?

        • brokenix@emacs.chOP
          link
          fedilink
          arrow-up
          1
          ·
          edit-2
          3 months ago

          @BB_C I am using rustfmt in Emacs , but yet I ll improvise, colite reference of doubt and get back her, although ATM its not very different from a github issue.
          i have cited the exact rust crate required (as per doc) , to build , and it build L’s without that . My code compiles, instead of giving an error