diff --git a/crates/move-compiler/src/expansion/alias_map_builder.rs b/crates/move-compiler/src/expansion/alias_map_builder.rs index e229a5a461..2789cef8f5 100644 --- a/crates/move-compiler/src/expansion/alias_map_builder.rs +++ b/crates/move-compiler/src/expansion/alias_map_builder.rs @@ -128,8 +128,9 @@ impl AliasMapBuilder { module_members, } => match kind { // constants and functions are not in the leading access namespace - ModuleMemberKind::Constant - | ModuleMemberKind::Function => remove_dup(module_members, alias), + ModuleMemberKind::Constant | ModuleMemberKind::Function => { + remove_dup(module_members, alias) + } // structs are in the leading access namespace in addition to the module members // namespace ModuleMemberKind::Struct => { @@ -186,8 +187,7 @@ impl AliasMapBuilder { module_members, } => match kind { // constants and functions are not in the leading access namespace - ModuleMemberKind::Constant - | ModuleMemberKind::Function => { + ModuleMemberKind::Constant | ModuleMemberKind::Function => { let entry = (MemberEntry::Member(ident, member), is_implicit); module_members.add(alias, entry).unwrap(); } diff --git a/crates/move-compiler/src/expansion/translate.rs b/crates/move-compiler/src/expansion/translate.rs index 859503d7ac..ce452617dc 100644 --- a/crates/move-compiler/src/expansion/translate.rs +++ b/crates/move-compiler/src/expansion/translate.rs @@ -217,7 +217,10 @@ impl<'env, 'map> Context<'env, 'map> { } else { Uncategorized::DeprecatedWillBeRemoved }, - (loc, "Specification blocks are deprecated and are no longer used") + ( + loc, + "Specification blocks are deprecated and are no longer used" + ) ) } } @@ -2103,7 +2106,6 @@ fn aliases_from_member( Some(P::ModuleMember::Struct(s)) } P::ModuleMember::Spec(s) => Some(P::ModuleMember::Spec(s)), - } } diff --git a/crates/move-compiler/src/parser/syntax.rs b/crates/move-compiler/src/parser/syntax.rs index fc3a106b88..8993097b62 100644 --- a/crates/move-compiler/src/parser/syntax.rs +++ b/crates/move-compiler/src/parser/syntax.rs @@ -3161,6 +3161,7 @@ fn parse_module_member(context: &mut Context) -> Result { Tok::Invariant => { context.tokens.match_doc_comments(); let spec_string = consume_spec_string(context)?; + consume_token(context.tokens, Tok::Semicolon)?; Ok(ModuleMember::Spec(spec_string)) } Tok::Spec => { @@ -3265,12 +3266,6 @@ fn consume_spec_string(context: &mut Context) -> Result, Box