Skip to content

Commit 889e571

Browse files
committed
explaining DefKind::Field
1 parent 4563f70 commit 889e571

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

compiler/rustc_hir/src/def.rs

+3
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,9 @@ pub enum DefKind {
113113
InlineConst,
114114
/// Opaque type, aka `impl Trait`.
115115
OpaqueTy,
116+
/// A field in a struct, enum or union. e.g.
117+
/// - `bar` in `struct Foo { bar: u8 }`
118+
/// - `Foo::Bar::0` in `enum Foo { Bar(u8) }`
116119
Field,
117120
/// Lifetime parameter: the `'a` in `struct Foo<'a> { ... }`
118121
LifetimeParam,

0 commit comments

Comments
 (0)