diff --git a/syntax/impls.rs b/syntax/impls.rs index acc99abd..a2ce05b2 100644 --- a/syntax/impls.rs +++ b/syntax/impls.rs @@ -1,7 +1,7 @@ use crate::syntax::{ExternFn, Receiver, Ref, Signature, Slice, Ty1, Type}; use std::hash::{Hash, Hasher}; use std::mem; -use std::ops::Deref; +use std::ops::{Deref, DerefMut}; impl Deref for ExternFn { type Target = Signature; @@ -11,6 +11,12 @@ impl Deref for ExternFn { } } +impl DerefMut for ExternFn { + fn deref_mut(&mut self) -> &mut Self::Target { + &mut self.sig + } +} + impl Hash for Type { fn hash(&self, state: &mut H) { mem::discriminant(self).hash(state);