-const TRAIT_METHODS: [(&str, usize, SelfKind, OutType, &str); 30] = [
- ("add", 2, SelfKind::Value, OutType::Any, "std::ops::Add"),
- ("as_mut", 1, SelfKind::RefMut, OutType::Ref, "std::convert::AsMut"),
- ("as_ref", 1, SelfKind::Ref, OutType::Ref, "std::convert::AsRef"),
- ("bitand", 2, SelfKind::Value, OutType::Any, "std::ops::BitAnd"),
- ("bitor", 2, SelfKind::Value, OutType::Any, "std::ops::BitOr"),
- ("bitxor", 2, SelfKind::Value, OutType::Any, "std::ops::BitXor"),
- ("borrow", 1, SelfKind::Ref, OutType::Ref, "std::borrow::Borrow"),
- ("borrow_mut", 1, SelfKind::RefMut, OutType::Ref, "std::borrow::BorrowMut"),
- ("clone", 1, SelfKind::Ref, OutType::Any, "std::clone::Clone"),
- ("cmp", 2, SelfKind::Ref, OutType::Any, "std::cmp::Ord"),
- ("default", 0, SelfKind::No, OutType::Any, "std::default::Default"),
- ("deref", 1, SelfKind::Ref, OutType::Ref, "std::ops::Deref"),
- ("deref_mut", 1, SelfKind::RefMut, OutType::Ref, "std::ops::DerefMut"),
- ("div", 2, SelfKind::Value, OutType::Any, "std::ops::Div"),
- ("drop", 1, SelfKind::RefMut, OutType::Unit, "std::ops::Drop"),
- ("eq", 2, SelfKind::Ref, OutType::Bool, "std::cmp::PartialEq"),
- ("from_iter", 1, SelfKind::No, OutType::Any, "std::iter::FromIterator"),
- ("from_str", 1, SelfKind::No, OutType::Any, "std::str::FromStr"),
- ("hash", 2, SelfKind::Ref, OutType::Unit, "std::hash::Hash"),
- ("index", 2, SelfKind::Ref, OutType::Ref, "std::ops::Index"),
- ("index_mut", 2, SelfKind::RefMut, OutType::Ref, "std::ops::IndexMut"),
- ("into_iter", 1, SelfKind::Value, OutType::Any, "std::iter::IntoIterator"),
- ("mul", 2, SelfKind::Value, OutType::Any, "std::ops::Mul"),
- ("neg", 1, SelfKind::Value, OutType::Any, "std::ops::Neg"),
- ("next", 1, SelfKind::RefMut, OutType::Any, "std::iter::Iterator"),
- ("not", 1, SelfKind::Value, OutType::Any, "std::ops::Not"),
- ("rem", 2, SelfKind::Value, OutType::Any, "std::ops::Rem"),
- ("shl", 2, SelfKind::Value, OutType::Any, "std::ops::Shl"),
- ("shr", 2, SelfKind::Value, OutType::Any, "std::ops::Shr"),
- ("sub", 2, SelfKind::Value, OutType::Any, "std::ops::Sub"),
+const TRAIT_METHODS: [(&str, usize, &hir::FnHeader, SelfKind, OutType, &str); 30] = [
+ ("add", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Add"),
+ ("as_mut", 1, &FN_HEADER, SelfKind::RefMut, OutType::Ref, "std::convert::AsMut"),
+ ("as_ref", 1, &FN_HEADER, SelfKind::Ref, OutType::Ref, "std::convert::AsRef"),
+ ("bitand", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::BitAnd"),
+ ("bitor", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::BitOr"),
+ ("bitxor", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::BitXor"),
+ ("borrow", 1, &FN_HEADER, SelfKind::Ref, OutType::Ref, "std::borrow::Borrow"),
+ ("borrow_mut", 1, &FN_HEADER, SelfKind::RefMut, OutType::Ref, "std::borrow::BorrowMut"),
+ ("clone", 1, &FN_HEADER, SelfKind::Ref, OutType::Any, "std::clone::Clone"),
+ ("cmp", 2, &FN_HEADER, SelfKind::Ref, OutType::Any, "std::cmp::Ord"),
+ ("default", 0, &FN_HEADER, SelfKind::No, OutType::Any, "std::default::Default"),
+ ("deref", 1, &FN_HEADER, SelfKind::Ref, OutType::Ref, "std::ops::Deref"),
+ ("deref_mut", 1, &FN_HEADER, SelfKind::RefMut, OutType::Ref, "std::ops::DerefMut"),
+ ("div", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Div"),
+ ("drop", 1, &FN_HEADER, SelfKind::RefMut, OutType::Unit, "std::ops::Drop"),
+ ("eq", 2, &FN_HEADER, SelfKind::Ref, OutType::Bool, "std::cmp::PartialEq"),
+ ("from_iter", 1, &FN_HEADER, SelfKind::No, OutType::Any, "std::iter::FromIterator"),
+ ("from_str", 1, &FN_HEADER, SelfKind::No, OutType::Any, "std::str::FromStr"),
+ ("hash", 2, &FN_HEADER, SelfKind::Ref, OutType::Unit, "std::hash::Hash"),
+ ("index", 2, &FN_HEADER, SelfKind::Ref, OutType::Ref, "std::ops::Index"),
+ ("index_mut", 2, &FN_HEADER, SelfKind::RefMut, OutType::Ref, "std::ops::IndexMut"),
+ ("into_iter", 1, &FN_HEADER, SelfKind::Value, OutType::Any, "std::iter::IntoIterator"),
+ ("mul", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Mul"),
+ ("neg", 1, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Neg"),
+ ("next", 1, &FN_HEADER, SelfKind::RefMut, OutType::Any, "std::iter::Iterator"),
+ ("not", 1, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Not"),
+ ("rem", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Rem"),
+ ("shl", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Shl"),
+ ("shr", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Shr"),
+ ("sub", 2, &FN_HEADER, SelfKind::Value, OutType::Any, "std::ops::Sub"),