about summary refs log tree commit diff
diff options
context:
space:
mode:
authorLukas Wirth <lukastw97@gmail.com>2025-03-25 07:26:49 +0000
committerGitHub <noreply@github.com>2025-03-25 07:26:49 +0000
commit51d3d8cfb1445eeaa9db819acfb3fe333b085eaa (patch)
tree2743c409b4be8ce2f13dbf438edfe7995c52a708
parentef44eaee063f15c48844d283163cd4ad933e409e (diff)
parent8d076eca0174b64ba156def68b783b2f67291944 (diff)
downloadrust-51d3d8cfb1445eeaa9db819acfb3fe333b085eaa.tar.gz
rust-51d3d8cfb1445eeaa9db819acfb3fe333b085eaa.zip
Merge pull request #19448 from Veykril/push-lkmyospxqrzz
ci: Require miri step
-rw-r--r--src/tools/rust-analyzer/.github/workflows/ci.yaml10
-rw-r--r--src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs2
-rw-r--r--src/tools/rust-analyzer/crates/project-model/src/build_dependencies.rs6
-rw-r--r--src/tools/rust-analyzer/xtask/src/tidy.rs2
4 files changed, 10 insertions, 10 deletions
diff --git a/src/tools/rust-analyzer/.github/workflows/ci.yaml b/src/tools/rust-analyzer/.github/workflows/ci.yaml
index 07ff5aacec1..8479d006319 100644
--- a/src/tools/rust-analyzer/.github/workflows/ci.yaml
+++ b/src/tools/rust-analyzer/.github/workflows/ci.yaml
@@ -15,7 +15,6 @@ env:
   CARGO_NET_RETRY: 10
   CI: 1
   RUST_BACKTRACE: short
-  RUSTFLAGS: "-D warnings"
   RUSTUP_MAX_RETRIES: 10
 
 jobs:
@@ -45,6 +44,9 @@ jobs:
     if: github.repository == 'rust-lang/rust-analyzer' && needs.changes.outputs.proc_macros == 'true'
     name: proc-macro-srv
     runs-on: ubuntu-latest
+    env:
+      RUSTFLAGS: "-D warnings"
+
     steps:
       - name: Checkout repository
         uses: actions/checkout@v4
@@ -73,6 +75,7 @@ jobs:
     name: Rust
     runs-on: ${{ matrix.os }}
     env:
+      RUSTFLAGS: "-D warnings"
       CC: deny_c
 
     strategy:
@@ -168,7 +171,7 @@ jobs:
       - name: Cache Dependencies
         uses: Swatinem/rust-cache@9bdad043e88c75890e36ad3bbc8d27f0090dd609
 
-      - run: cargo +nightly miri test --locked
+      - run: cargo +nightly miri test -p intern --locked
 
   # Weird targets to catch non-portable code
   rust-cross:
@@ -181,6 +184,7 @@ jobs:
       # The rust-analyzer binary is not expected to compile on WASM, but the IDE
       # crate should
       targets_ide: "wasm32-unknown-unknown"
+      RUSTFLAGS: "-D warnings"
 
     steps:
       - name: Checkout repository
@@ -283,7 +287,7 @@ jobs:
         run: typos
 
   conclusion:
-    needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv]
+    needs: [rust, rust-cross, typescript, typo-check, proc-macro-srv, miri]
     # We need to ensure this job does *not* get skipped if its dependencies fail,
     # because a skipped job is considered a success by GitHub. So we have to
     # overwrite `if:`. We use `!cancelled()` to ensure the job does still not get run
diff --git a/src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs b/src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs
index 69de555214d..731b7f5e028 100644
--- a/src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs
+++ b/src/tools/rust-analyzer/crates/hir-ty/src/infer/closure.rs
@@ -223,7 +223,7 @@ impl HirPlace {
             kind: MutBorrowKind::Default | MutBorrowKind::TwoPhasedBorrow,
         }) = current_capture
         {
-            if self.projections[len..].iter().any(|it| *it == ProjectionElem::Deref) {
+            if self.projections[len..].contains(&ProjectionElem::Deref) {
                 current_capture =
                     CaptureKind::ByRef(BorrowKind::Mut { kind: MutBorrowKind::ClosureCapture });
             }
diff --git a/src/tools/rust-analyzer/crates/project-model/src/build_dependencies.rs b/src/tools/rust-analyzer/crates/project-model/src/build_dependencies.rs
index 631787bf8e6..b26d19e3268 100644
--- a/src/tools/rust-analyzer/crates/project-model/src/build_dependencies.rs
+++ b/src/tools/rust-analyzer/crates/project-model/src/build_dependencies.rs
@@ -343,11 +343,7 @@ impl WorkspaceBuildScripts {
                     Message::CompilerArtifact(message) => {
                         with_output_for(&message.package_id.repr, &mut |name, data| {
                             progress(format!("building proc-macros: {name}"));
-                            if message
-                                .target
-                                .kind
-                                .iter()
-                                .any(|k| *k == cargo_metadata::TargetKind::ProcMacro)
+                            if message.target.kind.contains(&cargo_metadata::TargetKind::ProcMacro)
                             {
                                 // Skip rmeta file
                                 if let Some(filename) =
diff --git a/src/tools/rust-analyzer/xtask/src/tidy.rs b/src/tools/rust-analyzer/xtask/src/tidy.rs
index bf51760de17..343f76f6475 100644
--- a/src/tools/rust-analyzer/xtask/src/tidy.rs
+++ b/src/tools/rust-analyzer/xtask/src/tidy.rs
@@ -254,7 +254,7 @@ impl TidyDocs {
             d.file_name()
                 .unwrap_or_default()
                 .to_str()
-                .map(|f_n| file_names.iter().any(|name| *name == f_n))
+                .map(|f_n| file_names.contains(&f_n))
                 .unwrap_or(false)
         }
     }