File tree Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Expand file tree Collapse file tree 1 file changed +13
-3
lines changed Original file line number Diff line number Diff line change @@ -1305,10 +1305,20 @@ crate enum TypeKind {
1305
1305
}
1306
1306
1307
1307
crate trait GetDefId {
1308
- /// Doesn't retrieve primitive types `DefId`. Use `def_id_full` if you want it.
1308
+ /// Use this method to get the [`DefId`] of a [`clean`] AST node.
1309
+ /// This will return [`None`] when called on a primitive [`clean::Type`].
1310
+ /// Use [`Self::def_id_full`] if you are calling it on a primitive [`clean::Type`].
1311
+ ///
1312
+ /// [`clean`]: crate::clean
1313
+ /// [`clean::Type`]: Type
1309
1314
fn def_id ( & self ) -> Option < DefId > ;
1310
- /// Retrieves all types' `DefId` (including primitives). If you're not interested about
1311
- /// primitives, use `def_id`.
1315
+
1316
+ /// Use this method to get the [`DefId`] of a [`clean`] AST node that may be
1317
+ /// a primitive [`clean::Type`].
1318
+ ///
1319
+ /// See [`Self::def_id`] for more.
1320
+ ///
1321
+ /// [`clean::Type`]: Type
1312
1322
fn def_id_full ( & self , cache : & Cache ) -> Option < DefId > ;
1313
1323
}
1314
1324
You can’t perform that action at this time.
0 commit comments