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

Sort out body-less function argument names wrt incremental recompilation. #38501

Closed
eddyb opened this issue Dec 20, 2016 · 2 comments
Closed
Labels
A-incr-comp Area: Incremental compilation C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Comments

@eddyb
Copy link
Member

eddyb commented Dec 20, 2016

The x and y in trait Foo { fn bar(x: T, y: U); }, for example, are stored outside of any isolation, as such function declarations don't have bodies holding the arguments (see #38449), for this purpose.

Right now they're primarily used by rustdoc, which even loads them across crates. #38449 asserts that the cross-crate usage always happens without incremental recompilation and doesn't track the MetaData edge for them in neither the original crate or the one observing these "argument names".

OTOH, the same-crate usage is virtually impossible to prevent, accidentally, which leads to the implementation in #38449 hashing "argument names" as part of the definition's signature, for now.

Also, ideally, tools like rustdoc would have their own infrastructure (which save-analysis aims to be), potentially quite different (divergent even?) from rustc's HIR, but that will take some effort to reach.

@steveklabnik steveklabnik added A-compiler T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Dec 20, 2016
@michaelwoerister michaelwoerister added the A-incr-comp Area: Incremental compilation label Dec 22, 2016
@Mark-Simulacrum Mark-Simulacrum added C-enhancement Category: An issue proposing an enhancement or a PR with one. C-cleanup Category: PRs that clean code up or issues documenting cleanup. and removed C-enhancement Category: An issue proposing an enhancement or a PR with one. labels Jul 26, 2017
@steveklabnik
Copy link
Member

Triage: no idea what the status of this ticket is, honestly.

@eddyb
Copy link
Member Author

eddyb commented Jan 16, 2020

Incremental queries made this sort of thing a non-problem a long time ago, I think.

@eddyb eddyb closed this as completed Jan 16, 2020
Aaron1011 added a commit to Aaron1011/rust that referenced this issue Aug 16, 2020
The call to `with_ignore` was added years ago, and should no longer be
necessary with the modern incremental query infrastructure.

I also removed a related FIXME comment for issue rust-lang#38501, which was
closed months ago.
bors added a commit to rust-lang-ci/rust that referenced this issue Aug 18, 2020
…eddyb

Don't use `dep_graph.with_ignore` when encoding fn param names

The call to `with_ignore` was added years ago, and should no longer be
necessary with the modern incremental query infrastructure.

I also removed a related FIXME comment for issue rust-lang#38501, which was
closed months ago.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-incr-comp Area: Incremental compilation C-cleanup Category: PRs that clean code up or issues documenting cleanup. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.
Projects
None yet
Development

No branches or pull requests

4 participants