File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -28,10 +28,11 @@ fn check_that_clippy_has_the_same_major_version_as_rustc() {
2828 let clippy_minor = clippy_version. minor ;
2929 let clippy_patch = clippy_version. patch ;
3030
31- // get the rustc version
32- // this way the rust-toolchain file version is honored
31+ // get the rustc version either from the rustc installed with the toolchain file or from
32+ // `RUSTC_REAL` if Clippy is build in the Rust repo with `./x.py`.
33+ let rustc = std:: env:: var ( "RUSTC_REAL" ) . unwrap_or_else ( |_| "rustc" . to_string ( ) ) ;
3334 let rustc_version = String :: from_utf8 (
34- std:: process:: Command :: new ( " rustc" )
35+ std:: process:: Command :: new ( & rustc)
3536 . arg ( "--version" )
3637 . output ( )
3738 . expect ( "failed to run `rustc --version`" )
You can’t perform that action at this time.
0 commit comments