Skip to content

Commit 77ff866

Browse files
committed
---
yaml --- r: 60501 b: refs/heads/auto c: e0b1bdc h: refs/heads/master i: 60499: 2cfe183 v: v3
1 parent 513b13b commit 77ff866

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 9f671698e6ac2666293298eb5234237a8033683f
17+
refs/heads/auto: e0b1bdca5b56a104d8c221cb3bbb7eb16b5fcec4
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/src/libcore/io.rs

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1561,13 +1561,55 @@ pub fn buffered_file_writer(path: &Path) -> Result<@Writer, ~str> {
15611561
// FIXME (#2004) it would be great if this could be a const
15621562
// FIXME (#2004) why are these different from the way stdin() is
15631563
// implemented?
1564+
1565+
1566+
/**
1567+
* Gives a `Writer` which allows you to write to the standard output.
1568+
*
1569+
* # Examples
1570+
* ~~~
1571+
* let stdout = core::io::stdout();
1572+
* stdout.write_str("hello\n");
1573+
* ~~~
1574+
*/
15641575
pub fn stdout() -> @Writer { fd_writer(libc::STDOUT_FILENO as c_int, false) }
1576+
1577+
/**
1578+
* Gives a `Writer` which allows you to write to standard error.
1579+
*
1580+
* # Examples
1581+
* ~~~
1582+
* let stderr = core::io::stderr();
1583+
* stderr.write_str("hello\n");
1584+
* ~~~
1585+
*/
15651586
pub fn stderr() -> @Writer { fd_writer(libc::STDERR_FILENO as c_int, false) }
15661587

1588+
/**
1589+
* Prints a string to standard output.
1590+
*
1591+
* This string will not have an implicit newline at the end. If you want
1592+
* an implicit newline, please see `println`.
1593+
*
1594+
* # Examples
1595+
* ~~~
1596+
* core::io::print("hello");
1597+
* ~~~
1598+
*/
15671599
pub fn print(s: &str) {
15681600
stdout().write_str(s);
15691601
}
15701602

1603+
/**
1604+
* Prints a string to standard output, followed by a newline.
1605+
*
1606+
* If you do not want an implicit newline, please see `print`.
1607+
*
1608+
* # Examples
1609+
* ~~~
1610+
* core::io::println("hello");
1611+
* ~~~
1612+
*/
15711613
pub fn println(s: &str) {
15721614
stdout().write_line(s);
15731615
}

0 commit comments

Comments
 (0)