summaryrefslogtreecommitdiffstats
path: root/src/tools/jsondoclint
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/jsondoclint')
-rw-r--r--src/tools/jsondoclint/src/item_kind.rs12
-rw-r--r--src/tools/jsondoclint/src/validator.rs10
2 files changed, 11 insertions, 11 deletions
diff --git a/src/tools/jsondoclint/src/item_kind.rs b/src/tools/jsondoclint/src/item_kind.rs
index 45a9c93ee..9bd04e11c 100644
--- a/src/tools/jsondoclint/src/item_kind.rs
+++ b/src/tools/jsondoclint/src/item_kind.rs
@@ -12,7 +12,7 @@ pub(crate) enum Kind {
Enum,
Variant,
Function,
- Typedef,
+ TypeAlias,
OpaqueTy,
Constant,
Trait,
@@ -45,7 +45,7 @@ impl Kind {
Trait => true,
TraitAlias => true,
Impl => true,
- Typedef => true,
+ TypeAlias => true,
Constant => true,
Static => true,
Macro => true,
@@ -98,7 +98,7 @@ impl Kind {
Kind::Union => false,
Kind::Enum => false,
Kind::Variant => false,
- Kind::Typedef => false,
+ Kind::TypeAlias => false,
Kind::OpaqueTy => false,
Kind::Constant => false,
Kind::Trait => false,
@@ -131,7 +131,7 @@ impl Kind {
matches!(self, Kind::Trait | Kind::TraitAlias)
}
pub fn is_type(self) -> bool {
- matches!(self, Kind::Struct | Kind::Enum | Kind::Union | Kind::Typedef)
+ matches!(self, Kind::Struct | Kind::Enum | Kind::Union | Kind::TypeAlias)
}
pub fn from_item(i: &Item) -> Self {
@@ -148,7 +148,7 @@ impl Kind {
ItemEnum::Trait(_) => Trait,
ItemEnum::TraitAlias(_) => TraitAlias,
ItemEnum::Impl(_) => Impl,
- ItemEnum::Typedef(_) => Typedef,
+ ItemEnum::TypeAlias(_) => TypeAlias,
ItemEnum::OpaqueTy(_) => OpaqueTy,
ItemEnum::Constant(_) => Constant,
ItemEnum::Static(_) => Static,
@@ -186,7 +186,7 @@ impl Kind {
ItemKind::StructField => StructField,
ItemKind::Trait => Trait,
ItemKind::TraitAlias => TraitAlias,
- ItemKind::Typedef => Typedef,
+ ItemKind::TypeAlias => TypeAlias,
ItemKind::Union => Union,
ItemKind::Variant => Variant,
}
diff --git a/src/tools/jsondoclint/src/validator.rs b/src/tools/jsondoclint/src/validator.rs
index bf8a64acf..592e97310 100644
--- a/src/tools/jsondoclint/src/validator.rs
+++ b/src/tools/jsondoclint/src/validator.rs
@@ -5,7 +5,7 @@ use rustdoc_json_types::{
Constant, Crate, DynTrait, Enum, FnDecl, Function, FunctionPointer, GenericArg, GenericArgs,
GenericBound, GenericParamDef, Generics, Id, Impl, Import, ItemEnum, ItemSummary, Module,
OpaqueTy, Path, Primitive, ProcMacro, Static, Struct, StructKind, Term, Trait, TraitAlias,
- Type, TypeBinding, TypeBindingKind, Typedef, Union, Variant, VariantKind, WherePredicate,
+ Type, TypeAlias, TypeBinding, TypeBindingKind, Union, Variant, VariantKind, WherePredicate,
};
use serde_json::Value;
@@ -37,7 +37,7 @@ pub struct Validator<'a> {
enum PathKind {
Trait,
- /// Structs, Enums, Unions and Typedefs.
+ /// Structs, Enums, Unions and TypeAliases.
///
/// This doesn't include trait's because traits are not types.
Type,
@@ -99,7 +99,7 @@ impl<'a> Validator<'a> {
ItemEnum::Trait(x) => self.check_trait(x, id),
ItemEnum::TraitAlias(x) => self.check_trait_alias(x),
ItemEnum::Impl(x) => self.check_impl(x, id),
- ItemEnum::Typedef(x) => self.check_typedef(x),
+ ItemEnum::TypeAlias(x) => self.check_type_alias(x),
ItemEnum::OpaqueTy(x) => self.check_opaque_ty(x),
ItemEnum::Constant(x) => self.check_constant(x),
ItemEnum::Static(x) => self.check_static(x),
@@ -221,7 +221,7 @@ impl<'a> Validator<'a> {
}
}
- fn check_typedef(&mut self, x: &'a Typedef) {
+ fn check_type_alias(&mut self, x: &'a TypeAlias) {
self.check_generics(&x.generics);
self.check_type(&x.type_);
}
@@ -450,7 +450,7 @@ impl<'a> Validator<'a> {
}
fn add_type_id(&mut self, id: &'a Id) {
- self.add_id_checked(id, Kind::is_type, "Type (Struct, Enum, Union or Typedef)");
+ self.add_id_checked(id, Kind::is_type, "Type (Struct, Enum, Union or TypeAlias)");
}
/// Add an Id that appeared in a trait