Skip to content

Commit 127e447

Browse files
committed
---
yaml --- r: 273628 b: refs/heads/beta c: e539b74 h: refs/heads/master
1 parent 779bfce commit 127e447

File tree

145 files changed

+988
-2801
lines changed

Some content is hidden

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

145 files changed

+988
-2801
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ refs/tags/0.9: 36870b185fc5f5486636d4515f0e22677493f225
2323
refs/tags/0.10: ac33f2b15782272ae348dbd7b14b8257b2148b5a
2424
refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
26-
refs/heads/beta: d36cb2209f1b22b8b587ad128fb094156092aad8
26+
refs/heads/beta: e539b74f5438651c5d46e5c707d1dcf480faf0db
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
2828
refs/heads/tmp: e06d2ad9fcd5027bcaac5b08fc9aa39a49d0ecd3
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f

branches/beta/mk/tests.mk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ $(3)/stage$(1)/test/$(4)test-$(2)$$(X_$(2)): \
383383
@$$(call E, rustc: $$@)
384384
$(Q)CFG_LLVM_LINKAGE_FILE=$$(LLVM_LINKAGE_PATH_$(2)) \
385385
$$(subst @,,$$(STAGE$(1)_T_$(2)_H_$(3))) -o $$@ $$< --test \
386-
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-L "$$(RT_OUTPUT_DIR_$(2))" \
387387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
388388
$$(RUSTFLAGS_$(4))
389389

branches/beta/src/compiletest/common.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ impl fmt::Display for Mode {
6969
#[derive(Clone)]
7070
pub struct Config {
7171
// The library paths required for running the compiler
72-
pub compile_lib_path: PathBuf,
72+
pub compile_lib_path: String,
7373

7474
// The library paths required for running compiled programs
75-
pub run_lib_path: PathBuf,
75+
pub run_lib_path: String,
7676

7777
// The rustc executable
7878
pub rustc_path: PathBuf,

branches/beta/src/compiletest/compiletest.rs

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -118,17 +118,9 @@ pub fn parse_config(args: Vec<String> ) -> Config {
118118
}
119119
}
120120

121-
fn make_absolute(path: PathBuf) -> PathBuf {
122-
if path.is_relative() {
123-
env::current_dir().unwrap().join(path)
124-
} else {
125-
path
126-
}
127-
}
128-
129121
Config {
130-
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
131-
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
122+
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
123+
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
132124
rustc_path: opt_path(matches, "rustc-path"),
133125
rustdoc_path: opt_path(matches, "rustdoc-path"),
134126
python: matches.opt_str("python").unwrap(),

branches/beta/src/compiletest/runtest.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,7 @@ fn run_pretty_test_revision(config: &Config,
316316
testpaths,
317317
pretty_type.to_owned()),
318318
props.exec_env.clone(),
319-
config.compile_lib_path.to_str().unwrap(),
319+
&config.compile_lib_path,
320320
Some(aux_dir.to_str().unwrap()),
321321
Some(src))
322322
}
@@ -635,7 +635,7 @@ fn run_debuginfo_gdb_test(config: &Config, props: &TestProps, testpaths: &TestPa
635635
testpaths,
636636
proc_args,
637637
environment,
638-
config.run_lib_path.to_str().unwrap(),
638+
&config.run_lib_path,
639639
None,
640640
None);
641641
}
@@ -1315,7 +1315,7 @@ fn exec_compiled_test(config: &Config, props: &TestProps,
13151315
testpaths,
13161316
make_run_args(config, props, testpaths),
13171317
env,
1318-
config.run_lib_path.to_str().unwrap(),
1318+
&config.run_lib_path,
13191319
Some(aux_dir.to_str().unwrap()),
13201320
None)
13211321
}
@@ -1387,7 +1387,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
13871387
&aux_testpaths,
13881388
aux_args,
13891389
Vec::new(),
1390-
config.compile_lib_path.to_str().unwrap(),
1390+
&config.compile_lib_path,
13911391
Some(aux_dir.to_str().unwrap()),
13921392
None);
13931393
if !auxres.status.success() {
@@ -1410,7 +1410,7 @@ fn compose_and_run_compiler(config: &Config, props: &TestProps,
14101410
testpaths,
14111411
args,
14121412
props.rustc_env.clone(),
1413-
config.compile_lib_path.to_str().unwrap(),
1413+
&config.compile_lib_path,
14141414
Some(aux_dir.to_str().unwrap()),
14151415
input)
14161416
}

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

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,10 +1953,7 @@ impl StrExt for str {
19531953

19541954
#[inline]
19551955
fn is_char_boundary(&self, index: usize) -> bool {
1956-
// 0 and len are always ok.
1957-
// Test for 0 explicitly so that it can optimize out the check
1958-
// easily and skip reading string data for that case.
1959-
if index == 0 || index == self.len() { return true; }
1956+
if index == self.len() { return true; }
19601957
match self.as_bytes().get(index) {
19611958
None => false,
19621959
Some(&b) => b < 128 || b >= 192,
@@ -2029,7 +2026,6 @@ impl StrExt for str {
20292026
self.find(pat)
20302027
}
20312028

2032-
#[inline]
20332029
fn split_at(&self, mid: usize) -> (&str, &str) {
20342030
// is_char_boundary checks that the index is in [0, .len()]
20352031
if self.is_char_boundary(mid) {

branches/beta/src/librbml/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,15 +166,15 @@ impl<'doc> Doc<'doc> {
166166
}
167167
}
168168

169-
pub fn get(&self, tag: usize) -> Doc<'doc> {
169+
pub fn get<'a>(&'a self, tag: usize) -> Doc<'a> {
170170
reader::get_doc(*self, tag)
171171
}
172172

173173
pub fn is_empty(&self) -> bool {
174174
self.start == self.end
175175
}
176176

177-
pub fn as_str_slice(&self) -> &'doc str {
177+
pub fn as_str_slice<'a>(&'a self) -> &'a str {
178178
str::from_utf8(&self.data[self.start..self.end]).unwrap()
179179
}
180180

branches/beta/src/librustc/diagnostics.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,7 +1261,7 @@ compiled:
12611261
fn foo<T: Index<u8>>(x: T){}
12621262
12631263
#[rustc_on_unimplemented = "the type `{Self}` cannot be indexed by `{Idx}`"]
1264-
trait Index<Idx> { /* ... */ }
1264+
trait Index<Idx> { ... }
12651265
12661266
foo(true); // `bool` does not implement `Index<u8>`
12671267
```
@@ -1291,7 +1291,7 @@ compiled:
12911291
fn foo<T: Index<u8>>(x: T){}
12921292
12931293
#[rustc_on_unimplemented = "the type `{Self}` cannot be indexed by `{Idx}`"]
1294-
trait Index<Idx> { /* ... */ }
1294+
trait Index<Idx> { ... }
12951295
12961296
foo(true); // `bool` does not implement `Index<u8>`
12971297
```
@@ -1319,7 +1319,7 @@ compiled:
13191319
fn foo<T: Index<u8>>(x: T){}
13201320
13211321
#[rustc_on_unimplemented = "the type `{Self}` cannot be indexed by `{Idx}`"]
1322-
trait Index<Idx> { /* ... */ }
1322+
trait Index<Idx> { ... }
13231323
13241324
foo(true); // `bool` does not implement `Index<u8>`
13251325
```

branches/beta/src/librustc/front/map/collector.rs

Lines changed: 12 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ use super::MapEntry::*;
1414
use rustc_front::hir::*;
1515
use rustc_front::util;
1616
use rustc_front::intravisit::{self, Visitor};
17-
use middle::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
17+
use middle::def_id::{CRATE_DEF_INDEX, DefIndex};
1818
use std::iter::repeat;
1919
use syntax::ast::{NodeId, CRATE_NODE_ID, DUMMY_NODE_ID};
2020
use syntax::codemap::Span;
@@ -50,7 +50,6 @@ impl<'ast> NodeCollector<'ast> {
5050
parent: &'ast InlinedParent,
5151
parent_node: NodeId,
5252
parent_def_path: DefPath,
53-
parent_def_id: DefId,
5453
map: Vec<MapEntry<'ast>>,
5554
definitions: Definitions)
5655
-> NodeCollector<'ast> {
@@ -61,14 +60,8 @@ impl<'ast> NodeCollector<'ast> {
6160
definitions: definitions,
6261
};
6362

64-
assert_eq!(parent_def_path.krate, parent_def_id.krate);
65-
let root_path = Box::new(InlinedRootPath {
66-
data: parent_def_path.data,
67-
def_id: parent_def_id,
68-
});
69-
7063
collector.insert_entry(parent_node, RootInlinedParent(parent));
71-
collector.create_def(parent_node, DefPathData::InlinedRoot(root_path));
64+
collector.create_def(parent_node, DefPathData::InlinedRoot(parent_def_path));
7265

7366
collector
7467
}
@@ -133,16 +126,11 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
133126
// Pick the def data. This need not be unique, but the more
134127
// information we encapsulate into
135128
let def_data = match i.node {
136-
ItemDefaultImpl(..) | ItemImpl(..) =>
137-
DefPathData::Impl,
138-
ItemEnum(..) | ItemStruct(..) | ItemTrait(..) |
139-
ItemExternCrate(..) | ItemMod(..) | ItemForeignMod(..) |
140-
ItemTy(..) =>
141-
DefPathData::TypeNs(i.name),
142-
ItemStatic(..) | ItemConst(..) | ItemFn(..) =>
143-
DefPathData::ValueNs(i.name),
144-
ItemUse(..) =>
145-
DefPathData::Misc,
129+
ItemDefaultImpl(..) | ItemImpl(..) => DefPathData::Impl(i.name),
130+
ItemEnum(..) | ItemStruct(..) | ItemTrait(..) => DefPathData::Type(i.name),
131+
ItemExternCrate(..) | ItemMod(..) => DefPathData::Mod(i.name),
132+
ItemStatic(..) | ItemConst(..) | ItemFn(..) => DefPathData::Value(i.name),
133+
_ => DefPathData::Misc,
146134
};
147135

148136
self.insert_def(i.id, NodeItem(i), def_data);
@@ -207,7 +195,7 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
207195
fn visit_foreign_item(&mut self, foreign_item: &'ast ForeignItem) {
208196
self.insert_def(foreign_item.id,
209197
NodeForeignItem(foreign_item),
210-
DefPathData::ValueNs(foreign_item.name));
198+
DefPathData::Value(foreign_item.name));
211199

212200
let parent_node = self.parent_node;
213201
self.parent_node = foreign_item.id;
@@ -227,8 +215,8 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
227215

228216
fn visit_trait_item(&mut self, ti: &'ast TraitItem) {
229217
let def_data = match ti.node {
230-
MethodTraitItem(..) | ConstTraitItem(..) => DefPathData::ValueNs(ti.name),
231-
TypeTraitItem(..) => DefPathData::TypeNs(ti.name),
218+
MethodTraitItem(..) | ConstTraitItem(..) => DefPathData::Value(ti.name),
219+
TypeTraitItem(..) => DefPathData::Type(ti.name),
232220
};
233221

234222
self.insert(ti.id, NodeTraitItem(ti));
@@ -251,8 +239,8 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
251239

252240
fn visit_impl_item(&mut self, ii: &'ast ImplItem) {
253241
let def_data = match ii.node {
254-
ImplItemKind::Method(..) | ImplItemKind::Const(..) => DefPathData::ValueNs(ii.name),
255-
ImplItemKind::Type(..) => DefPathData::TypeNs(ii.name),
242+
ImplItemKind::Method(..) | ImplItemKind::Const(..) => DefPathData::Value(ii.name),
243+
ImplItemKind::Type(..) => DefPathData::Type(ii.name),
256244
};
257245

258246
self.insert_def(ii.id, NodeImplItem(ii), def_data);

0 commit comments

Comments
 (0)