mirror of
https://github.com/astral-sh/ruff.git
synced 2025-08-09 21:28:21 +00:00
Make the Nodes
vector generic on node type (#6328)
This commit is contained in:
parent
6da527170f
commit
8a5bc93fdd
3 changed files with 35 additions and 27 deletions
|
@ -31,7 +31,7 @@ pub struct SemanticModel<'a> {
|
|||
module_path: Option<&'a [String]>,
|
||||
|
||||
/// Stack of all visited statements.
|
||||
pub stmts: Nodes<'a>,
|
||||
pub stmts: Nodes<'a, Stmt>,
|
||||
|
||||
/// The identifier of the current statement.
|
||||
stmt_id: Option<NodeId>,
|
||||
|
@ -129,7 +129,7 @@ impl<'a> SemanticModel<'a> {
|
|||
Self {
|
||||
typing_modules,
|
||||
module_path: module.path(),
|
||||
stmts: Nodes::default(),
|
||||
stmts: Nodes::<Stmt>::default(),
|
||||
stmt_id: None,
|
||||
exprs: Vec::default(),
|
||||
scopes: Scopes::default(),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue