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

Documentation #13822

Open
ShakenCodes opened this issue Dec 12, 2024 · 1 comment
Open

Documentation #13822

ShakenCodes opened this issue Dec 12, 2024 · 1 comment
Labels
C-bug Category: Clippy is not doing the correct thing

Comments

@ShakenCodes
Copy link

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

@ShakenCodes ShakenCodes added the C-bug Category: Clippy is not doing the correct thing label Dec 12, 2024
@roberthree
Copy link

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: Clippy is not doing the correct thing
Projects
None yet
Development

No branches or pull requests

2 participants