One example is the is_sized method on Ty. Internally it creates a tcx.at(span), when it could simply be taking exactly that TyCtxtAt as an argument. In miri I had to write ty.is_sized(tcx.tcx, param_env, tcx.span) which just feels a little riddiculous (taking apart the TyCtxtAt, just to have the method construct it back).
There's probably many other similar methods and functions that should be taking a TyCtxtAt
One example is the
is_sizedmethod onTy. Internally it creates atcx.at(span), when it could simply be taking exactly thatTyCtxtAtas an argument. In miri I had to writety.is_sized(tcx.tcx, param_env, tcx.span)which just feels a little riddiculous (taking apart theTyCtxtAt, just to have the method construct it back).There's probably many other similar methods and functions that should be taking a
TyCtxtAt