Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion crates/ra_hir_expand/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ pub trait Diagnostic: Any + Send + Sync + fmt::Debug + 'static {

pub trait AstDiagnostic {
type AST;
fn ast(&self, db: &impl AstDatabase) -> Self::AST;
fn ast(&self, db: &dyn AstDatabase) -> Self::AST;
}

impl dyn Diagnostic {
Expand Down
10 changes: 5 additions & 5 deletions crates/ra_hir_ty/src/diagnostics.rs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ impl Diagnostic for NoSuchField {
impl AstDiagnostic for NoSuchField {
type AST = ast::RecordField;

fn ast(&self, db: &impl AstDatabase) -> Self::AST {
fn ast(&self, db: &dyn AstDatabase) -> Self::AST {
let root = db.parse_or_expand(self.source().file_id).unwrap();
let node = self.source().value.to_node(&root);
ast::RecordField::cast(node).unwrap()
Expand Down Expand Up @@ -65,7 +65,7 @@ impl Diagnostic for MissingFields {
impl AstDiagnostic for MissingFields {
type AST = ast::RecordFieldList;

fn ast(&self, db: &impl AstDatabase) -> Self::AST {
fn ast(&self, db: &dyn AstDatabase) -> Self::AST {
let root = db.parse_or_expand(self.source().file_id).unwrap();
let node = self.source().value.to_node(&root);
ast::RecordFieldList::cast(node).unwrap()
Expand Down Expand Up @@ -135,7 +135,7 @@ impl Diagnostic for MissingOkInTailExpr {
impl AstDiagnostic for MissingOkInTailExpr {
type AST = ast::Expr;

fn ast(&self, db: &impl AstDatabase) -> Self::AST {
fn ast(&self, db: &dyn AstDatabase) -> Self::AST {
let root = db.parse_or_expand(self.file).unwrap();
let node = self.source().value.to_node(&root);
ast::Expr::cast(node).unwrap()
Expand Down Expand Up @@ -163,7 +163,7 @@ impl Diagnostic for BreakOutsideOfLoop {
impl AstDiagnostic for BreakOutsideOfLoop {
type AST = ast::Expr;

fn ast(&self, db: &impl AstDatabase) -> Self::AST {
fn ast(&self, db: &dyn AstDatabase) -> Self::AST {
let root = db.parse_or_expand(self.file).unwrap();
let node = self.source().value.to_node(&root);
ast::Expr::cast(node).unwrap()
Expand Down Expand Up @@ -191,7 +191,7 @@ impl Diagnostic for MissingUnsafe {
impl AstDiagnostic for MissingUnsafe {
type AST = ast::Expr;

fn ast(&self, db: &impl AstDatabase) -> Self::AST {
fn ast(&self, db: &dyn AstDatabase) -> Self::AST {
let root = db.parse_or_expand(self.source().file_id).unwrap();
let node = self.source().value.to_node(&root);
ast::Expr::cast(node).unwrap()
Expand Down