Keep SyntaxNodePtr::range private

This commit is contained in:
Igor Aleksanov 2020-10-08 09:27:38 +03:00
parent 66cea8cbaa
commit fb0ab9f745
4 changed files with 17 additions and 9 deletions

View file

@ -267,7 +267,7 @@ impl fmt::Display for CaseType {
#[derive(Debug)]
pub struct IncorrectCase {
pub file: HirFileId,
pub ident: SyntaxNodePtr,
pub ident: AstPtr<ast::Name>,
pub expected_case: CaseType,
pub ident_type: String,
pub ident_text: String,
@ -290,7 +290,7 @@ impl Diagnostic for IncorrectCase {
}
fn display_source(&self) -> InFile<SyntaxNodePtr> {
InFile::new(self.file, self.ident.clone())
InFile::new(self.file, self.ident.clone().into())
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {