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 invalid_utf8_in_unchecked #9105

Merged
merged 1 commit into from
Jul 3, 2022
Merged

Conversation

Serial-ATA
Copy link
Contributor

changelog: Add [invalid_utf8_in_unchecked]
closes: #629

Don't know how useful of a lint this is, just saw this was a really old issue 😄.

@rust-highfive
Copy link

r? @Jarcho

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Jul 3, 2022
Copy link
Contributor

@Jarcho Jarcho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree this is likely useless. Passing a constant to from_utf8_unchecked is rather strange as it could have just been a string literal. On the other hand this is UB, so I guess it's justified.

clippy_lints/src/invalid_utf8_in_unchecked.rs Outdated Show resolved Hide resolved
clippy_lints/src/invalid_utf8_in_unchecked.rs Outdated Show resolved Hide resolved
@Jarcho
Copy link
Contributor

Jarcho commented Jul 3, 2022

Thank you.

@bors r+

@bors
Copy link
Collaborator

bors commented Jul 3, 2022

📌 Commit de646e1 has been approved by Jarcho

@bors
Copy link
Collaborator

bors commented Jul 3, 2022

⌛ Testing commit de646e1 with merge 8c89877...

@bors
Copy link
Collaborator

bors commented Jul 3, 2022

☀️ Test successful - checks-action_dev_test, checks-action_remark_test, checks-action_test
Approved by: Jarcho
Pushing 8c89877 to master...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties
Projects
None yet
Development

Successfully merging this pull request may close these issues.

lint creating a &str (or String) from invalid UTF-8 bytes
4 participants