Skip to content

Commit bd062c7

Browse files
committed
Fix preferred order of constructors and builder
methods in render function
1 parent 2a05fcc commit bd062c7

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

crates/ide-completion/src/render/function.rs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,11 +154,12 @@ fn render(
154154
item
155155
}
156156

157-
/// When typing `::` of a type, the preferred orderer is:
157+
/// When typing `::` of a type, the preferred order is:
158158
/// * Constructors: new like functions to be able to create the type,
159159
/// * Constructors that take args: Any other function that creates Self
160160
/// * Builder Methods: any builder methods available
161-
/// * Regular methods
161+
/// * Regular methods & Associated functions
162+
///
162163
fn calculate_bonus(ctx: &RenderContext<'_>, func: hir::Function, db: &dyn HirDatabase) -> u32 {
163164
if ctx.token().kind() != syntax::SyntaxKind::COLON2 || func.self_param(db).is_some() {
164165
return 0;

0 commit comments

Comments
 (0)