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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

zihan0822
Copy link
Contributor

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

changelog: none

@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
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.

3 participants