File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -24,6 +24,10 @@ mod local;
2424mod ref_;
2525
2626pub 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 ;
2831#[ allow( deprecated) ]
2932pub 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 {
8080 }
8181}
8282
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.
8489unsafe impl < ' rf , T > AllocRef for & ' rf T
8590 where T : LocalAlloc < ' rf >
8691{
You can’t perform that action at this time.
0 commit comments