Skip to content

Commit 726999d

Browse files
committed
---
yaml --- r: 236479 b: refs/heads/auto c: 0f491be h: refs/heads/master i: 236477: 929e5cf 236475: fc3cb10 236471: e939fc5 236463: 21f1098 236447: 98871f6 236415: 11b0f79 v: v3
1 parent 26fc0f7 commit 726999d

File tree

106 files changed

+655
-742
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

106 files changed

+655
-742
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: 9f129a9698d2b113153ada9ffc599a4c77f587c6
11+
refs/heads/auto: 0f491bee6976191ea977b4e400e6831844766f84
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/configure

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,12 +1295,6 @@ $ pacman -R cmake && pacman -S mingw-w64-x86_64-cmake
12951295
putvar CFG_MSVC_LIB_PATH_${bits}
12961296
;;
12971297

1298-
*-rumprun-netbsd)
1299-
step_msg "targeting rumprun-netbsd, disabling jemalloc"
1300-
CFG_DISABLE_JEMALLOC=1
1301-
putvar CFG_DISABLE_JEMALLOC
1302-
;;
1303-
13041298
*)
13051299
;;
13061300
esac

branches/auto/mk/cfg/x86_64-rumprun-netbsd.mk

Lines changed: 0 additions & 24 deletions
This file was deleted.

branches/auto/src/compiletest/compiletest.rs

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
348348
if !full_version_line.trim().is_empty() => {
349349
let full_version_line = full_version_line.trim();
350350

351-
// used to be a regex "(^|[^0-9])([0-9]\.[0-9]+)"
351+
// used to be a regex "(^|[^0-9])([0-9]\.[0-9])([^0-9]|$)"
352352
for (pos, c) in full_version_line.char_indices() {
353353
if !c.is_digit(10) { continue }
354354
if pos + 2 >= full_version_line.len() { continue }
@@ -357,12 +357,11 @@ fn extract_gdb_version(full_version_line: Option<String>) -> Option<String> {
357357
if pos > 0 && full_version_line.char_at_reverse(pos).is_digit(10) {
358358
continue
359359
}
360-
let mut end = pos + 3;
361-
while end < full_version_line.len() &&
362-
full_version_line.char_at(end).is_digit(10) {
363-
end += 1;
360+
if pos + 3 < full_version_line.len() &&
361+
full_version_line.char_at(pos + 3).is_digit(10) {
362+
continue
364363
}
365-
return Some(full_version_line[pos..end].to_owned());
364+
return Some(full_version_line[pos..pos+3].to_owned());
366365
}
367366
println!("Could not extract GDB version from line '{}'",
368367
full_version_line);

branches/auto/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -881,7 +881,7 @@ mod foo {
881881
}
882882
883883
use foo::example::iter; // good: foo is at crate root
884-
// use example::iter; // bad: core is not at the crate root
884+
// use example::iter; // bad: example is not at the crate root
885885
use self::baz::foobaz; // good: self refers to module 'foo'
886886
use foo::bar::foobar; // good: foo is at crate root
887887

branches/auto/src/grammar/verify.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ use syntax::parse::lexer::TokenAndSpan;
3535

3636
fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
3737
fn id() -> token::Token {
38-
token::Ident(ast::Ident::with_empty_ctxt(Name(0))), token::Plain)
38+
token::Ident(ast::Ident { name: Name(0), ctxt: 0, }, token::Plain)
3939
}
4040

4141
let mut res = HashMap::new();
@@ -75,7 +75,7 @@ fn parse_token_list(file: &str) -> HashMap<String, token::Token> {
7575
"RPAREN" => token::CloseDelim(token::Paren),
7676
"SLASH" => token::BinOp(token::Slash),
7777
"COMMA" => token::Comma,
78-
"LIFETIME" => token::Lifetime(ast::Ident::with_empty_ctxt(Name(0))),
78+
"LIFETIME" => token::Lifetime(ast::Ident { name: Name(0), ctxt: 0 }),
7979
"CARET" => token::BinOp(token::Caret),
8080
"TILDE" => token::Tilde,
8181
"IDENT" => id(),
@@ -208,9 +208,9 @@ fn parse_antlr_token(s: &str, tokens: &HashMap<String, token::Token>, surrogate_
208208
token::Literal(token::ByteStr(..), n) => token::Literal(token::ByteStr(nm), n),
209209
token::Literal(token::ByteStrRaw(..), n) => token::Literal(token::ByteStrRaw(fix(content),
210210
count(content)), n),
211-
token::Ident(..) => token::Ident(ast::Ident::with_empty_ctxt(nm)),
211+
token::Ident(..) => token::Ident(ast::Ident { name: nm, ctxt: 0 },
212212
token::ModName),
213-
token::Lifetime(..) => token::Lifetime(ast::Ident::with_empty_ctxt(nm)),
213+
token::Lifetime(..) => token::Lifetime(ast::Ident { name: nm, ctxt: 0 }),
214214
ref t => t.clone()
215215
};
216216

branches/auto/src/libcollections/str.rs

Lines changed: 42 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1157,21 +1157,25 @@ impl str {
11571157
core_str::StrExt::rmatches(self, pat)
11581158
}
11591159

1160-
/// An iterator over the disjoint matches of a pattern within `self` as well
1161-
/// as the index that the match starts at.
1160+
/// An iterator over the start and end indices of the disjoint matches
1161+
/// of a pattern within `self`.
11621162
///
11631163
/// For matches of `pat` within `self` that overlap, only the indices
1164-
/// corresponding to the first match are returned.
1164+
/// corresponding to the first
1165+
/// match are returned.
11651166
///
1166-
/// The pattern can be a simple `&str`, `char`, or a closure that determines
1167-
/// if a character matches. Additional libraries might provide more complex
1168-
/// patterns like regular expressions.
1167+
/// The pattern can be a simple `&str`, `char`, or a closure that
1168+
/// determines if a character matches.
1169+
/// Additional libraries might provide more complex patterns like
1170+
/// regular expressions.
11691171
///
11701172
/// # Iterator behavior
11711173
///
11721174
/// The returned iterator will be double ended if the pattern allows a
1173-
/// reverse search and forward/reverse search yields the same elements. This
1174-
/// is true for, eg, `char` but not for `&str`.
1175+
/// reverse search
1176+
/// and forward/reverse search yields the same elements. This is true for,
1177+
/// eg, `char` but not
1178+
/// for `&str`.
11751179
///
11761180
/// If the pattern allows a reverse search but its results might differ
11771181
/// from a forward search, `rmatch_indices()` can be used.
@@ -1181,36 +1185,42 @@ impl str {
11811185
/// ```
11821186
/// #![feature(str_match_indices)]
11831187
///
1184-
/// let v: Vec<_> = "abcXXXabcYYYabc".match_indices("abc").collect();
1185-
/// assert_eq!(v, [(0, "abc"), (6, "abc"), (12, "abc")]);
1188+
/// let v: Vec<(usize, usize)> = "abcXXXabcYYYabc".match_indices("abc").collect();
1189+
/// assert_eq!(v, [(0, 3), (6, 9), (12, 15)]);
11861190
///
1187-
/// let v: Vec<_> = "1abcabc2".match_indices("abc").collect();
1188-
/// assert_eq!(v, [(1, "abc"), (4, "abc")]);
1191+
/// let v: Vec<(usize, usize)> = "1abcabc2".match_indices("abc").collect();
1192+
/// assert_eq!(v, [(1, 4), (4, 7)]);
11891193
///
1190-
/// let v: Vec<_> = "ababa".match_indices("aba").collect();
1191-
/// assert_eq!(v, [(0, "aba")]); // only the first `aba`
1194+
/// let v: Vec<(usize, usize)> = "ababa".match_indices("aba").collect();
1195+
/// assert_eq!(v, [(0, 3)]); // only the first `aba`
11921196
/// ```
11931197
#[unstable(feature = "str_match_indices",
11941198
reason = "might have its iterator type changed",
11951199
issue = "27743")]
1200+
// NB: Right now MatchIndices yields `(usize, usize)`, but it would
1201+
// be more consistent with `matches` and `char_indices` to return `(usize, &str)`
11961202
pub fn match_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> MatchIndices<'a, P> {
11971203
core_str::StrExt::match_indices(self, pat)
11981204
}
11991205

1200-
/// An iterator over the disjoint matches of a pattern within `self`,
1201-
/// yielded in reverse order along with the index of the match.
1206+
/// An iterator over the start and end indices of the disjoint matches of
1207+
/// a pattern within
1208+
/// `self`, yielded in reverse order.
12021209
///
12031210
/// For matches of `pat` within `self` that overlap, only the indices
1204-
/// corresponding to the last match are returned.
1211+
/// corresponding to the last
1212+
/// match are returned.
12051213
///
1206-
/// The pattern can be a simple `&str`, `char`, or a closure that determines
1207-
/// if a character matches. Additional libraries might provide more complex
1208-
/// patterns like regular expressions.
1214+
/// The pattern can be a simple `&str`, `char`, or a closure that
1215+
/// determines if a character matches.
1216+
/// Additional libraries might provide more complex patterns like
1217+
/// regular expressions.
12091218
///
12101219
/// # Iterator behavior
12111220
///
1212-
/// The returned iterator requires that the pattern supports a reverse
1213-
/// search, and it will be double ended if a forward/reverse search yields
1221+
/// The returned iterator requires that the pattern supports a
1222+
/// reverse search,
1223+
/// and it will be double ended if a forward/reverse search yields
12141224
/// the same elements.
12151225
///
12161226
/// For iterating from the front, `match_indices()` can be used.
@@ -1220,18 +1230,20 @@ impl str {
12201230
/// ```
12211231
/// #![feature(str_match_indices)]
12221232
///
1223-
/// let v: Vec<_> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
1224-
/// assert_eq!(v, [(12, "abc"), (6, "abc"), (0, "abc")]);
1233+
/// let v: Vec<(usize, usize)> = "abcXXXabcYYYabc".rmatch_indices("abc").collect();
1234+
/// assert_eq!(v, [(12, 15), (6, 9), (0, 3)]);
12251235
///
1226-
/// let v: Vec<_> = "1abcabc2".rmatch_indices("abc").collect();
1227-
/// assert_eq!(v, [(4, "abc"), (1, "abc")]);
1236+
/// let v: Vec<(usize, usize)> = "1abcabc2".rmatch_indices("abc").collect();
1237+
/// assert_eq!(v, [(4, 7), (1, 4)]);
12281238
///
1229-
/// let v: Vec<_> = "ababa".rmatch_indices("aba").collect();
1230-
/// assert_eq!(v, [(2, "aba")]); // only the last `aba`
1239+
/// let v: Vec<(usize, usize)> = "ababa".rmatch_indices("aba").collect();
1240+
/// assert_eq!(v, [(2, 5)]); // only the last `aba`
12311241
/// ```
12321242
#[unstable(feature = "str_match_indices",
12331243
reason = "might have its iterator type changed",
12341244
issue = "27743")]
1245+
// NB: Right now RMatchIndices yields `(usize, usize)`, but it would
1246+
// be more consistent with `rmatches` and `char_indices` to return `(usize, &str)`
12351247
pub fn rmatch_indices<'a, P: Pattern<'a>>(&'a self, pat: P) -> RMatchIndices<'a, P>
12361248
where P::Searcher: ReverseSearcher<'a>
12371249
{
@@ -1404,10 +1416,10 @@ impl str {
14041416
pub fn replace(&self, from: &str, to: &str) -> String {
14051417
let mut result = String::new();
14061418
let mut last_end = 0;
1407-
for (start, part) in self.match_indices(from) {
1419+
for (start, end) in self.match_indices(from) {
14081420
result.push_str(unsafe { self.slice_unchecked(last_end, start) });
14091421
result.push_str(to);
1410-
last_end = start + part.len();
1422+
last_end = end;
14111423
}
14121424
result.push_str(unsafe { self.slice_unchecked(last_end, self.len()) });
14131425
result

branches/auto/src/libcollections/string.rs

Lines changed: 2 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1041,8 +1041,8 @@ impl ops::DerefMut for String {
10411041
#[unstable(feature = "str_parse_error", reason = "may want to be replaced with \
10421042
Void if it ever exists",
10431043
issue = "27734")]
1044-
#[derive(Copy)]
1045-
pub enum ParseError {}
1044+
#[derive(Copy, Clone, Debug, Eq, PartialEq)]
1045+
pub struct ParseError(());
10461046

10471047
#[stable(feature = "rust1", since = "1.0.0")]
10481048
impl FromStr for String {
@@ -1053,26 +1053,6 @@ impl FromStr for String {
10531053
}
10541054
}
10551055

1056-
impl Clone for ParseError {
1057-
fn clone(&self) -> ParseError {
1058-
match *self {}
1059-
}
1060-
}
1061-
1062-
impl fmt::Debug for ParseError {
1063-
fn fmt(&self, _: &mut fmt::Formatter) -> fmt::Result {
1064-
match *self {}
1065-
}
1066-
}
1067-
1068-
impl PartialEq for ParseError {
1069-
fn eq(&self, _: &ParseError) -> bool {
1070-
match *self {}
1071-
}
1072-
}
1073-
1074-
impl Eq for ParseError {}
1075-
10761056
/// A generic trait for converting a value to a string
10771057
#[stable(feature = "rust1", since = "1.0.0")]
10781058
pub trait ToString {

branches/auto/src/libcollectionstest/str.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1047,7 +1047,7 @@ fn test_pattern_deref_forward() {
10471047
fn test_empty_match_indices() {
10481048
let data = "aä中!";
10491049
let vec: Vec<_> = data.match_indices("").collect();
1050-
assert_eq!(vec, [(0, ""), (1, ""), (3, ""), (6, ""), (7, "")]);
1050+
assert_eq!(vec, [(0, 0), (1, 1), (3, 3), (6, 6), (7, 7)]);
10511051
}
10521052

10531053
#[test]
@@ -1477,7 +1477,7 @@ generate_iterator_test! {
14771477

14781478
generate_iterator_test! {
14791479
double_ended_match_indices {
1480-
("a1b2c3", char::is_numeric) -> [(1, "1"), (3, "2"), (5, "3")];
1480+
("a1b2c3", char::is_numeric) -> [(1, 2), (3, 4), (5, 6)];
14811481
}
14821482
with str::match_indices, str::rmatch_indices;
14831483
}

branches/auto/src/libcore/str/mod.rs

Lines changed: 5 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -729,19 +729,15 @@ struct MatchIndicesInternal<'a, P: Pattern<'a>>(P::Searcher);
729729

730730
impl<'a, P: Pattern<'a>> MatchIndicesInternal<'a, P> {
731731
#[inline]
732-
fn next(&mut self) -> Option<(usize, &'a str)> {
733-
self.0.next_match().map(|(start, end)| unsafe {
734-
(start, self.0.haystack().slice_unchecked(start, end))
735-
})
732+
fn next(&mut self) -> Option<(usize, usize)> {
733+
self.0.next_match()
736734
}
737735

738736
#[inline]
739-
fn next_back(&mut self) -> Option<(usize, &'a str)>
737+
fn next_back(&mut self) -> Option<(usize, usize)>
740738
where P::Searcher: ReverseSearcher<'a>
741739
{
742-
self.0.next_match_back().map(|(start, end)| unsafe {
743-
(start, self.0.haystack().slice_unchecked(start, end))
744-
})
740+
self.0.next_match_back()
745741
}
746742
}
747743

@@ -757,7 +753,7 @@ generate_pattern_iterators! {
757753
reason = "type may be removed or have its iterator impl changed",
758754
issue = "27743")]
759755
internal:
760-
MatchIndicesInternal yielding ((usize, &'a str));
756+
MatchIndicesInternal yielding ((usize, usize));
761757
delegate double ended;
762758
}
763759

branches/auto/src/liblibc/lib.rs

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424
html_playground_url = "https://play.rust-lang.org/",
2525
issue_tracker_base_url = "https://github.com/rust-lang/rust/issues/")]
2626
#![cfg_attr(test, feature(test))]
27-
#![feature(cfg_target_vendor)]
2827

2928
//! Bindings for the C standard library and other platform libraries
3029
//!
@@ -144,10 +143,7 @@ pub use funcs::bsd43::*;
144143

145144
// On NaCl, these libraries are static. Thus it would be a Bad Idea to link them
146145
// in when creating a test crate.
147-
#[cfg(not(any(windows,
148-
target_env = "musl",
149-
all(target_os = "nacl", test),
150-
all(target_os = "netbsd", target_vendor = "rumprun"))))]
146+
#[cfg(not(any(windows, target_env = "musl", all(target_os = "nacl", test))))]
151147
#[link(name = "c")]
152148
#[link(name = "m")]
153149
extern {}

branches/auto/src/librustc/metadata/creader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ impl<'a> CrateReader<'a> {
482482
let span = mk_sp(lo, p.last_span.hi);
483483
p.abort_if_errors();
484484
macros.push(ast::MacroDef {
485-
ident: ast::Ident::with_empty_ctxt(name),
485+
ident: name.ident(),
486486
attrs: attrs,
487487
id: ast::DUMMY_NODE_ID,
488488
span: span,

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -520,9 +520,9 @@ fn encode_info_for_mod(ecx: &EncodeContext,
520520
});
521521

522522
if let hir::ItemImpl(..) = item.node {
523-
let (name, did) = (item.name, item.id);
523+
let (ident, did) = (item.name, item.id);
524524
debug!("(encoding info for module) ... encoding impl {} ({}/{})",
525-
name,
525+
ident,
526526
did, ecx.tcx.map.node_to_string(did));
527527

528528
rbml_w.wr_tagged_u64(tag_mod_impl, def_to_u64(DefId::local(did)));

0 commit comments

Comments
 (0)