@@ -910,8 +910,9 @@ impl<P, U> CoerceUnsized<Pin<U>> for Pin<P> where P: CoerceUnsized<U> {}
910
910
#[ stable( feature = "pin" , since = "1.33.0" ) ]
911
911
impl < P , U > DispatchFromDyn < Pin < U > > for Pin < P > where P : DispatchFromDyn < U > { }
912
912
913
- /// Constructs a <code>[Pin]<[&mut] T></code>, by pinning[^1] a `value: T` _locally_[^2]
914
- /// (≠ [in the heap][`Box::pin`]).
913
+ /// Constructs a <code>[Pin]<[&mut] T></code>, by pinning[^1] a `value: T` _locally_[^2].
914
+ ///
915
+ /// Unlike [`Box::pin`], this does not involve a heap allocation.
915
916
///
916
917
/// [^1]: If the (type `T` of the) given value does not implement [`Unpin`], then this
917
918
/// effectively pins the `value` in memory, where it will be unable to be moved.
@@ -1043,8 +1044,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
1043
1044
///
1044
1045
/// <details><summary>Error message</summary>
1045
1046
///
1046
- /// ```rust
1047
- /// # const _IGNORE: &str = stringify! {
1047
+ /// ```console
1048
1048
/// error[E0716]: temporary value dropped while borrowed
1049
1049
/// --> src/main.rs:9:28
1050
1050
/// |
@@ -1056,8 +1056,7 @@ impl<P, U> DispatchFromDyn<Pin<U>> for Pin<P> where P: DispatchFromDyn<U> {}
1056
1056
/// 11 | }; // <- Foo is dropped
1057
1057
/// | - temporary value is freed at the end of this statement
1058
1058
/// |
1059
- /// = note: consider using a let binding to create a longer lived value
1060
- /// # };
1059
+ /// = note: consider using a `let` binding to create a longer lived value
1061
1060
/// ```
1062
1061
///
1063
1062
/// </details>
0 commit comments