Skip to content

Commit 4ab3a3f

Browse files
committed
---
yaml --- r: 73252 b: refs/heads/dist-snap c: 9283dfe h: refs/heads/master v: v3
1 parent 5196c50 commit 4ab3a3f

File tree

2 files changed

+45
-1
lines changed

2 files changed

+45
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/ndm: f3868061cd7988080c30d6d5bf352a5a5fe2460b
88
refs/heads/try2: 147ecfdd8221e4a4d4e090486829a06da1e0ca3c
99
refs/heads/incoming: b50030718cf28f2a5a81857a26b57442734fe854
10-
refs/heads/dist-snap: 7396f7f004667610455557e7872330b59fafc79a
10+
refs/heads/dist-snap: 9283dfe0b4dfbad176821ed93df6d519ad58423a
1111
refs/tags/release-0.2: c870d2dffb391e14efb05aa27898f1f6333a9596
1212
refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
1313
refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0

branches/dist-snap/src/libcore/io.rs

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1571,13 +1571,57 @@ pub fn buffered_file_writer(path: &Path) -> Result<@Writer, ~str> {
15711571
// FIXME (#2004) it would be great if this could be a const
15721572
// FIXME (#2004) why are these different from the way stdin() is
15731573
// implemented?
1574+
1575+
1576+
/**
1577+
* Gives a `Writer` which allows you to write to the standard output.
1578+
*
1579+
* # Examples
1580+
* ~~~
1581+
* let stdout = core::io::stdout();
1582+
* stdout.write_str("hello\n");
1583+
* ~~~
1584+
*/
15741585
pub fn stdout() -> @Writer { fd_writer(libc::STDOUT_FILENO as c_int, false) }
1586+
1587+
/**
1588+
* Gives a `Writer` which allows you to write to standard error.
1589+
*
1590+
* # Examples
1591+
* ~~~
1592+
* let stderr = core::io::stderr();
1593+
* stderr.write_str("hello\n");
1594+
* ~~~
1595+
*/
15751596
pub fn stderr() -> @Writer { fd_writer(libc::STDERR_FILENO as c_int, false) }
15761597

1598+
/**
1599+
* Prints a string to standard output.
1600+
*
1601+
* This string will not have an implicit newline at the end. If you want
1602+
* an implicit newline, please see `println`.
1603+
*
1604+
* # Examples
1605+
* ~~~
1606+
* // print is imported into the prelude, and so is always available.
1607+
* print("hello");
1608+
* ~~~
1609+
*/
15771610
pub fn print(s: &str) {
15781611
stdout().write_str(s);
15791612
}
15801613

1614+
/**
1615+
* Prints a string to standard output, followed by a newline.
1616+
*
1617+
* If you do not want an implicit newline, please see `print`.
1618+
*
1619+
* # Examples
1620+
* ~~~
1621+
* // println is imported into the prelude, and so is always available.
1622+
* println("hello");
1623+
* ~~~
1624+
*/
15811625
pub fn println(s: &str) {
15821626
stdout().write_line(s);
15831627
}

0 commit comments

Comments
 (0)