Prevent use of SyntaxNodePtr and AstPtr on mutable trees - #151
Conversation
|
There's an added There's also 2 tests added to ensure this panic behaviour, but I've had to make a custom impl of |
|
@Technohacker this appears conflicted now |
|
Ah I can get that resolved in a few mins |
Both of these use source code locations to identify the node, which can get invalidated by syntax tree mutations. This commit adds assertions to prevent their use, and adds documentation to inform users of the issue Fixes rust-analyzer#150
0df34b7 to
242ed0c
Compare
|
All done 👍 Also not sure what's going on with the CI, could you have a check? |
|
Hmm, it appears to fail in |
|
Well that's a fun new lint we trigger |
|
Thanks |
Both of these use source code locations to identify the node, which can get invalidated by syntax tree mutations. This commit adds assertions to prevent their use, and adds documentation to inform users of the issue
Fixes #150