]> git.lizzy.rs Git - rust.git/commit
Introduce `LocalInternedString::intern`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 14 May 2019 05:13:42 +0000 (15:13 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Sun, 19 May 2019 23:17:02 +0000 (09:17 +1000)
commitc06cdbeac55ec87181d015d2ef759349521773ea
tree7aca56810dc84cec24f397aac620b77a25cc55f7
parent257eaf523f7faabfc9845a238ec3776fc45fcd81
Introduce `LocalInternedString::intern`.

`LocalInternedString::intern(x)` is preferable to
`Symbol::intern(x).as_str()`, because the former involves one call to
`with_interner` while the latter involves two.
src/librustc/lint/context.rs
src/librustc_codegen_llvm/intrinsic.rs
src/librustc_codegen_ssa/mir/block.rs
src/libsyntax_pos/symbol.rs