diff --git a/ast/src/annotation.rs b/ast/src/annotation.rs index b81c309478..5b3060afc0 100644 --- a/ast/src/annotation.rs +++ b/ast/src/annotation.rs @@ -38,7 +38,7 @@ pub fn load_annotation( Definition::Circuit(_) => unimplemented!("annotated circuits are not supported yet"), // TODO need someone to take functions annotated with @test to be moved from function to tests. Definition::Function(function) => match ast_annotation.name { - AnnotationName::Test(_) | AnnotationName::TestWithContext(_) => { + AnnotationName::Test(_) => { let ident = Identifier::from(function.identifier.clone()); _functions.remove(&ident.clone()); @@ -58,8 +58,7 @@ pub fn load_annotated_test(test: TestFunction, annotation: Annotation, tests: &m let ast_arguments = annotation.arguments; match name { - AnnotationName::Test(_) => (), - AnnotationName::TestWithContext(_) if ast_arguments.is_some() => { + AnnotationName::Test(_) if ast_arguments.is_some() => { load_annotated_test_context(test, ast_arguments.unwrap(), tests) } _ => (), diff --git a/grammar/src/annotations/annotation_name.rs b/grammar/src/annotations/annotation_name.rs index 23b85785b5..a857de3426 100644 --- a/grammar/src/annotations/annotation_name.rs +++ b/grammar/src/annotations/annotation_name.rs @@ -24,7 +24,6 @@ use serde::Serialize; #[pest_ast(rule(Rule::annotation_name))] pub enum AnnotationName<'ast> { Test(Test<'ast>), - TestWithContext(TestWithContext<'ast>), } #[derive(Clone, Debug, FromPest, PartialEq, Serialize)] @@ -34,11 +33,3 @@ pub struct Test<'ast> { #[serde(with = "SpanDef")] pub span: Span<'ast>, } - -#[derive(Clone, Debug, FromPest, PartialEq, Serialize)] -#[pest_ast(rule(Rule::test))] -pub struct TestWithContext<'ast> { - #[pest_ast(outer())] - #[serde(with = "SpanDef")] - pub span: Span<'ast>, -}