Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Fix cargo shear warnings (#64340)

Finn Eversaec7395e30fe
diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml
index 7524b2a4894..4337917ad39 100644
--- a/.github/workflows/autofix_pr.yml
+++ b/.github/workflows/autofix_pr.yml
@@ -61,7 +61,7 @@ jobs:
run: cargo fix --workspace --allow-dirty --allow-staged
- name: autofix_pr::run_autofix::run_cargo_shear_fix
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
- run: cargo shear --fix
+ run: cargo shear --fix --check-test-targets
- name: autofix_pr::run_autofix::run_clippy_fix
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
run: cargo clippy --workspace --fix --allow-dirty --allow-staged
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index 09726ed3ed7..b77e66a4e77 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -707,7 +707,7 @@ jobs:
with:
- name: run_tests::check_dependencies::run_cargo_shear
- run: cargo shear --locked --deny-warnings
+ run: cargo shear --locked --deny-warnings --check-test-targets
- name: run_tests::check_dependencies::check_cargo_lock
run: cargo update --locked --workspace
- name: run_tests::check_dependencies::check_crate_graph
diff --git a/crates/acp_tools/Cargo.toml b/crates/acp_tools/Cargo.toml
index f38ca890e2f..4ee524b3687 100644
--- a/crates/acp_tools/Cargo.toml
+++ b/crates/acp_tools/Cargo.toml
@@ -12,6 +12,7 @@ workspace = true
[lib]
path = "src/acp_tools.rs"
doctest = false
+test = false
[features]
test-support = ["workspace/test-support"]
diff --git a/crates/action_log/Cargo.toml b/crates/action_log/Cargo.toml
index c8d3b6a36df..88a86c9684c 100644
--- a/crates/action_log/Cargo.toml
+++ b/crates/action_log/Cargo.toml
@@ -7,6 +7,7 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/action_log.rs"
+doctest = false
[lints]
workspace = true
diff --git a/crates/activity_indicator/Cargo.toml b/crates/activity_indicator/Cargo.toml
index df4c4a0db6e..198033c680f 100644
--- a/crates/activity_indicator/Cargo.toml
+++ b/crates/activity_indicator/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/activity_indicator.rs"
doctest = false
+test = false
[features]
test-support = []
diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml
index 62d6f271c43..5c7c8de3463 100644
--- a/crates/agent/Cargo.toml
+++ b/crates/agent/Cargo.toml
@@ -7,6 +7,7 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/agent.rs"
+doctest = false
[features]
test-support = ["db/test-support"]
diff --git a/crates/agent_settings/Cargo.toml b/crates/agent_settings/Cargo.toml
index 5d50e7251a0..82a430e5e16 100644
--- a/crates/agent_settings/Cargo.toml
+++ b/crates/agent_settings/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/agent_settings.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/agent_skills/Cargo.toml b/crates/agent_skills/Cargo.toml
index 31864f7a4f0..d277ff33bce 100644
--- a/crates/agent_skills/Cargo.toml
+++ b/crates/agent_skills/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "agent_skills.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/ai_onboarding/Cargo.toml b/crates/ai_onboarding/Cargo.toml
index 8215ea820bc..0d537aaf81b 100644
--- a/crates/ai_onboarding/Cargo.toml
+++ b/crates/ai_onboarding/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/ai_onboarding.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/anthropic/Cargo.toml b/crates/anthropic/Cargo.toml
index afb5a2f2ca4..ca41a0ececf 100644
--- a/crates/anthropic/Cargo.toml
+++ b/crates/anthropic/Cargo.toml
@@ -14,6 +14,7 @@ workspace = true
[lib]
path = "src/anthropic.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml
index 8c0cabcdb6a..4792fdbea71 100644
--- a/crates/askpass/Cargo.toml
+++ b/crates/askpass/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/askpass.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml
index 475b6d457d3..643bbacdc88 100644
--- a/crates/assets/Cargo.toml
+++ b/crates/assets/Cargo.toml
@@ -7,6 +7,8 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/assets.rs"
+test = false
+doctest = false
[lints]
workspace = true
diff --git a/crates/auto_update_ui/Cargo.toml b/crates/auto_update_ui/Cargo.toml
index a7d54d4cb98..f15ead3df25 100644
--- a/crates/auto_update_ui/Cargo.toml
+++ b/crates/auto_update_ui/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/auto_update_ui.rs"
+test = false
+doctest = false
[dependencies]
agent_skills.workspace = true
diff --git a/crates/aws_http_client/Cargo.toml b/crates/aws_http_client/Cargo.toml
index 24569a764dc..fc9d7fc5936 100644
--- a/crates/aws_http_client/Cargo.toml
+++ b/crates/aws_http_client/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/aws_http_client.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/bedrock/Cargo.toml b/crates/bedrock/Cargo.toml
index 17f69cde6b4..e9def2d251c 100644
--- a/crates/bedrock/Cargo.toml
+++ b/crates/bedrock/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/bedrock.rs"
+doctest = false
[features]
default = []
diff --git a/crates/benchmarks/Cargo.toml b/crates/benchmarks/Cargo.toml
index 2415ebc396f..63fa36275ad 100644
--- a/crates/benchmarks/Cargo.toml
+++ b/crates/benchmarks/Cargo.toml
@@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/benchmarks.rs"
doctest = false
+test = false
[lints]
workspace = true
diff --git a/crates/breadcrumbs/Cargo.toml b/crates/breadcrumbs/Cargo.toml
index e6db2b8f201..766e82c9adb 100644
--- a/crates/breadcrumbs/Cargo.toml
+++ b/crates/breadcrumbs/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/breadcrumbs.rs"
doctest = false
+test = false
[dependencies]
gpui.workspace = true
diff --git a/crates/buffer_diff/Cargo.toml b/crates/buffer_diff/Cargo.toml
index 53be798fff7..53997f7a686 100644
--- a/crates/buffer_diff/Cargo.toml
+++ b/crates/buffer_diff/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/buffer_diff.rs"
+doctest = false
[features]
test-support = ["settings"]
diff --git a/crates/cloud_api_client/Cargo.toml b/crates/cloud_api_client/Cargo.toml
index 1b65a1491e9..64f8fa80ee2 100644
--- a/crates/cloud_api_client/Cargo.toml
+++ b/crates/cloud_api_client/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/cloud_api_client.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/cloud_api_types/Cargo.toml b/crates/cloud_api_types/Cargo.toml
index a220f688f51..2d461993da7 100644
--- a/crates/cloud_api_types/Cargo.toml
+++ b/crates/cloud_api_types/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/cloud_api_types.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/cloud_llm_client/Cargo.toml b/crates/cloud_llm_client/Cargo.toml
index 7cc59f255ab..4a7a4a705fe 100644
--- a/crates/cloud_llm_client/Cargo.toml
+++ b/crates/cloud_llm_client/Cargo.toml
@@ -14,6 +14,7 @@ workspace = true
[lib]
path = "src/cloud_llm_client.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/codestral/Cargo.toml b/crates/codestral/Cargo.toml
index 1802f2a2d72..812820c2b56 100644
--- a/crates/codestral/Cargo.toml
+++ b/crates/codestral/Cargo.toml
@@ -7,6 +7,8 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/codestral.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
@@ -24,5 +26,3 @@ serde_json.workspace = true
text.workspace = true
zed_credentials_provider.workspace = true
zeta_prompt.workspace = true
-
-[dev-dependencies]
diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml
index 9e401280e6d..d2b7bce2b80 100644
--- a/crates/collab/Cargo.toml
+++ b/crates/collab/Cargo.toml
@@ -19,6 +19,7 @@ test-support = ["sqlite"]
[lib]
test = false
+doctest = false
[[test]]
name = "collab_tests"
diff --git a/crates/command_palette_hooks/Cargo.toml b/crates/command_palette_hooks/Cargo.toml
index 6ba771562d3..0a618a10c46 100644
--- a/crates/command_palette_hooks/Cargo.toml
+++ b/crates/command_palette_hooks/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/command_palette_hooks.rs"
doctest = false
+test = false
[dependencies]
collections.workspace = true
diff --git a/crates/component/Cargo.toml b/crates/component/Cargo.toml
index 4ca95cbbbdf..84cb5efa8a8 100644
--- a/crates/component/Cargo.toml
+++ b/crates/component/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/component.rs"
+test = false
[dependencies]
collections.workspace = true
diff --git a/crates/component_preview/Cargo.toml b/crates/component_preview/Cargo.toml
index 8b7ad1bc509..c805fb4bf34 100644
--- a/crates/component_preview/Cargo.toml
+++ b/crates/component_preview/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/component_preview.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/context_server/Cargo.toml b/crates/context_server/Cargo.toml
index e2c7380cf18..01141ce862d 100644
--- a/crates/context_server/Cargo.toml
+++ b/crates/context_server/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/context_server.rs"
+doctest = false
[features]
test-support = ["gpui/test-support"]
diff --git a/crates/copilot_ui/Cargo.toml b/crates/copilot_ui/Cargo.toml
index 315831525de..c5dc6d25cdd 100644
--- a/crates/copilot_ui/Cargo.toml
+++ b/crates/copilot_ui/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/copilot_ui.rs"
doctest = false
+test = false
[features]
default = []
diff --git a/crates/crashes/Cargo.toml b/crates/crashes/Cargo.toml
index 1b118097cb4..7d873b0f7f0 100644
--- a/crates/crashes/Cargo.toml
+++ b/crates/crashes/Cargo.toml
@@ -30,3 +30,4 @@ workspace = true
[lib]
path = "src/crashes.rs"
+doctest = false
diff --git a/crates/credentials_provider/Cargo.toml b/crates/credentials_provider/Cargo.toml
index 43f19456197..36f059911e1 100644
--- a/crates/credentials_provider/Cargo.toml
+++ b/crates/credentials_provider/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/credentials_provider.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/debug_adapter_extension/Cargo.toml b/crates/debug_adapter_extension/Cargo.toml
index 08f916eb9e7..0897925f843 100644
--- a/crates/debug_adapter_extension/Cargo.toml
+++ b/crates/debug_adapter_extension/Cargo.toml
@@ -21,3 +21,5 @@ workspace = true
[lib]
path = "src/debug_adapter_extension.rs"
+test = false
+doctest = false
diff --git a/crates/deepseek/Cargo.toml b/crates/deepseek/Cargo.toml
index 25e8f2f25c8..451f9752e4c 100644
--- a/crates/deepseek/Cargo.toml
+++ b/crates/deepseek/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/deepseek.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/dev_container/Cargo.toml b/crates/dev_container/Cargo.toml
index c9d9eb5f3fe..b405cd91c7f 100644
--- a/crates/dev_container/Cargo.toml
+++ b/crates/dev_container/Cargo.toml
@@ -4,6 +4,9 @@ version = "0.1.0"
publish.workspace = true
edition.workspace = true
+[lib]
+doctest = false
+
[dependencies]
anyhow.workspace = true
async-tar.workspace = true
diff --git a/crates/edit_prediction/Cargo.toml b/crates/edit_prediction/Cargo.toml
index d8a26c016c8..e86e3f5a480 100644
--- a/crates/edit_prediction/Cargo.toml
+++ b/crates/edit_prediction/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/edit_prediction.rs"
+doctest = false
[features]
cli-support = []
diff --git a/crates/edit_prediction_context/Cargo.toml b/crates/edit_prediction_context/Cargo.toml
index 8f0632aad0d..7f40db303aa 100644
--- a/crates/edit_prediction_context/Cargo.toml
+++ b/crates/edit_prediction_context/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/edit_prediction_context.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/edit_prediction_metrics/Cargo.toml b/crates/edit_prediction_metrics/Cargo.toml
index f046b3f110f..5c31f9bd175 100644
--- a/crates/edit_prediction_metrics/Cargo.toml
+++ b/crates/edit_prediction_metrics/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/edit_prediction_metrics.rs"
+doctest = false
[features]
tree-sitter = ["dep:tree-sitter"]
diff --git a/crates/edit_prediction_types/Cargo.toml b/crates/edit_prediction_types/Cargo.toml
index 4de0c9f62c5..baa4af0b201 100644
--- a/crates/edit_prediction_types/Cargo.toml
+++ b/crates/edit_prediction_types/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/edit_prediction_types.rs"
+test = false
+doctest = false
[dependencies]
client.workspace = true
diff --git a/crates/encoding_selector/Cargo.toml b/crates/encoding_selector/Cargo.toml
index 4903ab56d6d..b83ac22456e 100644
--- a/crates/encoding_selector/Cargo.toml
+++ b/crates/encoding_selector/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/encoding_selector.rs"
doctest = false
+test = false
[dependencies]
editor.workspace = true
diff --git a/crates/env_var/Cargo.toml b/crates/env_var/Cargo.toml
index 3c879a2f491..ea3c180867e 100644
--- a/crates/env_var/Cargo.toml
+++ b/crates/env_var/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/env_var.rs"
+test = false
+doctest = false
[dependencies]
gpui_shared_string.workspace = true
diff --git a/crates/etw_tracing/Cargo.toml b/crates/etw_tracing/Cargo.toml
index 639b1d6c4bb..fc67fddf778 100644
--- a/crates/etw_tracing/Cargo.toml
+++ b/crates/etw_tracing/Cargo.toml
@@ -7,6 +7,8 @@ license = "GPL-3.0-or-later"
[lib]
path = "etw_tracing.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/eval_utils/Cargo.toml b/crates/eval_utils/Cargo.toml
index de4ef711488..17b93ccd62f 100644
--- a/crates/eval_utils/Cargo.toml
+++ b/crates/eval_utils/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/eval_utils.rs"
doctest = false
+test = false
[dependencies]
gpui_platform.workspace = true
diff --git a/crates/explorer_command_injector/Cargo.toml b/crates/explorer_command_injector/Cargo.toml
index 44471b7f37a..f5aefe2b611 100644
--- a/crates/explorer_command_injector/Cargo.toml
+++ b/crates/explorer_command_injector/Cargo.toml
@@ -12,6 +12,7 @@ workspace = true
crate-type = ["cdylib"]
path = "src/explorer_command_injector.rs"
doctest = false
+test = false
[features]
default = ["nightly"]
@@ -23,5 +24,3 @@ nightly = []
windows.workspace = true
windows-core.workspace = true
windows-registry.workspace = true
-
-[dependencies]
diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.toml
index be58aa535c1..98835dcd414 100644
--- a/crates/extension/Cargo.toml
+++ b/crates/extension/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/extension.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/extension_api/Cargo.toml b/crates/extension_api/Cargo.toml
index c766954952e..377d7944699 100644
--- a/crates/extension_api/Cargo.toml
+++ b/crates/extension_api/Cargo.toml
@@ -15,6 +15,8 @@ workspace = true
[lib]
path = "src/extension_api.rs"
+test = false
+doctest = false
[dependencies]
serde = { version = "1.0", features = ["derive"] }
diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml
index f4a59df51b6..b574edfa97c 100644
--- a/crates/extensions_ui/Cargo.toml
+++ b/crates/extensions_ui/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/extensions_ui.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/feature_flags/Cargo.toml b/crates/feature_flags/Cargo.toml
index 31ec5ec0da8..b6f564f9bd2 100644
--- a/crates/feature_flags/Cargo.toml
+++ b/crates/feature_flags/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/feature_flags.rs"
+doctest = false
[dependencies]
collections.workspace = true
diff --git a/crates/feature_flags_macros/Cargo.toml b/crates/feature_flags_macros/Cargo.toml
index 794160e6839..aebfa5f7c13 100644
--- a/crates/feature_flags_macros/Cargo.toml
+++ b/crates/feature_flags_macros/Cargo.toml
@@ -8,6 +8,7 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/feature_flags_macros.rs"
proc-macro = true
+doctest = false
[lints]
workspace = true
diff --git a/crates/feedback/Cargo.toml b/crates/feedback/Cargo.toml
index 981fc4ea41c..0938c07435c 100644
--- a/crates/feedback/Cargo.toml
+++ b/crates/feedback/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/feedback.rs"
+test = false
+doctest = false
[features]
test-support = []
diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml
index 73567cf45d1..502c4601d76 100644
--- a/crates/fs/Cargo.toml
+++ b/crates/fs/Cargo.toml
@@ -10,7 +10,7 @@ workspace = true
[lib]
path = "src/fs.rs"
-test = false
+doctest = false
[[test]]
name = "integration"
diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml
index 7ecb8fa18e8..72db89537e5 100644
--- a/crates/git/Cargo.toml
+++ b/crates/git/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/git.rs"
+doctest = false
[features]
test-support = ["rand", "gpui/test-support"]
diff --git a/crates/git_hosting_providers/Cargo.toml b/crates/git_hosting_providers/Cargo.toml
index 9480e0ec28c..beb210cd4d8 100644
--- a/crates/git_hosting_providers/Cargo.toml
+++ b/crates/git_hosting_providers/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/git_hosting_providers.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/git_ui/Cargo.toml b/crates/git_ui/Cargo.toml
index 0916c8450d9..727d4601ed3 100644
--- a/crates/git_ui/Cargo.toml
+++ b/crates/git_ui/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
name = "git_ui"
path = "src/git_ui.rs"
+doctest = false
[features]
test-support = ["multi_buffer/test-support", "remote_connection/test-support"]
diff --git a/crates/git_ui_core/Cargo.toml b/crates/git_ui_core/Cargo.toml
index 9538fec421b..76815af5f2d 100644
--- a/crates/git_ui_core/Cargo.toml
+++ b/crates/git_ui_core/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
name = "git_ui_core"
path = "src/git_ui_core.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/google_ai/Cargo.toml b/crates/google_ai/Cargo.toml
index 3848ed5f875..4bbff2959d4 100644
--- a/crates/google_ai/Cargo.toml
+++ b/crates/google_ai/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/google_ai.rs"
+doctest = false
[features]
schemars = ["dep:schemars"]
diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml
index 7ab3121d08d..e767de582ff 100644
--- a/crates/gpui/Cargo.toml
+++ b/crates/gpui/Cargo.toml
@@ -44,7 +44,6 @@ stacker = ["dep:stacksafe"]
[lib]
path = "src/gpui.rs"
-doctest = false
[dependencies]
accesskit.workspace = true
diff --git a/crates/gpui_apple/Cargo.toml b/crates/gpui_apple/Cargo.toml
index 87fec14653d..ead06aa2c84 100644
--- a/crates/gpui_apple/Cargo.toml
+++ b/crates/gpui_apple/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_apple.rs"
+doctest = false
[features]
default = []
diff --git a/crates/gpui_linux/Cargo.toml b/crates/gpui_linux/Cargo.toml
index ecc9ceb5a4b..c4040af022a 100644
--- a/crates/gpui_linux/Cargo.toml
+++ b/crates/gpui_linux/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_linux.rs"
+doctest = false
[features]
default = ["wayland", "x11"]
diff --git a/crates/gpui_macos/Cargo.toml b/crates/gpui_macos/Cargo.toml
index 009bf6f0a02..3f57a8ccf8b 100644
--- a/crates/gpui_macos/Cargo.toml
+++ b/crates/gpui_macos/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_macos.rs"
+doctest = false
[features]
default = ["gpui/default"]
diff --git a/crates/gpui_macros/Cargo.toml b/crates/gpui_macros/Cargo.toml
index 513dd61d7b1..7e705a17b8f 100644
--- a/crates/gpui_macros/Cargo.toml
+++ b/crates/gpui_macros/Cargo.toml
@@ -16,6 +16,7 @@ inspector = []
path = "src/gpui_macros.rs"
proc-macro = true
doctest = true
+test = false
[dependencies]
heck.workspace = true
@@ -24,4 +25,4 @@ quote.workspace = true
syn.workspace = true
[dev-dependencies]
-gpui = { workspace = true, features = ["inspector"] }
\ No newline at end of file
+gpui = { workspace = true, features = ["inspector"] }
diff --git a/crates/gpui_platform/Cargo.toml b/crates/gpui_platform/Cargo.toml
index ccb9905909b..61be065c9d2 100644
--- a/crates/gpui_platform/Cargo.toml
+++ b/crates/gpui_platform/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_platform.rs"
+doctest = false
[features]
default = []
diff --git a/crates/gpui_shared_string/Cargo.toml b/crates/gpui_shared_string/Cargo.toml
index 36ce41ac7f2..c3ba8736215 100644
--- a/crates/gpui_shared_string/Cargo.toml
+++ b/crates/gpui_shared_string/Cargo.toml
@@ -7,6 +7,8 @@ license = "Apache-2.0"
[lib]
path = "gpui_shared_string.rs"
+test = false
+doctest = false
[dependencies]
schemars.workspace = true
diff --git a/crates/gpui_tokio/Cargo.toml b/crates/gpui_tokio/Cargo.toml
index 5ea343862f4..3ad3cd249ae 100644
--- a/crates/gpui_tokio/Cargo.toml
+++ b/crates/gpui_tokio/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/gpui_tokio.rs"
doctest = false
+test = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/gpui_util/Cargo.toml b/crates/gpui_util/Cargo.toml
index 06810be2065..86843d64c08 100644
--- a/crates/gpui_util/Cargo.toml
+++ b/crates/gpui_util/Cargo.toml
@@ -5,6 +5,9 @@ publish.workspace = true
edition.workspace = true
license = "Apache-2.0"
+[lib]
+doctest = false
+
[dependencies]
log.workspace = true
anyhow.workspace = true
diff --git a/crates/gpui_web/Cargo.toml b/crates/gpui_web/Cargo.toml
index f1f4e36b24f..80c4ca0decf 100644
--- a/crates/gpui_web/Cargo.toml
+++ b/crates/gpui_web/Cargo.toml
@@ -15,6 +15,7 @@ multithreaded = ["dep:wasm_thread", "scheduler/wasm-threads"]
[lib]
path = "src/gpui_web.rs"
+doctest = false
[dependencies]
unicode-properties = "=0.1.3"
diff --git a/crates/gpui_wgpu/Cargo.toml b/crates/gpui_wgpu/Cargo.toml
index 84e76e929db..18d6737c3d8 100644
--- a/crates/gpui_wgpu/Cargo.toml
+++ b/crates/gpui_wgpu/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_wgpu.rs"
+doctest = false
[features]
default = []
diff --git a/crates/gpui_windows/Cargo.toml b/crates/gpui_windows/Cargo.toml
index 76f13ad7a44..3d6221a79a8 100644
--- a/crates/gpui_windows/Cargo.toml
+++ b/crates/gpui_windows/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/gpui_windows.rs"
+doctest = false
[features]
default = ["gpui/default"]
diff --git a/crates/grammars/Cargo.toml b/crates/grammars/Cargo.toml
index 0df1966083a..ef83bb7079e 100644
--- a/crates/grammars/Cargo.toml
+++ b/crates/grammars/Cargo.toml
@@ -9,6 +9,8 @@ workspace = true
[lib]
path = "src/grammars.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/html_to_markdown/Cargo.toml b/crates/html_to_markdown/Cargo.toml
index 70ff3b3555e..8dc631f324b 100644
--- a/crates/html_to_markdown/Cargo.toml
+++ b/crates/html_to_markdown/Cargo.toml
@@ -14,6 +14,7 @@ workspace = true
[lib]
path = "src/html_to_markdown.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/http_client/Cargo.toml b/crates/http_client/Cargo.toml
index efae728ddb4..ba2282a0ca3 100644
--- a/crates/http_client/Cargo.toml
+++ b/crates/http_client/Cargo.toml
@@ -21,7 +21,7 @@ github-download = [
[lib]
path = "src/http_client.rs"
-doctest = true
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/http_client_tls/Cargo.toml b/crates/http_client_tls/Cargo.toml
index 58cce9c7456..3b2f456b3b7 100644
--- a/crates/http_client_tls/Cargo.toml
+++ b/crates/http_client_tls/Cargo.toml
@@ -13,7 +13,8 @@ test-support = []
[lib]
path = "src/http_client_tls.rs"
-doctest = true
+doctest = false
+test = false
[dependencies]
log.workspace = true
diff --git a/crates/http_proxy/Cargo.toml b/crates/http_proxy/Cargo.toml
index 239cd9657d8..1b4faecf7d4 100644
--- a/crates/http_proxy/Cargo.toml
+++ b/crates/http_proxy/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/http_proxy.rs"
+doctest = false
[features]
# Compiles in the `ZED_SANDBOX_PROXY_ALLOW_LOCAL_IPS` escape hatch that lets the
diff --git a/crates/icons/Cargo.toml b/crates/icons/Cargo.toml
index fc00165843a..7eac6af6d18 100644
--- a/crates/icons/Cargo.toml
+++ b/crates/icons/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/icons.rs"
+doctest = false
[dependencies]
serde.workspace = true
diff --git a/crates/input_latency_ui/Cargo.toml b/crates/input_latency_ui/Cargo.toml
index 67322ccb37d..792f8fe107c 100644
--- a/crates/input_latency_ui/Cargo.toml
+++ b/crates/input_latency_ui/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/input_latency_ui.rs"
+test = false
+doctest = false
[dependencies]
chrono.workspace = true
diff --git a/crates/inspector_ui/Cargo.toml b/crates/inspector_ui/Cargo.toml
index e3dd67de2e3..908479bb1f3 100644
--- a/crates/inspector_ui/Cargo.toml
+++ b/crates/inspector_ui/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/inspector_ui.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/install_cli/Cargo.toml b/crates/install_cli/Cargo.toml
index cc849d11c0e..0083c6aa5c5 100644
--- a/crates/install_cli/Cargo.toml
+++ b/crates/install_cli/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/install_cli.rs"
+test = false
+doctest = false
[features]
test-support = []
diff --git a/crates/json_schema_store/Cargo.toml b/crates/json_schema_store/Cargo.toml
index d94e2a29d1b..b9e9bf70c56 100644
--- a/crates/json_schema_store/Cargo.toml
+++ b/crates/json_schema_store/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/json_schema_store.rs"
+doctest = false
[features]
default = []
diff --git a/crates/keymap_editor/Cargo.toml b/crates/keymap_editor/Cargo.toml
index 904447c460f..d119bb8c910 100644
--- a/crates/keymap_editor/Cargo.toml
+++ b/crates/keymap_editor/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/keymap_editor.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/language_core/Cargo.toml b/crates/language_core/Cargo.toml
index 9941b1f8bf4..5281c3e1b34 100644
--- a/crates/language_core/Cargo.toml
+++ b/crates/language_core/Cargo.toml
@@ -6,6 +6,7 @@ publish = false
[lib]
path = "src/language_core.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/language_detection/Cargo.toml b/crates/language_detection/Cargo.toml
index b2d80c6f162..c00b8853933 100644
--- a/crates/language_detection/Cargo.toml
+++ b/crates/language_detection/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/language_detection.rs"
+test = false
+doctest = false
[dependencies]
betlang.workspace = true
diff --git a/crates/language_extension/Cargo.toml b/crates/language_extension/Cargo.toml
index f724dd94896..27939018c8d 100644
--- a/crates/language_extension/Cargo.toml
+++ b/crates/language_extension/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/language_extension.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/language_models/Cargo.toml b/crates/language_models/Cargo.toml
index ada12849dfe..ae6c7c5687a 100644
--- a/crates/language_models/Cargo.toml
+++ b/crates/language_models/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/language_models.rs"
+doctest = false
[features]
test-support = []
diff --git a/crates/language_models_cloud/Cargo.toml b/crates/language_models_cloud/Cargo.toml
index 571d8e86ebc..e73e79a9a09 100644
--- a/crates/language_models_cloud/Cargo.toml
+++ b/crates/language_models_cloud/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/language_models_cloud.rs"
+doctest = false
[dependencies]
anthropic = { workspace = true, features = ["schemars"] }
diff --git a/crates/language_onboarding/Cargo.toml b/crates/language_onboarding/Cargo.toml
index 1ab0a75fc3f..9d4989cb51f 100644
--- a/crates/language_onboarding/Cargo.toml
+++ b/crates/language_onboarding/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/python.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml
index cf35e2e1e16..17ed9024fda 100644
--- a/crates/languages/Cargo.toml
+++ b/crates/languages/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+doctest = false
+
[features]
test-support = [
"load-grammars"
diff --git a/crates/line_ending_selector/Cargo.toml b/crates/line_ending_selector/Cargo.toml
index db67823a6e9..9aa2c3e4c06 100644
--- a/crates/line_ending_selector/Cargo.toml
+++ b/crates/line_ending_selector/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/line_ending_selector.rs"
doctest = false
+test = false
[dependencies]
editor.workspace = true
diff --git a/crates/llama_cpp/Cargo.toml b/crates/llama_cpp/Cargo.toml
index 2309bf5e3ed..91522abe4c7 100644
--- a/crates/llama_cpp/Cargo.toml
+++ b/crates/llama_cpp/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/llama_cpp.rs"
+doctest = false
[features]
default = []
diff --git a/crates/lmstudio/Cargo.toml b/crates/lmstudio/Cargo.toml
index 2ef8b96d32e..c0ed0366b8a 100644
--- a/crates/lmstudio/Cargo.toml
+++ b/crates/lmstudio/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/lmstudio.rs"
+doctest = false
[features]
default = []
diff --git a/crates/markdown_preview/Cargo.toml b/crates/markdown_preview/Cargo.toml
index 662b3b95ff3..1df6d72026f 100644
--- a/crates/markdown_preview/Cargo.toml
+++ b/crates/markdown_preview/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/markdown_preview.rs"
+doctest = false
[features]
test-support = []
diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml
index fcb209df889..c1b728a13e5 100644
--- a/crates/menu/Cargo.toml
+++ b/crates/menu/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/menu.rs"
doctest = false
+test = false
[dependencies]
gpui.workspace = true
diff --git a/crates/miniprofiler_ui/Cargo.toml b/crates/miniprofiler_ui/Cargo.toml
index 09144c0fc68..5c60b582d54 100644
--- a/crates/miniprofiler_ui/Cargo.toml
+++ b/crates/miniprofiler_ui/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/miniprofiler_ui.rs"
+test = false
+doctest = false
[dependencies]
command_palette_hooks.workspace = true
diff --git a/crates/mistral/Cargo.toml b/crates/mistral/Cargo.toml
index c4d475f014a..d76b533f7c3 100644
--- a/crates/mistral/Cargo.toml
+++ b/crates/mistral/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/mistral.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/notifications/Cargo.toml b/crates/notifications/Cargo.toml
index 5a5ff9eee1a..11f27dcb32f 100644
--- a/crates/notifications/Cargo.toml
+++ b/crates/notifications/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/notifications.rs"
doctest = false
+test = false
[features]
test-support = [
diff --git a/crates/oauth_callback_server/Cargo.toml b/crates/oauth_callback_server/Cargo.toml
index 5fcc6233af5..5baf4606130 100644
--- a/crates/oauth_callback_server/Cargo.toml
+++ b/crates/oauth_callback_server/Cargo.toml
@@ -12,6 +12,7 @@ workspace = true
[lib]
path = "src/oauth_callback_server.rs"
doctest = false
+test = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/ollama/Cargo.toml b/crates/ollama/Cargo.toml
index fed74993fa4..01ef988526c 100644
--- a/crates/ollama/Cargo.toml
+++ b/crates/ollama/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/ollama.rs"
+doctest = false
[features]
default = []
diff --git a/crates/onboarding/Cargo.toml b/crates/onboarding/Cargo.toml
index 6994b2ba95c..585bf37a747 100644
--- a/crates/onboarding/Cargo.toml
+++ b/crates/onboarding/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/onboarding.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/open_ai/Cargo.toml b/crates/open_ai/Cargo.toml
index 8b89be9bada..f07e3bbfaa9 100644
--- a/crates/open_ai/Cargo.toml
+++ b/crates/open_ai/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/open_ai.rs"
+doctest = false
[features]
default = []
diff --git a/crates/open_path_prompt/Cargo.toml b/crates/open_path_prompt/Cargo.toml
index bbdba46ea4b..55e143de895 100644
--- a/crates/open_path_prompt/Cargo.toml
+++ b/crates/open_path_prompt/Cargo.toml
@@ -31,3 +31,4 @@ workspace = true
[lib]
path = "src/open_path_prompt.rs"
+doctest = false
diff --git a/crates/open_router/Cargo.toml b/crates/open_router/Cargo.toml
index 76e9a0d2137..bf14a14c2b3 100644
--- a/crates/open_router/Cargo.toml
+++ b/crates/open_router/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/open_router.rs"
+doctest = false
[features]
default = []
diff --git a/crates/openai_subscribed/Cargo.toml b/crates/openai_subscribed/Cargo.toml
index 4ce7c8db7f9..0eca2c0f452 100644
--- a/crates/openai_subscribed/Cargo.toml
+++ b/crates/openai_subscribed/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/openai_subscribed.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/opencode/Cargo.toml b/crates/opencode/Cargo.toml
index 035d78d53f4..01ccb35cb9b 100644
--- a/crates/opencode/Cargo.toml
+++ b/crates/opencode/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/opencode.rs"
test = false
+doctest = false
[features]
default = []
diff --git a/crates/path/Cargo.toml b/crates/path/Cargo.toml
index c50e6ef97c4..f1668b78ced 100644
--- a/crates/path/Cargo.toml
+++ b/crates/path/Cargo.toml
@@ -7,6 +7,7 @@ license = "Apache-2.0"
[lib]
path = "src/path.rs"
+doctest = false
[features]
test-support = []
diff --git a/crates/paths/Cargo.toml b/crates/paths/Cargo.toml
index 31eaaa31a96..aed676abfe9 100644
--- a/crates/paths/Cargo.toml
+++ b/crates/paths/Cargo.toml
@@ -13,6 +13,7 @@ test-support = []
[lib]
path = "src/paths.rs"
+doctest = false
[dependencies]
const_format.workspace = true
diff --git a/crates/picker_preview/Cargo.toml b/crates/picker_preview/Cargo.toml
index 12d7aec9cc3..874148804b4 100644
--- a/crates/picker_preview/Cargo.toml
+++ b/crates/picker_preview/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/picker_preview.rs"
doctest = false
+test = false
[dependencies]
diff --git a/crates/platform_title_bar/Cargo.toml b/crates/platform_title_bar/Cargo.toml
index 8497877d045..8f154bc897f 100644
--- a/crates/platform_title_bar/Cargo.toml
+++ b/crates/platform_title_bar/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/platform_title_bar.rs"
doctest = false
+test = false
[dependencies]
gpui.workspace = true
diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml
index 937a123b15b..a0e6d1e418f 100644
--- a/crates/project/Cargo.toml
+++ b/crates/project/Cargo.toml
@@ -11,7 +11,6 @@ workspace = true
[lib]
path = "src/project.rs"
doctest = false
-test = false
[[test]]
name = "integration"
diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs
index fe62b0ea048..68ff1f73523 100644
--- a/crates/project/src/git_store.rs
+++ b/crates/project/src/git_store.rs
@@ -11746,29 +11746,25 @@ mod tests {
#[gpui::test]
async fn test_merge_base_status_uses_worktree_contents(cx: &mut TestAppContext) {
- use util::rel_path::rel_path;
+ use util::{path, rel_path::rel_path};
init_test(cx);
+ let project_root = Path::new(path!("/project"));
+ let dot_git = project_root.join(".git");
let fs = FakeFs::new(cx.executor());
fs.insert_tree(
- Path::new("/project"),
+ project_root,
json!({
".git": {},
"committed.txt": "base\n",
}),
)
.await;
- fs.set_head_and_index_for_repo(
- Path::new("/project/.git"),
- &[("committed.txt", "head\n".into())],
- );
- fs.set_merge_base_content_for_repo(
- Path::new("/project/.git"),
- &[("committed.txt", "base\n".into())],
- );
+ fs.set_head_and_index_for_repo(&dot_git, &[("committed.txt", "head\n".into())]);
+ fs.set_merge_base_content_for_repo(&dot_git, &[("committed.txt", "base\n".into())]);
- let project = Project::test(fs.clone(), [Path::new("/project")], cx).await;
+ let project = Project::test(fs.clone(), [project_root], cx).await;
project
.update(cx, |project, cx| project.git_scans_complete(cx))
.await;
@@ -11836,10 +11832,7 @@ mod tests {
assert_eq!(display_snapshot.statuses_by_path.iter().count(), 0);
});
- fs.set_merge_base_content_for_repo(
- Path::new("/project/.git"),
- &[("committed.txt", "head\n".into())],
- );
+ fs.set_merge_base_content_for_repo(&dot_git, &[("committed.txt", "head\n".into())]);
let repository =
project.read_with(cx, |project, cx| project.active_repository(cx).unwrap());
let branches = repository.read_with(cx, |repository, _| {
diff --git a/crates/prompt_store/Cargo.toml b/crates/prompt_store/Cargo.toml
index bc4179e5e72..82d24e8944b 100644
--- a/crates/prompt_store/Cargo.toml
+++ b/crates/prompt_store/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/prompt_store.rs"
+doctest = false
[dependencies]
agent_skills.workspace = true
diff --git a/crates/refineable/Cargo.toml b/crates/refineable/Cargo.toml
index 4c4e02851b7..98bfd84bb81 100644
--- a/crates/refineable/Cargo.toml
+++ b/crates/refineable/Cargo.toml
@@ -12,6 +12,7 @@ workspace = true
[lib]
path = "src/refineable.rs"
doctest = false
+test = false
[dependencies]
derive_refineable.workspace = true
diff --git a/crates/refineable/derive_refineable/Cargo.toml b/crates/refineable/derive_refineable/Cargo.toml
index 75e9ef1f8f2..8c3f7c1dfb0 100644
--- a/crates/refineable/derive_refineable/Cargo.toml
+++ b/crates/refineable/derive_refineable/Cargo.toml
@@ -14,6 +14,7 @@ workspace = true
path = "src/derive_refineable.rs"
proc-macro = true
doctest = false
+test = false
[dependencies]
proc-macro2.workspace = true
diff --git a/crates/release_channel/Cargo.toml b/crates/release_channel/Cargo.toml
index 54a8afff8c1..0454e5c5ccf 100644
--- a/crates/release_channel/Cargo.toml
+++ b/crates/release_channel/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+doctest = false
+
[dependencies]
gpui.workspace = true
semver.workspace = true
diff --git a/crates/remote_connection/Cargo.toml b/crates/remote_connection/Cargo.toml
index 02cd44671c1..783ac9de095 100644
--- a/crates/remote_connection/Cargo.toml
+++ b/crates/remote_connection/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/remote_connection.rs"
+doctest = false
[features]
default = []
diff --git a/crates/reqwest_client/Cargo.toml b/crates/reqwest_client/Cargo.toml
index ae1150051a5..066c1b0ef57 100644
--- a/crates/reqwest_client/Cargo.toml
+++ b/crates/reqwest_client/Cargo.toml
@@ -13,7 +13,7 @@ test-support = []
[lib]
path = "src/reqwest_client.rs"
-doctest = true
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml
index 76515d6b9d0..41fb3b87fd5 100644
--- a/crates/rope/Cargo.toml
+++ b/crates/rope/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/rope.rs"
+doctest = false
[dependencies]
heapless.workspace = true
diff --git a/crates/sandbox/Cargo.toml b/crates/sandbox/Cargo.toml
index a04f7b2bc23..672d0bfb0bc 100644
--- a/crates/sandbox/Cargo.toml
+++ b/crates/sandbox/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/sandbox.rs"
+doctest = false
[features]
# Builds `bwrap_test_helper`, the behavior helper driven by the NixOS sandbox
diff --git a/crates/settings_json/Cargo.toml b/crates/settings_json/Cargo.toml
index a780b7fa0da..d84d9bb9cd3 100644
--- a/crates/settings_json/Cargo.toml
+++ b/crates/settings_json/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/settings_json.rs"
+doctest = false
[features]
default = ["editing"]
diff --git a/crates/settings_macros/Cargo.toml b/crates/settings_macros/Cargo.toml
index 175c2f26a3a..ecb60970c72 100644
--- a/crates/settings_macros/Cargo.toml
+++ b/crates/settings_macros/Cargo.toml
@@ -8,6 +8,8 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/settings_macros.rs"
proc-macro = true
+test = false
+doctest = false
[lints]
workspace = true
diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.toml
index b854811fcdf..861b71e221c 100644
--- a/crates/settings_ui/Cargo.toml
+++ b/crates/settings_ui/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/settings_ui.rs"
+doctest = false
[features]
default = []
diff --git a/crates/shell_command_parser/Cargo.toml b/crates/shell_command_parser/Cargo.toml
index 0e00eac7efd..8dec81812a5 100644
--- a/crates/shell_command_parser/Cargo.toml
+++ b/crates/shell_command_parser/Cargo.toml
@@ -10,8 +10,7 @@ workspace = true
[lib]
path = "src/shell_command_parser.rs"
+doctest = false
[dependencies]
brush-parser.workspace = true
-
-[dev-dependencies]
diff --git a/crates/sidebar/Cargo.toml b/crates/sidebar/Cargo.toml
index e15b7b339e0..6d4b5b8e320 100644
--- a/crates/sidebar/Cargo.toml
+++ b/crates/sidebar/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/sidebar.rs"
+doctest = false
[features]
default = []
diff --git a/crates/snippet_provider/Cargo.toml b/crates/snippet_provider/Cargo.toml
index c1f04117d48..da1ed237d7c 100644
--- a/crates/snippet_provider/Cargo.toml
+++ b/crates/snippet_provider/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+doctest = false
+
[features]
test-support = []
diff --git a/crates/snippets_ui/Cargo.toml b/crates/snippets_ui/Cargo.toml
index 7335accac0c..a52a2a33cb0 100644
--- a/crates/snippets_ui/Cargo.toml
+++ b/crates/snippets_ui/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/snippets_ui.rs"
+test = false
+doctest = false
[dependencies]
file_icons.workspace = true
diff --git a/crates/sqlez/Cargo.toml b/crates/sqlez/Cargo.toml
index f5db6f96a0d..f3b666911e9 100644
--- a/crates/sqlez/Cargo.toml
+++ b/crates/sqlez/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+doctest = false
+
[dependencies]
anyhow.workspace = true
collections.workspace = true
diff --git a/crates/sqlez_macros/Cargo.toml b/crates/sqlez_macros/Cargo.toml
index cff96d0b894..0c9beac3904 100644
--- a/crates/sqlez_macros/Cargo.toml
+++ b/crates/sqlez_macros/Cargo.toml
@@ -12,6 +12,7 @@ workspace = true
path = "src/sqlez_macros.rs"
proc-macro = true
doctest = false
+test = false
[dependencies]
sqlez.workspace = true
diff --git a/crates/streaming_diff/Cargo.toml b/crates/streaming_diff/Cargo.toml
index d3365d5793a..8d13705b9cc 100644
--- a/crates/streaming_diff/Cargo.toml
+++ b/crates/streaming_diff/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/streaming_diff.rs"
+doctest = false
[dependencies]
ordered-float.workspace = true
diff --git a/crates/svg_preview/Cargo.toml b/crates/svg_preview/Cargo.toml
index 9ee085ee073..b206b616d97 100644
--- a/crates/svg_preview/Cargo.toml
+++ b/crates/svg_preview/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/svg_preview.rs"
+test = false
+doctest = false
[dependencies]
multi_buffer.workspace = true
diff --git a/crates/system_specs/Cargo.toml b/crates/system_specs/Cargo.toml
index 7af62d934af..dcd6dd1e8c3 100644
--- a/crates/system_specs/Cargo.toml
+++ b/crates/system_specs/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/system_specs.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/tabular_data_preview/Cargo.toml b/crates/tabular_data_preview/Cargo.toml
index a9d263b1304..dfa12397019 100644
--- a/crates/tabular_data_preview/Cargo.toml
+++ b/crates/tabular_data_preview/Cargo.toml
@@ -6,6 +6,7 @@ edition.workspace = true
[lib]
path = "src/tabular_data_preview.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/tasks_ui/Cargo.toml b/crates/tasks_ui/Cargo.toml
index 89a1426a5d9..7512b225214 100644
--- a/crates/tasks_ui/Cargo.toml
+++ b/crates/tasks_ui/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/tasks_ui.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml
index f79c80bb17e..263ebbab25a 100644
--- a/crates/telemetry/Cargo.toml
+++ b/crates/telemetry/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/telemetry.rs"
+test = false
[dependencies]
serde_json.workspace = true
diff --git a/crates/telemetry_events/Cargo.toml b/crates/telemetry_events/Cargo.toml
index 6a5149c5458..1094f138962 100644
--- a/crates/telemetry_events/Cargo.toml
+++ b/crates/telemetry_events/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/telemetry_events.rs"
+test = false
+doctest = false
[dependencies]
semver.workspace = true
diff --git a/crates/theme_extension/Cargo.toml b/crates/theme_extension/Cargo.toml
index ca5b71de20b..3094ddb0b55 100644
--- a/crates/theme_extension/Cargo.toml
+++ b/crates/theme_extension/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/theme_extension.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/toolchain_selector/Cargo.toml b/crates/toolchain_selector/Cargo.toml
index 09f9acceabd..0c3cd7ce0b0 100644
--- a/crates/toolchain_selector/Cargo.toml
+++ b/crates/toolchain_selector/Cargo.toml
@@ -27,3 +27,4 @@ workspace = true
[lib]
path = "src/toolchain_selector.rs"
doctest = false
+test = false
diff --git a/crates/ui_input/Cargo.toml b/crates/ui_input/Cargo.toml
index fef5216266f..6ee0df793f9 100644
--- a/crates/ui_input/Cargo.toml
+++ b/crates/ui_input/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/ui_input.rs"
+test = false
+doctest = false
[dependencies]
component.workspace = true
diff --git a/crates/ui_macros/Cargo.toml b/crates/ui_macros/Cargo.toml
index 74bd2186a75..e2e3f96697e 100644
--- a/crates/ui_macros/Cargo.toml
+++ b/crates/ui_macros/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/ui_macros.rs"
proc-macro = true
+test = false
[dependencies]
quote.workspace = true
diff --git a/crates/ui_prompt/Cargo.toml b/crates/ui_prompt/Cargo.toml
index b8425a1a661..a8644cc8aed 100644
--- a/crates/ui_prompt/Cargo.toml
+++ b/crates/ui_prompt/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/ui_prompt.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/util_macros/Cargo.toml b/crates/util_macros/Cargo.toml
index f72955b3aee..5eb4173eb7e 100644
--- a/crates/util_macros/Cargo.toml
+++ b/crates/util_macros/Cargo.toml
@@ -12,7 +12,7 @@ workspace = true
[lib]
path = "src/util_macros.rs"
proc-macro = true
-doctest = false
+test = false
[dependencies]
quote.workspace = true
diff --git a/crates/vim_mode_setting/Cargo.toml b/crates/vim_mode_setting/Cargo.toml
index 6306d125b27..99814994bbe 100644
--- a/crates/vim_mode_setting/Cargo.toml
+++ b/crates/vim_mode_setting/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/vim_mode_setting.rs"
+test = false
+doctest = false
[dependencies]
gpui.workspace = true
diff --git a/crates/web_search/Cargo.toml b/crates/web_search/Cargo.toml
index 1da66095144..9b28a6914be 100644
--- a/crates/web_search/Cargo.toml
+++ b/crates/web_search/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/web_search.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/web_search_providers/Cargo.toml b/crates/web_search_providers/Cargo.toml
index 92a33b73822..e745f19299c 100644
--- a/crates/web_search_providers/Cargo.toml
+++ b/crates/web_search_providers/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/web_search_providers.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/windows_resources/Cargo.toml b/crates/windows_resources/Cargo.toml
index 4344040660c..41a277cccd6 100644
--- a/crates/windows_resources/Cargo.toml
+++ b/crates/windows_resources/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/windows_resources.rs"
doctest = false
+test = false
[target.'cfg(target_os = "windows")'.dependencies]
embed-resource = "3.0"
diff --git a/crates/worktree/Cargo.toml b/crates/worktree/Cargo.toml
index 99cbf3268aa..fb0ef41338a 100644
--- a/crates/worktree/Cargo.toml
+++ b/crates/worktree/Cargo.toml
@@ -8,7 +8,6 @@ license = "GPL-3.0-or-later"
[lib]
path = "src/worktree.rs"
doctest = false
-test = false
[[test]]
name = "integration"
diff --git a/crates/x_ai/Cargo.toml b/crates/x_ai/Cargo.toml
index 8ff020df8c1..bf6a4631499 100644
--- a/crates/x_ai/Cargo.toml
+++ b/crates/x_ai/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/x_ai.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/x_ai_subscribed/Cargo.toml b/crates/x_ai_subscribed/Cargo.toml
index e9ab153ef1a..e1d1420952d 100644
--- a/crates/x_ai_subscribed/Cargo.toml
+++ b/crates/x_ai_subscribed/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/x_ai_subscribed.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/zed_actions/Cargo.toml b/crates/zed_actions/Cargo.toml
index 08dd7360026..5f2dd6fa58a 100644
--- a/crates/zed_actions/Cargo.toml
+++ b/crates/zed_actions/Cargo.toml
@@ -8,6 +8,10 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+test = false
+doctest = false
+
[dependencies]
gpui.workspace = true
schemars.workspace = true
diff --git a/crates/zed_credentials_provider/Cargo.toml b/crates/zed_credentials_provider/Cargo.toml
index 653aa05b808..50bbc74cbbe 100644
--- a/crates/zed_credentials_provider/Cargo.toml
+++ b/crates/zed_credentials_provider/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/zed_credentials_provider.rs"
+test = false
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/zed_env_vars/Cargo.toml b/crates/zed_env_vars/Cargo.toml
index bf863b74256..28a35c8f339 100644
--- a/crates/zed_env_vars/Cargo.toml
+++ b/crates/zed_env_vars/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/zed_env_vars.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/zeta_prompt/Cargo.toml b/crates/zeta_prompt/Cargo.toml
index 8acd91a7a43..e4601383f98 100644
--- a/crates/zeta_prompt/Cargo.toml
+++ b/crates/zeta_prompt/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/zeta_prompt.rs"
+doctest = false
[dependencies]
anyhow.workspace = true
diff --git a/crates/zlog/Cargo.toml b/crates/zlog/Cargo.toml
index 46f2cff3241..b1a8ce3a435 100644
--- a/crates/zlog/Cargo.toml
+++ b/crates/zlog/Cargo.toml
@@ -10,6 +10,7 @@ workspace = true
[lib]
path = "src/zlog.rs"
+doctest = false
[features]
default = []
diff --git a/crates/zlog_settings/Cargo.toml b/crates/zlog_settings/Cargo.toml
index 39c3b6a1934..f7ca29c82ad 100644
--- a/crates/zlog_settings/Cargo.toml
+++ b/crates/zlog_settings/Cargo.toml
@@ -10,6 +10,8 @@ workspace = true
[lib]
path = "src/zlog_settings.rs"
+test = false
+doctest = false
[features]
default = []
diff --git a/crates/ztracing/Cargo.toml b/crates/ztracing/Cargo.toml
index e823785acd5..c08ca435cbc 100644
--- a/crates/ztracing/Cargo.toml
+++ b/crates/ztracing/Cargo.toml
@@ -8,6 +8,9 @@ license = "Apache-2.0"
[lints]
workspace = true
+[lib]
+doctest = false
+
[features]
tracy = ["tracing-tracy", "tracy-client"]
web = ["dep:async-channel", "dep:js-sys", "dep:wasm-bindgen", "dep:web-sys"]
diff --git a/crates/ztracing_macro/Cargo.toml b/crates/ztracing_macro/Cargo.toml
index 5420bc6063c..78feebb8730 100644
--- a/crates/ztracing_macro/Cargo.toml
+++ b/crates/ztracing_macro/Cargo.toml
@@ -7,5 +7,5 @@ license = "Apache-2.0"
[lib]
proc-macro = true
-
-[dependencies]
+test = false
+doctest = false
diff --git a/extensions/glsl/Cargo.toml b/extensions/glsl/Cargo.toml
index 2c08cf936de..4c68d56c8a7 100644
--- a/extensions/glsl/Cargo.toml
+++ b/extensions/glsl/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/glsl.rs"
crate-type = ["cdylib"]
+test = false
[dependencies]
zed_extension_api = "0.1.0"
diff --git a/extensions/html/Cargo.toml b/extensions/html/Cargo.toml
index aefe0eb120b..80051a25926 100644
--- a/extensions/html/Cargo.toml
+++ b/extensions/html/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/html.rs"
crate-type = ["cdylib"]
+test = false
[dependencies]
zed_extension_api = "0.7.0"
diff --git a/extensions/proto/Cargo.toml b/extensions/proto/Cargo.toml
index 685b3271f5a..80123069ac5 100644
--- a/extensions/proto/Cargo.toml
+++ b/extensions/proto/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/proto.rs"
crate-type = ["cdylib"]
+test = false
[dependencies]
zed_extension_api = "0.7.0"
diff --git a/extensions/test-extension/Cargo.toml b/extensions/test-extension/Cargo.toml
index 7d2412b98f3..9de84dec270 100644
--- a/extensions/test-extension/Cargo.toml
+++ b/extensions/test-extension/Cargo.toml
@@ -11,6 +11,7 @@ workspace = true
[lib]
path = "src/test_extension.rs"
crate-type = ["cdylib"]
+test = false
[dependencies]
zed_extension_api = { path = "../../crates/extension_api" }
diff --git a/tooling/compliance/Cargo.toml b/tooling/compliance/Cargo.toml
index f98fef63053..8a781b3a680 100644
--- a/tooling/compliance/Cargo.toml
+++ b/tooling/compliance/Cargo.toml
@@ -8,6 +8,9 @@ license = "GPL-3.0-or-later"
[lints]
workspace = true
+[lib]
+doctest = false
+
[features]
octo-client = ["dep:octocrab", "dep:jsonwebtoken", "dep:tokio"]
diff --git a/tooling/perf/Cargo.toml b/tooling/perf/Cargo.toml
index d4acad1fdb8..1dc07d89b39 100644
--- a/tooling/perf/Cargo.toml
+++ b/tooling/perf/Cargo.toml
@@ -6,8 +6,6 @@ edition.workspace = true
license = "Apache-2.0"
description = "A tool for measuring Zed test performance, with too many Clippy lints"
-[lib]
-
# Some personal lint preferences :3
[lints.rust]
missing_docs = "warn"
@@ -30,3 +28,7 @@ disallowed_methods = { level = "allow", priority = 1}
collections.workspace = true
serde.workspace = true
serde_json.workspace = true
+
+[lib]
+test = false
+doctest = false
diff --git a/tooling/xtask/src/tasks/workflows/autofix_pr.rs b/tooling/xtask/src/tasks/workflows/autofix_pr.rs
index 7ccb8539ad9..403f5c51b15 100644
--- a/tooling/xtask/src/tasks/workflows/autofix_pr.rs
+++ b/tooling/xtask/src/tasks/workflows/autofix_pr.rs
@@ -74,7 +74,7 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo
}
fn run_cargo_shear_fix() -> Step<Run> {
- named::bash("cargo shear --fix")
+ named::bash("cargo shear --fix --check-test-targets")
}
fn run_clippy_fix() -> Step<Run> {
diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs
index 2dd40c45e4c..7ab25bcdec9 100644
--- a/tooling/xtask/src/tasks/workflows/run_tests.rs
+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs
@@ -464,7 +464,7 @@ fn check_dependencies() -> NamedJob {
}
fn run_cargo_shear() -> Step<Run> {
- named::bash("cargo shear --locked --deny-warnings")
+ named::bash("cargo shear --locked --deny-warnings --check-test-targets")
}
fn check_cargo_lock() -> Step<Run> {