Various functions taking a TyCtxt
and a Span
should be taking a TyCtxtAt
#48425
Labels
E-easy
Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
One example is the
is_sized
method onTy
. Internally it creates atcx.at(span)
, when it could simply be taking exactly thatTyCtxtAt
as 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
The text was updated successfully, but these errors were encountered: