mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-30 13:51:31 +00:00
Fix typo
This commit is contained in:
parent
5f8b37563e
commit
9abcab1669
3 changed files with 3 additions and 3 deletions
|
@ -120,7 +120,7 @@ pub(crate) fn convert_to_guarded_return(ctx: AssistCtx) -> Option<Assist> {
|
||||||
let expr = {
|
let expr = {
|
||||||
let name_ref = make::name_ref("it");
|
let name_ref = make::name_ref("it");
|
||||||
let segment = make::path_segment(name_ref);
|
let segment = make::path_segment(name_ref);
|
||||||
let path = make::path_unqalified(segment);
|
let path = make::path_unqualified(segment);
|
||||||
make::expr_path(path)
|
make::expr_path(path)
|
||||||
};
|
};
|
||||||
make::match_arm(once(pat.into()), expr)
|
make::match_arm(once(pat.into()), expr)
|
||||||
|
|
|
@ -75,7 +75,7 @@ fn build_predicate(param: ast::TypeParam) -> Option<ast::WherePred> {
|
||||||
let path = {
|
let path = {
|
||||||
let name_ref = make::name_ref(¶m.name()?.syntax().to_string());
|
let name_ref = make::name_ref(¶m.name()?.syntax().to_string());
|
||||||
let segment = make::path_segment(name_ref);
|
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());
|
let predicate = make::where_pred(path, param.type_bound_list()?.bounds());
|
||||||
Some(predicate)
|
Some(predicate)
|
||||||
|
|
|
@ -15,7 +15,7 @@ pub fn name_ref(text: &str) -> ast::NameRef {
|
||||||
pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
|
pub fn path_segment(name_ref: ast::NameRef) -> ast::PathSegment {
|
||||||
ast_from_text(&format!("use {};", name_ref.syntax()))
|
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()))
|
path_from_text(&format!("use {}", segment.syntax()))
|
||||||
}
|
}
|
||||||
pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path {
|
pub fn path_qualified(qual: ast::Path, segment: ast::PathSegment) -> ast::Path {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue