]> git.lizzy.rs Git - rust.git/commit
Auto merge of #47540 - Manishearth:suggestion, r=nrc
authorbors <bors@rust-lang.org>
Thu, 1 Feb 2018 04:47:46 +0000 (04:47 +0000)
committerbors <bors@rust-lang.org>
Thu, 1 Feb 2018 04:47:46 +0000 (04:47 +0000)
commit26792f0607bea2b03daa5195c2688fd53289042b
tree35a3660501f3d9c285d4fbfcdf2efd01777574a5
parent8ccab7eed5f4fc93500fbf242e575073ca70d7cb
parent540f95d9fad41a605e4c8b898d77f47374a76cbd
Auto merge of #47540 - Manishearth:suggestion, r=nrc

Add approximate suggestions for rustfix

This adds `span_approximate_suggestion()` that lets you emit a
suggestion marked as "non-machine applicable" in the JSON output. UI
users see no difference. This is for when rustc and clippy wish to
 emit suggestions which will make sense to the reader (e.g. they may
have placeholders like `<type>`) but are not source-applicable, so that
rustfix/etc can ignore these.

fixes #39254
src/librustc/session/mod.rs
src/librustc_errors/lib.rs
src/libsyntax/json.rs