From 33391c55c241ac20af3f472ac1d516e5f373000d Mon Sep 17 00:00:00 2001 From: ychenfo Date: Fri, 13 Aug 2021 14:22:49 +0800 Subject: [PATCH] add Sync bound to Symbol resolver in top level --- nac3core/src/top_level.rs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/nac3core/src/top_level.rs b/nac3core/src/top_level.rs index 3e26c6706..e502903ca 100644 --- a/nac3core/src/top_level.rs +++ b/nac3core/src/top_level.rs @@ -26,7 +26,7 @@ pub enum TopLevelDef { // ancestor classes, including itself. ancestors: Vec, // symbol resolver of the module defined the class, none if it is built-in type - resolver: Option>>, + resolver: Option>>, }, Function { // prefix for symbol, should be unique globally, and not ending with numbers @@ -46,7 +46,7 @@ pub enum TopLevelDef { /// rigid type variables that would be substituted when the function is instantiated. instance_to_stmt: HashMap>, usize)>, // symbol resolver of the module defined the class - resolver: Option>>, + resolver: Option>>, }, Initializer { class_id: DefinitionId, @@ -167,7 +167,7 @@ impl TopLevelComposer { /// already include the definition_id of itself inside the ancestors vector pub fn make_top_level_class_def( index: usize, - resolver: Option>>, + resolver: Option>>, ) -> TopLevelDef { TopLevelDef::Class { object_id: DefinitionId(index), @@ -182,7 +182,7 @@ impl TopLevelComposer { pub fn make_top_level_function_def( name: String, ty: Type, - resolver: Option>>, + resolver: Option>>, ) -> TopLevelDef { TopLevelDef::Function { name, @@ -196,7 +196,7 @@ impl TopLevelComposer { pub fn register_top_level( &mut self, ast: ast::Stmt<()>, - resolver: Option>>, + resolver: Option>>, ) -> Result<(String, DefinitionId, Type), String> { // get write access to the lists let (