Skip to content

Commit ad919c8

Browse files
committed
---
yaml --- r: 60511 b: refs/heads/auto c: 9283dfe h: refs/heads/master i: 60509: 32fbaae 60507: ca493fd 60503: de03ced 60495: d50700a 60479: ee81107 v: v3
1 parent df464dd commit ad919c8

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
@@ -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: 7396f7f004667610455557e7872330b59fafc79a
17+
refs/heads/auto: 9283dfe0b4dfbad176821ed93df6d519ad58423a
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

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