Commit 7ea48f5 1 parent 903eb4d commit 7ea48f5 Copy full SHA for 7ea48f5
File tree 1 file changed +6
-6
lines changed
1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ impl<'a> AsmParser<'a> {
148
148
continue ;
149
149
}
150
150
151
- if line. starts_with ( ". section" ) {
151
+ if line. starts_with ( "section" ) {
152
152
section = AsmParser :: parse_section_line ( line) ;
153
153
continue ;
154
154
}
@@ -380,12 +380,12 @@ impl<'a> AsmParser<'a> {
380
380
/// A [`FileSection`] instance if a valid one was specified. This method will panic otherwise.
381
381
#[ inline]
382
382
fn parse_section_line ( line : & str ) -> FileSection {
383
- assert ! ( line. len( ) >= 10 ) ;
383
+ assert ! ( line. len( ) >= 9 ) ;
384
384
385
- if let Ok ( section) = FileSection :: from_str ( & line[ 10 ..] ) {
385
+ if let Ok ( section) = FileSection :: from_str ( & line[ 9 ..] ) {
386
386
section
387
387
} else {
388
- panic ! ( "invalid assembly file section name - {}" , & line[ 10 ..] )
388
+ panic ! ( "invalid assembly file section name - {}" , & line[ 9 ..] )
389
389
}
390
390
}
391
391
@@ -1307,14 +1307,14 @@ mod tests_asm_parsing {
1307
1307
) ,
1308
1308
// This is invalid because there must be something after the section marker.
1309
1309
ParserTest :: new (
1310
- ". section" ,
1310
+ "section" ,
1311
1311
& [ ] ,
1312
1312
true ,
1313
1313
"succeeded in parsing invalid section marker." ,
1314
1314
) ,
1315
1315
// This is invalid because the section marker isn't valid.
1316
1316
ParserTest :: new (
1317
- ". section abc" ,
1317
+ "section abc" ,
1318
1318
& [ ] ,
1319
1319
true ,
1320
1320
"succeeded in parsing invalid section marker." ,
You can’t perform that action at this time.
0 commit comments