Mark all extern statics FIXED, covering both static_tys[def_id] and addr_of_static[def_id]
Don't attempt to change static to static mut or vice versa if its addr_of_static is FIXED
Together, the last two prevent attempts to rewrite extern statics, which would otherwise panic because gen_static_rewrites isn't designed to handle extern statics (it expects the DefId to refer to a non-extern HIR item).
This has three parts:
gacx.static_tys
FIXED
, covering bothstatic_tys[def_id]
andaddr_of_static[def_id]
static
tostatic mut
or vice versa if itsaddr_of_static
is FIXEDTogether, the last two prevent attempts to rewrite extern statics, which would otherwise panic because
gen_static_rewrites
isn't designed to handle extern statics (it expects theDefId
to refer to a non-extern HIR item).