bors[bot] 0ee945e289
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>
2021-05-06 22:19:52 +00:00
..
2021-04-19 12:26:04 -07:00
2021-05-06 23:23:50 +02:00
2021-05-06 23:23:50 +02:00
2021-05-06 22:19:52 +00:00
2021-05-06 23:23:50 +02:00
2021-05-05 21:14:12 +00:00
2021-05-04 11:51:09 +00:00
2021-05-06 20:12:30 +03:00
2021-04-18 02:14:27 +00:00
2021-04-29 03:07:53 +02:00
2021-05-05 21:14:12 +00:00
2021-05-06 20:12:15 +03:00