-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
CString behaves strangely with regard to *const and *mut #16772
Comments
Ack, that is pretty nasty. I think |
This is a problem with cc @aturon (Parameterizable mutability would be another solution, I guess.) |
Somewhat orthogonal to the mutability issue, I find the dynamic ownership flag too error-prone, considering that the main use case for Perhaps |
Both |
Discussion at rust-lang/rust#16772
This was resolved in #20507 |
internal: Add tracing spans to macro generated database
In the current API,
CString::new
takes a*const i8
, but it has a methodas_mut_ptr
which returns a*mut i8
.The
as_mut_ptr
method seems to violate the invariant that thenew
method is trying to impose.Perhaps we need
CString
andMutCString
, as well asMutCString::to_c_string
?The text was updated successfully, but these errors were encountered: