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

Implement ToStr for char #6133

Closed
bstrie opened this issue Apr 30, 2013 · 3 comments
Closed

Implement ToStr for char #6133

bstrie opened this issue Apr 30, 2013 · 3 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@bstrie
Copy link
Contributor

bstrie commented Apr 30, 2013

fn main() {
    println('a'.to_str());
}

This should print "a".

@Kimundi
Copy link
Member

Kimundi commented Apr 30, 2013

Currently, Ascii implements to_str() such that 'c'.to_ascii().to_str() == ~"'c'".
I guess that should better be changed to also return ~"c" to be consistent with this implementation, and because there is a repr module whose job it is to return ~"'c'" here.

@jjjjw
Copy link
Contributor

jjjjw commented May 6, 2013

This can be closed. <- I'm not sure if leaving such a comment is helpful?

@thestinger
Copy link
Contributor

@oncemoreification: It's helpful, it ends up sending an email to people who are watching the repo.

flip1995 pushed a commit to flip1995/rust that referenced this issue Oct 9, 2020
clippy_lints: Do not warn against Box parameter in C FFI

changelog: [`boxed_local`]: don't lint in `extern fn` arguments

Fixes rust-lang#5542.

When using C FFI, to handle pointers in parameters it is needed to
declare them as `Box` in its Rust-side signature. However, the current
linter warns against the usage of Box stating that "local variable
doesn't need to be boxed here".

This commit fixes it by ignoring functions whose Abi is C.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

4 participants