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

False positive: myvec.as_ptr() allegedly doesn't exist for MSRV < 1.37 #13473

Open
mgeier opened this issue Sep 28, 2024 · 0 comments
Open

False positive: myvec.as_ptr() allegedly doesn't exist for MSRV < 1.37 #13473

mgeier opened this issue Sep 28, 2024 · 0 comments
Labels
C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have

Comments

@mgeier
Copy link
Contributor

mgeier commented Sep 28, 2024

Summary

I'm getting the MSRV lint below even though rustc 1.31 compiles the code without complaints.

I guess this is because slice::as_ptr() was used via auto-dereferencing before Vec::as_ptr() was introduced in rustc 1.37.

Lint Name

incompatible_msrv

Reproducer

I tried this code (where v is a Vec):

v.as_ptr()

I saw this happen:

error: current MSRV (Minimum Supported Rust Version) is `1.31.0` but this item is stable since `1.37.0`

Here's the CI log: https://github.com/mgeier/rsor/actions/runs/10656041863/job/30803245005

I expected to see this happen:

No error.

Version

No response

Additional Labels

No response

@mgeier mgeier added C-bug Category: Clippy is not doing the correct thing I-false-positive Issue: The lint was triggered on code it shouldn't have labels Sep 28, 2024
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 I-false-positive Issue: The lint was triggered on code it shouldn't have
Projects
None yet
Development

No branches or pull requests

1 participant