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

Bypass negative literal workaround on 1.56+ #1088

Merged
merged 5 commits into from Oct 26, 2021
Merged

Bypass negative literal workaround on 1.56+ #1088

merged 5 commits into from Oct 26, 2021

Commits on Oct 26, 2021

  1. Copy the full SHA
    d9a9ff4 View commit details
    Browse the repository at this point in the history
  2. Locally ignore unnecessary_wraps pedantic clippy lint

        error: this function's return value is unnecessarily wrapped by `Option`
            --> src/lit.rs:1542:5
             |
        1542 | /     pub fn to_literal(repr: &str, digits: &str, suffix: &str) -> Option<Literal> {
        1543 | |         #[cfg(syn_no_negative_literal_parse)]
        1544 | |         {
        1545 | |             if repr.starts_with('-') {
        ...    |
        1571 | |         Some(repr.parse::<Literal>().unwrap())
        1572 | |     }
             | |_____^
             |
             = note: `-D clippy::unnecessary-wraps` implied by `-D clippy::pedantic`
             = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_wraps
        help: remove `Option` from the return type...
             |
        1542 |     pub fn to_literal(repr: &str, digits: &str, suffix: &str) -> proc_macro2::Literal {
             |                                                                  ~~~~~~~~~~~~~~~~~~~~
        help: ...and then change returning expressions
             |
        1571 |         repr.parse::<Literal>().unwrap()
             |
    dtolnay committed Oct 26, 2021
    Copy the full SHA
    a7eedc1 View commit details
    Browse the repository at this point in the history
  3. Copy the full SHA
    3609334 View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    793b1c3 View commit details
    Browse the repository at this point in the history
  5. Delete lit overflow test

    dtolnay committed Oct 26, 2021
    Copy the full SHA
    0ca31d1 View commit details
    Browse the repository at this point in the history