about summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Mansi <markm@cs.wisc.edu>2018-12-01 18:16:08 -0600
committerMark Mansi <markm@cs.wisc.edu>2018-12-03 13:05:04 -0600
commit9c8802dc01692cbb684b8759c083b71b27102c29 (patch)
treebd85a27297f3aef5137bffb28c3194f7b9b449c2
parent0c999ed132d67bf2520643e9bd619972cf3888ba (diff)
downloadrust-9c8802dc01692cbb684b8759c083b71b27102c29.tar.gz
rust-9c8802dc01692cbb684b8759c083b71b27102c29.zip
Explain raw identifer syntax
-rw-r--r--src/libcore/macros.rs2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libcore/macros.rs b/src/libcore/macros.rs
index 8b1855800c2..a7fd3a08b4a 100644
--- a/src/libcore/macros.rs
+++ b/src/libcore/macros.rs
@@ -238,6 +238,8 @@ macro_rules! debug_assert_ne {
 /// with converting downstream errors.
 ///
 /// The `?` operator was added to replace `try!` and should be used instead.
+/// Furthermore, `try` is a reserved word in Rust 2018, so if you must use
+/// it, you will need to use the raw-identifier syntax: `r#try`.
 ///
 /// `try!` matches the given [`Result`]. In case of the `Ok` variant, the
 /// expression has the value of the wrapped value.