]>
git.proxmox.com Git - rustc.git/blob - compiler/rustc_builtin_macros/src/deriving/bounds.rs
1 use crate::deriving
::generic
::ty
::*;
2 use crate::deriving
::generic
::*;
3 use crate::deriving
::path_std
;
5 use rustc_ast
::MetaItem
;
6 use rustc_expand
::base
::{Annotatable, ExtCtxt}
;
9 pub fn expand_deriving_copy(
14 push
: &mut dyn FnMut(Annotatable
),
16 let trait_def
= TraitDef
{
18 attributes
: Vec
::new(),
19 path
: path_std
!(marker
::Copy
),
20 additional_bounds
: Vec
::new(),
21 generics
: Bounds
::empty(),
23 supports_unions
: true,
25 associated_types
: Vec
::new(),
28 trait_def
.expand(cx
, mitem
, item
, push
);