Skip to content

CStr::from_bytes_with_nul_unchecked() incorrectly listed as const in docs #74579

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

Closed
nwn opened this issue Jul 21, 2020 · 3 comments · Fixed by #74936
Closed

CStr::from_bytes_with_nul_unchecked() incorrectly listed as const in docs #74579

nwn opened this issue Jul 21, 2020 · 3 comments · Fixed by #74936
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.

Comments

@nwn
Copy link

nwn commented Jul 21, 2020

The documentation for CStr::from_bytes_with_nul_unchecked() lists it as a const fn, but its const-ness is still unstable (due to the rustc_const_unstable attribute and corroborated by the playground).

@lcnr lcnr added C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue. labels Jul 21, 2020
@RalfJung
Copy link
Member

Cc @GuillaumeGomez
We have plenty of stable but const-unstable functions; are they all affected?

@GuillaumeGomez
Copy link
Member

I guess? If they are under the same attribute, I see no reason for them to not share the same bug.

@GuillaumeGomez
Copy link
Member

I wrote a fix. I just need to test a few things and then I send the PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: This is a bug. T-rustdoc Relevant to the rustdoc team, which will review and decide on the PR/issue.
Projects
None yet
4 participants