Skip to content

varlink_generator uses Rust 2015 edition for formatting by default #124

@erwinschrodinger1

Description

@erwinschrodinger1

Description

While using varlink_generator, the function cargo_build_tosource_options appears to default to the Rust 2015 edition for formatting, even when the Cargo.toml specifies a different edition (e.g., 2018 or 2021).

As a result, running cargo fmt --check may produce formatting errors or warnings because rustfmt uses the default 2015 edition instead of respecting the crate's configured edition.

Proposed Solution

Introduce an option to explicitly set the fmt_edition when invoking formatting-related functionality. This will ensure that rustfmt uses the given edition for example via build.rs.

This change would help maintain consistent formatting.

Changes in #125

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions