1 //! This build script ensures that Clippy is not compiled with an
2 //! incompatible version of rust. It will panic with a descriptive
3 //! error message instead.
5 //! We specifially want to ensure that Clippy is only built with a
6 //! rustc version that is newer or equal to the one specified in the
7 //! `min_version.txt` file.
9 //! `min_version.txt` is in the repo but also in the `.gitignore` to
10 //! make sure that it is not updated manually by accident. Only CI
11 //! should update that file.
13 //! This build script was originally taken from the Rocket web framework:
14 //! https://github.com/SergioBenitez/Rocket
19 // Forward the profile to the main compilation
20 println!("cargo:rustc-env=PROFILE={}", env::var("PROFILE").unwrap());
21 // Don't rebuild even if nothing changed
22 println!("cargo:rerun-if-changed=build.rs");