Merge pull request #21161 from itsjunetime/no_default_force_always_assert

Remove force-always-assert from xtask/install install_cmd as well
This commit is contained in:
Laurențiu Nicola 2025-11-29 14:55:20 +00:00 committed by GitHub
commit 5dbb37634a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -44,8 +44,11 @@ pub(crate) struct ServerOpt {
impl ServerOpt {
fn to_features(&self) -> Vec<&'static str> {
let mut features = Vec::new();
features.extend(self.malloc.to_features());
let malloc_features = self.malloc.to_features();
let mut features = Vec::with_capacity(
malloc_features.len() + if self.force_always_assert { 2 } else { 0 },
);
features.extend(malloc_features);
if self.force_always_assert {
features.extend(["--features", "force-always-assert"]);
}
@ -153,7 +156,7 @@ fn install_server(sh: &Shell, opts: ServerOpt) -> anyhow::Result<()> {
let mut install_cmd = cmd!(
sh,
"cargo install --path crates/rust-analyzer --profile={profile} --locked --force --features force-always-assert {features...}"
"cargo install --path crates/rust-analyzer --profile={profile} --locked --force {features...}"
);
if let Some(train_crate) = opts.pgo {