-
Notifications
You must be signed in to change notification settings - Fork 12.9k
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
Add eprint!
and eprintln!
#39228
Comments
These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issue rust-lang#39228.
I'd suggest to just implement this and send a PR (in the worst case you'll need to write an RFC as well). |
This does require an RFC, as I mentioned in #39229, so I'm going to give this a close; this would be tracked by the RFC process. Thanks! |
These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issue rust-lang#39228.
Add `eprint!` and `eprintln!` macros to the prelude. These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issues rust-lang#39228 and rust-lang#40528; previous PR rust-lang#39229; accepted RFC rust-lang/rfcs#1869; proposed revision to The Book rust-lang/book#615. I have _not_ revised this any since the original submission; I will do that later this week. I wanted to get this PR in place since it's been quite a while since the RFC was merged. Known outstanding review comments: * [x] @steveklabnik requested a new chapter for the unstable version of The Book -- please see if the proposed revisions to the second edition cover it. * [x] @nodakai asked if it were possible to merge the internal methods `_print` and `_eprint` - not completely, since they both refer to different internal globals which we don't want to expose, but I will see if some duplication can be factored out. Please let me know if I missed anything.
Add `eprint!` and `eprintln!` macros to the prelude. These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout. Issues rust-lang#39228 and rust-lang#40528; previous PR rust-lang#39229; accepted RFC rust-lang/rfcs#1869; proposed revision to The Book rust-lang/book#615. I have _not_ revised this any since the original submission; I will do that later this week. I wanted to get this PR in place since it's been quite a while since the RFC was merged. Known outstanding review comments: * [x] @steveklabnik requested a new chapter for the unstable version of The Book -- please see if the proposed revisions to the second edition cover it. * [x] @nodakai asked if it were possible to merge the internal methods `_print` and `_eprint` - not completely, since they both refer to different internal globals which we don't want to expose, but I will see if some duplication can be factored out. Please let me know if I missed anything.
If you are still running into this error, update Rust to version I spent a while googling this error and wondering which package providing |
From https://internals.rust-lang.org/t/extremely-pre-rfc-eprintln/4635 …
… which met with general approval and two people saying they already were adding
eprintln!
to all their own crates, so I'm just gonna go ahead and submit a PR.eprint!
is included for completeness and symmetry; I'm not sure it's useful, but I think people would be surprised to find it missing.The text was updated successfully, but these errors were encountered: