-
Notifications
You must be signed in to change notification settings - Fork 12.8k
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
[goal] modifying private method in impl should not require users of public methods to recompile #37121
Comments
There are test cases checked in that reference this issue with |
Does this goal apply to methods using struct S;
impl S {
pub fn public() -> impl Clone {
S::private()
}
fn private() -> impl Clone {
0u8
}
} |
To be clear, this is about goals for incremental recompilation? |
No, clearly not. I didn't mean this in a blanket way ("no possible change!"). But I meant "most of the time."
right. |
@petrochenkov but good point, that'd make a nice test case :) |
…=michaelwoerister add test case for changing private methods The goal of this test case is to ensure we are getting the reuse we expect. This targets a particular change where we modify the body of a private inherent method defined on a struct, and looks at different ways we can use that struct. It checks for when type-checking would be needed as well as the actual reuse achieved. cc rust-lang#37121 r? @michaelwoerister
…=michaelwoerister add test case for changing private methods The goal of this test case is to ensure we are getting the reuse we expect. This targets a particular change where we modify the body of a private inherent method defined on a struct, and looks at different ways we can use that struct. It checks for when type-checking would be needed as well as the actual reuse achieved. cc rust-lang#37121 r? @michaelwoerister
One of the goals for the first alpha is that if you change the body of a private, inherent method, it should not cause the callers of public methods to recompile, nor to require type-checking.
Currently, however, it does. There are two reasons for this. Fixing either of these would fix the immediate problem described in this issue. Fixing both would be ideal.
The text was updated successfully, but these errors were encountered: