This commit is contained in:
Aleksey Kladov 2020-02-29 13:50:47 +01:00
parent 5f8b37563e
commit 9abcab1669
3 changed files with 3 additions and 3 deletions

View File

@ -120,7 +120,7 @@ pub(crate) fn convert_to_guarded_return(ctx: AssistCtx) -> Option<Assist> {
let expr = {
let name_ref = make::name_ref("it");
let segment = make::path_segment(name_ref);
let path = make::path_unqalified(segment);
let path = make::path_unqualified(segment);
make::expr_path(path)
};
make::match_arm(once(pat.into()), expr)

View File

@ -75,7 +75,7 @@ fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> {
let path = {
let name_ref = make::name_ref(&param.name()?.syntax().to_string());
let segment = make::path_segment(name_ref);
make::path_unqalified(segment)
make::path_unqualified(segment)
};
let predicate = make::where_pred(path, param.type_bound_list()?.bounds());
Some(predicate)

View File

@ -15,7 +15,7 @@ pub fn name_ref(text: &str) -> ast::NameRef {
pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
ast_from_text(&format!("use {};", name_ref.syntax()))
}
pub fn path_unqalified(segment: ast::PathSegment) -> ast::Path {
pub fn path_unqualified(segment: ast::PathSegment) -> ast::Path {
path_from_text(&format!("use {}", segment.syntax()))
}
pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path {