Skip to content

Commit c7d545e

Browse files
committed
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.
2 parents d58aecb + cddbb6a commit c7d545e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/libcore/ops.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -787,7 +787,7 @@ impl<'a, Sized? T> Deref<T> for &'a mut T {
787787
/// }
788788
/// ```
789789
#[lang="deref_mut"]
790-
pub trait DerefMut<Sized? Result>: Deref<Result> {
790+
pub trait DerefMut<Sized? Result> for Sized? : Deref<Result> {
791791
/// The method called to mutably dereference a value
792792
fn deref_mut<'a>(&'a mut self) -> &'a mut Result;
793793
}

0 commit comments

Comments
 (0)