mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-15 20:45:45 +03:00
Add documentation on skip_binder on how to get &T from &EarlyBinder<T>
This commit is contained in:
@@ -586,6 +586,9 @@ pub fn rebind<U>(&self, value: U) -> EarlyBinder<U> {
|
||||
/// arguments of an `FnSig`). Otherwise, consider using
|
||||
/// [`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
|
||||
/// the analogous operation on [`super::Binder`].
|
||||
pub fn skip_binder(self) -> T {
|
||||
|
||||
Reference in New Issue
Block a user