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

The docs for print! and println! should contain panics section #28510

Closed
llogiq opened this issue Sep 19, 2015 · 2 comments · Fixed by #28511
Closed

The docs for print! and println! should contain panics section #28510

llogiq opened this issue Sep 19, 2015 · 2 comments · Fixed by #28511

Comments

@llogiq
Copy link
Contributor

llogiq commented Sep 19, 2015

Invocations of the print!(..) and println!(..) macros may panic if stdout isn't writeable. This is undocumented as of yet.

Proposed solution: Add a # Panics section in both doc comments.

@retep998
Copy link
Member

This is closely related to rust-lang/rfcs#1014 which made print! and friends not panic if stdout doesn't exist. Should it be expanded to cover other kinds of behavior?
Also see discussion in #25977 (comment)

@llogiq
Copy link
Contributor Author

llogiq commented Sep 19, 2015

I agree that making print! not panic could be an even better solution. However, in the meantime, we still have an undocumented Panic. My suggestion is to fix the docs first (and don't forget to roll them back if we fix the actual panic!) and then concentrate on #25977.

steveklabnik added a commit to steveklabnik/rust that referenced this issue Sep 19, 2015
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 a pull request may close this issue.

2 participants