From 5d273f10cdd4da6f0670b41b2fdad4679d3df877 Mon Sep 17 00:00:00 2001 From: Jeremy Kolb Date: Sat, 12 Jan 2019 18:40:54 -0500 Subject: Add bench runnable and code lens --- crates/ra_ide_api/src/runnables.rs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'crates/ra_ide_api') 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 { pub enum RunnableKind { Test { name: String }, TestMod { path: String }, + Bench { name: String }, Bin, } @@ -48,6 +49,10 @@ fn runnable_fn(fn_def: &ast::FnDef) -> Option { RunnableKind::Test { name: name.to_string(), } + } else if fn_def.has_atom_attr("bench") { + RunnableKind::Bench { + name: name.to_string(), + } } else { return None; }; -- cgit v1.2.3