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

update tcp stream documentation #54965

Merged
merged 2 commits into from
Oct 25, 2018

Conversation

chathaway-codes
Copy link
Contributor

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).

@rust-highfive
Copy link
Collaborator

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @Kimundi (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 10, 2018
@rust-highfive
Copy link
Collaborator

The job x86_64-gnu-llvm-5.0 of your PR failed on Travis (raw log). Through arcane magic we have determined that the following fragments from the build log may contain information about the problem.

Click to expand the log.
[00:59:07] .................................................................................................... 2200/4581
[00:59:12] ......i............................................................................................. 2300/4581
[00:59:16] .................................................................................................... 2400/4581
[00:59:19] .................................................................................................... 2500/4581
[00:59:23] ...................iiiiiiiii........................................................................ 2600/4581
[00:59:30] .................................................................................................... 2800/4581
[00:59:34] .................................................................................................... 2900/4581
[00:59:36] .......................................i............................................................ 3000/4581
[00:59:39] ...................................................................................................i 3100/4581
---
[01:30:11] .................................................................................................... 200/954
[01:30:19] .....iii......i......i...i......i................................................................... 300/954
[01:30:25] .................................................................................................... 400/954
[01:30:36] ...................................iiii........ii................................................... 500/954
[01:30:41] .........................................F.......................................................... 600/954
[01:31:08] .................................................................................................... 800/954
[01:31:14] .................................................................................................... 900/954
[01:31:21] ...iiii...............................................
[01:31:21] failures:
[01:31:21] failures:
[01:31:21] 
[01:31:21] ---- net/tcp.rs - net::tcp::TcpStream (line 42) stdout ----
[01:31:21] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
[01:31:21]  --> net/tcp.rs:47:22
[01:31:21]   |
[01:31:21] 8 |     let mut stream = TcpStream::connect("127.0.0.1:34254")?;
[01:31:21]   |                      ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
[01:31:21]   = help: the trait `std::ops::Try` is not implemented for `()`
[01:31:21]   = note: required by `std::ops::Try::from_error`
[01:31:21] 
[01:31:21] 
[01:31:21] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
[01:31:21]   --> net/tcp.rs:49:5
[01:31:21]    |
[01:31:21] 10 |     stream.write(&[1])?;
[01:31:21]    |     ^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
[01:31:21]    = help: the trait `std::ops::Try` is not implemented for `()`
[01:31:21]    = note: required by `std::ops::Try::from_error`
[01:31:21] 
[01:31:21] 
[01:31:21] error[E0277]: the `?` operator can only be used in a function that returns `Result` or `Option` (or another type that implements `std::ops::Try`)
[01:31:21]   --> net/tcp.rs:50:5
[01:31:21]    |
[01:31:21] 11 |     stream.read(&mut [0; 128])?;
[01:31:21]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot use the `?` operator in a function that returns `()`
travis_time:end:1e2479b2:start=1539186485505106178,finish=1539191967116993912,duration=5481611887734

The command "stamp sh -x -c "$RUN_SCRIPT"" exited with 2.
travis_time:start:02323479

I'm a bot! I can only do what humans tell me to, so if this was not helpful or you have suggestions for improvements, please ping or otherwise contact @TimNN. (Feature Requests)

@chathaway-codes
Copy link
Contributor Author

My bad; didn't realize the code comments were being compiled for checking. I'll fix it and test locally then push a new commit

@TimNN
Copy link
Contributor

TimNN commented Oct 23, 2018

Ping from triage @Kimundi / @rust-lang/docs: This PR requires your review.

@GuillaumeGomez
Copy link
Member

Thanks!

@bors: r+ rollup

@bors
Copy link
Contributor

bors commented Oct 23, 2018

📌 Commit 4530b8c has been approved by GuillaumeGomez

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Oct 23, 2018
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 23, 2018
…ocs, r=GuillaumeGomez

update tcp stream documentation

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).
kennytm added a commit to kennytm/rust that referenced this pull request Oct 24, 2018
…ocs, r=GuillaumeGomez

update tcp stream documentation

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).
pietroalbini added a commit to pietroalbini/rust that referenced this pull request Oct 25, 2018
…ocs, r=GuillaumeGomez

update tcp stream documentation

A small styling issue that seemed inconsistent here when compared to other places (such as https://doc.rust-lang.org/beta/std/net/struct.TcpListener.html).
bors added a commit that referenced this pull request Oct 25, 2018
Rollup of 22 pull requests

Successful merges:

 - #53507 (Add doc for impl From for Waker)
 - #53931 (Gradually expanding libstd's keyword documentation)
 - #54965 (update tcp stream documentation)
 - #54977 (Accept `Option<Box<$t:ty>>` in macro argument)
 - #55138 (in which unused-parens suggestions heed what the user actually wrote)
 - #55173 (Suggest appropriate syntax on missing lifetime specifier in return type)
 - #55200 (Documents `From` implementations for `Stdio`)
 - #55245 (submodules: update clippy from 5afdf8b to b1d0343)
 - #55247 (Clarified code example in char primitive doc)
 - #55251 (Fix a typo in the documentation of RangeInclusive)
 - #55253 (only issue "variant of the expected type" suggestion for enums)
 - #55254 (Correct trailing ellipsis in name_from_pat)
 - #55269 (fix typos in various places)
 - #55282 (Remove redundant clone)
 - #55285 (Do some copy editing on the release notes)
 - #55291 (Update stdsimd submodule)
 - #55296 (Set RUST_BACKTRACE=0 for rustdoc-ui/failed-doctest-output.rs)
 - #55306 (Regression test for #54478.)
 - #55328 (Fix doc for new copysign functions)
 - #55340 (Operands no longer appear in places)
 - #55345 (Remove is_null)
 - #55348 (Update RELEASES.md after destabilization of non_modrs_mods)

Failed merges:

r? @ghost
@bors bors merged commit 4530b8c into rust-lang:master Oct 25, 2018
bors added a commit that referenced this pull request Oct 29, 2018
Rollup of 9 pull requests

Successful merges:

 - #54965 (update tcp stream documentation)
 - #55269 (fix typos in various places)
 - #55384 (Avoid unnecessary allocations in `float_lit` and `integer_lit`.)
 - #55423 (back out bogus `Ok`-wrapping suggestion on `?` arm type mismatch)
 - #55426 (Make a bunch of trivial methods of NonNull be `#[inline]`)
 - #55438 (Avoid directly catching BaseException in bootstrap configure script)
 - #55439 (Remove unused sys import from generate-deriving-span-tests)
 - #55440 (Remove unreachable code in hasClass function in Rustdoc)
 - #55447 (Fix invalid path in generate-deriving-span-tests.py.)

Failed merges:

r? @ghost
@kennytm
Copy link
Member

kennytm commented Oct 30, 2018

@bors r-

Wrongly reappeared on bors queue

@bors bors added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Oct 30, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants