Skip to content

Commit c29970d

Browse files
committed
---
yaml --- r: 161271 b: refs/heads/snap-stage3 c: 5f9741e h: refs/heads/master i: 161269: 0adb52d 161267: fbb7725 161263: 09d4a74 v: v3
1 parent c4045d4 commit c29970d

File tree

3 files changed

+12
-11
lines changed

3 files changed

+12
-11
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 4eb72d268f337a8f117c86a2ac1b98336cab9e9d
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: a4b1ac5447c44b5ad5923653ed2091e0510ac8db
4+
refs/heads/snap-stage3: 5f9741e62d7cfe26ca94a28716a95bc03d74e87a
55
refs/heads/try: 0f0d21c1eb5c7be04d323e0b06faf252ad790af6
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/etc/emacs/rust-mode.el

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,6 @@
3131
(modify-syntax-entry ?\" "\"" table)
3232
(modify-syntax-entry ?\\ "\\" table)
3333

34-
;; _ is a word-char
35-
(modify-syntax-entry ?_ "w" table)
36-
3734
;; Comments
3835
(modify-syntax-entry ?/ ". 124b" table)
3936
(modify-syntax-entry ?* ". 23" table)
@@ -397,7 +394,7 @@ This is written mainly to be used as `beginning-of-defun-function' for Rust.
397394
Don't move to the beginning of the line. `beginning-of-defun',
398395
which calls this, does that afterwards."
399396
(interactive "p")
400-
(re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\b")
397+
(re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\_>")
401398
nil 'move (or arg 1)))
402399

403400
(defun rust-end-of-defun ()

branches/snap-stage3/src/libstd/io/net/tcp.rs

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,22 @@ use sys::tcp::TcpAcceptor as TcpAcceptorImp;
3434
/// A structure which represents a TCP stream between a local socket and a
3535
/// remote socket.
3636
///
37+
/// The socket will be closed when the value is dropped.
38+
///
3739
/// # Example
3840
///
3941
/// ```no_run
40-
/// # #![allow(unused_must_use)]
4142
/// use std::io::TcpStream;
4243
///
43-
/// let mut stream = TcpStream::connect("127.0.0.1:34254");
44+
/// {
45+
/// let mut stream = TcpStream::connect("127.0.0.1:34254");
46+
///
47+
/// // ignore the Result
48+
/// let _ = stream.write(&[1]);
4449
///
45-
/// stream.write(&[1]);
46-
/// let mut buf = [0];
47-
/// stream.read(&mut buf);
48-
/// drop(stream); // close the connection
50+
/// let mut buf = [0];
51+
/// let _ = stream.read(&mut buf); // ignore here too
52+
/// } // the stream is closed here
4953
/// ```
5054
pub struct TcpStream {
5155
inner: TcpStreamImp,

0 commit comments

Comments
 (0)