Skip to content

6399 Lint: is_ascii_digit instead of is_digit #6400

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

Closed
wants to merge 1 commit into from

Conversation

rajcspsg
Copy link

changelog: none

@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @ebroto (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties label Nov 29, 2020
Copy link
Member

@ebroto ebroto left a comment

Choose a reason for hiding this comment

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

Hi @rajcspsg and welcome to Clippy!

The objective of this issue is to create a lint that detects c.is_digit(10) and c.is_digit(16) and suggests changing that code to c.is_ascii_digit() and c.is_ascii_hexdigit() respectively. After implementing that lint, running clippy will suggest the changes you made to the code manually.

Take a look at the following docs:

These will help you to get started. In case you have any doubt, you can ask a question on Zulip or in this same PR.

@ebroto ebroto 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 Nov 29, 2020
@ebroto
Copy link
Member

ebroto commented Nov 29, 2020

Also, you can take a look at other PRs that add lints, like #6394, to get an idea of what is needed.

Happy hacking!

@giraffate
Copy link
Contributor

ping from triage @rajcspsg. Do you have any questions on how to proceed here?

@rajcspsg
Copy link
Author

@giraffate - I'm facing below issue in my local

    $ cargo test
    error: failed to run `rustc` to learn about target-specific information

    Caused by:
    process didn't exit successfully: `rustc - --crate-name ___ --print=file-names -Zunstable-options --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
    --- stderr
    error: the option `Z` is only accepted on the nightly compiler

I tried these options -

  1. cargo +nightly rustc -- -Z external-macro-backtrace
  2. rustup default nightly

Even after I did rustup default nightly I'm seeing the rust version is rustc 1.48.0 (7eac88abb 2020-11-16)
I don't know how to fix this issue. Any idea on this

@giraffate
Copy link
Contributor

@rajcspsg Can you do a rebase? nightly-2020-12-14 is pinned by rust-toolchain file on master branch.
Also, you might look at ${RUSTUP_HOME}/settings.toml to check if you have a override on Clippy repo. rustup override unset might be useful if you had a override.

@ebroto
Copy link
Member

ebroto commented Jan 2, 2021

According to the triage procedure, I should close this PR as there has been no activity and two weeks have passed since the last ping.

@rajcspsg did @giraffate suggestions help? Can we help you with another issue? Do not hesitate to reopen this in case you are working on it.

@ebroto ebroto closed this Jan 2, 2021
@ebroto ebroto added S-inactive-closed Status: Closed due to inactivity and removed S-waiting-on-author Status: This is awaiting some action from the author. (Use `@rustbot ready` to update this status) labels Jan 2, 2021
@jonboh
Copy link
Contributor

jonboh commented Oct 10, 2023

@rustbot label -S-inactive-closed

@rustbot rustbot removed the S-inactive-closed Status: Closed due to inactivity label Oct 10, 2023
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.

6 participants