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

Lines changed: 92 additions & 4 deletions
Large diffs are not rendered by default.

configure

Lines changed: 8 additions & 1 deletion
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

Lines changed: 4 additions & 3 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 12 additions & 10 deletions
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

Lines changed: 6 additions & 4 deletions
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

Lines changed: 2 additions & 1 deletion
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

Lines changed: 1 addition & 0 deletions
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)

0 commit comments

Comments
 (0)