]> git.lizzy.rs Git - rust.git/commit
Add `Symbol::{with,with2}`.
authorNicholas Nethercote <nnethercote@mozilla.com>
Tue, 3 Sep 2019 23:19:27 +0000 (09:19 +1000)
committerNicholas Nethercote <nnethercote@mozilla.com>
Wed, 4 Sep 2019 05:21:33 +0000 (15:21 +1000)
commitcc17b1bc3c877c5cf9a2f5de58535477607972f2
treec807d5c6ef0191351d15afba1aad0f7f5bda747c
parent7a1bc79cbd6fbf5577e5216b8e2f3c29cbbacb29
Add `Symbol::{with,with2}`.

And remove the `unsafe` blocks, they're not necessary.

Also rewrite `InternedString::{with,with2}` to use the new functions.

Finally, add some comments about the speed of the
`as_str()`/`as_interned_str()` functions.
src/libsyntax_pos/symbol.rs