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

Fix unused_qualifications warnings on Windows and exclude extract-generated-code-doc and generator from clippy's MSRV check #928

Merged
merged 6 commits into from
Jun 1, 2024

Conversation

psychon
Copy link
Owner

@psychon psychon commented Jun 1, 2024

I am not quite sure why, but CI started failing on windows. The previous, successful build used Rust 1.77.2 and now with 1.78.0, the build fail. I do not know whether this is really the reason, but it is my best guess.

The compiler error message looks like this:

error: unnecessary qualification
   --> x11rb\src\rust_connection\stream.rs:430:47
    |
430 |                     Err(ref e) if e.kind() == std::io::ErrorKind::Interrupted => {}
    |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
note: the lint level is defined here
   --> x11rb\src\lib.rs:129:5
    |
129 |     unused_qualifications,
    |     ^^^^^^^^^^^^^^^^^^^^^

psychon added 6 commits June 1, 2024 11:57
I am not quite sure why, but CI started failing on windows. The
previous, successful build used Rust 1.77.2 and now with 1.78.0, the
build fail. I do not know whether this is really the reason, but it is
my best guess.

The compiler error message looks like this:

    error: unnecessary qualification
       --> x11rb\src\rust_connection\stream.rs:430:47
        |
    430 |                     Err(ref e) if e.kind() == std::io::ErrorKind::Interrupted => {}
        |                                               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        |
    note: the lint level is defined here
       --> x11rb\src\lib.rs:129:5
        |
    129 |     unused_qualifications,
        |     ^^^^^^^^^^^^^^^^^^^^^

Signed-off-by: Uli Schlachter <psychon@znc.in>
Signed-off-by: Uli Schlachter <psychon@znc.in>
Clippy reports:

    warning: usage of a legacy numeric constant
       --> x11rb-async/src/rust_connection/mod.rs:630:40
        |
    630 | ...                   .unwrap_or(std::usize::MAX);
        |                                  ^^^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#legacy_numeric_constants
    help: use the associated constant instead
        |
    630 |                             .unwrap_or(usize::MAX);
        |                                        ~~~~~~~~~~

Signed-off-by: Uli Schlachter <psychon@znc.in>
Clippy nightly reports e.g.:

    warning: doc list item missing indentation
        --> x11rb-protocol/src/protocol/xproto.rs:1325:5
         |
    1325 | /// which was pressed.
         |     ^
         |
         = help: if this is supposed to be its own paragraph, add a blank line
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
         = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
    help: indent this line
         |
    1325 | ///   which was pressed.
         |     ++

Signed-off-by: Uli Schlachter <psychon@znc.in>
Clippy nightly reports e.g.:

    warning: doc list item missing indentation
        --> x11rb-protocol/src/protocol/xproto.rs:8386:5
         |
    8386 | /// windows created by other clients to your save set.
         |     ^
         |
         = help: if this is supposed to be its own paragraph, add a blank line
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
         = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
    help: indent this line
         |
    8386 | ///   windows created by other clients to your save set.
         |     ++

Signed-off-by: Uli Schlachter <psychon@znc.in>
Clippy nightly reports e.g:

    warning: doc list item missing indentation
      --> x11rb-async/src/lib.rs:40:5
       |
    40 | //! [`blocking::BlockingConnection`] for [`x11rb::xcb_ffi::XCBConnection`]
       |     ^
       |
       = help: if this is supposed to be its own paragraph, add a blank line
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#doc_lazy_continuation
       = note: `#[warn(clippy::doc_lazy_continuation)]` on by default
    help: indent this line
       |
    40 | //!   [`blocking::BlockingConnection`] for [`x11rb::xcb_ffi::XCBConnection`]
       |     ++

Signed-off-by: Uli Schlachter <psychon@znc.in>
Copy link
Collaborator

@notgull notgull left a comment

Choose a reason for hiding this comment

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

ACK

@mergify mergify bot merged commit c55337f into master Jun 1, 2024
21 checks passed
@mergify mergify bot deleted the fix-ci branch June 1, 2024 13:08
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.

2 participants