about summary refs log tree commit diff
path: root/compiler/rustc_hir/src/definitions.rs
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2025-03-31 15:10:21 +0000
committerbors <bors@rust-lang.org>2025-03-31 15:10:21 +0000
commit0b45675cfcec57f30a3794e1a1e18423aa9cf200 (patch)
tree1fadef17d924d8bfee7fc848336e4760e8aee56b /compiler/rustc_hir/src/definitions.rs
parentab5b1be771e63ea3736d8830e7b661decc6b1abc (diff)
parent70a1bbc8f06b66fc154a8edef08ebd0d8aeeaeef (diff)
downloadrust-0b45675cfcec57f30a3794e1a1e18423aa9cf200.tar.gz
rust-0b45675cfcec57f30a3794e1a1e18423aa9cf200.zip
Auto merge of #139169 - matthiaskrgr:rollup-nfy4aew, r=matthiaskrgr
Rollup of 6 pull requests

Successful merges:

 - #138176 (Prefer built-in sized impls (and only sized impls) for rigid types always)
 - #138749 (Fix closure recovery for missing block when return type is specified)
 - #138842 (Emit `unused_attributes` for `#[inline]` on exported functions)
 - #139153 (Encode synthetic by-move coroutine body with a different `DefPathData`)
 - #139157 (Remove mention of `exhaustive_patterns` from `never` docs)
 - #139167 (Remove Amanieu from the libs review rotation)

r? `@ghost`
`@rustbot` modify labels: rollup
Diffstat (limited to 'compiler/rustc_hir/src/definitions.rs')
-rw-r--r--compiler/rustc_hir/src/definitions.rs15
1 files changed, 13 insertions, 2 deletions
diff --git a/compiler/rustc_hir/src/definitions.rs b/compiler/rustc_hir/src/definitions.rs
index 61f5efd9978..c52954aa96f 100644
--- a/compiler/rustc_hir/src/definitions.rs
+++ b/compiler/rustc_hir/src/definitions.rs
@@ -291,6 +291,8 @@ pub enum DefPathData {
     /// An existential `impl Trait` type node.
     /// Argument position `impl Trait` have a `TypeNs` with their pretty-printed name.
     OpaqueTy,
+    /// A synthetic body for a coroutine's by-move body.
+    SyntheticCoroutineBody,
 }
 
 impl Definitions {
@@ -415,8 +417,16 @@ impl DefPathData {
 
             ValueNs(name) | MacroNs(name) | LifetimeNs(name) => Some(name),
 
-            Impl | ForeignMod | CrateRoot | Use | GlobalAsm | Closure | Ctor | AnonConst
-            | OpaqueTy => None,
+            Impl
+            | ForeignMod
+            | CrateRoot
+            | Use
+            | GlobalAsm
+            | Closure
+            | Ctor
+            | AnonConst
+            | OpaqueTy
+            | SyntheticCoroutineBody => None,
         }
     }
 
@@ -441,6 +451,7 @@ impl DefPathData {
             Ctor => DefPathDataName::Anon { namespace: sym::constructor },
             AnonConst => DefPathDataName::Anon { namespace: sym::constant },
             OpaqueTy => DefPathDataName::Anon { namespace: sym::opaque },
+            SyntheticCoroutineBody => DefPathDataName::Anon { namespace: sym::synthetic },
         }
     }
 }