diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-06 18:49:59 +0100 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2019-02-06 18:49:59 +0100 |
| commit | 43f4dc622054d7794c0e86cf8203ec294534c66c (patch) | |
| tree | 7572a6126600ea0c040bd34140d7580214610735 /example/example.rs | |
| parent | 059b589407186dbf17f25ab0eaa81dddb5b125f9 (diff) | |
| download | rust-43f4dc622054d7794c0e86cf8203ec294534c66c.tar.gz rust-43f4dc622054d7794c0e86cf8203ec294534c66c.zip | |
Fix some warnings
Diffstat (limited to 'example/example.rs')
| -rw-r--r-- | example/example.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/example/example.rs b/example/example.rs index 220554550f1..d7fbb932240 100644 --- a/example/example.rs +++ b/example/example.rs @@ -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) } } |
