From a3263bafe0543cb72749cb03de61f26ba1ea4f19 Mon Sep 17 00:00:00 2001 From: bjorn3 Date: Tue, 13 Nov 2018 17:58:42 +0100 Subject: [PATCH] Change some unimplemented! to unimpl! --- src/abi.rs | 4 +++- src/base.rs | 8 ++++---- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/abi.rs b/src/abi.rs index 597e288d603..e50aa9ff63d 100644 --- a/src/abi.rs +++ b/src/abi.rs @@ -75,7 +75,9 @@ pub fn clif_sig_from_fn_ty<'a, 'tcx: 'a>( fn_ty: Ty<'tcx>, ) -> Signature { let sig = ty_fn_sig(tcx, fn_ty); - assert!(!sig.variadic, "Variadic function are not yet supported"); + if sig.variadic { + unimpl!("Variadic function are not yet supported"); + } let (call_conv, inputs, output): (CallConv, Vec, Ty) = match sig.abi { Abi::Rust => (CallConv::Fast, sig.inputs().to_vec(), sig.output()), Abi::C => (CallConv::SystemV, sig.inputs().to_vec(), sig.output()), diff --git a/src/base.rs b/src/base.rs index 00e80dfa8ca..3f0222ca6ae 100644 --- a/src/base.rs +++ b/src/base.rs @@ -264,7 +264,7 @@ fn codegen_fn_content<'a, 'tcx: 'a>(fx: &mut FunctionCx<'a, 'tcx, impl Backend>) drop_place.write_place_ref(fx, arg_place); match ty.sty { ty::Dynamic(..) => { - unimplemented!("Drop for trait object"); + unimpl!("Drop for trait object"); } _ => { let drop_fn_ty = drop_fn.ty(fx.tcx); @@ -1061,7 +1061,7 @@ pub fn trans_place<'a, 'tcx: 'a>( offset, min_length: _, from_end: false, - } => unimplemented!( + } => unimpl!( "projection const index {:?} offset {:?} not from end", projection.base, offset @@ -1070,12 +1070,12 @@ pub fn trans_place<'a, 'tcx: 'a>( offset, min_length: _, from_end: true, - } => unimplemented!( + } => unimpl!( "projection const index {:?} offset {:?} from end", projection.base, offset ), - ProjectionElem::Subslice { from, to } => unimplemented!( + ProjectionElem::Subslice { from, to } => unimpl!( "projection subslice {:?} from {} to {}", projection.base, from,