Allow #[derive()] to generate unsafe methods

This commit is contained in:
Manish Goregaokar 2015-05-17 11:28:19 +05:30
parent 4f83c4b851
commit 5b63841d91
14 changed files with 25 additions and 1 deletions

View file

@ -54,6 +54,7 @@ fn expand(cx: &mut ExtCtxt,
args: vec![],
ret_ty: Literal(Path::new_local("isize")),
attributes: vec![],
is_unsafe: false,
combine_substructure: combine_substructure(box |cx, span, substr| {
let zero = cx.expr_isize(span, 0);
cs_fold(false,

View file

@ -56,6 +56,7 @@ fn expand(cx: &mut ExtCtxt,
args: vec![],
ret_ty: Literal(Path::new_local("isize")),
attributes: vec![],
is_unsafe: false,
combine_substructure: combine_substructure(Box::new(totalsum_substructure)),
},
],