From c5204087316a79be9e39d9944cd5380313fe095e Mon Sep 17 00:00:00 2001 From: Amos Wenger Date: Wed, 20 Jul 2022 15:49:40 +0200 Subject: [PATCH] Allow merge commits when 'in-rust-tree' feature is enabled This adds an `in-rust-tree` feature that will be enabled when rust-analyzer is built from `rust-lang/rust`. Due to the way "git subtree" works, that test _will_ find merge commits and fail, so we simply skip it. --- crates/rust-analyzer/Cargo.toml | 1 + crates/rust-analyzer/tests/slow-tests/tidy.rs | 1 + 2 files changed, 2 insertions(+) diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml index c37a0d17491d..6998209a078e 100644 --- a/crates/rust-analyzer/Cargo.toml +++ b/crates/rust-analyzer/Cargo.toml @@ -84,3 +84,4 @@ mbe = { path = "../mbe" } [features] jemalloc = ["jemallocator", "profile/jemalloc"] force-always-assert = ["always-assert/force"] +in-rust-tree = [] diff --git a/crates/rust-analyzer/tests/slow-tests/tidy.rs b/crates/rust-analyzer/tests/slow-tests/tidy.rs index 1d666fdf0f3d..63337214cd62 100644 --- a/crates/rust-analyzer/tests/slow-tests/tidy.rs +++ b/crates/rust-analyzer/tests/slow-tests/tidy.rs @@ -142,6 +142,7 @@ fn check_cargo_toml(path: &Path, text: String) { } } +#[cfg(not(feature = "in-rust-tree"))] #[test] fn check_merge_commits() { let sh = &Shell::new().unwrap();