Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add useless_concat #13793

Open
sorairolake opened this issue Dec 7, 2024 · 1 comment · May be fixed by #13829
Open

Add useless_concat #13793

sorairolake opened this issue Dec 7, 2024 · 1 comment · May be fixed by #13829
Labels
A-lint Area: New lints

Comments

@sorairolake
Copy link

sorairolake commented Dec 7, 2024

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";
@sorairolake sorairolake added the A-lint Area: New lints label Dec 7, 2024
@GuillaumeGomez GuillaumeGomez linked a pull request Dec 14, 2024 that will close this issue
@GuillaumeGomez
Copy link
Member

Opened #13829.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-lint Area: New lints
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants