Skip to content

Commit b2951d7

Browse files
committed
---
yaml --- r: 160695 b: refs/heads/master c: fbde112 h: refs/heads/master i: 160693: 4f1d7d4 160691: be52b46 160687: 90c626b v: v3
1 parent 0a2dce9 commit b2951d7

File tree

198 files changed

+2149
-6012
lines changed

Some content is hidden

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

198 files changed

+2149
-6012
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
refs/heads/master: 74f0ceba6c956e8a332993db8dd667de3c461aa2
2+
refs/heads/master: fbde11297fc06efa8e1e63527467ef7e65d072fa
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: c9f6d696420107f82304b992cf623b806995fe18
55
refs/heads/try: 225de0d60f8ca8dcc62ab2fd8818ebbda4b58cfe

trunk/Makefile.in

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,6 @@ include $(CFG_SRC_DIR)mk/rustllvm.mk
198198
include $(CFG_SRC_DIR)mk/docs.mk
199199
# LLVM
200200
include $(CFG_SRC_DIR)mk/llvm.mk
201-
# Rules for installing debugger scripts
202-
include $(CFG_SRC_DIR)mk/debuggers.mk
203201

204202
######################################################################
205203
# Secondary makefiles, conditionalized for speed

trunk/mk/clean.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ clean-generic-$(2)-$(1):
6363
-name '*.lib' -o \
6464
-name '*.dll' -o \
6565
-name '*.def' -o \
66-
-name '*.py' -o \
6766
-name '*.bc' \
6867
\) \
6968
| xargs rm -f
@@ -79,7 +78,7 @@ define CLEAN_HOST_STAGE_N
7978

8079
clean$(1)_H_$(2): \
8180
$$(foreach crate,$$(CRATES),clean$(1)_H_$(2)-lib-$$(crate)) \
82-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_H_$(2)-tool-$$(tool))
81+
$$(foreach tool,$$(TOOLS),clean$(1)_H_$(2)-tool-$$(tool))
8382
$$(Q)rm -fr $(2)/rt/libbacktrace
8483

8584
clean$(1)_H_$(2)-tool-%:
@@ -99,7 +98,7 @@ define CLEAN_TARGET_STAGE_N
9998

10099
clean$(1)_T_$(2)_H_$(3): \
101100
$$(foreach crate,$$(CRATES),clean$(1)_T_$(2)_H_$(3)-lib-$$(crate)) \
102-
$$(foreach tool,$$(TOOLS) $$(DEBUGGER_BIN_SCRIPTS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
101+
$$(foreach tool,$$(TOOLS),clean$(1)_T_$(2)_H_$(3)-tool-$$(tool))
103102
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libmorestack.a
104103
$$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/libcompiler-rt.a
105104
$(Q)rm -f $$(TLIB$(1)_T_$(2)_H_$(3))/librun_pass_stage* # For unix

trunk/mk/crates.mk

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
################################################################################
5151

5252
TARGET_CRATES := libc std flate arena term \
53-
serialize getopts collections test time rand \
53+
serialize sync getopts collections test time rand \
5454
log regex graphviz core rbml alloc rustrt \
5555
unicode
5656
HOST_CRATES := syntax rustc rustc_trans rustdoc regex_macros fmt_macros \
@@ -63,7 +63,7 @@ DEPS_libc := core
6363
DEPS_unicode := core
6464
DEPS_alloc := core libc native:jemalloc
6565
DEPS_rustrt := alloc core libc collections native:rustrt_native
66-
DEPS_std := core libc rand alloc collections rustrt unicode \
66+
DEPS_std := core libc rand alloc collections rustrt sync unicode \
6767
native:rust_builtin native:backtrace
6868
DEPS_graphviz := std
6969
DEPS_syntax := std term serialize log fmt_macros arena libc
@@ -81,6 +81,7 @@ DEPS_glob := std
8181
DEPS_serialize := std log
8282
DEPS_rbml := std log serialize
8383
DEPS_term := std log
84+
DEPS_sync := core alloc rustrt collections
8485
DEPS_getopts := std
8586
DEPS_collections := core alloc unicode
8687
DEPS_num := std

trunk/mk/debuggers.mk

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

trunk/mk/main.mk

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -356,8 +356,7 @@ HSREQ$(1)_H_$(3) = $$(HBIN$(1)_H_$(3))/rustc$$(X_$(3))
356356
else
357357
HSREQ$(1)_H_$(3) = \
358358
$$(HBIN$(1)_H_$(3))/rustc$$(X_$(3)) \
359-
$$(MKFILE_DEPS) \
360-
tmp/install-debugger-scripts$(1)_H_$(3).done
359+
$$(MKFILE_DEPS)
361360
endif
362361

363362
# Prerequisites for using the stageN compiler to build target artifacts
@@ -371,8 +370,7 @@ TSREQ$(1)_T_$(2)_H_$(3) = \
371370
SREQ$(1)_T_$(2)_H_$(3) = \
372371
$$(TSREQ$(1)_T_$(2)_H_$(3)) \
373372
$$(foreach dep,$$(TARGET_CRATES), \
374-
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep)) \
375-
tmp/install-debugger-scripts$(1)_T_$(2)_H_$(3).done
373+
$$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$$(dep))
376374

377375
# Prerequisites for a working stageN compiler and complete set of target
378376
# libraries

trunk/mk/prepare.mk

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ prepare-base-$(1): PREPARE_DEST_LIB_DIR=$$(PREPARE_DEST_DIR)/$$(CFG_LIBDIR_RELAT
155155
prepare-base-$(1): PREPARE_DEST_MAN_DIR=$$(PREPARE_DEST_DIR)/share/man/man1
156156
prepare-base-$(1): prepare-everything-$(1)
157157

158-
prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1) prepare-debugger-scripts-$(1)
158+
prepare-everything-$(1): prepare-host-$(1) prepare-targets-$(1)
159159

160160
prepare-host-$(1): prepare-host-tools-$(1)
161161

@@ -167,13 +167,8 @@ prepare-host-tools-$(1): \
167167
prepare-host-dirs-$(1): prepare-maybe-clean-$(1)
168168
$$(call PREPARE_DIR,$$(PREPARE_DEST_BIN_DIR))
169169
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR))
170-
$$(call PREPARE_DIR,$$(PREPARE_DEST_LIB_DIR)/rustlib/etc)
171170
$$(call PREPARE_DIR,$$(PREPARE_DEST_MAN_DIR))
172171

173-
prepare-debugger-scripts-$(1): prepare-host-dirs-$(1) $(DEBUGGER_SCRIPTS_ALL)
174-
$$(Q)$$(PREPARE_BIN_CMD) $(DEBUGGER_BIN_SCRIPTS_ABS) $$(PREPARE_DEST_BIN_DIR)
175-
$$(Q)$$(PREPARE_LIB_CMD) $(DEBUGGER_RUSTLIB_ETC_SCRIPTS_ABS) $$(PREPARE_DEST_LIB_DIR)/rustlib/etc
176-
177172
$$(foreach tool,$$(PREPARE_TOOLS), \
178173
$$(foreach host,$$(CFG_HOST), \
179174
$$(eval $$(call DEF_PREPARE_HOST_TOOL,$$(tool),$$(PREPARE_STAGE),$$(host),$(1)))))

trunk/src/compiletest/errors.rs

Lines changed: 9 additions & 56 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
// <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your
88
// option. This file may not be copied, modified, or distributed
99
// except according to those terms.
10-
use self::WhichLine::*;
1110

1211
use std::ascii::AsciiExt;
1312
use std::io::{BufferedReader, File};
@@ -19,74 +18,28 @@ pub struct ExpectedError {
1918
pub msg: String,
2019
}
2120

22-
/// Looks for either "//~| KIND MESSAGE" or "//~^^... KIND MESSAGE"
23-
/// The former is a "follow" that inherits its target from the preceding line;
24-
/// the latter is an "adjusts" that goes that many lines up.
25-
///
26-
/// Goal is to enable tests both like: //~^^^ ERROR go up three
27-
/// and also //~^ ERROR message one for the preceding line, and
28-
/// //~| ERROR message two for that same line.
29-
30-
pub static EXPECTED_PATTERN : &'static str =
31-
r"//~(?P<follow>\|)?(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
32-
33-
#[deriving(PartialEq, Show)]
34-
enum WhichLine { ThisLine, FollowPrevious(uint), AdjustBackward(uint) }
21+
pub static EXPECTED_PATTERN : &'static str = r"//~(?P<adjusts>\^*)\s*(?P<kind>\S*)\s*(?P<msg>.*)";
3522

3623
// Load any test directives embedded in the file
3724
pub fn load_errors(re: &Regex, testfile: &Path) -> Vec<ExpectedError> {
3825
let mut rdr = BufferedReader::new(File::open(testfile).unwrap());
3926

40-
// `last_nonfollow_error` tracks the most recently seen
41-
// line with an error template that did not use the
42-
// follow-syntax, "//~| ...".
43-
//
44-
// (pnkfelix could not find an easy way to compose Iterator::scan
45-
// and Iterator::filter_map to pass along this information into
46-
// `parse_expected`. So instead I am storing that state here and
47-
// updating it in the map callback below.)
48-
let mut last_nonfollow_error = None;
49-
5027
rdr.lines().enumerate().filter_map(|(line_no, ln)| {
51-
parse_expected(last_nonfollow_error,
52-
line_no + 1,
53-
ln.unwrap().as_slice(), re)
54-
.map(|(which, error)| {
55-
match which {
56-
FollowPrevious(_) => {}
57-
_ => last_nonfollow_error = Some(error.line),
58-
}
59-
error
60-
})
28+
parse_expected(line_no + 1, ln.unwrap().as_slice(), re)
6129
}).collect()
6230
}
6331

64-
fn parse_expected(last_nonfollow_error: Option<uint>,
65-
line_num: uint,
66-
line: &str,
67-
re: &Regex) -> Option<(WhichLine, ExpectedError)> {
32+
fn parse_expected(line_num: uint, line: &str, re: &Regex) -> Option<ExpectedError> {
6833
re.captures(line).and_then(|caps| {
6934
let adjusts = caps.name("adjusts").len();
7035
let kind = caps.name("kind").to_ascii_lower();
7136
let msg = caps.name("msg").trim().to_string();
72-
let follow = caps.name("follow").len() > 0;
73-
74-
let (which, line) = if follow {
75-
assert!(adjusts == 0, "use either //~| or //~^, not both.");
76-
let line = last_nonfollow_error.unwrap_or_else(|| {
77-
panic!("encountered //~| without preceding //~^ line.")
78-
});
79-
(FollowPrevious(line), line)
80-
} else {
81-
let which =
82-
if adjusts > 0 { AdjustBackward(adjusts) } else { ThisLine };
83-
let line = line_num - adjusts;
84-
(which, line)
85-
};
8637

87-
debug!("line={} which={} kind={} msg={}", line_num, which, kind, msg);
88-
Some((which, ExpectedError { line: line,
89-
kind: kind,
90-
msg: msg, }))
38+
debug!("line={} kind={} msg={}", line_num, kind, msg);
39+
Some(ExpectedError {
40+
line: line_num - adjusts,
41+
kind: kind,
42+
msg: msg,
43+
})
9144
})
9245
}

trunk/src/doc/reference.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1689,20 +1689,7 @@ methods in such an implementation can only be used as direct calls on the
16891689
values of the type that the implementation targets. In such an implementation,
16901690
the trait type and `for` after `impl` are omitted. Such implementations are
16911691
limited to nominal types (enums, structs), and the implementation must appear
1692-
in the same module or a sub-module as the `self` type:
1693-
1694-
```
1695-
struct Point {x: int, y: int}
1696-
1697-
impl Point {
1698-
fn log(&self) {
1699-
println!("Point is at ({}, {})", self.x, self.y);
1700-
}
1701-
}
1702-
1703-
let my_point = Point {x: 10, y:11};
1704-
my_point.log();
1705-
```
1692+
in the same module or a sub-module as the `self` type.
17061693

17071694
When a trait _is_ specified in an `impl`, all methods declared as part of the
17081695
trait must be implemented, with matching types and type parameter counts.

trunk/src/etc/emacs/rust-mode.el

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,9 @@
3131
(modify-syntax-entry ?\" "\"" table)
3232
(modify-syntax-entry ?\\ "\\" table)
3333

34+
;; _ is a word-char
35+
(modify-syntax-entry ?_ "w" table)
36+
3437
;; Comments
3538
(modify-syntax-entry ?/ ". 124b" table)
3639
(modify-syntax-entry ?* ". 23" table)
@@ -394,7 +397,7 @@ This is written mainly to be used as `beginning-of-defun-function' for Rust.
394397
Don't move to the beginning of the line. `beginning-of-defun',
395398
which calls this, does that afterwards."
396399
(interactive "p")
397-
(re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\_>")
400+
(re-search-backward (concat "^\\(" rust-top-item-beg-re "\\)\\b")
398401
nil 'move (or arg 1)))
399402

400403
(defun rust-end-of-defun ()

trunk/src/etc/licenseck.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@
3838
"rt/isaac/randport.cpp", # public domain
3939
"rt/isaac/rand.h", # public domain
4040
"rt/isaac/standard.h", # public domain
41-
"libstd/sync/mpsc_queue.rs", # BSD
42-
"libstd/sync/spsc_queue.rs", # BSD
43-
"libstd/sync/mpmc_bounded_queue.rs", # BSD
41+
"libsync/mpsc_queue.rs", # BSD
42+
"libsync/spsc_queue.rs", # BSD
43+
"libsync/mpmc_bounded_queue.rs", # BSD
44+
"libsync/mpsc_intrusive.rs", # BSD
4445
"test/bench/shootout-binarytrees.rs", # BSD
4546
"test/bench/shootout-chameneos-redux.rs", # BSD
4647
"test/bench/shootout-fannkuch-redux.rs", # BSD

trunk/src/etc/lldb_rust_formatters.py

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -69,14 +69,8 @@ def print_struct_val_starting_from(field_start_index, val, internal_dict):
6969
assert val.GetType().GetTypeClass() == lldb.eTypeClassStruct
7070

7171
t = val.GetType()
72-
type_name = extract_type_name(t.GetName())
73-
num_children = val.num_children
74-
75-
if (num_children - field_start_index) == 0:
76-
# The only field of this struct is the enum discriminant
77-
return type_name
78-
7972
has_field_names = type_has_field_names(t)
73+
type_name = extract_type_name(t.GetName())
8074

8175
if has_field_names:
8276
template = "%(type_name)s {\n%(body)s\n}"
@@ -89,6 +83,8 @@ def print_struct_val_starting_from(field_start_index, val, internal_dict):
8983
# this is a tuple, so don't print the type name
9084
type_name = ""
9185

86+
num_children = val.num_children
87+
9288
def render_child(child_index):
9389
this = ""
9490
if has_field_names:
@@ -109,6 +105,7 @@ def print_enum_val(val, internal_dict):
109105

110106
assert val.GetType().GetTypeClass() == lldb.eTypeClassUnion
111107

108+
112109
if val.num_children == 1:
113110
# This is either an enum with just one variant, or it is an Option-like enum
114111
# where the discriminant is encoded in a non-nullable pointer field. We find

trunk/src/etc/rust-lldb

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

0 commit comments

Comments
 (0)