]> git.lizzy.rs Git - rust.git/blob - compiler/rustc_builtin_macros/src/deriving/bounds.rs
Test drop_tracking_mir before querying generator.
[rust.git] / compiler / rustc_builtin_macros / src / deriving / bounds.rs
1 use crate::deriving::generic::*;
2 use crate::deriving::path_std;
3
4 use rustc_ast::MetaItem;
5 use rustc_expand::base::{Annotatable, ExtCtxt};
6 use rustc_span::Span;
7
8 pub fn expand_deriving_copy(
9     cx: &mut ExtCtxt<'_>,
10     span: Span,
11     mitem: &MetaItem,
12     item: &Annotatable,
13     push: &mut dyn FnMut(Annotatable),
14     is_const: bool,
15 ) {
16     let trait_def = TraitDef {
17         span,
18         path: path_std!(marker::Copy),
19         skip_path_as_bound: false,
20         additional_bounds: Vec::new(),
21         supports_unions: true,
22         methods: Vec::new(),
23         associated_types: Vec::new(),
24         is_const,
25     };
26
27     trait_def.expand(cx, mitem, item, push);
28 }