about summary refs log tree commit diff
path: root/src/libstd/sys/windows
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2017-01-22 16:55:16 +0000
committerbors <bors@rust-lang.org>2017-01-22 16:55:16 +0000
commitb79081c2eb7fe789f428ffcd20f49549c7ca84ea (patch)
tree6312735bc66c44fcee2fb142fe73fad868af398c /src/libstd/sys/windows
parent9f705575452e04ce2d8cb88e5f5accdc4d54e650 (diff)
parent19724d34d2b223f940363cc07aa83a8a530f8093 (diff)
downloadrust-b79081c2eb7fe789f428ffcd20f49549c7ca84ea.tar.gz
rust-b79081c2eb7fe789f428ffcd20f49549c7ca84ea.zip
Auto merge of #38648 - utkarshkukreti:question-mark-in-libstd-documentation-examples, r=pnkfelix,steveklabnik,frewsxcvx
libstd: replace all `try!` with `?` in documentation examples

See #38644.

For the record, I used the following Perl one-liner and then manually fixed a couple of things it got wrong:

    $ perl -p -i -e 's#(///.*)try!\((.*)\)#$1$2?#' src/libstd/**/*.rs
Diffstat (limited to 'src/libstd/sys/windows')
-rw-r--r--src/libstd/sys/windows/ext/fs.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libstd/sys/windows/ext/fs.rs b/src/libstd/sys/windows/ext/fs.rs
index 7fc04ad69d6..c63dd8a47ca 100644
--- a/src/libstd/sys/windows/ext/fs.rs
+++ b/src/libstd/sys/windows/ext/fs.rs
@@ -257,7 +257,7 @@ impl MetadataExt for Metadata {
 /// use std::os::windows::fs;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// try!(fs::symlink_file("a.txt", "b.txt"));
+/// fs::symlink_file("a.txt", "b.txt")?;
 /// # Ok(())
 /// # }
 /// ```
@@ -278,7 +278,7 @@ pub fn symlink_file<P: AsRef<Path>, Q: AsRef<Path>>(src: P, dst: Q)
 /// use std::os::windows::fs;
 ///
 /// # fn foo() -> std::io::Result<()> {
-/// try!(fs::symlink_file("a", "b"));
+/// fs::symlink_file("a", "b")?;
 /// # Ok(())
 /// # }
 /// ```