Skip to content

Commit 3021d4c

Browse files
committed
Test fixes and rebase conflicts, round 2
1 parent db2c3ba commit 3021d4c

File tree

8 files changed

+17
-11
lines changed

8 files changed

+17
-11
lines changed

src/libcore/str/mod.rs

+1
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ use iter::ExactSizeIterator;
2828
use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
2929
use marker::Sized;
3030
use mem;
31+
#[allow(deprecated)]
3132
use num::Int;
3233
use ops::{Fn, FnMut, FnOnce};
3334
use option::Option::{self, None, Some};

src/liblibc/lib.rs

+1
Original file line numberDiff line numberDiff line change
@@ -2439,6 +2439,7 @@ pub mod consts {
24392439
}
24402440
pub mod posix88 {
24412441
use types::os::arch::c95::c_int;
2442+
use types::os::arch::posix88::mode_t;
24422443

24432444
pub const O_RDONLY : c_int = 0;
24442445
pub const O_WRONLY : c_int = 1;

src/librbml/lib.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,7 @@ pub mod reader {
352352
let i = (val >> 28) as uint;
353353
let (shift, mask) = SHIFT_MASK_TABLE[i];
354354
Ok(Res {
355-
val: ((val >> shift) & mask) as uint,
355+
val: ((val >> shift) & mask) as usize,
356356
next: start + ((32 - shift) >> 3),
357357
})
358358
}

src/librustdoc/html/format.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
290290
if ast_util::is_local(did) || cache.inlined.contains(&did) {
291291
Some(repeat("../").take(loc.len()).collect::<String>())
292292
} else {
293-
match cache.extern_locations[did.krate] {
293+
match cache.extern_locations[&did.krate] {
294294
render::Remote(ref s) => Some(s.to_string()),
295295
render::Local => {
296296
Some(repeat("../").take(loc.len()).collect::<String>())
@@ -404,11 +404,11 @@ fn primitive_link(f: &mut fmt::Formatter,
404404
needs_termination = true;
405405
}
406406
Some(&cnum) => {
407-
let path = &m.paths[ast::DefId {
407+
let path = &m.paths[&ast::DefId {
408408
krate: cnum,
409409
node: ast::CRATE_NODE_ID,
410410
}];
411-
let loc = match m.extern_locations[cnum] {
411+
let loc = match m.extern_locations[&cnum] {
412412
render::Remote(ref s) => Some(s.to_string()),
413413
render::Local => {
414414
let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());

src/librustdoc/html/render.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -1409,8 +1409,8 @@ impl<'a> Item<'a> {
14091409
// located, then we return `None`.
14101410
} else {
14111411
let cache = cache();
1412-
let path = &cache.external_paths[self.item.def_id];
1413-
let root = match cache.extern_locations[self.item.def_id.krate] {
1412+
let path = &cache.external_paths[&self.item.def_id];
1413+
let root = match cache.extern_locations[&self.item.def_id.krate] {
14141414
Remote(ref s) => s.to_string(),
14151415
Local => self.cx.root_path.clone(),
14161416
Unknown => return None,
@@ -1868,7 +1868,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
18681868
path = if ast_util::is_local(it.def_id) {
18691869
cx.current.connect("/")
18701870
} else {
1871-
let path = &cache.external_paths[it.def_id];
1871+
let path = &cache.external_paths[&it.def_id];
18721872
path[..path.len() - 1].connect("/")
18731873
},
18741874
ty = shortty(it).to_static_str(),

src/librustdoc/visit_ast.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
196196
Some(tcx) => tcx,
197197
None => return false
198198
};
199-
let def = tcx.def_map.borrow()[id].def_id();
199+
let def = tcx.def_map.borrow()[&id].def_id();
200200
if !ast_util::is_local(def) { return false }
201201
let analysis = match self.analysis {
202202
Some(analysis) => analysis, None => return false

src/libstd/sys/windows/net.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ pub fn init() {
3636
&mut data);
3737
assert_eq!(ret, 0);
3838

39-
rt::at_exit(|| { c::WSACleanup(); })
39+
let _ = rt::at_exit(|| { c::WSACleanup(); });
4040
});
4141
}
4242

src/libstd/sys/windows/thread_local.rs

+6-2
Original file line numberDiff line numberDiff line change
@@ -133,16 +133,20 @@ unsafe fn init_dtors() {
133133
if !DTORS.is_null() { return }
134134

135135
let dtors = box Vec::<(Key, Dtor)>::new();
136-
DTORS = boxed::into_raw(dtors);
137136

138-
rt::at_exit(move|| {
137+
let res = rt::at_exit(move|| {
139138
DTOR_LOCK.lock();
140139
let dtors = DTORS;
141140
DTORS = 1 as *mut _;
142141
Box::from_raw(dtors);
143142
assert!(DTORS as uint == 1); // can't re-init after destructing
144143
DTOR_LOCK.unlock();
145144
});
145+
if res.is_ok() {
146+
DTORS = boxed::into_raw(dtors);
147+
} else {
148+
DTORS = 1 as *mut _;
149+
}
146150
}
147151

148152
unsafe fn register_dtor(key: Key, dtor: Dtor) {

0 commit comments

Comments
 (0)