@@ -1451,24 +1451,6 @@ crate enum Type {
14511451#[ cfg( all( target_arch = "x86_64" , target_pointer_width = "64" ) ) ]
14521452rustc_data_structures:: static_assert_size!( Type , 72 ) ;
14531453
1454- crate trait GetDefId {
1455- /// Use this method to get the [`DefId`] of a [`clean`] AST node.
1456- /// This will return [`None`] when called on a primitive [`clean::Type`].
1457- /// Use [`Self::def_id_full`] if you want to include primitives.
1458- ///
1459- /// [`clean`]: crate::clean
1460- /// [`clean::Type`]: crate::clean::Type
1461- // FIXME: get rid of this function and always use `def_id_full`
1462- fn def_id ( & self ) -> Option < DefId > ;
1463-
1464- /// Use this method to get the [DefId] of a [clean] AST node, including [PrimitiveType]s.
1465- ///
1466- /// See [`Self::def_id`] for more.
1467- ///
1468- /// [clean]: crate::clean
1469- fn def_id_full ( & self , cache : & Cache ) -> Option < DefId > ;
1470- }
1471-
14721454impl Type {
14731455 crate fn primitive_type ( & self ) -> Option < PrimitiveType > {
14741456 match * self {
@@ -1549,14 +1531,24 @@ impl Type {
15491531 } ;
15501532 cache. and_then ( |c| Primitive ( t) . def_id_full ( c) )
15511533 }
1552- }
15531534
1554- impl GetDefId for Type {
1555- fn def_id ( & self ) -> Option < DefId > {
1535+ /// Use this method to get the [`DefId`] of a [`clean`] AST node.
1536+ /// This will return [`None`] when called on a primitive [`clean::Type`].
1537+ /// Use [`Self::def_id_full`] if you want to include primitives.
1538+ ///
1539+ /// [`clean`]: crate::clean
1540+ /// [`clean::Type`]: crate::clean::Type
1541+ // FIXME: get rid of this function and always use `def_id_full`
1542+ crate fn def_id ( & self ) -> Option < DefId > {
15561543 self . inner_def_id ( None )
15571544 }
15581545
1559- fn def_id_full ( & self , cache : & Cache ) -> Option < DefId > {
1546+ /// Use this method to get the [DefId] of a [clean] AST node, including [PrimitiveType]s.
1547+ ///
1548+ /// See [`Self::def_id`] for more.
1549+ ///
1550+ /// [clean]: crate::clean
1551+ crate fn def_id_full ( & self , cache : & Cache ) -> Option < DefId > {
15601552 self . inner_def_id ( Some ( cache) )
15611553 }
15621554}
0 commit comments