diff --git a/Formula/rust-analyzer.rb b/Formula/rust-analyzer.rb index 83070826589115..824ada981c0604 100644 --- a/Formula/rust-analyzer.rb +++ b/Formula/rust-analyzer.rb @@ -19,6 +19,8 @@ class RustAnalyzer < Formula depends_on "rust" => :build + conflicts_with "rust", because: "both install `rust-analyzer` binary" + def install cd "crates/rust-analyzer" do system "cargo", "install", "--bin", "rust-analyzer", *std_cargo_args diff --git a/Formula/rust.rb b/Formula/rust.rb index ac91b09aa83f8a..5d5bdcbb557916 100644 --- a/Formula/rust.rb +++ b/Formula/rust.rb @@ -42,6 +42,8 @@ class Rust < Formula uses_from_macos "curl" uses_from_macos "zlib" + conflicts_with "rust-analyzer", because: "both install `rust-analyzer` binary" + resource "cargobootstrap" do on_macos do # From https://github.com/rust-lang/rust/blob/#{version}/src/stage0.json