More principled approach for finding From trait

This commit is contained in:
Aleksey Kladov 2020-04-29 14:49:54 +02:00
parent c3dfeba165
commit b4dd475257
4 changed files with 95 additions and 39 deletions

View file

@ -22,8 +22,7 @@ pub fn path_unqualified(segment: ast::PathSegment) -> ast::Path {
pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path {
path_from_text(&format!("{}::{}", qual, segment))
}
pub fn path_from_text(text: &str) -> ast::Path {
fn path_from_text(text: &str) -> ast::Path {
ast_from_text(text)
}