rust-clippy icon indicating copy to clipboard operation
rust-clippy copied to clipboard

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

Open mgeier opened this issue 1 year ago • 0 comments

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 avatar Sep 28 '24 19:09 mgeier