Remove force-always-assert from xtask/install install_cmd as well

This commit is contained in:
itsjunetime 2025-11-28 08:18:13 -06:00
parent 36fa19936b
commit a25defef14
No known key found for this signature in database

View file

@ -44,8 +44,11 @@ pub(crate) struct ServerOpt {
impl ServerOpt { impl ServerOpt {
fn to_features(&self) -> Vec<&'static str> { fn to_features(&self) -> Vec<&'static str> {
let mut features = Vec::new(); let malloc_features = self.malloc.to_features();
features.extend(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 { if self.force_always_assert {
features.extend(["--features", "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!( let mut install_cmd = cmd!(
sh, 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 { if let Some(train_crate) = opts.pgo {