Skip to content

fix &str type check in from_str_radix_10 #15410

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

Merged
merged 1 commit into from
Aug 9, 2025

Conversation

zihan0822
Copy link
Contributor

@zihan0822 zihan0822 commented Aug 5, 2025

minor fix in from_str_radix_10 lint, is_type_diagnostic_item only checks Adt, use .is_str() instead

changelog: [from_str_radix_10]: properly lint references to &str as well

@rustbot
Copy link
Collaborator

rustbot commented Aug 5, 2025

r? @samueltardieu

rustbot has assigned @samueltardieu.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 5, 2025
Copy link
Member

@samueltardieu samueltardieu left a comment

Choose a reason for hiding this comment

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

Could you add a test where that makes a difference in output? Such as:

    let string = &&&"300";
    i32::from_str_radix(&string, 10)?;

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties labels Aug 5, 2025
changelog: none

Signed-off-by: Zihan <[email protected]>
@zihan0822 zihan0822 force-pushed the fix-str-type-check branch from f359d70 to 7a11381 Compare August 5, 2025 13:50
@zihan0822
Copy link
Contributor Author

Done! @rustbot ready

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Aug 5, 2025
@zihan0822 zihan0822 requested a review from samueltardieu August 5, 2025 13:52
@samueltardieu samueltardieu enabled auto-merge August 9, 2025 22:30
@samueltardieu samueltardieu added this pull request to the merge queue Aug 9, 2025
@samueltardieu
Copy link
Member

Thanks.

Merged via the queue into rust-lang:master with commit e6b63d1 Aug 9, 2025
13 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Aug 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants