Skip to content

Commit 616be87

Browse files
committed
---
yaml --- r: 162575 b: refs/heads/try c: 534fd3a h: refs/heads/master i: 162573: bf39ce0 162571: cdb28f6 162567: ceb8664 162559: faef9ef v: v3
1 parent 2345c5c commit 616be87

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: cafe2966770ff377aad6dd9fd808e68055587c58
5-
refs/heads/try: 54c628cb849ad53b66f0d738dc8c83529a9d08d2
5+
refs/heads/try: 534fd3a98349ec2250e1515a3cb19dbb98935b98
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d
88
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596

branches/try/src/librustc_trans/save/recorder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ impl<'a> FmtStrs<'a> {
171171

172172
let pairs = fields.iter().zip(values);
173173
let mut strs = pairs.map(|(f, v)| format!(",{},\"{}\"", f, escape(
174-
if *f == "qualname" && v.len() > 0 {
174+
if *f == "qualname" {
175175
let mut n = self.krate.clone();
176176
n.push_str("::");
177177
n.push_str(v);

branches/try/src/librustc_trans/save/span_utils.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,7 @@ impl<'a> SpanUtils<'a> {
293293
if ts.tok == token::Eof {
294294
return None
295295
} else {
296+
println!("found keyword: {} at {}", ts, ts.sp);
296297
return self.make_sub_span(span, Some(ts.sp));
297298
}
298299
}

branches/try/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)