mark vstl1_* functions as unsafe#2092
Conversation
| static_defs: ["const LANE: i32"] | ||
| safety: safe | ||
| safety: | ||
| unsafe: [neon] |
There was a problem hiding this comment.
@adamgemmell using neon here is not right, this is unsafe in its own right. I'm not sure if there are further safety conditions though, the link to the documentation that is generated for these functions does not work.
I also haven't quite reverse-engineered the right yaml to use to get a better message here.
There was a problem hiding this comment.
Only SVE intrinsics have custom unsafety messages - originally all neon intrinsics were unsafe with the same message, and it looks like we never added proper messages when making the majority of them safe. I think just the pointer dereference is the only relevant safety condition here.
In my opinion, neon is fine and is in keeping with the rest of the neon intrinsics. If you're up for it a proper message would involve adding a variant of "UnsafetyComment" in intrinsic.rs and implementing Display for it (the Dereference variant which you'd otherwise use is specific to SVE as it makes reference to predicates)
these functions write to a raw pointer, and so are clearly unsafe to use
e60a0fb to
e850a3b
Compare
|
r? @sayantn rustbot has assigned @sayantn. Use Why was this reviewer chosen?The reviewer was selected based on:
|
fixes rust-lang/rust#155751
these functions write to a raw pointer, and so are clearly unsafe to use