Sort out body-less function argument names wrt incremental recompilation. #38501
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.
The
x
andy
intrait 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 theMetaData
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?) fromrustc
's HIR, but that will take some effort to reach.The text was updated successfully, but these errors were encountered: