|
|
|
|
|
by kccqzy
248 days ago
|
|
Consider this simple C code: void inc(int* a, int* b) {
*a += 1; *b += 2;
}
Are you adding one to an integer and adding two to another integer, or are you adding three to a single integer?In other words are the two pointers actually pointing to the same variable? There's no way to know. When you select one pointer, should the other also be highlighted? But in Rust you cannot have two mutable references to a single variable so the above cannot happen. Variable renaming is a much much simpler task than this. Of course it is archaic and has existed for a long time. |
|
This statement is incorrect. You can't have pointers to a variable. You can have pointers to a memory address, and most people would be fine with a tool that is correct up to the level of being unable to differentiate that.
This is a disingenuous redefinition of what the GP is looking for in order to shill Rust.