pub(super) struct DeclValidator<'a> {
db: &'a dyn HirDatabase,
pub(super) sink: Vec<IncorrectCase>,
}Fields§
§db: &'a dyn HirDatabase§sink: Vec<IncorrectCase>Implementations§
Source§impl<'a> DeclValidator<'a>
impl<'a> DeclValidator<'a>
pub(super) fn new(db: &'a dyn HirDatabase) -> DeclValidator<'a>
pub(super) fn validate_item(&mut self, item: ModuleDefId)
fn validate_adt(&mut self, adt: AdtId)
fn validate_module(&mut self, module_id: ModuleId)
fn validate_trait(&mut self, trait_id: TraitId)
fn validate_func(&mut self, func: FunctionId)
Sourcefn validate_func_body(&mut self, func: FunctionId)
fn validate_func_body(&mut self, func: FunctionId)
Check incorrect names for patterns inside the function body. This includes function parameters except for trait implementation associated functions.
fn edition(&self, id: impl HasModule) -> Edition
fn validate_struct(&mut self, struct_id: StructId)
Sourcefn validate_struct_fields(&mut self, struct_id: StructId)
fn validate_struct_fields(&mut self, struct_id: StructId)
Check incorrect names for struct fields.
fn validate_union(&mut self, union_id: UnionId)
Sourcefn validate_union_fields(&mut self, union_id: UnionId)
fn validate_union_fields(&mut self, union_id: UnionId)
Check incorrect names for union fields.
fn validate_enum(&mut self, enum_id: EnumId)
Sourcefn validate_enum_variants(&mut self, enum_id: EnumId)
fn validate_enum_variants(&mut self, enum_id: EnumId)
Check incorrect names for enum variants.
Sourcefn validate_enum_variant_fields(&mut self, variant_id: EnumVariantId)
fn validate_enum_variant_fields(&mut self, variant_id: EnumVariantId)
Check incorrect names for fields of enum variant.
fn validate_const(&mut self, const_id: ConstId)
fn validate_static(&mut self, static_id: StaticId)
fn validate_type_alias(&mut self, type_alias_id: TypeAliasId)
fn create_incorrect_case_diagnostic_for_item_name<N, S, L>( &mut self, item_id: L, name: &Name, expected_case: CaseType, ident_type: IdentType, )
fn create_incorrect_case_diagnostic_for_ast_node<T>(
&mut self,
replacement: Replacement,
file_id: HirFileId,
node: &T,
ident_type: IdentType,
)where
T: AstNode + HasName + Debug,
fn is_trait_impl_container(&self, container_id: ItemContainerId) -> bool
Auto Trait Implementations§
impl<'a> Freeze for DeclValidator<'a>
impl<'a> !RefUnwindSafe for DeclValidator<'a>
impl<'a> !Send for DeclValidator<'a>
impl<'a> !Sync for DeclValidator<'a>
impl<'a> Unpin for DeclValidator<'a>
impl<'a> UnsafeUnpin for DeclValidator<'a>
impl<'a> !UnwindSafe for DeclValidator<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T, R> CollectAndApply<T, R> for T
impl<T, R> CollectAndApply<T, R> for T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more