Skip to content

Commit c4fa21d

Browse files
committed
Test fixes and rebase conflicts from the rollup
1 parent f8b67e0 commit c4fa21d

File tree

8 files changed

+28
-29
lines changed

8 files changed

+28
-29
lines changed

mk/debuggers.mk

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,12 @@ DEBUGGER_SCRIPTS_ALL=$(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $(DEBUGGER_BIN_SCRIPTS_
2626
# $(2) - the host triple
2727
define DEF_INSTALL_DEBUGGER_SCRIPTS_HOST
2828

29-
install-debugger-scripts$(1)_H_$(2): $(DEBUGGER_SCRIPTS_ALL)
29+
tmp/install-debugger-scripts$(1)_H_$(2).done: $$(DEBUGGER_SCRIPTS_ALL)
3030
$(Q)mkdir -p $$(HBIN$(1)_H_$(2))
3131
$(Q)mkdir -p $$(HLIB$(1)_H_$(2))/rustlib/etc
3232
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(HBIN$(1)_H_$(2))
3333
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(HLIB$(1)_H_$(2))/rustlib/etc
34-
34+
$(Q)touch $$@
3535
endef
3636

3737
# Expand host make-targets for all stages
@@ -44,12 +44,12 @@ $(foreach stage,$(STAGES), \
4444
# $(3) is the host triple
4545
define DEF_INSTALL_DEBUGGER_SCRIPTS_TARGET
4646

47-
install-debugger-scripts$(1)_T_$(2)_H_$(3): $(DEBUGGER_SCRIPTS_ALL)
47+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done: $$(DEBUGGER_SCRIPTS_ALL)
4848
$(Q)mkdir -p $$(TBIN$(1)_T_$(2)_H_$(3))
4949
$(Q)mkdir -p $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
5050
$(Q)install $(DEBUGGER_BIN_SCRIPTS_ABS) $$(TBIN$(1)_T_$(2)_H_$(3))
5151
$(Q)install $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(TLIB$(1)_T_$(2)_H_$(3))/rustlib/etc
52-
52+
$(Q)touch $$@
5353
endef
5454

5555
# Expand target make-targets for all stages

mk/main.mk

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ else
357357
HSREQ$(1)_H_$(3) = \
358358
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359359
$$(MKFILE_DEPS) \
360-
install-debugger-scripts$(1)_H_$(3)
360+
tmp/install-debugger-scripts$(1)_H_$(3).done
361361
endif
362362

363363
# Prerequisites for using the stageN compiler to build target artifacts
@@ -372,7 +372,7 @@ SREQ$(1)_T_$(2)_H_$(3) = \
372372
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373373
$$(foreach dep,$$(TARGET_CRATES), \
374374
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
install-debugger-scripts$(1)_T_$(2)_H_$(3)
375+
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
376376

377377
# Prerequisites for a working stageN compiler and complete set of target
378378
# libraries

src/librustdoc/html/markdown.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
199199
let mut s = String::new();
200200
let krate = PLAYGROUND_KRATE.with(|c| c.borrow().clone());
201201
let id = krate.as_ref().map(|krate| {
202-
let i = TEST_IDX.with(|slot| {
202+
let idx = TEST_IDX.with(|slot| {
203203
let r = slot.get();
204204
slot.set(r + 1);
205205
r
@@ -212,8 +212,8 @@ pub fn render(w: &mut fmt::Formatter, s: &str, print_toc: bool) -> fmt::Result {
212212
let test = test::maketest(test.as_slice(), krate, false, false);
213213
s.push_str(format!("<span id='rust-example-raw-{}' \
214214
class='rusttest'>{}</span>",
215-
i, Escape(test.as_slice())).as_slice());
216-
format!("rust-example-rendered-{}", i)
215+
idx, Escape(test.as_slice())).as_slice());
216+
format!("rust-example-rendered-{}", idx)
217217
});
218218
let id = id.as_ref().map(|i| i.as_slice());
219219
s.push_str(highlight::highlight(text.as_slice(), None, id)

src/librustdoc/html/render.rs

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2113,14 +2113,6 @@ fn render_impl(w: &mut fmt::Formatter, i: &Impl) -> fmt::Result {
21132113
fn doctraititem(w: &mut fmt::Formatter, item: &clean::Item, dox: bool)
21142114
-> fmt::Result {
21152115
match item.inner {
2116-
clean::MethodItem(..) => {
2117-
try!(write!(w, "<h4 id='method.{}' class='{}'>{}<code>",
2118-
*item.name.as_ref().unwrap(),
2119-
shortty(item),
2120-
ConciseStability(&item.stability)));
2121-
try!(render_method(w, item));
2122-
try!(write!(w, "</code></h4>\n"));
2123-
}
21242116
clean::TypedefItem(ref tydef) => {
21252117
let name = item.name.as_ref().unwrap();
21262118
try!(write!(w, "<h4 id='assoc_type.{}' class='{}'>{}<code>",
@@ -2130,7 +2122,14 @@ fn render_impl(w: &mut fmt::Formatter, i: &Impl) -> fmt::Result {
21302122
try!(write!(w, "type {} = {}", name, tydef.type_));
21312123
try!(write!(w, "</code></h4>\n"));
21322124
}
2133-
_ => panic!("unknown trait item with name {}", item.name)
2125+
_ => {
2126+
try!(write!(w, "<h4 id='method.{}' class='{}'>{}<code>",
2127+
*item.name.as_ref().unwrap(),
2128+
shortty(item),
2129+
ConciseStability(&item.stability)));
2130+
try!(render_method(w, item));
2131+
try!(write!(w, "</code></h4>\n"));
2132+
}
21342133
}
21352134
match item.doc_value() {
21362135
Some(s) if dox => {

src/libstd/os.rs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
248248
unsafe {
249249
#[cfg(windows)]
250250
unsafe fn get_env_pairs() -> Vec<Vec<u8>> {
251-
use slice::raw;
251+
use slice;
252252

253253
use libc::funcs::extra::kernel32::{
254254
GetEnvironmentStringsW,
@@ -281,9 +281,9 @@ pub fn env_as_bytes() -> Vec<(Vec<u8>,Vec<u8>)> {
281281
while *(p as *const _).offset(len) != 0 {
282282
len += 1;
283283
}
284-
raw::buf_as_slice(p, len as uint, |s| {
285-
result.push(String::from_utf16_lossy(s).into_bytes());
286-
});
284+
let p = p as *const u8;
285+
let s = slice::from_raw_buf(&p, len as uint);
286+
result.push(String::from_utf16_lossy(s).into_bytes());
287287
i += len as int + 1;
288288
}
289289
FreeEnvironmentStringsW(ch);
@@ -1071,9 +1071,9 @@ fn real_args() -> Vec<String> {
10711071
while *ptr.offset(len as int) != 0 { len += 1; }
10721072

10731073
// Push it onto the list.
1074-
let opt_s = slice::raw::buf_as_slice(ptr as *const _, len, |buf| {
1075-
String::from_utf16(::str::truncate_utf16_at_nul(buf))
1076-
});
1074+
let ptr = ptr as *const u16;
1075+
let buf = slice::from_raw_buf(&ptr, len);
1076+
let opt_s = String::from_utf16(::str::truncate_utf16_at_nul(buf));
10771077
opt_s.expect("CommandLineToArgvW returned invalid UTF-16")
10781078
});
10791079

src/libstd/sys/windows/thread_local.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ unsafe fn unregister_dtor(key: Key) -> bool {
185185
// that if we start linking with msvc?
186186

187187
#[link_section = ".CRT$XLB"]
188-
#[linkage = "extern"]
188+
#[linkage = "external"]
189189
#[allow(warnings)]
190190
pub static p_thread_callback: unsafe extern "system" fn(LPVOID, DWORD,
191191
LPVOID) =

src/libstd/thread_local/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ mod tests {
449449
use prelude::*;
450450

451451
use cell::UnsafeCell;
452-
use rt::thread::Thread;
452+
use rustrt::thread::Thread;
453453

454454
struct Foo(Sender<()>);
455455

src/libstd/thread_local/scoped.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ impl<T> Key<T> {
190190
}
191191
}
192192

193-
#[cfg(any(windows, target_os = "android", target_os = "ios"))]
193+
#[cfg(not(any(windows, target_os = "android", target_os = "ios")))]
194194
mod imp {
195195
use std::cell::UnsafeCell;
196196

@@ -207,7 +207,7 @@ mod imp {
207207
}
208208
}
209209

210-
#[cfg(not(any(windows, target_os = "android", target_os = "ios")))]
210+
#[cfg(any(windows, target_os = "android", target_os = "ios"))]
211211
mod imp {
212212
use kinds::marker;
213213
use sys_common::thread_local::StaticKey as OsStaticKey;

0 commit comments

Comments
 (0)