about summary refs log tree commit diff
path: root/src/libcore
diff options
context:
space:
mode:
authorVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-07 13:02:05 +0300
committerVadim Petrochenkov <vadim.petrochenkov@gmail.com>2019-07-11 00:12:57 +0300
commitdcd30a4b175364ca1ee1efdcae701a23c5ff7d0b (patch)
treebda92f926da4cad9671855d921e773b6aef7225e /src/libcore
parent99c7432896bbfdab1f7f70f8d763cab5f3efe64a (diff)
downloadrust-dcd30a4b175364ca1ee1efdcae701a23c5ff7d0b.tar.gz
rust-dcd30a4b175364ca1ee1efdcae701a23c5ff7d0b.zip
hygiene: Fix wording of desugaring descriptions
Use variant names rather than descriptions for identifying desugarings in `#[rustc_on_unimplemented]`.
Both are highly unstable, but variant name is at least a single identifier.
Diffstat (limited to 'src/libcore')
-rw-r--r--src/libcore/ops/try.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs
index 9fa2c81954e..76fec1020f1 100644
--- a/src/libcore/ops/try.rs
+++ b/src/libcore/ops/try.rs
@@ -8,12 +8,12 @@
 #[rustc_on_unimplemented(
    on(all(
        any(from_method="from_error", from_method="from_ok"),
-       from_desugaring="?"),
+       from_desugaring="QuestionMark"),
       message="the `?` operator can only be used in a \
                function that returns `Result` or `Option` \
                (or another type that implements `{Try}`)",
       label="cannot use the `?` operator in a function that returns `{Self}`"),
-   on(all(from_method="into_result", from_desugaring="?"),
+   on(all(from_method="into_result", from_desugaring="QuestionMark"),
       message="the `?` operator can only be applied to values \
                that implement `{Try}`",
       label="the `?` operator cannot be applied to type `{Self}`")