[ty] Implement the legacy PEP-484 convention for indicating positional-only parameters (#20248)

Co-authored-by: Carl Meyer <carl@astral.sh>
This commit is contained in:
Alex Waygood
2025-09-05 17:56:06 +01:00
committed by GitHub
parent eb6154f792
commit 5d52902e18
17 changed files with 376 additions and 150 deletions

View File

@@ -49,6 +49,12 @@ pub struct AstNodeRef<T> {
_node: PhantomData<T>,
}
impl<T> AstNodeRef<T> {
pub(crate) fn index(&self) -> NodeIndex {
self.index
}
}
impl<T> AstNodeRef<T>
where
T: HasNodeIndex + Ranged + PartialEq + Debug,