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

[pull] master from dtolnay:master #1

Open
wants to merge 619 commits into
base: master
Choose a base branch
from

Conversation

pull[bot]
Copy link

@pull pull bot commented Jan 12, 2020

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

@pull pull bot added the ⤵️ pull label Jan 12, 2020
@pull pull bot added the merge-conflict Resolve conflicts manually label Feb 19, 2020
@dtolnay dtolnay force-pushed the master branch 2 times, most recently from 78a3e69 to 305b57a Compare May 7, 2022 03:52
dtolnay and others added 24 commits December 30, 2023 13:53
Remove option_if_let_else clippy suppression
Make CI verify that error_generic_member_access works in latest nightly
Make env-dep:RUSTC_BOOTSTRAP get listed in probe's dep-info
Emit dep-info for probe.rs in case sccache needs it
Compiler is unable to generate as efficient code for `write!(f, "text")` as it does for `f.write_str("text")`.  This PR checks if the `#[error("text")]` uses a simple string literal without the `{` and `}` characters, and without arguments, and uses `write_str` if so.
Optimize performance for string literals in Display::fmt
    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:354:12
        |
    354 |     assert(r#"raw brace left {"#, Error::BraceLeft);
        |            ^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
        = note: `-W clippy::needless-raw-string-hashes` implied by `-W clippy::pedantic`
        = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_raw_string_hashes)]`
    help: remove all the hashes around the string literal
        |
    354 -     assert(r#"raw brace left {"#, Error::BraceLeft);
    354 +     assert(r"raw brace left {", Error::BraceLeft);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:355:12
        |
    355 |     assert(r#"raw brace left 2 \x7B"#, Error::BraceLeft2);
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    355 -     assert(r#"raw brace left 2 \x7B"#, Error::BraceLeft2);
    355 +     assert(r"raw brace left 2 \x7B", Error::BraceLeft2);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:356:12
        |
    356 |     assert(r#"raw brace right }"#, Error::BraceRight);
        |            ^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    356 -     assert(r#"raw brace right }"#, Error::BraceRight);
    356 +     assert(r"raw brace right }", Error::BraceRight);
        |

    warning: unnecessary hashes around raw string literal
       --> tests/test_display.rs:357:12
        |
    357 |     assert(r#"raw brace right 2 \x7D"#, Error::BraceRight2);
        |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_raw_string_hashes
    help: remove all the hashes around the string literal
        |
    357 -     assert(r#"raw brace right 2 \x7D"#, Error::BraceRight2);
    357 +     assert(r"raw brace right 2 \x7D", Error::BraceRight2);
        |
    warning: assigning the result of `Clone::clone()` may be inefficient
      --> impl/src/ast.rs:85:21
       |
    85 |                     *display = attrs.display.clone();
       |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display.clone_from(&attrs.display)`
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
       = note: `#[warn(clippy::assigning_clones)]` on by default

    warning: assigning the result of `Clone::clone()` may be inefficient
       --> impl/src/expand.rs:158:9
        |
    158 |         display_implied_bounds = display.implied_bounds.clone();
        |         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display_implied_bounds.clone_from(&display.implied_bounds)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones

    warning: assigning the result of `Clone::clone()` may be inefficient
       --> impl/src/expand.rs:402:21
        |
    402 |                     display_implied_bounds = display.implied_bounds.clone();
        |                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use `clone_from()`: `display_implied_bounds.clone_from(&display.implied_bounds)`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#assigning_clones
dtolnay and others added 30 commits December 7, 2024 09:04
    error: use of deprecated struct `test_deprecated::DeprecatedStruct`
      --> tests/test_lints.rs:73:13
       |
    73 |             DeprecatedStruct,
       |             ^^^^^^^^^^^^^^^^
       |
    note: the lint level is defined here
      --> tests/test_lints.rs:39:13
       |
    39 |     #![deny(deprecated)]
       |             ^^^^^^^^^^
Suppress deprecation warning on generated From impls
    error[E0425]: cannot find value `_0` in this scope
       --> tests/test_display.rs:308:17
        |
    308 |         #[error("{0}")]
        |                 ^^^^^ not found in this scope

    error[E0425]: cannot find value `__display_x` in this scope
       --> tests/test_display.rs:310:17
        |
    310 |         #[error("{x}")]
        |                 ^^^^^ not found in this scope
Fix spans on macro-generated bindings and format variables
Unspan From impl contents
    error[E0599]: the method `as_display` exists for reference `&<T as FromStr>::Err`, but its trait bounds were not satisfied
       --> tests/test_generics.rs:178:13
        |
    178 |     #[error("couldn't parse entry: {0}")]
        |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^ method cannot be called on `&<T as FromStr>::Err` due to unsatisfied trait bounds
        |
        = note: the following trait bounds were not satisfied:
                `<T as FromStr>::Err: std::fmt::Display`
                which is required by `&<T as FromStr>::Err: AsDisplay<'_>`
Generate trait bounds on associated types
Add feature gate to tests that use std
    warning: unused import: `std::path::PathBuf`
     --> tests/test_expr.rs:4:5
      |
    4 | use std::path::PathBuf;
      |     ^^^^^^^^^^^^^^^^^^
      |
      = note: `#[warn(unused_imports)]` on by default
Add CI step to test with "std" disabled
Cargo stopped generating this in its project template 5 years ago. It
would belong in a global gitignore instead.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
⤵️ pull merge-conflict Resolve conflicts manually
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants