diff options
| author | bors <bors@rust-lang.org> | 2021-05-18 20:50:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2021-05-18 20:50:01 +0000 |
| commit | 4e3e6db011c5b482d2bef8ba02274657f93b5e0d (patch) | |
| tree | 18c4d91304ab931792236935417dfe51ad998a7a /library/alloc/src | |
| parent | 491cf5561efb1f5ff33c3234ccd0bc5cacbebe3e (diff) | |
| parent | e2edee4da07032de72ac930df1453780dbe73f3b (diff) | |
| download | rust-4e3e6db011c5b482d2bef8ba02274657f93b5e0d.tar.gz rust-4e3e6db011c5b482d2bef8ba02274657f93b5e0d.zip | |
Auto merge of #84767 - scottmcm:try_trait_actual, r=lcnr
Implement the new desugaring from `try_trait_v2` ~~Currently blocked on https://github.com/rust-lang/rust/issues/84782, which has a PR in https://github.com/rust-lang/rust/pull/84811~~ Rebased atop that fix. `try_trait_v2` tracking issue: https://github.com/rust-lang/rust/issues/84277 Unfortunately this is already touching a ton of things, so if you have suggestions for good ways to split it up, I'd be happy to hear them. (The combination between the use in the library, the compiler changes, the corresponding diagnostic differences, even MIR tests mean that I don't really have a great plan for it other than trying to have decently-readable commits. r? `@ghost` ~~(This probably shouldn't go in during the last week before the fork anyway.)~~ Fork happened.
Diffstat (limited to 'library/alloc/src')
| -rw-r--r-- | library/alloc/src/collections/vec_deque/iter.rs | 4 | ||||
| -rw-r--r-- | library/alloc/src/lib.rs | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/library/alloc/src/collections/vec_deque/iter.rs b/library/alloc/src/collections/vec_deque/iter.rs index e4cfb3acdfd..f3eb228c9e3 100644 --- a/library/alloc/src/collections/vec_deque/iter.rs +++ b/library/alloc/src/collections/vec_deque/iter.rs @@ -66,7 +66,7 @@ impl<'a, T> Iterator for Iter<'a, T> { where Self: Sized, F: FnMut(B, Self::Item) -> R, - R: Try<Ok = B>, + R: Try<Output = B>, { let (mut iter, final_res); if self.tail <= self.head { @@ -140,7 +140,7 @@ impl<'a, T> DoubleEndedIterator for Iter<'a, T> { where Self: Sized, F: FnMut(B, Self::Item) -> R, - R: Try<Ok = B>, + R: Try<Output = B>, { let (mut iter, final_res); if self.tail <= self.head { diff --git a/library/alloc/src/lib.rs b/library/alloc/src/lib.rs index 66b1036f2ab..3bc376482e9 100644 --- a/library/alloc/src/lib.rs +++ b/library/alloc/src/lib.rs @@ -140,7 +140,8 @@ #![feature(maybe_uninit_extra, maybe_uninit_slice, maybe_uninit_uninit_array)] #![feature(alloc_layout_extra)] #![feature(trusted_random_access)] -#![feature(try_trait)] +#![cfg_attr(bootstrap, feature(try_trait))] +#![cfg_attr(not(bootstrap), feature(try_trait_v2))] #![feature(min_type_alias_impl_trait)] #![feature(associated_type_bounds)] #![feature(slice_group_by)] |
