mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-26 08:44:35 +00:00
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 @@ impl<T> EarlyBinder<T> {
|
||||
/// 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 {
|
||||
|
Loading…
Reference in New Issue
Block a user