Use a specialized string interner to reduce the need for owned strings
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.
This commit is contained in:
parent
936c07dcf0
commit
1393c3a3f4
50 changed files with 521 additions and 466 deletions
|
@ -502,10 +502,10 @@ pub fn mk_unreachable(cx: @ext_ctxt, span: span) -> @ast::expr {
|
|||
cx,
|
||||
span,
|
||||
~[
|
||||
cx.ident_of(~"core"),
|
||||
cx.ident_of(~"sys"),
|
||||
cx.ident_of(~"FailWithCause"),
|
||||
cx.ident_of(~"fail_with"),
|
||||
cx.ident_of("core"),
|
||||
cx.ident_of("sys"),
|
||||
cx.ident_of("FailWithCause"),
|
||||
cx.ident_of("fail_with"),
|
||||
],
|
||||
~[
|
||||
mk_base_str(cx, span, ~"internal error: entered unreachable code"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue