Add documentation on skip_binder on how to get &T from &EarlyBinder<T>
This commit is contained in:
parent
c40e9cc7ca
commit
c29c212f8d
@ -586,6 +586,9 @@ pub fn rebind<U>(&self, value: U) -> EarlyBinder<U> {
|
|||||||
/// arguments of an `FnSig`). Otherwise, consider using
|
/// arguments of an `FnSig`). Otherwise, consider using
|
||||||
/// [`subst_identity`](EarlyBinder::subst_identity).
|
/// [`subst_identity`](EarlyBinder::subst_identity).
|
||||||
///
|
///
|
||||||
|
/// To skip the binder on `x: &EarlyBinder<T>` to obtain `&T`, leverage
|
||||||
|
/// [`EarlyBinder::as_ref`](EarlyBinder::as_ref): `x.as_ref().skip_binder()`.
|
||||||
|
///
|
||||||
/// See also [`Binder::skip_binder`](super::Binder::skip_binder), which is
|
/// See also [`Binder::skip_binder`](super::Binder::skip_binder), which is
|
||||||
/// the analogous operation on [`super::Binder`].
|
/// the analogous operation on [`super::Binder`].
|
||||||
pub fn skip_binder(self) -> T {
|
pub fn skip_binder(self) -> T {
|
||||||
|
Loading…
Reference in New Issue
Block a user