merge bugs and fix warnings
This commit is contained in:
parent
4c5425dbde
commit
6b1db6a656
@ -305,7 +305,7 @@ pub fn strip_ptr(ty: &P<ast::Ty>) -> P<ast::Ty> {
|
|||||||
else { ty.clone() }
|
else { ty.clone() }
|
||||||
}
|
}
|
||||||
|
|
||||||
fn has_ptr(ty: &P<ast::Ty>) -> bool {
|
pub fn has_ptr(ty: &P<ast::Ty>) -> bool {
|
||||||
if let ast::TyKind::Rptr(_, ref _ptr_mut) = ty.node {
|
if let ast::TyKind::Rptr(_, ref _ptr_mut) = ty.node {
|
||||||
true
|
true
|
||||||
}
|
}
|
||||||
|
@ -111,6 +111,7 @@ fn serialize_item(
|
|||||||
).unwrap())
|
).unwrap())
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unreachable_code)]
|
||||||
fn binary_expr(
|
fn binary_expr(
|
||||||
cx: &ExtCtxt,
|
cx: &ExtCtxt,
|
||||||
builder: &aster::AstBuilder,
|
builder: &aster::AstBuilder,
|
||||||
@ -128,7 +129,7 @@ fn binary_expr(
|
|||||||
item.span,
|
item.span,
|
||||||
variant_data,
|
variant_data,
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
ast::ItemKind::Enum(ref enum_def, _) => {
|
ast::ItemKind::Enum(ref enum_def, _) => {
|
||||||
binary_expr_enum(
|
binary_expr_enum(
|
||||||
cx,
|
cx,
|
||||||
@ -139,7 +140,7 @@ fn binary_expr(
|
|||||||
item.span,
|
item.span,
|
||||||
enum_def,
|
enum_def,
|
||||||
)
|
)
|
||||||
}
|
},
|
||||||
_ => {
|
_ => {
|
||||||
cx.span_bug(item.span,
|
cx.span_bug(item.span,
|
||||||
"expected ItemStruct or ItemEnum in #[derive(Binary)]");
|
"expected ItemStruct or ItemEnum in #[derive(Binary)]");
|
||||||
@ -255,10 +256,11 @@ fn binary_expr_struct(
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(unreachable_code)]
|
||||||
fn binary_expr_item_struct(
|
fn binary_expr_item_struct(
|
||||||
cx: &ExtCtxt,
|
cx: &ExtCtxt,
|
||||||
builder: &aster::AstBuilder,
|
builder: &aster::AstBuilder,
|
||||||
impl_generics: &ast::Generics,
|
_impl_generics: &ast::Generics,
|
||||||
ty: P<ast::Ty>,
|
ty: P<ast::Ty>,
|
||||||
span: Span,
|
span: Span,
|
||||||
variant_data: &ast::VariantData,
|
variant_data: &ast::VariantData,
|
||||||
|
Loading…
Reference in New Issue
Block a user