diff options
| author | Michael Goulet <michael@errs.io> | 2023-03-13 18:54:05 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2023-03-21 15:38:51 +0000 |
| commit | 2eb1c08e433aadf2362a65f2ef1387670a6d34cf (patch) | |
| tree | 1d8465f4d80adbbe4a44dd72eedc3361bd2b8f7c /compiler/rustc_hir/src/hir_id.rs | |
| parent | a01b4cc9f375f1b95fa8195daeea938d3d9c4c34 (diff) | |
| download | rust-2eb1c08e433aadf2362a65f2ef1387670a6d34cf.tar.gz rust-2eb1c08e433aadf2362a65f2ef1387670a6d34cf.zip | |
Use local key in providers
Diffstat (limited to 'compiler/rustc_hir/src/hir_id.rs')
| -rw-r--r-- | compiler/rustc_hir/src/hir_id.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/compiler/rustc_hir/src/hir_id.rs b/compiler/rustc_hir/src/hir_id.rs index 404abe2b068..37ac3723161 100644 --- a/compiler/rustc_hir/src/hir_id.rs +++ b/compiler/rustc_hir/src/hir_id.rs @@ -22,6 +22,12 @@ impl From<OwnerId> for HirId { } } +impl From<OwnerId> for DefId { + fn from(value: OwnerId) -> Self { + value.to_def_id() + } +} + impl OwnerId { #[inline] pub fn to_def_id(self) -> DefId { |
