Fix some warnings

This commit is contained in:
bjorn3 2019-02-06 18:49:59 +01:00
parent 059b589407
commit 43f4dc6220
3 changed files with 7 additions and 7 deletions

View file

@ -77,7 +77,7 @@ fn debug_tuple() -> DebugTuple {
}
fn size_of<T>() -> usize {
unsafe { intrinsics::size_of::<T>() }
intrinsics::size_of::<T>()
}
fn use_size_of() -> usize {
@ -93,10 +93,10 @@ unsafe fn use_copy_intrinsic_ref(src: *const u8, dst: *mut u8) {
copy2(src, dst, 1);
}
const Abc: u8 = 6 * 7;
const ABC: u8 = 6 * 7;
fn use_const() -> u8 {
Abc
ABC
}
pub fn call_closure_3arg() {
@ -120,7 +120,7 @@ impl<'a, 'b> FnOnce<(&'a &'b [u16],)> for IsNotEmpty {
impl<'a, 'b> FnMut<(&'a &'b [u16],)> for IsNotEmpty {
#[inline]
extern "rust-call" fn call_mut(&mut self, arg: (&'a &'b [u16],)) -> (u8, u8) {
extern "rust-call" fn call_mut(&mut self, _arg: (&'a &'b [u16],)) -> (u8, u8) {
(0, 42)
}
}

View file

@ -103,8 +103,8 @@ struct Unique<T: ?Sized> {
impl<T: ?Sized, U: ?Sized> CoerceUnsized<Unique<U>> for Unique<T> where T: Unsize<U> {}
fn take_f32(f: f32) {}
fn take_unique(u: Unique<()>) {}
fn take_f32(_f: f32) {}
fn take_unique(_u: Unique<()>) {}
fn main() {
take_unique(Unique {

View file

@ -203,7 +203,7 @@ impl<'a, 'tcx: 'a, B: Backend + 'a> FunctionCx<'a, 'tcx, B> {
Ok(mut file) => {
let target_triple: ::target_lexicon::Triple = self.tcx.sess.target.target.llvm_target.parse().unwrap();
writeln!(file, "test compile").unwrap();
writeln!(file, "set is_pic");
writeln!(file, "set is_pic").unwrap();
writeln!(file, "target {}", target_triple).unwrap();
writeln!(file, "").unwrap();
file.write(clif.as_bytes()).unwrap();