Change Symbol::as_str to &self -> &str #83295
Labels
C-cleanup
Category: PRs that clean code up or issues documenting cleanup.
T-compiler
Relevant to the compiler team, which will review and decide on the PR/issue.
#76460 experimented with this, but it was never finished. We should figure out whether we actually want this
Pros:
&str
is nicer to work with thanSymbolStr
, e.g. avoids the need for some&
and&*
occurrences.SymbolStr
.SymbolStr
strings have astatic
lifetime, replacing it with a smaller lie that the strings have a lifetime tied to the lifetime of the inputSymbol
.Cons:
&str
than it is within aSymbolStr
.&str
as!Send
and!Sync
.SymbolStr
(or what it was called previously) was introduced in the first place, because Zoxc did it together with the work on compiler parallelization.SymbolStr
entirely. Theto_stable_hash_key()
is the hardest case.The text was updated successfully, but these errors were encountered: