@@ -923,13 +923,13 @@ pub enum Term {
923
923
#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
924
924
#[ serde( rename_all = "snake_case" ) ]
925
925
pub enum Type {
926
- /// Structs, enums, unions, etc. , e.g. `std::option::Option<u32>`
926
+ /// Structs, enums, unions and type aliases , e.g. `std::option::Option<u32>`
927
927
ResolvedPath ( Path ) ,
928
928
/// Dynamic trait object type (`dyn Trait`).
929
929
DynTrait ( DynTrait ) ,
930
930
/// Parameterized types. The contained string is the name of the parameter.
931
931
Generic ( String ) ,
932
- /// Built-in types, such as the integers, floating-point numbers , `bool`, `char`.
932
+ /// Built-in numeric types (e.g. `u32`, `f32`) , `bool`, `char`.
933
933
Primitive ( String ) ,
934
934
/// A function pointer type, e.g. `fn(u32) -> u32`, `extern "C" fn() -> *const u8`
935
935
FunctionPointer ( Box < FunctionPointer > ) ,
@@ -942,8 +942,9 @@ pub enum Type {
942
942
/// The type of the contained element.
943
943
#[ serde( rename = "type" ) ]
944
944
type_ : Box < Type > ,
945
- /// The stringified expression that is the length of the array. Keep in mind that it's not
946
- /// guaranteed to match the actual source code of the expression.
945
+ /// The stringified expression that is the length of the array.
946
+ ///
947
+ /// Keep in mind that it's not guaranteed to match the actual source code of the expression.
947
948
len : String ,
948
949
} ,
949
950
/// A pattern type, e.g. `u32 is 1..`
@@ -1059,7 +1060,8 @@ pub struct FnDecl {
1059
1060
/// The output type, if specified.
1060
1061
pub output : Option < Type > ,
1061
1062
/// Whether the function accepts an arbitrary amount of trailing arguments the C way.
1062
- /// ```text
1063
+ ///
1064
+ /// ```ignore (incomplete code)
1063
1065
/// fn printf(fmt: &str, ...);
1064
1066
/// ```
1065
1067
pub c_variadic : bool ,
@@ -1103,8 +1105,8 @@ pub struct Impl {
1103
1105
pub is_unsafe : bool ,
1104
1106
/// Information about the impl’s type parameters and `where` clauses.
1105
1107
pub generics : Generics ,
1106
- /// The list of names for all provided methods in this impl block. This is provided for
1107
- /// ease of access if you don’t need more information from the items field .
1108
+ /// The list of the names of all the trait methods that weren't mentioned in this impl but
1109
+ /// were provided by the trait itself .
1108
1110
///
1109
1111
/// For example, for this impl of the [`PartialEq`] trait:
1110
1112
/// ```rust
@@ -1114,9 +1116,9 @@ pub struct Impl {
1114
1116
/// fn eq(&self, other: &Self) -> bool { todo!() }
1115
1117
/// }
1116
1118
/// ```
1117
- /// This field will be `["eq "]`
1119
+ /// This field will be `["ne "]`, as it has a default implementation defined for it.
1118
1120
pub provided_trait_methods : Vec < String > ,
1119
- /// The trait being implemented or `None` if the impl is “ inherent” , which means
1121
+ /// The trait being implemented or `None` if the impl is inherent, which means
1120
1122
/// `impl Struct {}` as opposed to `impl Trait for Struct {}`.
1121
1123
#[ serde( rename = "trait" ) ]
1122
1124
pub trait_ : Option < Path > ,
@@ -1130,13 +1132,7 @@ pub struct Impl {
1130
1132
/// Whether this is an impl that’s implied by the compiler
1131
1133
/// (for autotraits, e.g. `Send` or `Sync`).
1132
1134
pub synthetic : bool ,
1133
- /// If this is a blanket impl, the name with which [`for_`] is referred to in the original impl.
1134
- ///
1135
- /// E.g., for `impl<T, U> Into<U> for T` this field would be `T`.
1136
- ///
1137
- /// The contained [`Type`], if present, is always of kind [`Type::Generic`]
1138
- ///
1139
- /// [`for_`]: Impl::for_
1135
+ // FIXME: document this
1140
1136
pub blanket_impl : Option < Type > ,
1141
1137
}
1142
1138
0 commit comments