File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
src/tools/rust-analyzer/crates/rust-analyzer/src/cli Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -444,14 +444,14 @@ impl SymbolGenerator {
444
444
MonikerResult :: Moniker ( moniker) => TokenSymbols {
445
445
symbol : scip:: symbol:: format_symbol ( moniker_to_symbol ( moniker) ) ,
446
446
enclosing_symbol : None ,
447
- is_inherent_impl : moniker
448
- . identifier
449
- . description
450
- . get ( moniker. identifier . description . len ( ) - 2 )
451
- . is_some_and ( |descriptor| {
447
+ is_inherent_impl : match & moniker. identifier . description [ ..] {
448
+ // inherent impls are represented as impl#[SelfType]
449
+ [ .., descriptor, _] => {
452
450
descriptor. desc == MonikerDescriptorKind :: Type
453
451
&& descriptor. name == "impl"
454
- } ) ,
452
+ }
453
+ _ => false ,
454
+ } ,
455
455
} ,
456
456
MonikerResult :: Local { enclosing_moniker } => {
457
457
let local_symbol = scip:: types:: Symbol :: new_local ( local_count) ;
You can’t perform that action at this time.
0 commit comments