Forward compat

This commit is contained in:
Aleksey Kladov 2020-04-11 00:27:00 +02:00
parent ca9a5dd165
commit c1244c853c
8 changed files with 25 additions and 26 deletions

View file

@ -21,7 +21,7 @@ impl Diagnostic for NoSuchField {
}
fn source(&self) -> InFile<SyntaxNodePtr> {
InFile { file_id: self.file, value: self.field.into() }
InFile { file_id: self.file, value: self.field.clone().into() }
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {
@ -45,7 +45,7 @@ impl Diagnostic for MissingFields {
buf
}
fn source(&self) -> InFile<SyntaxNodePtr> {
InFile { file_id: self.file, value: self.field_list.into() }
InFile { file_id: self.file, value: self.field_list.clone().into() }
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {
self
@ -78,7 +78,7 @@ impl Diagnostic for MissingPatFields {
buf
}
fn source(&self) -> InFile<SyntaxNodePtr> {
InFile { file_id: self.file, value: self.field_list.into() }
InFile { file_id: self.file, value: self.field_list.clone().into() }
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {
self
@ -97,7 +97,7 @@ impl Diagnostic for MissingMatchArms {
String::from("Missing match arm")
}
fn source(&self) -> InFile<SyntaxNodePtr> {
InFile { file_id: self.file, value: self.match_expr.into() }
InFile { file_id: self.file, value: self.match_expr.clone().into() }
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {
self
@ -115,7 +115,7 @@ impl Diagnostic for MissingOkInTailExpr {
"wrap return expression in Ok".to_string()
}
fn source(&self) -> InFile<SyntaxNodePtr> {
InFile { file_id: self.file, value: self.expr.into() }
InFile { file_id: self.file, value: self.expr.clone().into() }
}
fn as_any(&self) -> &(dyn Any + Send + 'static) {
self