switch to upstream rowan's API

This commit is contained in:
Aleksey Kladov
2019-07-20 20:04:34 +03:00
parent 7bde8012cb
commit c9cfd57eea
22 changed files with 208 additions and 738 deletions

View File

@@ -1,5 +1,4 @@
use std::fmt::Write;
use format_buf::format;
use ra_syntax::ast::{self, AstNode, NameOwner, TypeAscriptionOwner, VisibilityOwner};
pub(crate) trait ShortLabel {
@@ -73,7 +72,7 @@ where
let mut buf = short_label_from_node(node, prefix)?;
if let Some(type_ref) = node.ascribed_type() {
write!(buf, ": {}", type_ref.syntax()).unwrap();
format!(buf, ": {}", type_ref.syntax());
}
Some(buf)