about summary refs log tree commit diff
path: root/compiler/rustc_middle/src
diff options
context:
space:
mode:
authorMichael Goulet <michael@errs.io>2024-06-12 18:35:51 -0400
committerMichael Goulet <michael@errs.io>2024-06-13 09:34:29 -0400
commita2fb2ebc177cc4fa5933e72f3a81791e9b0b0083 (patch)
treea3806ebcb6695c9d7d862a0b045203e8a0c26637 /compiler/rustc_middle/src
parente82db89b4dbf0ddcc67f7804a01c322c761415b4 (diff)
Fix some TODOs
Diffstat (limited to 'compiler/rustc_middle/src')
-rw-r--r--compiler/rustc_middle/src/ty/context.rs8
1 files changed, 8 insertions, 0 deletions
diff --git a/compiler/rustc_middle/src/ty/context.rs b/compiler/rustc_middle/src/ty/context.rs
index ebcb47966eb..849e10a952b 100644
--- a/compiler/rustc_middle/src/ty/context.rs
+++ b/compiler/rustc_middle/src/ty/context.rs
@@ -324,12 +324,20 @@ impl<'tcx> Interner for TyCtxt<'tcx> {
 }
 
 impl<'tcx> rustc_type_ir::inherent::Abi<TyCtxt<'tcx>> for abi::Abi {
+    fn rust() -> Self {
+        abi::Abi::Rust
+    }
+
     fn is_rust(self) -> bool {
         matches!(self, abi::Abi::Rust)
     }
 }
 
 impl<'tcx> rustc_type_ir::inherent::Safety<TyCtxt<'tcx>> for hir::Safety {
+    fn safe() -> Self {
+        hir::Safety::Safe
+    }
+
     fn is_safe(self) -> bool {
         matches!(self, hir::Safety::Safe)
     }