diff options
Diffstat (limited to 'crates/ra_ide_api/src/runnables.rs')
-rw-r--r-- | crates/ra_ide_api/src/runnables.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/crates/ra_ide_api/src/runnables.rs b/crates/ra_ide_api/src/runnables.rs index 98b1d2d55..53e49da5b 100644 --- a/crates/ra_ide_api/src/runnables.rs +++ b/crates/ra_ide_api/src/runnables.rs | |||
@@ -17,6 +17,7 @@ pub struct Runnable { | |||
17 | pub enum RunnableKind { | 17 | pub enum RunnableKind { |
18 | Test { name: String }, | 18 | Test { name: String }, |
19 | TestMod { path: String }, | 19 | TestMod { path: String }, |
20 | Bench { name: String }, | ||
20 | Bin, | 21 | Bin, |
21 | } | 22 | } |
22 | 23 | ||
@@ -48,6 +49,10 @@ fn runnable_fn(fn_def: &ast::FnDef) -> Option<Runnable> { | |||
48 | RunnableKind::Test { | 49 | RunnableKind::Test { |
49 | name: name.to_string(), | 50 | name: name.to_string(), |
50 | } | 51 | } |
52 | } else if fn_def.has_atom_attr("bench") { | ||
53 | RunnableKind::Bench { | ||
54 | name: name.to_string(), | ||
55 | } | ||
51 | } else { | 56 | } else { |
52 | return None; | 57 | return None; |
53 | }; | 58 | }; |