change BuiltinDeriveFn type to get ExtCtxt by immutable ref and fix signatures
This commit is contained in:
parent
615bb53a8d
commit
afd0a8eb8f
12 changed files with 13 additions and 13 deletions
|
@ -6,7 +6,7 @@ use rustc_expand::base::{Annotatable, ExtCtxt};
|
|||
use rustc_span::Span;
|
||||
|
||||
pub fn expand_deriving_copy(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
@ -29,7 +29,7 @@ pub fn expand_deriving_copy(
|
|||
}
|
||||
|
||||
pub fn expand_deriving_const_param_ty(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -9,7 +9,7 @@ use rustc_span::Span;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_clone(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -10,7 +10,7 @@ use rustc_span::Span;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_eq(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -8,7 +8,7 @@ use rustc_span::Span;
|
|||
use thin_vec::thin_vec;
|
||||
|
||||
pub fn expand_deriving_ord(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -9,7 +9,7 @@ use rustc_span::Span;
|
|||
use thin_vec::thin_vec;
|
||||
|
||||
pub fn expand_deriving_partial_eq(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -8,7 +8,7 @@ use rustc_span::Span;
|
|||
use thin_vec::thin_vec;
|
||||
|
||||
pub fn expand_deriving_partial_ord(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -9,7 +9,7 @@ use rustc_span::Span;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_debug(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -11,7 +11,7 @@ use rustc_span::Span;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_rustc_decodable(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -13,7 +13,7 @@ use smallvec::SmallVec;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_default(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &ast::MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -95,7 +95,7 @@ use rustc_span::Span;
|
|||
use thin_vec::{thin_vec, ThinVec};
|
||||
|
||||
pub fn expand_deriving_rustc_encodable(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -8,7 +8,7 @@ use rustc_span::Span;
|
|||
use thin_vec::thin_vec;
|
||||
|
||||
pub fn expand_deriving_hash(
|
||||
cx: &mut ExtCtxt<'_>,
|
||||
cx: &ExtCtxt<'_>,
|
||||
span: Span,
|
||||
mitem: &MetaItem,
|
||||
item: &Annotatable,
|
||||
|
|
|
@ -40,7 +40,7 @@ pub mod partial_ord;
|
|||
pub mod generic;
|
||||
|
||||
pub(crate) type BuiltinDeriveFn =
|
||||
fn(&mut ExtCtxt<'_>, Span, &MetaItem, &Annotatable, &mut dyn FnMut(Annotatable), bool);
|
||||
fn(&ExtCtxt<'_>, Span, &MetaItem, &Annotatable, &mut dyn FnMut(Annotatable), bool);
|
||||
|
||||
pub(crate) struct BuiltinDerive(pub(crate) BuiltinDeriveFn);
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue