@@ -87,7 +87,7 @@ pub(crate) fn add_missing_match_arms(acc: &mut Assists, ctx: &AssistContext<'_>)
87
87
. into_iter ( )
88
88
. filter_map ( |variant| {
89
89
Some ( (
90
- build_pat ( ctx. db ( ) , module, variant, ctx. config . prefer_core ) ?,
90
+ build_pat ( ctx. db ( ) , module, variant, ctx. config . prefer_no_std ) ?,
91
91
variant. should_be_hidden ( ctx. db ( ) , module. krate ( ) ) ,
92
92
) )
93
93
} )
@@ -133,7 +133,7 @@ pub(crate) fn add_missing_match_arms(acc: &mut Assists, ctx: &AssistContext<'_>)
133
133
. iter ( )
134
134
. any ( |variant| variant. should_be_hidden ( ctx. db ( ) , module. krate ( ) ) ) ;
135
135
let patterns = variants. into_iter ( ) . filter_map ( |variant| {
136
- build_pat ( ctx. db ( ) , module, variant, ctx. config . prefer_core )
136
+ build_pat ( ctx. db ( ) , module, variant, ctx. config . prefer_no_std )
137
137
} ) ;
138
138
139
139
( ast:: Pat :: from ( make:: tuple_pat ( patterns) ) , is_hidden)
@@ -354,12 +354,12 @@ fn build_pat(
354
354
db : & RootDatabase ,
355
355
module : hir:: Module ,
356
356
var : ExtendedVariant ,
357
- prefer_core : bool ,
357
+ prefer_no_std : bool ,
358
358
) -> Option < ast:: Pat > {
359
359
match var {
360
360
ExtendedVariant :: Variant ( var) => {
361
361
let path =
362
- mod_path_to_ast ( & module. find_use_path ( db, ModuleDef :: from ( var) , prefer_core ) ?) ;
362
+ mod_path_to_ast ( & module. find_use_path ( db, ModuleDef :: from ( var) , prefer_no_std ) ?) ;
363
363
364
364
// FIXME: use HIR for this; it doesn't currently expose struct vs. tuple vs. unit variants though
365
365
let pat: ast:: Pat = match var. source ( db) ?. value . kind ( ) {
0 commit comments