Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'xtask/src/install.rs')
| -rw-r--r-- | xtask/src/install.rs | 37 |
1 files changed, 1 insertions, 36 deletions
diff --git a/xtask/src/install.rs b/xtask/src/install.rs index 412132f60e..6bae5123a6 100644 --- a/xtask/src/install.rs +++ b/xtask/src/install.rs @@ -7,9 +7,6 @@ use xshell::{cmd, pushd}; use crate::flags; -// Latest stable, feel free to send a PR if this lags behind. -const REQUIRED_RUST_VERSION: u32 = 56; - impl flags::Install { pub(crate) fn run(self) -> Result<()> { if cfg!(target_os = "macos") { @@ -137,19 +134,6 @@ fn install_client(client_opt: ClientOpt) -> Result<()> { } fn install_server(opts: ServerOpt) -> Result<()> { - let mut old_rust = false; - if let Ok(stdout) = cmd!("cargo --version").read() { - if !check_version(&stdout, REQUIRED_RUST_VERSION) { - old_rust = true; - } - } - - if old_rust { - eprintln!( - "\nWARNING: at least rust 1.{}.0 is required to compile rust-analyzer\n", - REQUIRED_RUST_VERSION, - ); - } let features = match opts.malloc { Malloc::System => &[][..], Malloc::Mimalloc => &["--features", "mimalloc"], @@ -157,25 +141,6 @@ fn install_server(opts: ServerOpt) -> Result<()> { }; let cmd = cmd!("cargo install --path crates/rust-analyzer --locked --force --features force-always-assert {features...}"); - let res = cmd.run(); - - if res.is_err() && old_rust { - eprintln!( - "\nWARNING: at least rust 1.{}.0 is required to compile rust-analyzer\n", - REQUIRED_RUST_VERSION, - ); - } - - res?; + cmd.run()?; Ok(()) } - -fn check_version(version_output: &str, min_minor_version: u32) -> bool { - // Parse second the number out of - // cargo 1.39.0-beta (1c6ec66d5 2019-09-30) - let minor: Option<u32> = version_output.split('.').nth(1).and_then(|it| it.parse().ok()); - match minor { - None => true, - Some(minor) => minor >= min_minor_version, - } -} |