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

rusti: print() is not io::print() #6617

Closed
kud1ing opened this issue May 19, 2013 · 3 comments
Closed

rusti: print() is not io::print() #6617

kud1ing opened this issue May 19, 2013 · 3 comments

Comments

@kud1ing
Copy link

kud1ing commented May 19, 2013

print() in rusti behaves unexpected, compared to println():

rusti> let a = 42; println(fmt!("%d", a));
42
rusti> let a = 42; print(fmt!("%d", a));
~"42"

@cmr found there is a wrapper in librusti/wrapper.rs doing a io::println(fmt!("%?", result));.

This makes it easier to do a print(a) for any type, but it is overlaying io::print with a different behavior.
I am not sure, whether this wrapper is necessary, since a inspects the item in a similar way.

@kud1ing
Copy link
Author

kud1ing commented May 19, 2013

CC @z0w0

@steveklabnik
Copy link
Member

In Ruby, we use pp for 'pretty printthat does something like it seems likeprintdoes inrusti`.

bors added a commit that referenced this issue Jun 13, 2013
More descriptive comments can be found throughout the code, but the bulk of this is that it addresses a vast number of issues with the old rusti model.

Closes #6772, #5675, #5469, and #6617
@alexcrichton
Copy link
Member

Closed by #7070

flip1995 pushed a commit to flip1995/rust that referenced this issue Jan 30, 2021
…ffen

New lint: exhaustive_enums, exhaustive_structs

Fixes rust-lang#6616

changelog: Added restriction lint: `exhaustive_enums`, `exhaustive_structs`
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

No branches or pull requests

3 participants