Impl Eq/PartialEq on FnKind, improve docs

This commit is contained in:
Manish Goregaokar 2015-08-16 18:14:37 +05:30
parent bef7d90a3b
commit 27db6e1e51

View File

@ -32,7 +32,7 @@ use codemap::Span;
use ptr::P; use ptr::P;
use owned_slice::OwnedSlice; use owned_slice::OwnedSlice;
#[derive(Copy, Clone)] #[derive(Copy, Clone, PartialEq, Eq)]
pub enum FnKind<'a> { pub enum FnKind<'a> {
/// fn foo() or extern "Abi" fn foo() /// fn foo() or extern "Abi" fn foo()
FkItemFn(Ident, &'a Generics, Unsafety, Constness, Abi, Visibility), FkItemFn(Ident, &'a Generics, Unsafety, Constness, Abi, Visibility),
@ -40,8 +40,7 @@ pub enum FnKind<'a> {
/// fn foo(&self) /// fn foo(&self)
FkMethod(Ident, &'a MethodSig, Option<Visibility>), FkMethod(Ident, &'a MethodSig, Option<Visibility>),
/// |x, y| ... /// Closures (|x, y| {})
/// proc(x, y) ...
FkFnBlock, FkFnBlock,
} }