Skip to content

Commit 7e5d971

Browse files
committed
fix warnings; make test suite pass again
1 parent 2be159b commit 7e5d971

File tree

4 files changed

+4
-5
lines changed

4 files changed

+4
-5
lines changed

src/librustc_mir/interpret/memory.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -1454,7 +1454,7 @@ impl<'a, 'tcx, M: Machine<'tcx>> Memory<'a, 'tcx, M> {
14541454
return Ok(());
14551455
}
14561456
let ptr = ptr.to_ptr()?;
1457-
let mut alloc = self.get_mut(ptr.alloc_id)?;
1457+
let alloc = self.get_mut(ptr.alloc_id)?;
14581458
alloc.undef_mask.set_range(
14591459
ptr.offset,
14601460
ptr.offset + size,

src/librustc_mir/interpret/value.rs

-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
#![allow(unknown_lints)]
2-
#![allow(float_cmp)]
32

43
use rustc::ty::layout::HasDataLayout;
54

tests/run-pass/pointers.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ fn tuple_ref_mut() -> (i8, i8) {
3434
fn match_ref_mut() -> i8 {
3535
let mut t = (20, 22);
3636
{
37-
let mut opt = Some(&mut t);
37+
let opt = Some(&mut t);
3838
match opt {
3939
Some(&mut (ref mut x, ref mut y)) => *x += *y,
4040
None => {},

tests/run-pass/thread-local.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,10 @@ pub fn record(r: usize) {
2929
unsafe { RECORD = RECORD*10 + r };
3030
}
3131

32-
unsafe extern fn dtor(mut ptr: *mut u64) {
32+
unsafe extern fn dtor(ptr: *mut u64) {
3333
assert!(CANNARY != 0 as *mut _); // make sure we do not get run too often
3434
let val = *ptr;
35-
35+
3636
let which_key = GLOBALS.iter().position(|global| global as *const _ == ptr).expect("Should find my global");
3737
record(which_key);
3838

0 commit comments

Comments
 (0)