Some clarification on taking a reference from a return value #1386
Unanswered
sirlan-ff00ff
asked this question in
Q&A
Replies: 1 comment
|
Hi there! This is another manifestation of the same bug reported by Ryan at #1374, fixed at #1375, releasing this weekend. The checker was looking for a writable place behind the |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
with this following code (in lisette 0.12.0)
it gives the following error
Which makes me wonder, why does it consider the the
&A.n()to not be mutable, and if there is a way to make it read as mutable, as lisette doesn't have a&mut, and trying to write the type or usingaswill also be errorsAlthough doing
seems valid, but looks like a hack
Is the intended way to prefer having the function itself return a
mut Ref<A>and discouraging taking the reference of return values? if so would be nice to have a specific hint about thatAll reactions