File tree Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Expand file tree Collapse file tree 2 files changed +11
-2
lines changed Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ mod local;
24
24
mod ref_;
25
25
26
26
pub use crate :: layout:: { Layout , NonZeroLayout } ;
27
- pub use crate :: local:: { AllocTime , Allocation , LocalAlloc } ;
27
+ pub use crate :: local:: { AllocTime , LocalAlloc } ;
28
+ #[ deprecated="Use the name `LocalAllocation` instead" ]
29
+ pub use crate :: local:: Allocation ;
30
+ pub use crate :: local:: Allocation as LocalAllocation ;
28
31
#[ allow( deprecated) ]
29
32
pub use crate :: local:: Invariant ;
33
+ pub use crate :: ref_:: { AllocRef , Allocation as RefAllocation } ;
Original file line number Diff line number Diff line change @@ -80,7 +80,12 @@ impl Allocation {
80
80
}
81
81
}
82
82
83
- /// Note the
83
+ /// A reference is an `AllocRef`.
84
+ ///
85
+ /// Note the lifetime of the references is exactly the same as the lifetime of the trait. If the
86
+ /// reference outlived the parameter then the returned allocations would not live long enough.
87
+ /// Conversely, if the parameter outlived the lifetime then it would not be possible to construct
88
+ /// the reference necessary for the trait.
84
89
unsafe impl < ' rf , T > AllocRef for & ' rf T
85
90
where T : LocalAlloc < ' rf >
86
91
{
You can’t perform that action at this time.
0 commit comments