diff options
| author | bors <bors@rust-lang.org> | 2019-12-03 13:21:03 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2019-12-03 13:21:03 +0000 |
| commit | f577b0ef6e637ab7a6095cdfe0b51fa3faf97050 (patch) | |
| tree | 3acfc5e36ad8991bf613d5b85e3274c816a8b970 /src/libcore | |
| parent | 7d808659cdc6c979a992fe3db345c0cfb53d973e (diff) | |
| parent | bce77980a2611da10b42dbd8a672c8cd17f79a94 (diff) | |
| download | rust-f577b0ef6e637ab7a6095cdfe0b51fa3faf97050.tar.gz rust-f577b0ef6e637ab7a6095cdfe0b51fa3faf97050.zip | |
Auto merge of #66982 - Centril:rollup-yq2281i, r=Centril
Rollup of 6 pull requests Successful merges: - #66148 (Show the sign for signed ops on `exact_div`) - #66651 (Add `enclosing scope` parameter to `rustc_on_unimplemented`) - #66904 (Adding docs for keyword match, move) - #66935 (syntax: Unify macro and attribute arguments in AST) - #66941 (Remove `ord` lang item) - #66967 (Remove hack for top-level or-patterns in match checking) Failed merges: r? @ghost
Diffstat (limited to 'src/libcore')
| -rw-r--r-- | src/libcore/cmp.rs | 1 | ||||
| -rw-r--r-- | src/libcore/ops/try.rs | 7 |
2 files changed, 4 insertions, 4 deletions
diff --git a/src/libcore/cmp.rs b/src/libcore/cmp.rs index eea3dc39d34..a5f355cd9a7 100644 --- a/src/libcore/cmp.rs +++ b/src/libcore/cmp.rs @@ -534,7 +534,6 @@ impl<T: Ord> Ord for Reverse<T> { /// } /// } /// ``` -#[lang = "ord"] #[doc(alias = "<")] #[doc(alias = ">")] #[doc(alias = "<=")] diff --git a/src/libcore/ops/try.rs b/src/libcore/ops/try.rs index 4f4652084a8..a748ee87ef9 100644 --- a/src/libcore/ops/try.rs +++ b/src/libcore/ops/try.rs @@ -5,19 +5,20 @@ /// extracting those success or failure values from an existing instance and /// creating a new instance from a success or failure value. #[unstable(feature = "try_trait", issue = "42327")] -#[rustc_on_unimplemented( +#[cfg_attr(not(bootstrap), rustc_on_unimplemented( on(all( any(from_method="from_error", from_method="from_ok"), from_desugaring="QuestionMark"), message="the `?` operator can only be used in {ItemContext} \ that returns `Result` or `Option` \ (or another type that implements `{Try}`)", -label="cannot use the `?` operator in {ItemContext} that returns `{Self}`"), +label="cannot use the `?` operator in {ItemContext} that returns `{Self}`", +enclosing_scope="this function should return `Result` or `Option` to accept `?`"), 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}`") -)] +))] #[doc(alias = "?")] pub trait Try { /// The type of this value when viewed as successful. |
