dtolnay / rustversion

Conditional compilation according to rustc compiler version
Apache License 2.0
326 stars 15 forks source link

rustversion panics if RUSTC=clippy-driver #13

Closed jsgf closed 2 years ago

jsgf commented 4 years ago

clippy-driver --version does not produce a rustc version number, which confuses rustversion. As far as I know there's no way to map from the clippy version to rustc (see https://github.com/rust-lang/rust-clippy/issues/5159) so this is really a matter of just producing a better diagnostic for now.

jsgf commented 4 years ago

clippy-driver -Vv produces the same output as rustc.

$ clippy-driver -Vv
rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: x86_64-unknown-linux-gnu
release: 1.41.0
LLVM version: 9.0
$ rustc -Vv
rustc 1.41.0 (5e1a79984 2020-01-27)
binary: rustc
commit-hash: 5e1a799842ba6ed4a57e91f7ab9435947482f7d8
commit-date: 2020-01-27
host: x86_64-unknown-linux-gnu
release: 1.41.0
LLVM version: 9.0