diff options
| author | Ilija Tovilo <ilija.tovilo@me.com> | 2019-07-31 21:00:35 +0200 |
|---|---|---|
| committer | Ilija Tovilo <ilija.tovilo@me.com> | 2019-08-08 22:39:15 +0200 |
| commit | 3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a (patch) | |
| tree | 9d577f11fb6f00c835bf70b13d8a90e7934719e1 /src/librustc_data_structures | |
| parent | d4abb08be6c3a06a14e285396f5e3ef367584f77 (diff) | |
| download | rust-3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a.tar.gz rust-3a6a29b4ecfdb7f641ca699fcd66a09b4baaae6a.zip | |
Use associated_type_bounds where applicable - closes #61738
Diffstat (limited to 'src/librustc_data_structures')
| -rw-r--r-- | src/librustc_data_structures/lib.rs | 1 | ||||
| -rw-r--r-- | src/librustc_data_structures/owning_ref/mod.rs | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/src/librustc_data_structures/lib.rs b/src/librustc_data_structures/lib.rs index 8fb0ea0271b..9f103437d36 100644 --- a/src/librustc_data_structures/lib.rs +++ b/src/librustc_data_structures/lib.rs @@ -23,6 +23,7 @@ #![feature(core_intrinsics)] #![feature(integer_atomics)] #![feature(test)] +#![feature(associated_type_bounds)] #![cfg_attr(unix, feature(libc))] diff --git a/src/librustc_data_structures/owning_ref/mod.rs b/src/librustc_data_structures/owning_ref/mod.rs index ea9c5283aee..b835b1706b8 100644 --- a/src/librustc_data_structures/owning_ref/mod.rs +++ b/src/librustc_data_structures/owning_ref/mod.rs @@ -847,7 +847,9 @@ pub trait ToHandleMut { } impl<O, H> OwningHandle<O, H> - where O: StableAddress, O::Target: ToHandle<Handle = H>, H: Deref, +where + O: StableAddress<Target: ToHandle<Handle = H>>, + H: Deref, { /// Creates a new `OwningHandle` for a type that implements `ToHandle`. For types /// that don't implement `ToHandle`, callers may invoke `new_with_fn`, which accepts @@ -858,7 +860,9 @@ impl<O, H> OwningHandle<O, H> } impl<O, H> OwningHandle<O, H> - where O: StableAddress, O::Target: ToHandleMut<HandleMut = H>, H: DerefMut, +where + O: StableAddress<Target: ToHandleMut<HandleMut = H>>, + H: DerefMut, { /// Creates a new mutable `OwningHandle` for a type that implements `ToHandleMut`. pub fn new_mut(o: O) -> Self { |
