Skip to content

Documentation #13822

Open
Open

Description

@ShakenCodes

Summary

Documentation of as_pointer_underscore claims it is available in 1.81.0, but it is not present in 1.83.0
https://rust-lang.github.io/rust-clippy/master/index.html#/as_pointer_underscore

Reproducer

I tried this code:

% cargo clippy --version
clippy 0.1.83 (90b35a62 2024-11-26)
% cargo clippy --explain as_pointer_underscore
unknown lint: as_pointer_underscore
%

I expected to see this happen:
The explanation of the lint to be given. (According to the documentation, I should be able to do this a 1.81.0.)

Instead, this happened:
unknown lint: as_pointer_underscore reported.

Version

rustc 1.83.0 (90b35a623 2024-11-26)
binary: rustc
commit-hash: 90b35a6239c3d8bdabc530a6a0816f7ff89a0aaf
commit-date: 2024-11-26
host: aarch64-apple-darwin
release: 1.83.0
LLVM version: 19.1.1

Additional Labels

No response

Activity

  1. added
    C-bugCategory: Clippy is not doing the correct thing
    on Dec 12, 2024
  2. roberthree commented on Dec 19, 2024

    @roberthree

    This lint was introduced with #13251, two weeks ago, so it's not part of 1.83.0, and certainly not 1.81.0. The 1.81.0 version is probably due to the fact that the PR was opened much earlier. On the other hand, the version of newly added lints is corrected in new releases, as described in 4. Update clippy::version attributes.

    Since you are using the 1.83.0 version, you should look for lints in https://rust-lang.github.io/rust-clippy/rust-1.83.0/index.html, which does not contain as_pointer_underscore, instead of https://rust-lang.github.io/rust-clippy/master/index.html. In general, one can start from https://rust-lang.github.io/rust-clippy/ and choose the correct version.

    I have also encountered this problem, especially when clicking on links from search results for Clippy Lints. Perhaps there should be a noticeable difference between Clippy Lints (stable) and Clippy Lints (master), apart from the different URL. Much like the difference between std (stable) and std (internal).

  3. GuillaumeGomez commented on Dec 28, 2024

    @GuillaumeGomez
    Member

    You mean between std (stable) and std (nightly)? 😉

    There is no difference except for the URL and the version displayed in the sidebar.

  4. roberthree commented on Dec 29, 2024

    @roberthree

    That's true, stable and nightly is probably a better comparison. However, the reason I chose the "internal" documentation as an example was because the potentially wrong version numbers of new lints feel like an internal agreement that may not be obvious to users? I don't know if such internal agreements exist in nightly Rust, too. How does Clippy relate to the nightly Rust builds?
    I understand that it might be complicated to introduce some difference between the master and stable webpages, since some master will be the next stable, but since new lints are unfinished anyway (as far as their version number is concerned), could "unfinished" lints be highlighted differently on the webpage?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thing

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions