Link
Another way to fix this
macro_rules! make_self_mutable {
($i:ident) => {let mut $i = self;};
}
is
macro_rules! make_self_mutable {
($i:ident, $v:ident) => {let mut $i = $v;};
}
(playground)
And I think the section lacks a conclusion of when self is
- matched as a
ident: always?
- matched as a
pat: never?
- hygiened as a keyword/identifier: as a keyword unless the incoming context suggests otherwise?
and went on to talk about a lot of failing solutions while the essence of the problem seems to be with contextual matching of self as ident
Link
Another way to fix this
is
(playground)
And I think the section lacks a conclusion of when
selfisident: always?pat: never?and went on to talk about a lot of failing solutions while the essence of the problem seems to be with contextual matching of
selfasident