Rollup merge of #134285 - oli-obk:push-vwrqsqlwnuxo, r=Urgau

Add some convenience helper methods on `hir::Safety`

Makes a lot of call sites simpler and should make any refactorings needed for https://github.com/rust-lang/rust/pull/134090#issuecomment-2541332415 simpler, as fewer sites have to be touched in case we end up storing some information in the variants of `hir::Safety`
This commit is contained in:
Stuart Cook
2024-12-15 20:01:38 +11:00
committed by GitHub
28 changed files with 74 additions and 70 deletions

View File

@@ -439,7 +439,7 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
let sig = sig_tys.with(hdr);
self.push("F");
self.in_binder(&sig, |cx, sig| {
if sig.safety == hir::Safety::Unsafe {
if sig.safety.is_unsafe() {
cx.push("U");
}
match sig.abi {