File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/doc/rustc/src/symbol-mangling Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -545,14 +545,14 @@ Indices starting from 1 refer (as de Bruijn indices) to a higher-ranked lifetime
545
545
> * * Recommended Demangling **
546
546
>
547
547
> A * lifetime* may be displayed like a Rust lifetime using a single quote.
548
- > Index 0 should be displayed as `'_`.
549
- >
550
- > Lifetimes starting from 1 may be translated to single lowercase letters starting with `'a`.
551
- > Indices over 25 may consider printing the numeric lifetime index as in `'_123`.
552
548
>
549
+ > Index 0 should be displayed as `'_`.
553
550
> Index 0 should not be displayed for lifetimes in a * [ref - type ]* , * [mut - ref - type ]* , or * [dyn - trait - type ]* .
554
551
>
555
- > Nested binders may consider tracking their indices so that lifetime lettering can start back with `'a` within a nested binder.
552
+ > A lifetime can be displayed by converting the De Bruijn index to a De Bruijn level
553
+ > (level = number of bound lifetimes - index) and selecting a unique name for each level.
554
+ > For example, starting with single lowercase letters such as `'a` for level 0.
555
+ > Levels over 25 may consider printing the numeric lifetime as in `'_123`.
556
556
> See * [binder]* for more on lifetime indexes and ordering.
557
557
558
558
> Example :
You can’t perform that action at this time.
0 commit comments