Skip to content

Commit e379ceb

Browse files
committed
---
yaml --- r: 174762 b: refs/heads/snap-stage3 c: 4b6a056 h: refs/heads/master v: v3
1 parent ab5997d commit e379ceb

File tree

126 files changed

+1576
-1932
lines changed

Some content is hidden

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

126 files changed

+1576
-1932
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: a0f86de49748b472d4d189d9688b0d856c000914
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: ed56c15ceb3e8a6a30c46a4b7a1124d2086b5874
4+
refs/heads/snap-stage3: 4b6a0563c6d7bf90d5a70120d1818d57f49cb62a
55
refs/heads/try: 08f6380a9f0b866796080094f44fe25ea5636547
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ documentation.
2121
1. Make sure you have installed the dependencies:
2222
* `g++` 4.7 or `clang++` 3.x
2323
* `python` 2.6 or later (but not 3.x)
24-
* `perl` 5.0 or later
2524
* GNU `make` 3.81 or later
2625
* `curl`
2726
* `git`

branches/snap-stage3/configure

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -617,7 +617,6 @@ putvar CFG_BOOTSTRAP_KEY
617617

618618
step_msg "looking for build programs"
619619

620-
probe_need CFG_PERL perl
621620
probe_need CFG_CURLORWGET curl wget
622621
probe_need CFG_PYTHON python2.7 python2.6 python2 python
623622

@@ -1375,7 +1374,7 @@ do
13751374
done
13761375

13771376
# Munge any paths that appear in config.mk back to posix-y
1378-
perl -i.bak -p -e 's@ ([a-zA-Z]):[/\\]@ /\1/@go;' config.tmp
1377+
sed -i.bak -e 's@ \([a-zA-Z]\):[/\\]@ /\1/@g;' config.tmp
13791378
rm -f config.tmp.bak
13801379

13811380
msg

branches/snap-stage3/mk/cfg/i686-pc-windows-gnu.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFG_LIB_NAME_i686-pc-windows-gnu=$(1).dll
88
CFG_STATIC_LIB_NAME_i686-pc-windows-gnu=$(1).lib
99
CFG_LIB_GLOB_i686-pc-windows-gnu=$(1)-*.dll
1010
CFG_LIB_DSYM_GLOB_i686-pc-windows-gnu=$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_i686-pc-windows-gnu := -march=i686 -m32 -D_WIN32_WINNT=0x0600 $(CFLAGS)
12-
CFG_GCCISH_CFLAGS_i686-pc-windows-gnu := -Wall -Werror -g -m32 -D_WIN32_WINNT=0x0600 $(CFLAGS)
11+
CFG_JEMALLOC_CFLAGS_i686-pc-windows-gnu := -march=i686 -m32 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_i686-pc-windows-gnu := -Wall -Werror -g -m32 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
1313
CFG_GCCISH_CXXFLAGS_i686-pc-windows-gnu := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_i686-pc-windows-gnu := -shared -g -m32
1515
CFG_GCCISH_DEF_FLAG_i686-pc-windows-gnu :=
@@ -22,7 +22,7 @@ CFG_EXE_SUFFIX_i686-pc-windows-gnu := .exe
2222
CFG_WINDOWSY_i686-pc-windows-gnu := 1
2323
CFG_UNIXY_i686-pc-windows-gnu :=
2424
CFG_PATH_MUNGE_i686-pc-windows-gnu :=
25-
CFG_LDPATH_i686-pc-windows-gnu :=$(CFG_LDPATH_i686-pc-windows-gnu):$(PATH)
26-
CFG_RUN_i686-pc-windows-gnu=PATH="$(CFG_LDPATH_i686-pc-windows-gnu):$(1)" $(2)
27-
CFG_RUN_TARG_i686-pc-windows-gnu=$(call CFG_RUN_i686-pc-windows-gnu,$(HLIB$(1)_H_$(CFG_BUILD)),$(2))
25+
CFG_LDPATH_i686-pc-windows-gnu :=
26+
CFG_RUN_i686-pc-windows-gnu=$(2)
27+
CFG_RUN_TARG_i686-pc-windows-gnu=$(call CFG_RUN_i686-pc-windows-gnu,,$(2))
2828
CFG_GNU_TRIPLE_i686-pc-windows-gnu := i686-w64-mingw32

branches/snap-stage3/mk/cfg/x86_64-pc-windows-gnu.mk

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ CFG_LIB_NAME_x86_64-pc-windows-gnu=$(1).dll
88
CFG_STATIC_LIB_NAME_x86_64-pc-windows-gnu=$(1).lib
99
CFG_LIB_GLOB_x86_64-pc-windows-gnu=$(1)-*.dll
1010
CFG_LIB_DSYM_GLOB_x86_64-pc-windows-gnu=$(1)-*.dylib.dSYM
11-
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-gnu := -m64 -D_WIN32_WINNT=0x0600 $(CFLAGS)
12-
CFG_GCCISH_CFLAGS_x86_64-pc-windows-gnu := -Wall -Werror -g -m64 -D_WIN32_WINNT=0x0600 $(CFLAGS)
11+
CFG_JEMALLOC_CFLAGS_x86_64-pc-windows-gnu := -m64 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
12+
CFG_GCCISH_CFLAGS_x86_64-pc-windows-gnu := -Wall -Werror -g -m64 -D_WIN32_WINNT=0x0600 -D__USE_MINGW_ANSI_STDIO=1 $(CFLAGS)
1313
CFG_GCCISH_CXXFLAGS_x86_64-pc-windows-gnu := -fno-rtti $(CXXFLAGS)
1414
CFG_GCCISH_LINK_FLAGS_x86_64-pc-windows-gnu := -shared -g -m64
1515
CFG_GCCISH_DEF_FLAG_x86_64-pc-windows-gnu :=
@@ -22,7 +22,7 @@ CFG_EXE_SUFFIX_x86_64-pc-windows-gnu := .exe
2222
CFG_WINDOWSY_x86_64-pc-windows-gnu := 1
2323
CFG_UNIXY_x86_64-pc-windows-gnu :=
2424
CFG_PATH_MUNGE_x86_64-pc-windows-gnu :=
25-
CFG_LDPATH_x86_64-pc-windows-gnu :=$(CFG_LDPATH_x86_64-pc-windows-gnu):$(PATH)
26-
CFG_RUN_x86_64-pc-windows-gnu=PATH="$(CFG_LDPATH_x86_64-pc-windows-gnu):$(1)" $(2)
27-
CFG_RUN_TARG_x86_64-pc-windows-gnu=$(call CFG_RUN_x86_64-pc-windows-gnu,$(HLIB$(1)_H_$(CFG_BUILD)),$(2))
25+
CFG_LDPATH_x86_64-pc-windows-gnu :=
26+
CFG_RUN_x86_64-pc-windows-gnu=$(2)
27+
CFG_RUN_TARG_x86_64-pc-windows-gnu=$(call CFG_RUN_x86_64-pc-windows-gnu,,$(2))
2828
CFG_GNU_TRIPLE_x86_64-pc-windows-gnu := x86_64-w64-mingw32

branches/snap-stage3/mk/tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,7 @@ tidy:
300300
| grep '^$(S)src/libbacktrace' -v \
301301
| grep '^$(S)src/rust-installer' -v \
302302
| xargs $(CFG_PYTHON) $(S)src/etc/check-binaries.py
303+
$(Q) $(CFG_PYTHON) $(S)src/etc/errorck.py $(S)src/
303304

304305

305306
endif

branches/snap-stage3/src/doc/trpl/if.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
% `if`
1+
% If
22

33
Rust's take on `if` is not particularly complex, but it's much more like the
44
`if` you'll find in a dynamically typed language than in a more traditional

branches/snap-stage3/src/etc/check-links.pl

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

branches/snap-stage3/src/etc/emacs/rust-mode.el

Lines changed: 30 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,11 @@
5454
:type 'integer
5555
:group 'rust-mode)
5656

57+
(defcustom rust-indent-method-chain nil
58+
"Indent Rust method chains, aligned by the '.' operators"
59+
:type 'boolean
60+
:group 'rust-mode)
61+
5762
(defun rust-paren-level () (nth 0 (syntax-ppss)))
5863
(defun rust-in-str-or-cmnt () (nth 8 (syntax-ppss)))
5964
(defun rust-rewind-past-str-cmnt () (goto-char (nth 8 (syntax-ppss))))
@@ -73,10 +78,19 @@
7378
;; open bracket ends the line
7479
(when (not (looking-at "[[:blank:]]*\\(?://.*\\)?$"))
7580
(when (looking-at "[[:space:]]")
76-
(forward-word 1)
77-
(backward-word 1))
81+
(forward-word 1)
82+
(backward-word 1))
7883
(current-column))))
7984

85+
(defun rust-align-to-method-chain ()
86+
(save-excursion
87+
(previous-line)
88+
(end-of-line)
89+
(backward-word 1)
90+
(backward-char)
91+
(when (looking-at "\\..+\(.*\)\n")
92+
(- (current-column) rust-indent-offset))))
93+
8094
(defun rust-rewind-to-beginning-of-current-level-expr ()
8195
(let ((current-level (rust-paren-level)))
8296
(back-to-indentation)
@@ -99,10 +113,13 @@
99113
;; the inside of it correctly relative to the outside.
100114
(if (= 0 level)
101115
0
116+
(or
117+
(when rust-indent-method-chain
118+
(rust-align-to-method-chain))
102119
(save-excursion
103120
(backward-up-list)
104121
(rust-rewind-to-beginning-of-current-level-expr)
105-
(+ (current-column) rust-indent-offset)))))
122+
(+ (current-column) rust-indent-offset))))))
106123
(cond
107124
;; A function return type is indented to the corresponding function arguments
108125
((looking-at "->")
@@ -114,6 +131,16 @@
114131
;; A closing brace is 1 level unindended
115132
((looking-at "}") (- baseline rust-indent-offset))
116133

134+
;;Line up method chains by their .'s
135+
((when (and rust-indent-method-chain
136+
(looking-at "\..+\(.*\);?\n"))
137+
(or
138+
(let ((method-indent (rust-align-to-method-chain)))
139+
(when method-indent
140+
(+ method-indent rust-indent-offset)))
141+
(+ baseline rust-indent-offset))))
142+
143+
117144
;; Doc comments in /** style with leading * indent to line up the *s
118145
((and (nth 4 (syntax-ppss)) (looking-at "*"))
119146
(+ 1 baseline))
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# Copyright 2015 The Rust Project Developers. See the COPYRIGHT
2+
# file at the top-level directory of this distribution and at
3+
# http://rust-lang.org/COPYRIGHT.
4+
#
5+
# Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
6+
# http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
7+
# <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
8+
# option. This file may not be copied, modified, or distributed
9+
# except according to those terms.
10+
11+
# Digs error codes out of files named 'diagnostics.rs' across
12+
# the tree, and ensures thare are no duplicates.
13+
14+
import sys, os, re
15+
16+
src_dir = sys.argv[1]
17+
18+
errcode_map = { }
19+
20+
for (dirpath, dirnames, filenames) in os.walk(src_dir):
21+
22+
if "src/test" in dirpath or "src/llvm" in dirpath:
23+
# Short circuit for fast
24+
continue
25+
26+
for filename in filenames:
27+
if filename != "diagnostics.rs":
28+
continue
29+
30+
path = os.path.join(dirpath, filename)
31+
line_num = 1
32+
with open(path, 'r') as f:
33+
for line in f:
34+
35+
p = re.compile("(E\d\d\d\d)")
36+
m = p.search(line)
37+
if not m is None:
38+
errcode = m.group(1)
39+
40+
new_record = [(errcode, path, line_num, line)]
41+
existing = errcode_map.get(errcode)
42+
if existing is not None:
43+
# This is a dupe
44+
errcode_map[errcode] = existing + new_record
45+
else:
46+
errcode_map[errcode] = new_record
47+
48+
line_num += 1
49+
50+
errors = False
51+
all_errors = []
52+
for errcode in errcode_map:
53+
entries = errcode_map[errcode]
54+
all_errors += [entries[0][0]]
55+
if len(entries) > 1:
56+
print "error: duplicate error code " + errcode
57+
for entry in entries:
58+
print entry[1] + ": " + str(entry[2])
59+
print entry[3]
60+
errors = True
61+
62+
print str(len(errcode_map)) + " error codes"
63+
64+
all_errors.sort()
65+
all_errors.reverse()
66+
67+
print "highest error code: " + all_errors[0]
68+
69+
if errors:
70+
sys.exit(1)

branches/snap-stage3/src/etc/indenter

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,19 @@
1-
#!/usr/bin/perl
2-
use strict;
3-
use warnings;
1+
#!/usr/bin/env python
2+
import re
3+
import sys
44

5-
my $indent = 0;
6-
while (<>) {
7-
if (/^rust: ~">>/) {
8-
$indent += 1;
9-
}
5+
indent = 0
6+
more_re = re.compile(r"^rust: ~\">>")
7+
less_re = re.compile(r"^rust: ~\"<<")
8+
while True:
9+
line = sys.stdin.readline()
10+
if not line:
11+
break
1012

11-
printf "%03d %s%s", $indent, (" " x $indent), $_;
13+
if more_re.match(line):
14+
indent += 1
1215

13-
if (/^rust: ~"<</) {
14-
$indent -= 1;
15-
}
16-
}
16+
print "%03d %s%s" % (indent, " " * indent, line.strip())
17+
18+
if less_re.match(line):
19+
indent -= 1

branches/snap-stage3/src/etc/rustup.sh

Lines changed: 29 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -433,11 +433,16 @@ CFG_TMP_DIR=$(mktemp -d 2>/dev/null \
433433
|| mktemp -d -t 'rustup-tmp-install' 2>/dev/null \
434434
|| create_tmp_dir)
435435

436-
# If we're saving nightlies and we didn't specify which one, grab todays.
437-
# Otherwise we'll use the latest version.
436+
# If we're saving nightlies and we didn't specify which one, grab the latest
437+
# verison from the perspective of the server. Buildbot has typically finished
438+
# building and uploading by ~8UTC, but we want to include a little buffer.
439+
#
440+
# FIXME It would be better to use the known most recent nightly that has been
441+
# built. This is waiting on a change to have buildbot publish metadata that
442+
# can be queried.
438443
if [ -n "${CFG_SAVE}" -a -z "${CFG_DATE}" ];
439444
then
440-
CFG_DATE=`date "+%Y-%m-%d"`
445+
CFG_DATE=`TZ=Etc/UTC+9 date "+%Y-%m-%d"`
441446
fi
442447

443448
RUST_URL="https://static.rust-lang.org/dist"
@@ -453,16 +458,33 @@ then
453458
RUST_URL="${RUST_URL}/${CFG_DATE}"
454459
fi
455460

456-
verify_hash() {
457-
remote_sha256="$1"
458-
local_file="$2"
459-
461+
download_hash() {
460462
msg "Downloading ${remote_sha256}"
461463
remote_sha256=`"${CFG_CURL}" -f "${remote_sha256}"`
464+
if [ -n "${CFG_SAVE}" ]; then
465+
echo "${remote_sha256}" > "${local_sha_file}"
466+
fi
462467
if [ "$?" -ne 0 ]; then
463468
rm -Rf "${CFG_TMP_DIR}"
464469
err "Failed to download ${remote_url}"
465470
fi
471+
}
472+
473+
verify_hash() {
474+
remote_sha256="$1"
475+
local_file="$2"
476+
local_sha_file="${local_file}.sha256"
477+
478+
if [ -n "${CFG_SAVE}" ]; then
479+
if [ -f "${local_sha_file}" ]; then
480+
msg "Local ${local_sha_file} exists, treating as remote hash"
481+
remote_sha256=`cat "${local_sha_file}"`
482+
else
483+
download_hash
484+
fi
485+
else
486+
download_hash
487+
fi
466488

467489
msg "Verifying hash"
468490
local_sha256=$(calculate_hash "${local_file}")

branches/snap-stage3/src/liballoc/boxed.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
1818
use core::default::Default;
1919
use core::fmt;
2020
use core::hash::{self, Hash};
21+
use core::iter::Iterator;
2122
use core::marker::Sized;
2223
use core::mem;
2324
use core::option::Option;
@@ -187,6 +188,20 @@ impl<T: ?Sized> DerefMut for Box<T> {
187188
fn deref_mut(&mut self) -> &mut T { &mut **self }
188189
}
189190

191+
// FIXME(#21363) remove `old_impl_check` when bug is fixed
192+
#[old_impl_check]
193+
impl<'a, T> Iterator for Box<Iterator<Item=T> + 'a> {
194+
type Item = T;
195+
196+
fn next(&mut self) -> Option<T> {
197+
(**self).next()
198+
}
199+
200+
fn size_hint(&self) -> (usize, Option<usize>) {
201+
(**self).size_hint()
202+
}
203+
}
204+
190205
#[cfg(test)]
191206
mod test {
192207
#[test]

branches/snap-stage3/src/liballoc/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,8 @@
7070
#![feature(lang_items, unsafe_destructor)]
7171
#![feature(box_syntax)]
7272
#![feature(optin_builtin_traits)]
73+
// FIXME(#21363) remove `old_impl_check` when bug is fixed
74+
#![feature(old_impl_check)]
7375
#![allow(unknown_features)] #![feature(int_uint)]
7476

7577
#[macro_use]

0 commit comments

Comments
 (0)