@@ -923,13 +923,13 @@ pub enum Term {
923923#[ derive( Clone , Debug , PartialEq , Eq , Hash , Serialize , Deserialize ) ]
924924#[ serde( rename_all = "snake_case" ) ]
925925pub 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>`
927927 ResolvedPath ( Path ) ,
928928 /// Dynamic trait object type (`dyn Trait`).
929929 DynTrait ( DynTrait ) ,
930930 /// Parameterized types. The contained string is the name of the parameter.
931931 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`.
933933 Primitive ( String ) ,
934934 /// A function pointer type, e.g. `fn(u32) -> u32`, `extern "C" fn() -> *const u8`
935935 FunctionPointer ( Box < FunctionPointer > ) ,
@@ -942,8 +942,9 @@ pub enum Type {
942942 /// The type of the contained element.
943943 #[ serde( rename = "type" ) ]
944944 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.
947948 len : String ,
948949 } ,
949950 /// A pattern type, e.g. `u32 is 1..`
@@ -1059,7 +1060,8 @@ pub struct FnDecl {
10591060 /// The output type, if specified.
10601061 pub output : Option < Type > ,
10611062 /// Whether the function accepts an arbitrary amount of trailing arguments the C way.
1062- /// ```text
1063+ ///
1064+ /// ```ignore (incomplete code)
10631065 /// fn printf(fmt: &str, ...);
10641066 /// ```
10651067 pub c_variadic : bool ,
@@ -1103,8 +1105,8 @@ pub struct Impl {
11031105 pub is_unsafe : bool ,
11041106 /// Information about the impl’s type parameters and `where` clauses.
11051107 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 .
11081110 ///
11091111 /// For example, for this impl of the [`PartialEq`] trait:
11101112 /// ```rust
@@ -1114,9 +1116,9 @@ pub struct Impl {
11141116 /// fn eq(&self, other: &Self) -> bool { todo!() }
11151117 /// }
11161118 /// ```
1117- /// This field will be `["eq "]`
1119+ /// This field will be `["ne "]`, as it has a default implementation defined for it.
11181120 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
11201122 /// `impl Struct {}` as opposed to `impl Trait for Struct {}`.
11211123 #[ serde( rename = "trait" ) ]
11221124 pub trait_ : Option < Path > ,
@@ -1130,13 +1132,7 @@ pub struct Impl {
11301132 /// Whether this is an impl that’s implied by the compiler
11311133 /// (for autotraits, e.g. `Send` or `Sync`).
11321134 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
11401136 pub blanket_impl : Option < Type > ,
11411137}
11421138
0 commit comments