diff options
| author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-06 22:19:52 +0000 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-06 22:19:52 +0000 |
| commit | 0ee945e289c438e87d4701401059e8c407710e7b (patch) | |
| tree | 6b16e28da049a1f627b26eda1a2595a6b3cd84cd /docs/dev/debugging.md | |
| parent | 6fccb152b4646877e38dc29dce1b0cd826eb6908 (diff) | |
| parent | 90a5dca0a2dbb858ee34eb7de06de8a1cad9e488 (diff) | |
| download | rust-0ee945e289c438e87d4701401059e8c407710e7b.tar.gz rust-0ee945e289c438e87d4701401059e8c407710e7b.zip | |
Merge #8280
8280: Borrow text of immutable syntax node r=iDawer a=iDawer In https://github.com/rust-analyzer/rowan/pull/101 `rowan::SyntaxNode::green` returns `Cow<'_, GreenNodeData>`. It returns borrow of green node of immutable syntax tree node. Using this we can return borrowed text from `ast::Name::text`. ~~However now it allocates in case of mutable syntax trees.~~ (see next comment) The idea comes from https://github.com/rust-analyzer/rowan/pull/100#issuecomment-809330325 Co-authored-by: Dawer <7803845+iDawer@users.noreply.github.com>
Diffstat (limited to 'docs/dev/debugging.md')
0 files changed, 0 insertions, 0 deletions
