Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various functions taking a TyCtxt and a Span should be taking a TyCtxtAt #48425

Closed
oli-obk opened this issue Feb 22, 2018 · 2 comments · Fixed by #48651
Closed

Various functions taking a TyCtxt and a Span should be taking a TyCtxtAt #48425

oli-obk opened this issue Feb 22, 2018 · 2 comments · Fixed by #48651
Assignees
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.

Comments

@oli-obk
Copy link
Contributor

oli-obk commented Feb 22, 2018

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

@oli-obk oli-obk added T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. labels Feb 22, 2018
@PramodBisht
Copy link
Contributor

PramodBisht commented Feb 22, 2018

Can I take this one if no one is working on that ?

@oli-obk
Copy link
Contributor Author

oli-obk commented Feb 23, 2018

@PramodBisht it's all yours!

@PramodBisht PramodBisht self-assigned this Feb 28, 2018
PramodBisht added a commit to PramodBisht/rust that referenced this issue Mar 2, 2018
PramodBisht added a commit to PramodBisht/rust that referenced this issue Mar 4, 2018
Manishearth added a commit to Manishearth/rust that referenced this issue Mar 5, 2018
Fixed rust-lang#48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt`

Hi @oli-obk
I have done some code refactoring to fix rust-lang#48425, Please let me know if anything else is required on this.
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 7, 2018
Fixed rust-lang#48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt`

Hi @oli-obk
I have done some code refactoring to fix rust-lang#48425, Please let me know if anything else is required on this.
alexcrichton added a commit to alexcrichton/rust that referenced this issue Mar 7, 2018
Fixed rust-lang#48425 : Various functions taking a `TyCtxt` and a `Span` should be taking a `TyCtxtAt`

Hi @oli-obk
I have done some code refactoring to fix rust-lang#48425, Please let me know if anything else is required on this.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
2 participants