You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fnstrchr(// `WRITE` because the return type is derived from `cs`'s provenance.
cs:*constc_char:[READ | WRITE | OFFSET_ADD | NON_NULL],
c:c_int,) -> *mutc_char:[READ | WRITE | OFFSET_ADD];
it would be nice for them to pass through certain permissions like we do for ptr::offset (a builtin for us). If the returned pointer is never written, there's no need to require WRITE on the argument. In other words, we'd like to be able to be generic over certain permissions, like how fn foo and fn foo_mut functions are meant to be.
Supporting this is still a ways away and not very high-priority, but I imagine we could try to implement this either by allowing permissions to be generic or to allow multiple declarations of the same fn with different permissions (like how fn foo and fn foo_mut do it) and then selecting the KnownFn with the matching permissions.
For
KnownFn
s likeit would be nice for them to pass through certain permissions like we do for
ptr::offset
(a builtin for us). If the returned pointer is never written, there's no need to requireWRITE
on the argument. In other words, we'd like to be able to be generic over certain permissions, like howfn foo
andfn foo_mut
functions are meant to be.Supporting this is still a ways away and not very high-priority, but I imagine we could try to implement this either by allowing permissions to be generic or to allow multiple declarations of the same
fn
with different permissions (like howfn foo
andfn foo_mut
do it) and then selecting theKnownFn
with the matching permissions.c2rust-analyze
) Add almost alllibc
KnownFn
s used inlighttpd_rust_amalgamated
#998 (comment).The text was updated successfully, but these errors were encountered: