I've just realize that it is extremely easy to use goto definition to open a file in the
~/.cargo directory and edit it. I've just use that to make one private field in the dependency public, and after
rm -rf ./target it just worked!
Doing that every time to
dbg! things in the third-party libraries :smile:
It is easy to forget to revert it again.
I think cargo should just mark everything read-only.
but how would I expose a private field to circumvent a safety invariant?
I've got an open bug in rustup that this is possible in libstd, I can't imagine the cargo folk aren't also aware of needing to close this :confused:
Yeah this is a problem :( I filed this for LSP awhile ago https://github.com/microsoft/language-server-protocol/issues/1150
On the r-a side, we could at least refuse to rename definitions inside library sources
I just ran into this and accidentally edited the cargo crate in my cache.