Export default diagnostics extractors #289
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The config
diagnostic_extractor
s provided by therustc
feature are not exported but reachable throughConfig::{cargo,rustc}().diagnostic_extractor
; making these public would let users import the function directly instead of having it to access it throughConfig
methods.I've renamed them and moved them to the
diagnostics
module, as well as added the default one as a separate function.My use case for this is I am testing another compiler that can emit JSON diagnostics using the rustc format, but everything else about the configuration will be different, so it doesn't really make sense to call
Config::rustc
if it wasn't for this method.BTW I was able to migrate to this library from a compiletest-rs fork pretty easily, thanks a lot for developing this!