Skip to content

Would concatdoc!() be possible? #53

@Enyium

Description

@Enyium

I have a definition like this:

static HELP: &str = concat! {
    indoc! { "
        Prints help.

        Usage: " }, env!("CARGO_BIN_NAME"), indoc! { " [options]

        Options:
            -h, --help
    " },
};

formatdoc! {} can't be used because of the following error:

cannot call non-const fn `std::fmt::format` in statics
calls in statics are limited to constant functions, tuple structs and tuple variants

I'm not sure though how the macro would determine what parts to apply the rules on that are described in README.md.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions