cognitive-engineering-lab / rustc_plugin

A framework for writing plugins that integrate with the Rust compiler
MIT License
135 stars 16 forks source link

Make Caches Recursion Breaking #4

Closed JustusAdam closed 1 year ago

JustusAdam commented 1 year ago

This adds a new type of Cache which breaks recursive get calls in the compute function by returning an Option.

Also adds a len method to gage the size of the cache.

JustusAdam commented 1 year ago

Made caches ... consistent :P as requested

willcrichton commented 1 year ago

Oh can you also add a unit test that checks for the recursion-breaking behavior?