Use named fields for OpaqueTyOrigin

This commit is contained in:
Michael Goulet 2024-10-02 22:04:18 -04:00
parent f95bdf453e
commit cb7e3695e8
19 changed files with 53 additions and 40 deletions

View file

@ -2806,9 +2806,15 @@ pub struct PreciseCapturingNonLifetimeArg {
#[derive(Copy, Clone, PartialEq, Eq, Debug, HashStable_Generic)]
pub enum OpaqueTyOrigin {
/// `-> impl Trait`
FnReturn(LocalDefId),
FnReturn {
/// The defining function.
parent: LocalDefId,
},
/// `async fn`
AsyncFn(LocalDefId),
AsyncFn {
/// The defining function.
parent: LocalDefId,
},
/// type aliases: `type Foo = impl Trait;`
TyAlias {
/// The type alias or associated type parent of the TAIT/ATPIT