Skip to content

Commit e292b3c

Browse files
authored
Rollup merge of #56424 - mark-i-m:explain-raw, r=Centril
Mention raw-ident syntax According to #56419 (review) Blocked on #56419 r? @Centril
2 parents 705da41 + 1fca907 commit e292b3c

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/libcore/macros.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,10 @@ macro_rules! debug_assert_ne {
238238
/// with converting downstream errors.
239239
///
240240
/// The `?` operator was added to replace `try!` and should be used instead.
241+
/// Furthermore, `try` is a reserved word in Rust 2018, so if you must use
242+
/// it, you will need to use the [raw-identifier syntax][ris]: `r#try`.
243+
///
244+
/// [ris]: https://doc.rust-lang.org/nightly/rust-by-example/compatibility/raw_identifiers.html
241245
///
242246
/// `try!` matches the given [`Result`]. In case of the `Ok` variant, the
243247
/// expression has the value of the wrapped value.

0 commit comments

Comments
 (0)