diff options
Diffstat (limited to 'library/core/src')
| -rw-r--r-- | library/core/src/alloc/mod.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/library/core/src/alloc/mod.rs b/library/core/src/alloc/mod.rs index 045eb58d013..9c2a0146e2c 100644 --- a/library/core/src/alloc/mod.rs +++ b/library/core/src/alloc/mod.rs @@ -342,7 +342,10 @@ pub unsafe trait Allocator { /// /// The returned adaptor also implements `Allocator` and will simply borrow this. #[inline(always)] - fn by_ref(&self) -> &Self { + fn by_ref(&self) -> &Self + where + Self: Sized, + { self } } |
