File tree 1 file changed +5
-1
lines changed
compiler/rustc_ast_lowering/src
1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -1367,14 +1367,18 @@ impl<'hir> LoweringContext<'_, 'hir> {
1367
1367
1368
1368
let mut used_input_regs = FxHashMap :: default ( ) ;
1369
1369
let mut used_output_regs = FxHashMap :: default ( ) ;
1370
+ let mut required_features: Vec < & str > = vec ! [ ] ;
1370
1371
for ( idx, op) in operands. iter ( ) . enumerate ( ) {
1371
1372
let op_sp = asm. operands [ idx] . 1 ;
1372
1373
if let Some ( reg) = op. reg ( ) {
1374
+ // Make sure we don't accidentally carry features from the
1375
+ // previous iteration.
1376
+ required_features. clear ( ) ;
1377
+
1373
1378
// Validate register classes against currently enabled target
1374
1379
// features. We check that at least one type is available for
1375
1380
// the current target.
1376
1381
let reg_class = reg. reg_class ( ) ;
1377
- let mut required_features: Vec < & str > = vec ! [ ] ;
1378
1382
for & ( _, feature) in reg_class. supported_types ( asm_arch) {
1379
1383
if let Some ( feature) = feature {
1380
1384
if self . sess . target_features . contains ( & Symbol :: intern ( feature) ) {
You can’t perform that action at this time.
0 commit comments