diff options
| author | Michael Goulet <michael@errs.io> | 2025-03-30 21:39:12 +0000 |
|---|---|---|
| committer | Michael Goulet <michael@errs.io> | 2025-03-30 22:53:21 +0000 |
| commit | 897acc3e5d3622927118924fa920c8be0ef6f154 (patch) | |
| tree | 259f699bfddad26f179bdd7b165d7deacac20584 /compiler/rustc_hir/src/definitions.rs | |
| parent | 46424fb5054f211ec836c5c03159f92e46bb35ac (diff) | |
| download | rust-897acc3e5d3622927118924fa920c8be0ef6f154.tar.gz rust-897acc3e5d3622927118924fa920c8be0ef6f154.zip | |
Encode synthetic by-move coroutine body with a different DefPathData
Diffstat (limited to 'compiler/rustc_hir/src/definitions.rs')
| -rw-r--r-- | compiler/rustc_hir/src/definitions.rs | 15 |
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 }, } } } |
