File tree Expand file tree Collapse file tree
crates/ide-completion/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -286,7 +286,7 @@ impl CompletionRelevance {
286286 function,
287287 is_skipping_completion,
288288 has_local_inherent_impl,
289- is_deprecated : _ ,
289+ is_deprecated,
290290 } = self ;
291291
292292 // only applicable for completions within use items
@@ -363,6 +363,11 @@ impl CompletionRelevance {
363363 score -= 5 ;
364364 }
365365
366+ // lower rank for deprecated items
367+ if is_deprecated {
368+ score -= 5 ;
369+ }
370+
366371 score
367372 }
368373
Original file line number Diff line number Diff line change @@ -3802,10 +3802,10 @@ fn main() {
38023802}
38033803"# ,
38043804 expect ! [ [ r#"
3805- ct INFINITY f32 [type_could_unify+requires_import+deprecated]
3806- ct NEG_INFINITY f32 [type_could_unify+requires_import+deprecated]
38073805 ct INFINITY pub const INFINITY: f32 []
38083806 ct NEG_INFINITY pub const NEG_INFINITY: f32 []
3807+ ct INFINITY f32 [type_could_unify+requires_import+deprecated]
3808+ ct NEG_INFINITY f32 [type_could_unify+requires_import+deprecated]
38093809 "# ] ] ,
38103810 ) ;
38113811 }
You can’t perform that action at this time.
0 commit comments