mirror of
https://github.com/rust-lang/rust.git
synced 2025-04-28 11:07:42 +00:00
Modifiers -> Qualifiers
This commit is contained in:
parent
ffa5280b0e
commit
be4ea06643
@ -228,19 +228,19 @@ crate fn from_ctor_kind(struct_type: CtorKind) -> StructType {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
crate fn from_fn_header(header: &rustc_hir::FnHeader) -> HashSet<Modifiers> {
|
crate fn from_fn_header(header: &rustc_hir::FnHeader) -> HashSet<Qualifiers> {
|
||||||
let mut v = HashSet::new();
|
let mut v = HashSet::new();
|
||||||
|
|
||||||
if let rustc_hir::Unsafety::Unsafe = header.unsafety {
|
if let rustc_hir::Unsafety::Unsafe = header.unsafety {
|
||||||
v.insert(Modifiers::Unsafe);
|
v.insert(Qualifiers::Unsafe);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let rustc_hir::IsAsync::Async = header.asyncness {
|
if let rustc_hir::IsAsync::Async = header.asyncness {
|
||||||
v.insert(Modifiers::Async);
|
v.insert(Qualifiers::Async);
|
||||||
}
|
}
|
||||||
|
|
||||||
if let rustc_hir::Constness::Const = header.constness {
|
if let rustc_hir::Constness::Const = header.constness {
|
||||||
v.insert(Modifiers::Const);
|
v.insert(Qualifiers::Const);
|
||||||
}
|
}
|
||||||
|
|
||||||
v
|
v
|
||||||
@ -376,7 +376,7 @@ impl From<clean::BareFunctionDecl> for FunctionPointer {
|
|||||||
FunctionPointer {
|
FunctionPointer {
|
||||||
header: if let rustc_hir::Unsafety::Unsafe = unsafety {
|
header: if let rustc_hir::Unsafety::Unsafe = unsafety {
|
||||||
let mut hs = HashSet::new();
|
let mut hs = HashSet::new();
|
||||||
hs.insert(Modifiers::Unsafe);
|
hs.insert(Qualifiers::Unsafe);
|
||||||
hs
|
hs
|
||||||
} else {
|
} else {
|
||||||
HashSet::new()
|
HashSet::new()
|
||||||
|
@ -284,7 +284,7 @@ pub enum StructType {
|
|||||||
#[non_exhaustive]
|
#[non_exhaustive]
|
||||||
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
#[derive(Clone, Debug, Serialize, Deserialize, PartialEq, Eq, Hash)]
|
||||||
#[serde(rename_all = "snake_case")]
|
#[serde(rename_all = "snake_case")]
|
||||||
pub enum Modifiers {
|
pub enum Qualifiers {
|
||||||
Const,
|
Const,
|
||||||
Unsafe,
|
Unsafe,
|
||||||
Async,
|
Async,
|
||||||
@ -294,7 +294,7 @@ pub enum Modifiers {
|
|||||||
pub struct Function {
|
pub struct Function {
|
||||||
pub decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
pub generics: Generics,
|
pub generics: Generics,
|
||||||
pub header: HashSet<Modifiers>,
|
pub header: HashSet<Qualifiers>,
|
||||||
pub abi: String,
|
pub abi: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -302,7 +302,7 @@ pub struct Function {
|
|||||||
pub struct Method {
|
pub struct Method {
|
||||||
pub decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
pub generics: Generics,
|
pub generics: Generics,
|
||||||
pub header: HashSet<Modifiers>,
|
pub header: HashSet<Qualifiers>,
|
||||||
pub abi: String,
|
pub abi: String,
|
||||||
pub has_body: bool,
|
pub has_body: bool,
|
||||||
}
|
}
|
||||||
@ -415,7 +415,7 @@ pub enum Type {
|
|||||||
pub struct FunctionPointer {
|
pub struct FunctionPointer {
|
||||||
pub decl: FnDecl,
|
pub decl: FnDecl,
|
||||||
pub generic_params: Vec<GenericParamDef>,
|
pub generic_params: Vec<GenericParamDef>,
|
||||||
pub header: HashSet<Modifiers>,
|
pub header: HashSet<Qualifiers>,
|
||||||
pub abi: String,
|
pub abi: String,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user