mirror of
https://github.com/astral-sh/ruff.git
synced 2025-10-02 14:52:01 +00:00
@no_type_check
support (#15122)
Co-authored-by: Carl Meyer <carl@astral.sh>
This commit is contained in:
parent
d4ee6abf4a
commit
0caab81d3d
8 changed files with 253 additions and 47 deletions
|
@ -43,7 +43,7 @@ impl<T> AstNodeRef<T> {
|
|||
}
|
||||
|
||||
/// Returns a reference to the wrapped node.
|
||||
pub fn node(&self) -> &T {
|
||||
pub const fn node(&self) -> &T {
|
||||
// SAFETY: Holding on to `parsed` ensures that the AST to which `node` belongs is still
|
||||
// alive and not moved.
|
||||
unsafe { self.node.as_ref() }
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue