Skip to content

Commit c8f2b60

Browse files
committed
---
yaml --- r: 156511 b: refs/heads/master c: 7b02185 h: refs/heads/master i: 156509: 7e268d6 156507: e463276 156503: d682cff 156495: 0d54a89 156479: d094ada v: v3
1 parent bb09a2b commit c8f2b60

File tree

96 files changed

+64
-250
lines changed

Some content is hidden

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

96 files changed

+64
-250
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: 7d7e40983972d128c74eaea1f92be1adaf45d647
2+
refs/heads/master: 7b021859a4ea33bb0f5512649a5c9792648e9ad6
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: d44ea720fa9dfe062ef06d0eb49a58d4e7e92344
55
refs/heads/try: 6601b0501e31d08d3892a2d5a7d8a57ab120bf75

trunk/mk/main.mk

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -157,13 +157,6 @@ RUSTFLAGS_STAGE1 += -C prefer-dynamic
157157
# by not emitting them.
158158
RUSTFLAGS_STAGE0 += -Z no-landing-pads
159159

160-
# Go fast for stage0, and also for stage1/stage2 if optimization is off.
161-
RUSTFLAGS_STAGE0 += -C codegen-units=4
162-
ifdef CFG_DISABLE_OPTIMIZE
163-
RUSTFLAGS_STAGE1 += -C codegen-units=4
164-
RUSTFLAGS_STAGE2 += -C codegen-units=4
165-
endif
166-
167160
# platform-specific auto-configuration
168161
include $(CFG_SRC_DIR)mk/platform.mk
169162

trunk/mk/tests.mk

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -584,14 +584,13 @@ ifeq ($(CFG_LLDB),)
584584
CTEST_DISABLE_debuginfo-lldb = "no lldb found"
585585
endif
586586

587+
# Completely disable LLDB tests for now
588+
CTEST_DISABLE_debuginfo-lldb = "LLDB tests are not enabled yet"
589+
587590
ifeq ($(CFG_CLANG),)
588591
CTEST_DISABLE_codegen = "no clang found"
589592
endif
590593

591-
ifneq ($(CFG_OSTYPE),apple-darwin)
592-
CTEST_DISABLE_debuginfo-lldb = "lldb tests are only run on darwin"
593-
endif
594-
595594
ifeq ($(CFG_OSTYPE),apple-darwin)
596595
CTEST_DISABLE_debuginfo-gdb = "gdb on darwing needs root"
597596
endif
@@ -629,10 +628,6 @@ CTEST_RUSTC_FLAGS := $$(subst -O,,$$(CTEST_RUSTC_FLAGS))
629628
ifndef CFG_DISABLE_OPTIMIZE_TESTS
630629
CTEST_RUSTC_FLAGS += -O
631630
endif
632-
# Force codegen-units=1 for compiletest tests. compiletest does its own
633-
# parallelization internally, so rustc's default codegen-units=2 will actually
634-
# slow things down.
635-
CTEST_RUSTC_FLAGS += -C codegen-units=1
636631

637632
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
638633
--compile-lib-path $$(HLIB$(1)_H_$(3)) \

trunk/src/compiletest/compiletest.rs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ use std::io::fs;
2525
use std::from_str::FromStr;
2626
use getopts::{optopt, optflag, reqopt};
2727
use common::Config;
28-
use common::{Pretty, DebugInfoGdb, Codegen};
28+
use common::{Pretty, DebugInfoGdb, DebugInfoLldb, Codegen};
2929
use util::logv;
3030
use regex::Regex;
3131

@@ -235,6 +235,16 @@ pub fn run_tests(config: &Config) {
235235
os::setenv("RUST_TEST_TASKS","1");
236236
}
237237

238+
match config.mode {
239+
DebugInfoLldb => {
240+
// Some older versions of LLDB seem to have problems with multiple
241+
// instances running in parallel, so only run one test task at a
242+
// time.
243+
os::setenv("RUST_TEST_TASKS", "1");
244+
}
245+
_ => { /* proceed */ }
246+
}
247+
238248
let opts = test_opts(config);
239249
let tests = make_tests(config);
240250
// sadly osx needs some file descriptor limits raised for running tests in

trunk/src/compiletest/runtest.rs

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -653,15 +653,7 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
653653
script_str.push_str("version\n");
654654

655655
// Switch LLDB into "Rust mode"
656-
let rust_src_root = find_rust_src_root(config)
657-
.expect("Could not find Rust source root");
658-
let rust_pp_module_rel_path = Path::new("./src/etc/lldb_rust_formatters.py");
659-
let rust_pp_module_abs_path = rust_src_root.join(rust_pp_module_rel_path)
660-
.as_str()
661-
.unwrap()
662-
.to_string();
663-
664-
script_str.push_str(format!("command script import {}\n", rust_pp_module_abs_path[])[]);
656+
script_str.push_str("command script import ./src/etc/lldb_rust_formatters.py\n");
665657
script_str.push_str("type summary add --no-value ");
666658
script_str.push_str("--python-function lldb_rust_formatters.print_val ");
667659
script_str.push_str("-x \".*\" --category Rust\n");
@@ -691,27 +683,18 @@ fn run_debuginfo_lldb_test(config: &Config, props: &TestProps, testfile: &Path)
691683
let debugger_script = make_out_name(config, testfile, "debugger.script");
692684

693685
// Let LLDB execute the script via lldb_batchmode.py
694-
let debugger_run_result = run_lldb(config,
695-
&exe_file,
696-
&debugger_script,
697-
&rust_src_root);
686+
let debugger_run_result = run_lldb(config, &exe_file, &debugger_script);
698687

699688
if !debugger_run_result.status.success() {
700689
fatal_proc_rec("Error while running LLDB", &debugger_run_result);
701690
}
702691

703692
check_debugger_output(&debugger_run_result, check_lines.as_slice());
704693

705-
fn run_lldb(config: &Config,
706-
test_executable: &Path,
707-
debugger_script: &Path,
708-
rust_src_root: &Path)
709-
-> ProcRes {
694+
fn run_lldb(config: &Config, test_executable: &Path, debugger_script: &Path) -> ProcRes {
710695
// Prepare the lldb_batchmode which executes the debugger script
711-
let lldb_script_path = rust_src_root.join(Path::new("./src/etc/lldb_batchmode.py"));
712-
713696
let mut cmd = Command::new("python");
714-
cmd.arg(lldb_script_path)
697+
cmd.arg("./src/etc/lldb_batchmode.py")
715698
.arg(test_executable)
716699
.arg(debugger_script)
717700
.env_set_all([("PYTHONPATH", config.lldb_python_dir.clone().unwrap().as_slice())]);

trunk/src/doc/guide.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4326,7 +4326,7 @@ The most common consumer is `collect()`. This code doesn't quite compile,
43264326
but it shows the intention:
43274327

43284328
```{rust,ignore}
4329-
let one_to_one_hundred = range(1i, 101i).collect();
4329+
let one_to_one_hundred = range(0i, 100i).collect();
43304330
```
43314331

43324332
As you can see, we call `collect()` on our iterator. `collect()` takes
@@ -4336,7 +4336,7 @@ type of things you want to collect, and so you need to let it know.
43364336
Here's the version that does compile:
43374337

43384338
```{rust}
4339-
let one_to_one_hundred = range(1i, 101i).collect::<Vec<int>>();
4339+
let one_to_one_hundred = range(0i, 100i).collect::<Vec<int>>();
43404340
```
43414341

43424342
If you remember, the `::<>` syntax allows us to give a type hint,

trunk/src/etc/lldb_batchmode.py

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,11 +141,6 @@ def listen():
141141
target_path = sys.argv[1]
142142
script_path = sys.argv[2]
143143

144-
print("LLDB batch-mode script")
145-
print("----------------------")
146-
print("Debugger commands script is '%s'." % script_path)
147-
print("Target executable is '%s'." % target_path)
148-
print("Current working directory is '%s'" % os.getcwd())
149144

150145
# Create a new debugger instance
151146
debugger = lldb.SBDebugger.Create()
@@ -156,12 +151,10 @@ def listen():
156151

157152
# Create a target from a file and arch
158153
print("Creating a target for '%s'" % target_path)
159-
target_error = lldb.SBError()
160-
target = debugger.CreateTarget(target_path, None, None, True, target_error)
154+
target = debugger.CreateTargetWithFileAndArch(target_path, lldb.LLDB_ARCH_DEFAULT)
161155

162156
if not target:
163-
print("Could not create debugging target '" + target_path + "': " + str(target_error) +
164-
". Aborting.", file=sys.stderr)
157+
print("Could not create debugging target '" + target_path + "'. Aborting.", file=sys.stderr)
165158
sys.exit(1)
166159

167160

trunk/src/librustc/driver/config.rs

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -780,20 +780,7 @@ pub fn build_session_options(matches: &getopts::Matches) -> Options {
780780
early_warn("the --crate-file-name argument has been renamed to \
781781
--print-file-name");
782782
}
783-
784-
let mut cg = build_codegen_options(matches);
785-
786-
if cg.codegen_units == 0 {
787-
match opt_level {
788-
// `-C lto` doesn't work with multiple codegen units.
789-
_ if cg.lto => cg.codegen_units = 1,
790-
791-
No | Less => cg.codegen_units = 2,
792-
Default | Aggressive => cg.codegen_units = 1,
793-
}
794-
}
795-
let cg = cg;
796-
783+
let cg = build_codegen_options(matches);
797784

798785
if !cg.remark.is_empty() && debuginfo == NoDebugInfo {
799786
early_warn("-C remark will not show source locations without --debuginfo");

trunk/src/librustc/middle/traits/coherence.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,9 @@ pub fn impl_is_local(tcx: &ty::ctxt,
6767
return true;
6868
}
6969

70-
// Otherwise, at least one of the input types must be local to the
71-
// crate.
72-
trait_ref.input_types().iter().any(|&t| ty_is_local(tcx, t))
70+
// Otherwise, self type must be local to the crate.
71+
let self_ty = ty::lookup_item_type(tcx, impl_def_id).ty;
72+
return ty_is_local(tcx, self_ty);
7373
}
7474

7575
pub fn ty_is_local(tcx: &ty::ctxt,

trunk/src/librustdoc/passes.rs

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -134,18 +134,7 @@ impl<'a> fold::DocFolder for Stripper<'a> {
134134
clean::StructItem(..) | clean::EnumItem(..) |
135135
clean::TraitItem(..) | clean::FunctionItem(..) |
136136
clean::VariantItem(..) | clean::MethodItem(..) |
137-
clean::ForeignFunctionItem(..) | clean::ForeignStaticItem(..) => {
138-
if ast_util::is_local(i.def_id) {
139-
if !self.exported_items.contains(&i.def_id.node) {
140-
return None;
141-
}
142-
// Traits are in exported_items even when they're totally private.
143-
if i.is_trait() && i.visibility != Some(ast::Public) {
144-
return None;
145-
}
146-
}
147-
}
148-
137+
clean::ForeignFunctionItem(..) | clean::ForeignStaticItem(..) |
149138
clean::ConstantItem(..) => {
150139
if ast_util::is_local(i.def_id) &&
151140
!self.exported_items.contains(&i.def_id.node) {

trunk/src/libsyntax/parse/mod.rs

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -721,7 +721,7 @@ pub fn integer_lit(s: &str, sd: &SpanHandler, sp: Span) -> ast::Lit_ {
721721
mod test {
722722
use super::*;
723723
use serialize::json;
724-
use codemap::{Span, BytePos, Pos, Spanned, NO_EXPANSION};
724+
use codemap::{Span, BytePos, Spanned, NO_EXPANSION};
725725
use owned_slice::OwnedSlice;
726726
use ast;
727727
use abi;
@@ -1121,46 +1121,6 @@ mod test {
11211121
span: sp(0,21)})));
11221122
}
11231123

1124-
fn get_spans_of_pat_idents(src: &str) -> Vec<Span> {
1125-
let item = string_to_item(src.to_string()).unwrap();
1126-
1127-
struct PatIdentVisitor {
1128-
spans: Vec<Span>
1129-
}
1130-
impl<'v> ::visit::Visitor<'v> for PatIdentVisitor {
1131-
fn visit_pat(&mut self, p: &'v ast::Pat) {
1132-
match p.node {
1133-
ast::PatIdent(_ , ref spannedident, _) => {
1134-
self.spans.push(spannedident.span.clone());
1135-
}
1136-
_ => {
1137-
::visit::walk_pat(self, p);
1138-
}
1139-
}
1140-
}
1141-
}
1142-
let mut v = PatIdentVisitor { spans: Vec::new() };
1143-
::visit::walk_item(&mut v, &*item);
1144-
return v.spans;
1145-
}
1146-
1147-
#[test] fn span_of_self_arg_pat_idents_are_correct() {
1148-
1149-
let srcs = ["impl z { fn a (&self, &myarg: int) {} }",
1150-
"impl z { fn a (&mut self, &myarg: int) {} }",
1151-
"impl z { fn a (&'a self, &myarg: int) {} }",
1152-
"impl z { fn a (self, &myarg: int) {} }",
1153-
"impl z { fn a (self: Foo, &myarg: int) {} }",
1154-
];
1155-
1156-
for &src in srcs.iter() {
1157-
let spans = get_spans_of_pat_idents(src);
1158-
let Span{lo:lo,hi:hi,..} = spans[0];
1159-
assert!("self" == src.slice(lo.to_uint(), hi.to_uint()),
1160-
"\"{}\" != \"self\". src=\"{}\"",
1161-
src.slice(lo.to_uint(), hi.to_uint()), src)
1162-
}
1163-
}
11641124

11651125
#[test] fn parse_exprs () {
11661126
// just make sure that they parse....

trunk/src/libsyntax/parse/parser.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4165,16 +4165,10 @@ impl<'a> Parser<'a> {
41654165
// A bit of complexity and lookahead is needed here in order to be
41664166
// backwards compatible.
41674167
let lo = self.span.lo;
4168-
let mut self_ident_lo = self.span.lo;
4169-
let mut self_ident_hi = self.span.hi;
4170-
41714168
let mut mutbl_self = MutImmutable;
41724169
let explicit_self = match self.token {
41734170
token::BINOP(token::AND) => {
4174-
let eself = maybe_parse_borrowed_explicit_self(self);
4175-
self_ident_lo = self.last_span.lo;
4176-
self_ident_hi = self.last_span.hi;
4177-
eself
4171+
maybe_parse_borrowed_explicit_self(self)
41784172
}
41794173
token::TILDE => {
41804174
// We need to make sure it isn't a type
@@ -4246,7 +4240,7 @@ impl<'a> Parser<'a> {
42464240
_ => SelfStatic,
42474241
};
42484242

4249-
let explicit_self_sp = mk_sp(self_ident_lo, self_ident_hi);
4243+
let explicit_self_sp = mk_sp(lo, self.span.hi);
42504244

42514245
// shared fall-through for the three cases below. borrowing prevents simply
42524246
// writing this as a closure

trunk/src/test/auxiliary/coherence-orphan-lib.rs

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

trunk/src/test/debuginfo/basic-types-globals-metadata.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// ignore-windows: FIXME #13256
1212
// ignore-android: FIXME(#10381)
13-
// min-lldb-version: 310
1413

1514
// compile-flags:-g
1615
// gdb-command:rbreak zzz

trunk/src/test/debuginfo/basic-types-globals.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
// ignore-windows: FIXME #13256
1818
// ignore-android: FIXME(#10381)
19-
// min-lldb-version: 310
2019

2120
// compile-flags:-g
2221
// gdb-command:rbreak zzz

trunk/src/test/debuginfo/basic-types-metadata.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@
99
// except according to those terms.
1010

1111
// ignore-android: FIXME(#10381)
12-
// min-lldb-version: 310
1312

1413
// compile-flags:-g
1514
// gdb-command:rbreak zzz

trunk/src/test/debuginfo/basic-types-mut-globals.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@
1616

1717
// ignore-windows: FIXME #13256
1818
// ignore-android: FIXME(#10381)
19-
// min-lldb-version: 310
2019

2120
// compile-flags:-g
2221
// gdb-command:rbreak zzz

trunk/src/test/debuginfo/basic-types.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@
1515
// its numerical value.
1616

1717
// ignore-android: FIXME(#10381)
18-
// min-lldb-version: 310
1918

2019
// compile-flags:-g
2120

trunk/src/test/debuginfo/borrowed-basic.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@
1414
// its numerical value.
1515

1616
// compile-flags:-g
17-
// min-lldb-version: 310
1817

1918
// === GDB TESTS ===================================================================================
2019

trunk/src/test/debuginfo/borrowed-c-style-enum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
// ignore-android: FIXME(#10381)
1212

1313
// compile-flags:-g
14-
// min-lldb-version: 310
1514

1615
// === GDB TESTS ===================================================================================
1716

trunk/src/test/debuginfo/borrowed-enum.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// ignore-tidy-linelength
1212
// ignore-android: FIXME(#10381)
13-
// min-lldb-version: 310
1413

1514
// compile-flags:-g
1615

trunk/src/test/debuginfo/borrowed-struct.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
// ignore-android: FIXME(#10381)
1212
// compile-flags:-g
13-
// min-lldb-version: 310
1413

1514
// === GDB TESTS ===================================================================================
1615

0 commit comments

Comments
 (0)