From 05e6cbf31028b58a71ace5f09f09a19631844b9f Mon Sep 17 00:00:00 2001 From: vsrs Date: Mon, 29 Jun 2020 14:05:52 +0300 Subject: [PATCH] Fix "Run | Debug" lens for examples --- crates/rust-analyzer/src/handlers.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/rust-analyzer/src/handlers.rs b/crates/rust-analyzer/src/handlers.rs index 38e3c3324f..e35a5e846a 100644 --- a/crates/rust-analyzer/src/handlers.rs +++ b/crates/rust-analyzer/src/handlers.rs @@ -1283,7 +1283,7 @@ fn should_skip_target(runnable: &Runnable, cargo_spec: Option<&CargoTargetSpec>) RunnableKind::Bin => { // Do not suggest binary run on other target than binary match &cargo_spec { - Some(spec) => spec.target_kind != TargetKind::Bin, + Some(spec) => !matches!(spec.target_kind, TargetKind::Bin | TargetKind::Example), None => true, } }