mirror of
https://github.com/rust-lang/rust.git
synced 2024-12-05 05:04:24 +00:00
Impl Eq/PartialEq on FnKind, improve docs
This commit is contained in:
parent
bef7d90a3b
commit
27db6e1e51
@ -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,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user