The function a turbofish wraps: `s.get:: ` → `s.get`, `helper:: ` → `helper`; any other callee as is.
(func: Node<'_>)
| 1678 | /// The function a turbofish wraps: `s.get::<u32>` → `s.get`, |
| 1679 | /// `helper::<u8>` → `helper`; any other callee as is. |
| 1680 | fn unwrap_generic_function(func: Node<'_>) -> Node<'_> { |
| 1681 | if func.kind() == "generic_function" { |
| 1682 | func.child_by_field_name("function").unwrap_or(func) |
| 1683 | } else { |
| 1684 | func |
| 1685 | } |
| 1686 | } |
| 1687 | |
| 1688 | /// The most links a receiver chain is kept with (receiver_chain). |
| 1689 | const RECEIVER_CHAIN_MAX_LINKS: usize = 16; |