Add documentation on skip_binder on how to get &T from &EarlyBinder<T>
This commit is contained in:
parent
c40e9cc7ca
commit
c29c212f8d
1 changed files with 3 additions and 0 deletions
|
@ -586,6 +586,9 @@ impl<T> EarlyBinder<T> {
|
||||||
/// 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…
Add table
Add a link
Reference in a new issue