Skip to content
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

std: str conversion fns should take *const u8 #8073

Closed
wants to merge 1 commit into from

Conversation

erickt
Copy link
Contributor

@erickt erickt commented Jul 27, 2013

This changes str::raw::from_{buf,buf_len,c_str,c_str_len} to take *const u8 or *const libc::c_char.

@erickt
Copy link
Contributor Author

erickt commented Jul 27, 2013

@huonw mentioned in IRC that *const T may be deprecated. Does anyone know if it was deprecated?

@alexcrichton
Copy link
Member

Right now &const is deprecated, and I think it was up in the air whether *const is deprecated, although I'd vote for not introducing new instances of it. Currently the use of *const is that * and *mut are both automatically coerced to it, but it has the same read-only guarantees as *u8. IMO it's probably ok to just write as *u8?

@erickt erickt closed this Jul 27, 2013
@erickt
Copy link
Contributor Author

erickt commented Jul 27, 2013

Thanks @alexcrichton!

flip1995 pushed a commit to flip1995/rust that referenced this pull request Jan 13, 2022
…earth

fix [`redundant_closure`] fp with `Rc<F>`/`Arc<F>`

fixes rust-lang#8073

changelog: don't trigger [`redundant_closure`] on `Arc<F>` or `Rc<F>`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants