The function a turbofish wraps: `s.get:: ` → `s.get`, `helper:: ` → `helper`; any other callee as is.
(func: Node<'_>)
| 1652 | /// The function a turbofish wraps: `s.get::<u32>` → `s.get`, |
| 1653 | /// `helper::<u8>` → `helper`; any other callee as is. |
| 1654 | fn unwrap_generic_function(func: Node<'_>) -> Node<'_> { |
| 1655 | if func.kind() == "generic_function" { |
| 1656 | func.child_by_field_name("function").unwrap_or(func) |
| 1657 | } else { |
| 1658 | func |
| 1659 | } |
| 1660 | } |
| 1661 | |
| 1662 | /// The most links a receiver chain is kept with (receiver_chain). |
| 1663 | const RECEIVER_CHAIN_MAX_LINKS: usize = 16; |