pub trait IsDependentType {
// Required method
fn is_dependent_type(
&self,
db: &dyn SyntaxGroup,
identifiers: &[&str],
) -> bool;
}
Expand description
Helper trait for check syntactically if a type is dependent on a given identifier.
Required Methods§
Sourcefn is_dependent_type(&self, db: &dyn SyntaxGroup, identifiers: &[&str]) -> bool
fn is_dependent_type(&self, db: &dyn SyntaxGroup, identifiers: &[&str]) -> bool
Returns true if self
is dependent on identifier
in an internal type.
For example given identifier T
will return true for:
T
, Array<T>
, Array<Array<T>>
, (T, felt252)
.
Does not resolve paths, type aliases or named generics.