We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 63322d0 + c37d020 commit 03bb9d1Copy full SHA for 03bb9d1
1 file changed
compiler/rustc_hir/src/def.rs
@@ -134,6 +134,11 @@ pub enum DefKind {
134
},
135
/// Refers to the struct or enum variant's constructor.
136
///
137
+ /// ```
138
+ /// struct S;
139
+ /// let x = S; // S in the value namespace is a Ctor
140
141
+ ///
142
/// The reason `Ctor` exists in addition to [`DefKind::Struct`] and
143
/// [`DefKind::Variant`] is because structs and enum variants exist
144
/// in the *type* namespace, whereas struct and enum variant *constructors*
0 commit comments