rust/src/libstd/io
Corey Farwell 6edab01499 Rollup merge of #40763 - pirate:patch-2, r=steveklabnik
Add helpful hint in io docs about how ? is not allowed in main()

This is my effort to help alleviate the confusion caused by the error message:
```rust
error[E0277]: the trait bound `(): std::ops::Carrier` is not satisfied
  --> hello_world.rs:72:5
   |
72 |     io::stdin().read_line(&mut d_input)?;
   |     ------------------------------------
   |     |
   |     the trait `std::ops::Carrier` is not implemented for `()`
   |     in this macro invocation
   |
   = note: required by `std::ops::Carrier::from_error`

error: aborting due to previous error
```
This has been discussed at length in https://github.com/rust-lang/rust/issues/35946, but I figured it would be helpful to mention in the docs.
Reading user input is one of the first things beginners will look up in the docs, so my thinking was they'd see this warning here and not have to deal with the [tricky error message](https://blog.rust-lang.org/2017/03/02/lang-ergonomics.html).

If you think this isn't the right place to put this in the docs, that's understandable, I'm open to suggestions for putting it elsewhere or removing it entirely.
2017-03-31 16:48:26 -04:00
..
buffered.rs libstd: replace all try! with ? in documentation examples 2017-01-22 21:07:38 +05:30
cursor.rs Document Cursor::new position is 0 2017-03-24 05:05:34 +03:00
error.rs Remove function invokation parens from documentation links. 2017-03-13 21:43:18 -04:00
impls.rs Move small-copy optimization into <&[u8] as Read> 2016-11-30 11:09:29 +01:00
lazy.rs Use #[prelude_import] in libstd. 2016-08-24 22:12:48 +00:00
mod.rs Rollup merge of #40763 - pirate:patch-2, r=steveklabnik 2017-03-31 16:48:26 -04:00
prelude.rs std: Remove deprecated functionality from 1.5 2015-12-10 11:47:55 -08:00
stdio.rs Remove function invokation parens from documentation links. 2017-03-13 21:43:18 -04:00
util.rs Remove function invokation parens from documentation links. 2017-03-13 21:43:18 -04:00