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

ref_as_ptr not available in Rust 1.77 despite documentation #12559

Closed
Rua opened this issue Mar 25, 2024 · 3 comments
Closed

ref_as_ptr not available in Rust 1.77 despite documentation #12559

Rua opened this issue Mar 25, 2024 · 3 comments
Labels
A-documentation Area: Adding or improving documentation C-bug Category: Clippy is not doing the correct thing

Comments

@Rua
Copy link
Contributor

Rua commented Mar 25, 2024

Summary

The documentation for the ref_as_ptr lint says that it's available since Rust 1.77, but when I use it, I get a warning to say it's not.

Reproducer

I tried this code in Cargo.toml:

[lints]
clippy.ref_as_ptr = "warn"

This happened:

$ cargo clippy
warning[E0602]: unknown lint: `clippy::ref_as_ptr`
  |
  = help: did you mean: `clippy::ptr_as_ptr`
  = note: requested on the command line with `-W clippy::ref_as_ptr`
  = note: `#[warn(unknown_lints)]` on by default

Version

rustc 1.77.0 (aedd173a2 2024-03-17)
binary: rustc
commit-hash: aedd173a2c086e558c2b66d3743b344f977621a7
commit-date: 2024-03-17
host: x86_64-unknown-linux-gnu
release: 1.77.0
LLVM version: 17.0.6

Additional Labels

No response

@Rua Rua added the C-bug Category: Clippy is not doing the correct thing label Mar 25, 2024
@J-ZhengLi
Copy link
Member

The version in documentation indicates when the lint starts development.

so, in this case, this lint starts its development from nightly 1.77 but finally got merged on Feburary, which did not make it into rust stable yet...

@J-ZhengLi J-ZhengLi added the A-documentation Area: Adding or improving documentation label Mar 28, 2024
@Rua
Copy link
Contributor Author

Rua commented Mar 28, 2024

Ah I see. A tiny bit confusing to say the least!

@y21
Copy link
Member

y21 commented May 6, 2024

The version for ref_as_ptr was corrected to 1.78 in the last changelog (#12735) and is also available in 1.78 so I think we can close this.

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

No branches or pull requests

3 participants