This repository was archived by the owner on May 28, 2025. It is now read-only.
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
545545> * * Recommended Demangling **
546546>
547547> 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`.
552548>
549+ > Index 0 should be displayed as `'_`.
553550> Index 0 should not be displayed for lifetimes in a * [ref - type ]* , * [mut - ref - type ]* , or * [dyn - trait - type ]* .
554551>
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`.
556556> See * [binder]* for more on lifetime indexes and ordering.
557557
558558> Example :
You can’t perform that action at this time.
0 commit comments