@@ -5,20 +5,20 @@ use super::super::ast::{
55 InstructionSequence , LiteralValue , TaggedProgramInstruction , UntaggedProgramInstruction ,
66} ;
77use super :: super :: collections:: OneOrMore ;
8- use super :: super :: eval:: { make_empty_rc_block_for_test , symbol_name_lookup , EvaluationContext } ;
8+ use super :: super :: eval:: { EvaluationContext , make_empty_rc_block_for_test , symbol_name_lookup } ;
99use super :: super :: manuscript:: { ManuscriptBlock , PunchCommand , SourceFile } ;
1010use super :: super :: memorymap:: LocatedBlock ;
1111use super :: super :: source:: Source ;
1212use super :: super :: span:: * ;
1313use super :: super :: symbol:: SymbolName ;
1414use super :: super :: symtab:: IndexRegisterAssigner ;
15+ use super :: { Binary , BinaryChunk , assemble_pass1} ;
1516use super :: { assemble_nonempty_valid_input, assemble_source} ;
16- use super :: { assemble_pass1, Binary , BinaryChunk } ;
1717use base:: {
1818 charset:: Script ,
1919 prelude:: {
20- u18 , u36 , u6 , Address , Instruction , Opcode , OperandAddress , SymbolicInstruction ,
21- Unsigned18Bit , Unsigned36Bit , Unsigned5Bit , Unsigned6Bit ,
20+ Address , Instruction , Opcode , OperandAddress , SymbolicInstruction , Unsigned5Bit ,
21+ Unsigned6Bit , Unsigned18Bit , Unsigned36Bit , u6 , u18 , u36 ,
2222 } ,
2323} ;
2424
@@ -136,26 +136,33 @@ fn test_metacommand_dec_changes_default_base() {
136136 "no index register should have been default-assigned"
137137 ) ;
138138
139- if let [ LocatedBlock {
140- origin : _,
141- location : _,
142- sequences,
143- } ] = directive. blocks . values ( ) . collect :: < Vec < _ > > ( ) . as_slice ( )
139+ if let [
140+ LocatedBlock {
141+ origin : _,
142+ location : _,
143+ sequences,
144+ } ,
145+ ] = directive. blocks . values ( ) . collect :: < Vec < _ > > ( ) . as_slice ( )
144146 {
145- if let [ InstructionSequence {
146- local_symbols : None ,
147- instructions,
148- } ] = sequences. as_slice ( )
147+ if let [
148+ InstructionSequence {
149+ local_symbols : None ,
150+ instructions,
151+ } ,
152+ ] = sequences. as_slice ( )
149153 {
150- if let [ TaggedProgramInstruction {
151- span : _,
152- tags : tags1,
153- instruction : first_instruction,
154- } , TaggedProgramInstruction {
155- span : _,
156- tags : tags2,
157- instruction : second_instruction,
158- } ] = instructions. as_slice ( )
154+ if let [
155+ TaggedProgramInstruction {
156+ span : _,
157+ tags : tags1,
158+ instruction : first_instruction,
159+ } ,
160+ TaggedProgramInstruction {
161+ span : _,
162+ tags : tags2,
163+ instruction : second_instruction,
164+ } ,
165+ ] = instructions. as_slice ( )
159166 {
160167 assert ! ( tags1. is_empty( ) ) ;
161168 assert ! ( tags2. is_empty( ) ) ;
@@ -1048,13 +1055,16 @@ fn test_symbol_definition_loop_detection() {
10481055 ) ;
10491056 let errors = Vec :: from ( errors) ;
10501057 match errors. as_slice ( ) {
1051- [ e1 @ WithLocation {
1052- location : _,
1053- inner : ProgramError :: SymbolDefinitionLoop { .. } ,
1054- } , e2 @ WithLocation {
1055- location : _,
1056- inner : ProgramError :: SymbolDefinitionLoop { .. } ,
1057- } ] => {
1058+ [
1059+ e1 @ WithLocation {
1060+ location : _,
1061+ inner : ProgramError :: SymbolDefinitionLoop { .. } ,
1062+ } ,
1063+ e2 @ WithLocation {
1064+ location : _,
1065+ inner : ProgramError :: SymbolDefinitionLoop { .. } ,
1066+ } ,
1067+ ] => {
10581068 // Then the error messages that result should name
10591069 // both of the problem symbols, indicating the
10601070 // dependency loop for each.
0 commit comments