Skip to content

Add useless_concat #13793

Closed
Closed
@sorairolake

Description

@sorairolake

What it does

Checks for the use of concat!("takes a single string literal").

Advantage

Redundant code. The type of a literal yielded by concat! and the type of a string literal are both &'static str.

Drawbacks

No response

Example

let foo = concat!("foo");

Could be written as:

let foo = "foo";

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-lintArea: New lints

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions