diff options
| author | ljedrz <ljedrz@gmail.com> | 2018-07-12 11:58:16 +0200 |
|---|---|---|
| committer | ljedrz <ljedrz@gmail.com> | 2018-07-12 11:58:16 +0200 |
| commit | 08c113abef13bd5ed050f7f8480afcd04eda081f (patch) | |
| tree | 0a02ef8e4f3fa98fa60cee0215f5bd0a74fb2784 /src/libsyntax_ext/deriving/generic | |
| parent | c946c2539e9690fab5dbf7ac217ec696ac263cf3 (diff) | |
| download | rust-08c113abef13bd5ed050f7f8480afcd04eda081f.tar.gz rust-08c113abef13bd5ed050f7f8480afcd04eda081f.zip | |
Deny bare trait objects in src/libsyntax_ext
Diffstat (limited to 'src/libsyntax_ext/deriving/generic')
| -rw-r--r-- | src/libsyntax_ext/deriving/generic/mod.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/libsyntax_ext/deriving/generic/mod.rs b/src/libsyntax_ext/deriving/generic/mod.rs index 3ea0eb8bbd8..aad69c109f9 100644 --- a/src/libsyntax_ext/deriving/generic/mod.rs +++ b/src/libsyntax_ext/deriving/generic/mod.rs @@ -330,7 +330,7 @@ pub enum SubstructureFields<'a> { /// Combine the values of all the fields together. The last argument is /// all the fields of all the structures. pub type CombineSubstructureFunc<'a> = - Box<FnMut(&mut ExtCtxt, Span, &Substructure) -> P<Expr> + 'a>; + Box<dyn FnMut(&mut ExtCtxt, Span, &Substructure) -> P<Expr> + 'a>; /// Deal with non-matching enum variants. The tuple is a list of /// identifiers (one for each `Self` argument, which could be any of the @@ -338,7 +338,7 @@ pub type CombineSubstructureFunc<'a> = /// holding the variant index value for each of the `Self` arguments. The /// last argument is all the non-`Self` args of the method being derived. pub type EnumNonMatchCollapsedFunc<'a> = - Box<FnMut(&mut ExtCtxt, Span, (&[Ident], &[Ident]), &[P<Expr>]) -> P<Expr> + 'a>; + Box<dyn FnMut(&mut ExtCtxt, Span, (&[Ident], &[Ident]), &[P<Expr>]) -> P<Expr> + 'a>; pub fn combine_substructure<'a>(f: CombineSubstructureFunc<'a>) -> RefCell<CombineSubstructureFunc<'a>> { @@ -398,7 +398,7 @@ impl<'a> TraitDef<'a> { cx: &mut ExtCtxt, mitem: &ast::MetaItem, item: &'a Annotatable, - push: &mut FnMut(Annotatable)) { + push: &mut dyn FnMut(Annotatable)) { self.expand_ext(cx, mitem, item, push, false); } @@ -406,7 +406,7 @@ impl<'a> TraitDef<'a> { cx: &mut ExtCtxt, mitem: &ast::MetaItem, item: &'a Annotatable, - push: &mut FnMut(Annotatable), + push: &mut dyn FnMut(Annotatable), from_scratch: bool) { match *item { Annotatable::Item(ref item) => { |
