mirror of
https://github.com/rust-lang/rust.git
synced 2026-05-28 20:16:58 +03:00
rollup merge of #19520: csouth3/derefmut-unsized
Right now, `DerefMut` is not `for Sized?`, so you can't impl `DerefMut<T> for Foo` where `Foo` is unsized. However, there is no reason that it can't be `for Sized?`, so this pull request fixes the issue. Closes #19493.
This commit is contained in:
+1
-1
@@ -787,7 +787,7 @@ fn deref(&self) -> &T { *self }
|
||||
/// }
|
||||
/// ```
|
||||
#[lang="deref_mut"]
|
||||
pub trait DerefMut<Sized? Result>: Deref<Result> {
|
||||
pub trait DerefMut<Sized? Result> for Sized? : Deref<Result> {
|
||||
/// The method called to mutably dereference a value
|
||||
fn deref_mut<'a>(&'a mut self) -> &'a mut Result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user