Skip to content

allow interner cache to be shared across parsers (#3699) - #3700

Merged
catamorphism merged 1 commit into
rust-lang:incomingfrom
erickt:cargo-interner
Oct 9, 2012
Merged

catamorphism merged 1 commit into
rust-lang:incomingfrom
erickt:cargo-interner

Conversation

@erickt

@erickt erickt commented Oct 8, 2012

Copy link
Copy Markdown
Contributor

This patch is to potentially fix (#3699). It allows the parser interner cache to be shared between multiple parsers on the same thread. I'm not quite sure what the consequences of this are, but most of the tests pass on my laptop (the failures already exist on incoming so I believe they are unrelated). cargo install mongrel2 works as well.

@paulstansifer

Copy link
Copy Markdown
Contributor

The code change looks good to me. I don't fully remember why the original code failed rather than returning the existing interner; I guess I figured that interner creation was (and ought to be) statically guaranteed to happen in only one place.

catamorphism added a commit that referenced this pull request Oct 9, 2012
allow interner cache to be shared across parsers (#3699)
@catamorphism
catamorphism merged commit 15d8457 into rust-lang:incoming Oct 9, 2012
@catamorphism

Copy link
Copy Markdown
Contributor

Thanks!

RalfJung pushed a commit to RalfJung/rust that referenced this pull request Jun 29, 2024
./miri: nicer error when building miri-script fails
U007D pushed a commit to U007D/rust-mos that referenced this pull request Aug 21, 2026
3700: fill match arms with empty block rather than unit tuple r=matklad a=JoshMcguigan

As requested by @Veetaha in rust-lang#3689 and rust-lang#3687, this modifies the fill match arms assist to create match arms as an empty block `{}` rather than a unit tuple `()`.

In one test I left one of the pre-existing match arms as a unit tuple, and added a body to another match arm, to demonstrate that the contents of existing match arms persist. 

Co-authored-by: Josh Mcguigan <joshmcg88@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants