Test fixes and rebase conflicts, round 2
This commit is contained in:
parent
db2c3ba0cf
commit
3021d4c564
8 changed files with 17 additions and 11 deletions
|
@ -28,6 +28,7 @@ use iter::ExactSizeIterator;
|
||||||
use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
|
use iter::{Map, Iterator, IteratorExt, DoubleEndedIterator};
|
||||||
use marker::Sized;
|
use marker::Sized;
|
||||||
use mem;
|
use mem;
|
||||||
|
#[allow(deprecated)]
|
||||||
use num::Int;
|
use num::Int;
|
||||||
use ops::{Fn, FnMut, FnOnce};
|
use ops::{Fn, FnMut, FnOnce};
|
||||||
use option::Option::{self, None, Some};
|
use option::Option::{self, None, Some};
|
||||||
|
|
|
@ -2439,6 +2439,7 @@ pub mod consts {
|
||||||
}
|
}
|
||||||
pub mod posix88 {
|
pub mod posix88 {
|
||||||
use types::os::arch::c95::c_int;
|
use types::os::arch::c95::c_int;
|
||||||
|
use types::os::arch::posix88::mode_t;
|
||||||
|
|
||||||
pub const O_RDONLY : c_int = 0;
|
pub const O_RDONLY : c_int = 0;
|
||||||
pub const O_WRONLY : c_int = 1;
|
pub const O_WRONLY : c_int = 1;
|
||||||
|
|
|
@ -352,7 +352,7 @@ pub mod reader {
|
||||||
let i = (val >> 28) as uint;
|
let i = (val >> 28) as uint;
|
||||||
let (shift, mask) = SHIFT_MASK_TABLE[i];
|
let (shift, mask) = SHIFT_MASK_TABLE[i];
|
||||||
Ok(Res {
|
Ok(Res {
|
||||||
val: ((val >> shift) & mask) as uint,
|
val: ((val >> shift) & mask) as usize,
|
||||||
next: start + ((32 - shift) >> 3),
|
next: start + ((32 - shift) >> 3),
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
@ -290,7 +290,7 @@ fn resolved_path(w: &mut fmt::Formatter, did: ast::DefId, p: &clean::Path,
|
||||||
if ast_util::is_local(did) || cache.inlined.contains(&did) {
|
if ast_util::is_local(did) || cache.inlined.contains(&did) {
|
||||||
Some(repeat("../").take(loc.len()).collect::<String>())
|
Some(repeat("../").take(loc.len()).collect::<String>())
|
||||||
} else {
|
} else {
|
||||||
match cache.extern_locations[did.krate] {
|
match cache.extern_locations[&did.krate] {
|
||||||
render::Remote(ref s) => Some(s.to_string()),
|
render::Remote(ref s) => Some(s.to_string()),
|
||||||
render::Local => {
|
render::Local => {
|
||||||
Some(repeat("../").take(loc.len()).collect::<String>())
|
Some(repeat("../").take(loc.len()).collect::<String>())
|
||||||
|
@ -404,11 +404,11 @@ fn primitive_link(f: &mut fmt::Formatter,
|
||||||
needs_termination = true;
|
needs_termination = true;
|
||||||
}
|
}
|
||||||
Some(&cnum) => {
|
Some(&cnum) => {
|
||||||
let path = &m.paths[ast::DefId {
|
let path = &m.paths[&ast::DefId {
|
||||||
krate: cnum,
|
krate: cnum,
|
||||||
node: ast::CRATE_NODE_ID,
|
node: ast::CRATE_NODE_ID,
|
||||||
}];
|
}];
|
||||||
let loc = match m.extern_locations[cnum] {
|
let loc = match m.extern_locations[&cnum] {
|
||||||
render::Remote(ref s) => Some(s.to_string()),
|
render::Remote(ref s) => Some(s.to_string()),
|
||||||
render::Local => {
|
render::Local => {
|
||||||
let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());
|
let len = CURRENT_LOCATION_KEY.with(|s| s.borrow().len());
|
||||||
|
|
|
@ -1409,8 +1409,8 @@ impl<'a> Item<'a> {
|
||||||
// located, then we return `None`.
|
// located, then we return `None`.
|
||||||
} else {
|
} else {
|
||||||
let cache = cache();
|
let cache = cache();
|
||||||
let path = &cache.external_paths[self.item.def_id];
|
let path = &cache.external_paths[&self.item.def_id];
|
||||||
let root = match cache.extern_locations[self.item.def_id.krate] {
|
let root = match cache.extern_locations[&self.item.def_id.krate] {
|
||||||
Remote(ref s) => s.to_string(),
|
Remote(ref s) => s.to_string(),
|
||||||
Local => self.cx.root_path.clone(),
|
Local => self.cx.root_path.clone(),
|
||||||
Unknown => return None,
|
Unknown => return None,
|
||||||
|
@ -1868,7 +1868,7 @@ fn item_trait(w: &mut fmt::Formatter, cx: &Context, it: &clean::Item,
|
||||||
path = if ast_util::is_local(it.def_id) {
|
path = if ast_util::is_local(it.def_id) {
|
||||||
cx.current.connect("/")
|
cx.current.connect("/")
|
||||||
} else {
|
} else {
|
||||||
let path = &cache.external_paths[it.def_id];
|
let path = &cache.external_paths[&it.def_id];
|
||||||
path[..path.len() - 1].connect("/")
|
path[..path.len() - 1].connect("/")
|
||||||
},
|
},
|
||||||
ty = shortty(it).to_static_str(),
|
ty = shortty(it).to_static_str(),
|
||||||
|
|
|
@ -196,7 +196,7 @@ impl<'a, 'tcx> RustdocVisitor<'a, 'tcx> {
|
||||||
Some(tcx) => tcx,
|
Some(tcx) => tcx,
|
||||||
None => return false
|
None => return false
|
||||||
};
|
};
|
||||||
let def = tcx.def_map.borrow()[id].def_id();
|
let def = tcx.def_map.borrow()[&id].def_id();
|
||||||
if !ast_util::is_local(def) { return false }
|
if !ast_util::is_local(def) { return false }
|
||||||
let analysis = match self.analysis {
|
let analysis = match self.analysis {
|
||||||
Some(analysis) => analysis, None => return false
|
Some(analysis) => analysis, None => return false
|
||||||
|
|
|
@ -36,7 +36,7 @@ pub fn init() {
|
||||||
&mut data);
|
&mut data);
|
||||||
assert_eq!(ret, 0);
|
assert_eq!(ret, 0);
|
||||||
|
|
||||||
rt::at_exit(|| { c::WSACleanup(); })
|
let _ = rt::at_exit(|| { c::WSACleanup(); });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -133,9 +133,8 @@ unsafe fn init_dtors() {
|
||||||
if !DTORS.is_null() { return }
|
if !DTORS.is_null() { return }
|
||||||
|
|
||||||
let dtors = box Vec::<(Key, Dtor)>::new();
|
let dtors = box Vec::<(Key, Dtor)>::new();
|
||||||
DTORS = boxed::into_raw(dtors);
|
|
||||||
|
|
||||||
rt::at_exit(move|| {
|
let res = rt::at_exit(move|| {
|
||||||
DTOR_LOCK.lock();
|
DTOR_LOCK.lock();
|
||||||
let dtors = DTORS;
|
let dtors = DTORS;
|
||||||
DTORS = 1 as *mut _;
|
DTORS = 1 as *mut _;
|
||||||
|
@ -143,6 +142,11 @@ unsafe fn init_dtors() {
|
||||||
assert!(DTORS as uint == 1); // can't re-init after destructing
|
assert!(DTORS as uint == 1); // can't re-init after destructing
|
||||||
DTOR_LOCK.unlock();
|
DTOR_LOCK.unlock();
|
||||||
});
|
});
|
||||||
|
if res.is_ok() {
|
||||||
|
DTORS = boxed::into_raw(dtors);
|
||||||
|
} else {
|
||||||
|
DTORS = 1 as *mut _;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unsafe fn register_dtor(key: Key, dtor: Dtor) {
|
unsafe fn register_dtor(key: Key, dtor: Dtor) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue