Skip to content

Commit f77cb26

Browse files
committed
Auto merge of #24009 - Manishearth:rollup, r=Manishearth
- Successful merges: #23930, #23941, #23972, #23976, #23978, #23993, #23995, #23997, #24005 - Failed merges:
2 parents 80def6c + b104d70 commit f77cb26

File tree

24 files changed

+161
-39
lines changed

24 files changed

+161
-39
lines changed

AUTHORS.txt

+92-4
Large diffs are not rendered by default.

configure

+8-1
Original file line numberDiff line numberDiff line change
@@ -669,7 +669,6 @@ probe CFG_LD ld
669669
probe CFG_VALGRIND valgrind
670670
probe CFG_PERF perf
671671
probe CFG_ISCC iscc
672-
probe CFG_JAVAC javac
673672
probe CFG_ANTLR4 antlr4
674673
probe CFG_GRUN grun
675674
probe CFG_FLEX flex
@@ -679,6 +678,14 @@ probe CFG_XELATEX xelatex
679678
probe CFG_GDB gdb
680679
probe CFG_LLDB lldb
681680

681+
# On MacOS X, invoking `javac` pops up a dialog if the JDK is not
682+
# installed. Since `javac` is only used if `antlr4` is available,
683+
# probe for it only in this case.
684+
if [ ! -z "$CFG_ANTLR4" ]
685+
then
686+
probe CFG_JAVAC javac
687+
fi
688+
682689
if [ ! -z "$CFG_GDB" ]
683690
then
684691
# Store GDB's version

src/compiletest/runtest.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -382,7 +382,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
382382

383383
// write debugger script
384384
let mut script_str = String::with_capacity(2048);
385-
script_str.push_str("set charset UTF-8\n");
385+
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
386+
script_str.push_str(&format!("set charset {}\n", charset));
386387
script_str.push_str(&format!("file {}\n", exe_file.to_str().unwrap()));
387388
script_str.push_str("target remote :5039\n");
388389
script_str.push_str(&format!("set solib-search-path \
@@ -516,8 +517,8 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testfile: &Path) {
516517
.to_string();
517518
// write debugger script
518519
let mut script_str = String::with_capacity(2048);
519-
520-
script_str.push_str("set charset UTF-8\n");
520+
let charset = if cfg!(target_os = "bitrig") { "auto" } else { "UTF-8" };
521+
script_str.push_str(&format!("set charset {}\n", charset));
521522
script_str.push_str("show version\n");
522523

523524
match config.gdb_version {

src/liballoc/arc.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ impl<T> Weak<T> {
446446
/// ```
447447
pub fn upgrade(&self) -> Option<Arc<T>> {
448448
// We use a CAS loop to increment the strong count instead of a
449-
// fetch_add because once the count hits 0 is must never be above 0.
449+
// fetch_add because once the count hits 0 it must never be above 0.
450450
let inner = self.inner();
451451
loop {
452452
let n = inner.strong.load(SeqCst);

src/libcollections/borrow.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ impl<'a, B: ?Sized> IntoCow<'a, B> for Cow<'a, B> where B: ToOwned {
342342
}
343343

344344
#[stable(feature = "rust1", since = "1.0.0")]
345-
impl<'a, T: Clone> AsRef<T> for Cow<'a, T> {
345+
impl<'a, T: ?Sized + ToOwned> AsRef<T> for Cow<'a, T> {
346346
fn as_ref(&self) -> &T {
347347
self
348348
}

src/libcollections/string.rs

+12-10
Original file line numberDiff line numberDiff line change
@@ -796,49 +796,51 @@ impl<'a, 'b> Pattern<'a> for &'b String {
796796
#[stable(feature = "rust1", since = "1.0.0")]
797797
impl PartialEq for String {
798798
#[inline]
799-
fn eq(&self, other: &String) -> bool { PartialEq::eq(&**self, &**other) }
799+
fn eq(&self, other: &String) -> bool { PartialEq::eq(&self[..], &other[..]) }
800800
#[inline]
801-
fn ne(&self, other: &String) -> bool { PartialEq::ne(&**self, &**other) }
801+
fn ne(&self, other: &String) -> bool { PartialEq::ne(&self[..], &other[..]) }
802802
}
803803

804804
macro_rules! impl_eq {
805805
($lhs:ty, $rhs: ty) => {
806806
#[stable(feature = "rust1", since = "1.0.0")]
807807
impl<'a> PartialEq<$rhs> for $lhs {
808808
#[inline]
809-
fn eq(&self, other: &$rhs) -> bool { PartialEq::eq(&**self, &**other) }
809+
fn eq(&self, other: &$rhs) -> bool { PartialEq::eq(&self[..], &other[..]) }
810810
#[inline]
811-
fn ne(&self, other: &$rhs) -> bool { PartialEq::ne(&**self, &**other) }
811+
fn ne(&self, other: &$rhs) -> bool { PartialEq::ne(&self[..], &other[..]) }
812812
}
813813

814814
#[stable(feature = "rust1", since = "1.0.0")]
815815
impl<'a> PartialEq<$lhs> for $rhs {
816816
#[inline]
817-
fn eq(&self, other: &$lhs) -> bool { PartialEq::eq(&**self, &**other) }
817+
fn eq(&self, other: &$lhs) -> bool { PartialEq::eq(&self[..], &other[..]) }
818818
#[inline]
819-
fn ne(&self, other: &$lhs) -> bool { PartialEq::ne(&**self, &**other) }
819+
fn ne(&self, other: &$lhs) -> bool { PartialEq::ne(&self[..], &other[..]) }
820820
}
821821

822822
}
823823
}
824824

825+
impl_eq! { String, str }
825826
impl_eq! { String, &'a str }
827+
impl_eq! { Cow<'a, str>, str }
826828
impl_eq! { Cow<'a, str>, String }
827829

828830
#[stable(feature = "rust1", since = "1.0.0")]
829831
impl<'a, 'b> PartialEq<&'b str> for Cow<'a, str> {
830832
#[inline]
831-
fn eq(&self, other: &&'b str) -> bool { PartialEq::eq(&**self, &**other) }
833+
fn eq(&self, other: &&'b str) -> bool { PartialEq::eq(&self[..], &other[..]) }
832834
#[inline]
833-
fn ne(&self, other: &&'b str) -> bool { PartialEq::ne(&**self, &**other) }
835+
fn ne(&self, other: &&'b str) -> bool { PartialEq::ne(&self[..], &other[..]) }
834836
}
835837

836838
#[stable(feature = "rust1", since = "1.0.0")]
837839
impl<'a, 'b> PartialEq<Cow<'a, str>> for &'b str {
838840
#[inline]
839-
fn eq(&self, other: &Cow<'a, str>) -> bool { PartialEq::eq(&**self, &**other) }
841+
fn eq(&self, other: &Cow<'a, str>) -> bool { PartialEq::eq(&self[..], &other[..]) }
840842
#[inline]
841-
fn ne(&self, other: &Cow<'a, str>) -> bool { PartialEq::ne(&**self, &**other) }
843+
fn ne(&self, other: &Cow<'a, str>) -> bool { PartialEq::ne(&self[..], &other[..]) }
842844
}
843845

844846
#[unstable(feature = "collections", reason = "waiting on Str stabilization")]

src/librustdoc/html/static/main.js

+6-4
Original file line numberDiff line numberDiff line change
@@ -713,10 +713,12 @@
713713
if (crates[i] == window.currentCrate) {
714714
klass += ' current';
715715
}
716-
var desc = rawSearchIndex[crates[i]].items[0][3];
717-
div.append($('<a>', {'href': '../' + crates[i] + '/index.html',
718-
'title': plainSummaryLine(desc),
719-
'class': klass}).text(crates[i]));
716+
if (rawSearchIndex[crates[i]].items[0]) {
717+
var desc = rawSearchIndex[crates[i]].items[0][3];
718+
div.append($('<a>', {'href': '../' + crates[i] + '/index.html',
719+
'title': plainSummaryLine(desc),
720+
'class': klass}).text(crates[i]));
721+
}
720722
}
721723
sidebar.append(div);
722724
}

src/libstd/sys/unix/fs.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -381,7 +381,8 @@ mod tests {
381381
use prelude::v1::*;
382382

383383
#[cfg_attr(any(target_os = "freebsd",
384-
target_os = "openbsd"),
384+
target_os = "openbsd",
385+
target_os = "bitrig"),
385386
ignore)]
386387
// under some system, pipe(2) will return a bidrectionnal pipe
387388
#[test]

src/rust-installer

src/test/debuginfo/gdb-pretty-struct-and-enums-pre-gdb-7-7.rs

+1
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414

1515
// ignore-windows failing on win32 bot
1616
// ignore-freebsd: gdb package too new
17+
// ignore-bitrig: gdb-check:$2 = {<No data fields>}
1718
// ignore-tidy-linelength
1819
// ignore-lldb
1920
// ignore-android: FIXME(#10381)

src/test/parse-fail/issue-5806.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ignore-windows
1212
// ignore-freebsd
1313
// ignore-openbsd
14+
// ignore-bitrig
1415

1516
#[path = "../compile-fail"]
1617
mod foo; //~ ERROR: a directory

src/test/run-make/c-link-to-rust-staticlib/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ endif
88
ifneq ($(shell uname),FreeBSD)
99
all:
1010
$(RUSTC) foo.rs
11-
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) -lstdc++
11+
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRAFLAGS) $(EXTRACXXFLAGS)
1212
$(call RUN,bar)
1313
rm $(call STATICLIB,foo*)
1414
$(call RUN,bar)

src/test/run-make/issue-14500/Makefile

+4
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66
# is compiled with LTO, it shouldn't strip the symbol from `foo`, and that's the
77
# only way that `foo.c` will successfully compile.
88

9+
ifeq ($(UNAME),Bitrig)
10+
EXTRACFLAGS := -lc $(EXTRACFLAGS) $(EXTRACXXFLAGS)
11+
endif
12+
913
all:
1014
$(RUSTC) foo.rs --crate-type=rlib
1115
$(RUSTC) bar.rs --crate-type=staticlib -C lto -L. -o $(TMPDIR)/libbar.a

src/test/run-make/lto-smoke-c/Makefile

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,5 @@ CC := $(CC:-g=)
55

66
all:
77
$(RUSTC) foo.rs -C lto
8-
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) -lstdc++
8+
$(CC) bar.c -lfoo -o $(call RUN_BINFILE,bar) $(EXTRACFLAGS) $(EXTRACXXFLAGS)
99
$(call RUN,bar)
+5-6
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
-include ../tools.mk
22

3-
ifndef IS_WINDOWS
4-
ifneq ($(UNAME),OpenBSD)
3+
SKIP_OS := 'MINGW OpenBSD Bitrig'
4+
5+
ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))
6+
57
all:
68
$(RUSTC) -O --emit asm attr.rs
79
! grep -q morestack $(TMPDIR)/attr.s
@@ -10,11 +12,8 @@ all:
1012
$(RUSTC) -O --emit asm -C no-stack-check flag.rs
1113
! grep -q morestack $(TMPDIR)/flag.s
1214
else
13-
# On OpenBSD, morestack isn't used as the segmented stacks are disabled
14-
all:
15-
endif
16-
else
1715
# On Windows we use __chkstk and it only appears in functions with large allocations,
1816
# so this test wouldn't be reliable.
17+
# On Bitrig/OpenBSD, morestack isn't used as the segmented stacks are disabled
1918
all:
2019
endif

src/test/run-make/tools.mk

+9-3
Original file line numberDiff line numberDiff line change
@@ -55,15 +55,21 @@ endif
5555
ifdef IS_WINDOWS
5656
EXTRACFLAGS := -lws2_32 -luserenv
5757
else
58-
ifeq ($(shell uname),Darwin)
58+
ifeq ($(UNAME),Darwin)
5959
else
60-
ifeq ($(shell uname),FreeBSD)
60+
ifeq ($(UNAME),FreeBSD)
6161
EXTRACFLAGS := -lm -lpthread -lgcc_s
6262
else
63-
ifeq ($(shell uname),OpenBSD)
63+
ifeq ($(UNAME),Bitrig)
64+
EXTRACFLAGS := -lm -lpthread
65+
EXTRACXXFLAGS := -lc++ -lc++abi
66+
else
67+
ifeq ($(UNAME),OpenBSD)
6468
EXTRACFLAGS := -lm -lpthread
6569
else
6670
EXTRACFLAGS := -lm -lrt -ldl -lpthread
71+
EXTRACXXFLAGS := -lstdc++
72+
endif
6773
endif
6874
endif
6975
endif

src/test/run-make/use-extern-for-plugins/Makefile

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
-include ../tools.mk
22

3-
ifneq ($(findstring BSD,$(UNAME)),BSD)
3+
SKIP_OS := 'FreeBSD OpenBSD Bitrig'
4+
5+
ifneq ($(UNAME),$(findstring $(UNAME),$(SKIP_OS)))
6+
47
HOST := $(shell $(RUSTC) -vV | grep 'host:' | sed 's/host: //')
58
ifeq ($(findstring i686,$(HOST)),i686)
69
TARGET := $(subst i686,x86_64,$(HOST))
@@ -13,6 +16,6 @@ all:
1316
$(RUSTC) bar.rs -C extra-filename=-targ --target $(TARGET)
1417
$(RUSTC) baz.rs --extern a=$(TMPDIR)/liba-targ.rlib --target $(TARGET)
1518
else
16-
# FreeBSD & OpenBSD support only x86_64 architecture for now
19+
# FreeBSD, OpenBSD, and Bitrig support only x86_64 architecture for now
1720
all:
1821
endif

src/test/run-pass/sepcomp-cci.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213
// aux-build:sepcomp_cci_lib.rs
1314

src/test/run-pass/sepcomp-extern.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213
// aux-build:sepcomp-extern-lib.rs
1314

src/test/run-pass/sepcomp-fns-backwards.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test references to items that haven't been translated yet.

src/test/run-pass/sepcomp-fns.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test basic separate compilation functionality. The functions should be able

src/test/run-pass/sepcomp-statics.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test references to static items across compilation units.

src/test/run-pass/sepcomp-unwind.rs

+1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
1010

11+
// ignore-bitrig
1112
// compile-flags: -C codegen-units=3
1213

1314
// Test unwinding through multiple compilation units.

src/test/run-pass/tcp-stress.rs

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// ignore-linux see joyent/libuv#1189
1212
// ignore-android needs extra network permissions
1313
// ignore-openbsd system ulimit (Too many open files)
14+
// ignore-bitrig system ulimit (Too many open files)
1415
// exec-env:RUST_LOG=debug
1516

1617
#![feature(rustc_private, libc, old_io, io, std_misc)]

0 commit comments

Comments
 (0)