mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
internal: add deref_mut to minicore
This commit is contained in:
parent
2980fd430d
commit
d2c9f3add1
3 changed files with 49 additions and 35 deletions
|
@ -13,6 +13,7 @@
|
|||
//! range:
|
||||
//! unsize: sized
|
||||
//! deref: sized
|
||||
//! deref_mut: deref
|
||||
//! coerce_unsized: unsize
|
||||
//! pin:
|
||||
//! future: pin
|
||||
|
@ -64,8 +65,15 @@ pub mod ops {
|
|||
type Target: ?Sized;
|
||||
fn deref(&self) -> &Self::Target;
|
||||
}
|
||||
// region:deref_mut
|
||||
#[lang = "deref_mut"]
|
||||
pub trait DerefMut: Deref {
|
||||
fn deref_mut(&mut self) -> &mut Self::Target;
|
||||
}
|
||||
// endregion:deref_mut
|
||||
}
|
||||
pub use self::deref::Deref;
|
||||
pub use self::deref::DerefMut; //:deref_mut
|
||||
// endregion:deref
|
||||
|
||||
// region:range
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue