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

Audit uses of FnCtxt::impl_self_ty #69489

Closed
Centril opened this issue Feb 26, 2020 · 5 comments · Fixed by #71087
Closed

Audit uses of FnCtxt::impl_self_ty #69489

Centril opened this issue Feb 26, 2020 · 5 comments · Fixed by #71087
Labels
A-typesystem Area: The type system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@Centril
Copy link
Contributor

Centril commented Feb 26, 2020

Context: #69340 (comment)

cc @eddyb

@Centril Centril added A-typesystem Area: The type system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Feb 26, 2020
@eddyb
Copy link
Member

eddyb commented Feb 26, 2020

IMO it should be possible to fully remove (see comment linked by @Centril).

If it was more widely used (or if removing it doesn't seem to work), it would be important to rename to have instantiate in the name to indicate it introduces inference variables.

@JohnTitor
Copy link
Member

JohnTitor commented Mar 18, 2020

I just tried removing impl_self_ty fully, it seems to work well: https://github.com/JohnTitor/rust/tree/impl-self-ty

Could I submit this patch?

@Centril
Copy link
Contributor Author

Centril commented Mar 18, 2020

cc also @nikomatsakis ^---
Error messages are improved at least. :)

@eddyb
Copy link
Member

eddyb commented Mar 18, 2020

@JohnTitor In suggestions you probably don't need normalize_ty either, AFAICT the type is just used to describe the impl to the user.

@JohnTitor
Copy link
Member

@eddyb You're right, thanks! I'd like to submit a PR if you could do further reviews :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-typesystem Area: The type system C-enhancement Category: An issue proposing an enhancement or a PR with one. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants