@Oli I applied you
walk_array/visit_array suggestion. I suppose I could do something similar for structs. Not sure yet whether I can reach the API you suggested.
I think you forgot to push
not "forgot", still doing the 2nd half ;)
do tell me once my suggestions are getting out of hand! You have a clearer picture of what it's needed for
I have no idea what I am doing^^
I originally thought I couldn't write a "normal" visitor
but that was before I had two traits (
now that I do, it's getting better. But I still don't think I can do your
visit_array(impl Iterator). that's no loss though.
or maybe I can, but that will be one step further down the refactoring of this^^
it's at least compiling again now :)
@Oli pushed something
now to see if we can smuggle an iterator into there
no reason to make that specific to arrays though, I think.
visit_aggregate(impl Iterator) has a nice ring to it :D
woah I have no idea why the borrow checker accepts this^^
the iterator captures some data, but seemingly little enough that the lifetimes still work out. crazy.
hm. but for general aggregates I do not think I can make this work... the iterator may need to access memory to determine size&align of a DST
@Oli I added a commit to this PR that is needed to make the visitor usable in miri where I need it... let me know if you want me to put that in a separate PR instead
Nah, it's fine to include it here
dang I need a read-only visitor as well...
or I need to make everything that might execute a
Deref projection take
isn't purely read-only hard because of
no it's also because I later want to write another visitor that actually changes stuff
anyway, you can do that by using a macro like in
walks over a value and changes all the tag of pointers in there
force_allocation is not even called any more
the other annoying one is
&mut because... okay I guess that's because
force_allocation. the alternative would be for
Place::Local to also have an offset or something similarly horrible
we used to have this... for a short time
let's not repeat that
maybe you can only visit
MPlaceTy then. I dont want to also make THAT mut-polymorphic
force_allocate if you want to visit a
(which retagging will do)
okay pushed a mut-polymorphic version. it's not as bad as I thought -- though it would be nicer if we could do it without macros
I am getting a lifetime error that I dont understand at all... suddenly now that I use
'tcxin argument position in the stacked borrow extension trait, it complains. but other extension traits do that, too...
oh got it
some of the other types had hidden lifetimes
when are we getting mandatory
When I'm done cleaning up the compiler :P
okay, so never then :P