Put derives on a single line where possible.
This commit is contained in:
parent
b142ed296c
commit
5bec5ae545
3 changed files with 13 additions and 26 deletions
|
@ -13,8 +13,7 @@ use std::array::IntoIter;
|
|||
use std::fmt::Debug;
|
||||
|
||||
/// Encodes if a `DefKind::Ctor` is the constructor of an enum variant or a struct.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
|
||||
#[derive(HashStable_Generic)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
|
||||
pub enum CtorOf {
|
||||
/// This `DefKind::Ctor` is a synthesized constructor of a tuple or unit struct.
|
||||
Struct,
|
||||
|
@ -23,8 +22,7 @@ pub enum CtorOf {
|
|||
}
|
||||
|
||||
/// What kind of constructor something is.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
|
||||
#[derive(HashStable_Generic)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
|
||||
pub enum CtorKind {
|
||||
/// Constructor function automatically created by a tuple struct/variant.
|
||||
Fn,
|
||||
|
@ -33,8 +31,7 @@ pub enum CtorKind {
|
|||
}
|
||||
|
||||
/// An attribute that is not a macro; e.g., `#[inline]` or `#[rustfmt::skip]`.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
|
||||
#[derive(HashStable_Generic)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
|
||||
pub enum NonMacroAttrKind {
|
||||
/// Single-segment attribute defined by the language (`#[inline]`)
|
||||
Builtin(Symbol),
|
||||
|
@ -48,8 +45,7 @@ pub enum NonMacroAttrKind {
|
|||
}
|
||||
|
||||
/// What kind of definition something is; e.g., `mod` vs `struct`.
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
|
||||
#[derive(HashStable_Generic)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
|
||||
pub enum DefKind {
|
||||
// Type namespace
|
||||
Mod,
|
||||
|
@ -299,8 +295,7 @@ impl DefKind {
|
|||
/// - the call to `str_to_string` will resolve to [`Res::Def`], with the [`DefId`]
|
||||
/// pointing to the definition of `str_to_string` in the current crate.
|
||||
//
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug)]
|
||||
#[derive(HashStable_Generic)]
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Encodable, Decodable, Hash, Debug, HashStable_Generic)]
|
||||
pub enum Res<Id = hir::HirId> {
|
||||
/// Definition having a unique ID (`DefId`), corresponds to something defined in user code.
|
||||
///
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue