Skip to content

Commit d93b037

Browse files
committed
Remove wfness requirement from anon consts used by asm
1 parent cf5748f commit d93b037

File tree

1 file changed

+4
-4
lines changed
  • compiler/rustc_typeck/src/check

1 file changed

+4
-4
lines changed

compiler/rustc_typeck/src/check/expr.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -2591,10 +2591,10 @@ impl<'a, 'tcx> FnCtxt<'a, 'tcx> {
25912591
self.check_expr_asm_operand(out_expr, false);
25922592
}
25932593
}
2594-
hir::InlineAsmOperand::Const { anon_const }
2595-
| hir::InlineAsmOperand::SymFn { anon_const } => {
2596-
self.to_const(anon_const);
2597-
}
2594+
// `AnonConst`s have their own body and is type-checked separately.
2595+
// As they don't flow into the type system we don't need them to
2596+
// be well-formed.
2597+
hir::InlineAsmOperand::Const { .. } | hir::InlineAsmOperand::SymFn { .. } => {}
25982598
hir::InlineAsmOperand::SymStatic { .. } => {}
25992599
}
26002600
}

0 commit comments

Comments
 (0)