File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed
compiler/rustc_ast_lowering/src Expand file tree Collapse file tree 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> {
13671367
13681368 let mut used_input_regs = FxHashMap :: default ( ) ;
13691369 let mut used_output_regs = FxHashMap :: default ( ) ;
1370+ let mut required_features: Vec < & str > = vec ! [ ] ;
13701371 for ( idx, op) in operands. iter ( ) . enumerate ( ) {
13711372 let op_sp = asm. operands [ idx] . 1 ;
13721373 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+
13731378 // Validate register classes against currently enabled target
13741379 // features. We check that at least one type is available for
13751380 // the current target.
13761381 let reg_class = reg. reg_class ( ) ;
1377- let mut required_features: Vec < & str > = vec ! [ ] ;
13781382 for & ( _, feature) in reg_class. supported_types ( asm_arch) {
13791383 if let Some ( feature) = feature {
13801384 if self . sess . target_features . contains ( & Symbol :: intern ( feature) ) {
You can’t perform that action at this time.
0 commit comments