cognitive-engineering-lab / rustc_plugin

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

Configurable compilation for tests #23

Closed JustusAdam closed 4 months ago

JustusAdam commented 5 months ago

Replaces the suite of compile_* functions in the test utils with a CompileBuilder which can be configured (currently only by passing additional arguments). Then, instead of having multiple compile_* methods we have one compile method which returns a CompileResult that lets us fetch the same kinds of information that was previously returned by compile_range, compile_body and so on in a suite of methods called as_...

willcrichton commented 5 months ago

To reduce verbosity I would still prefer that compile_body exists as an alias, but I'm fine with the change otherwise.