Skip to content

Commit e163ed5

Browse files
committed
---
yaml --- r: 271607 b: refs/heads/auto c: 2c4d039 h: refs/heads/master i: 271605: 2564753 271603: 5777a09 271599: 42490a4
1 parent 5c5b881 commit e163ed5

File tree

151 files changed

+2815
-1196
lines changed

Some content is hidden

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

151 files changed

+2815
-1196
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: 6ce63fb3f1bf37004868f79beacb180283c0750e
11+
refs/heads/auto: 2c4d039b762f5fc9e1d3340196dc2ca05d9bf104
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/configure

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -969,11 +969,11 @@ then
969969
LLVM_VERSION=$($LLVM_CONFIG --version)
970970

971971
case $LLVM_VERSION in
972-
(3.[5-8]*)
972+
(3.[6-8]*)
973973
msg "found ok version of LLVM: $LLVM_VERSION"
974974
;;
975975
(*)
976-
err "bad LLVM version: $LLVM_VERSION, need >=3.5"
976+
err "bad LLVM version: $LLVM_VERSION, need >=3.6"
977977
;;
978978
esac
979979
fi

branches/auto/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-
-L "$$(RT_OUTPUT_DIR_$(2))" \
386+
-Cmetadata="test-crate" -L "$$(RT_OUTPUT_DIR_$(2))" \
387387
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
388388
$$(RUSTFLAGS_$(4))
389389

branches/auto/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: String,
72+
pub compile_lib_path: PathBuf,
7373

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

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

branches/auto/src/compiletest/compiletest.rs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,17 @@ 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+
121129
Config {
122-
compile_lib_path: matches.opt_str("compile-lib-path").unwrap(),
123-
run_lib_path: matches.opt_str("run-lib-path").unwrap(),
130+
compile_lib_path: make_absolute(opt_path(matches, "compile-lib-path")),
131+
run_lib_path: make_absolute(opt_path(matches, "run-lib-path")),
124132
rustc_path: opt_path(matches, "rustc-path"),
125133
rustdoc_path: opt_path(matches, "rustdoc-path"),
126134
python: matches.opt_str("python").unwrap(),

branches/auto/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,
319+
config.compile_lib_path.to_str().unwrap(),
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,
638+
config.run_lib_path.to_str().unwrap(),
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,
1318+
config.run_lib_path.to_str().unwrap(),
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,
1390+
config.compile_lib_path.to_str().unwrap(),
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,
1413+
config.compile_lib_path.to_str().unwrap(),
14141414
Some(aux_dir.to_str().unwrap()),
14151415
input)
14161416
}

branches/auto/src/doc/reference.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3911,6 +3911,9 @@ The _heap_ is a general term that describes boxes. The lifetime of an
39113911
allocation in the heap depends on the lifetime of the box values pointing to
39123912
it. Since box values may themselves be passed in and out of frames, or stored
39133913
in the heap, heap allocations may outlive the frame they are allocated within.
3914+
An allocation in the heap is guaranteed to reside at a single location in the
3915+
heap for the whole lifetime of the allocation - it will never be relocated as
3916+
a result of moving a box value.
39143917

39153918
### Memory ownership
39163919

branches/auto/src/etc/CONFIGS.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,3 @@ These are some links to repos with configs which ease the use of rust.
1010
* [kate-config](https://github.com/rust-lang/kate-config)
1111
* [nano-config](https://github.com/rust-lang/nano-config)
1212
* [zsh-config](https://github.com/rust-lang/zsh-config)
13-
14-
## Community-maintained Configs
15-
16-
* [.editorconfig](https://gist.github.com/derhuerst/c9d1b9309e308d9851fa) ([what is this?](http://editorconfig.org/))

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

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

19541954
#[inline]
19551955
fn is_char_boundary(&self, index: usize) -> bool {
1956-
if index == self.len() { return true; }
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; }
19571960
match self.as_bytes().get(index) {
19581961
None => false,
19591962
Some(&b) => b < 128 || b >= 192,
@@ -2026,6 +2029,7 @@ impl StrExt for str {
20262029
self.find(pat)
20272030
}
20282031

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

branches/auto/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<'a>(&'a self, tag: usize) -> Doc<'a> {
169+
pub fn get(&self, tag: usize) -> Doc<'doc> {
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<'a>(&'a self) -> &'a str {
177+
pub fn as_str_slice(&self) -> &'doc str {
178178
str::from_utf8(&self.data[self.start..self.end]).unwrap()
179179
}
180180

branches/auto/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/auto/src/librustc/front/map/collector.rs

Lines changed: 24 additions & 12 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, DefIndex};
17+
use middle::def_id::{CRATE_DEF_INDEX, DefId, DefIndex};
1818
use std::iter::repeat;
1919
use syntax::ast::{NodeId, CRATE_NODE_ID, DUMMY_NODE_ID};
2020
use syntax::codemap::Span;
@@ -50,6 +50,7 @@ impl<'ast> NodeCollector<'ast> {
5050
parent: &'ast InlinedParent,
5151
parent_node: NodeId,
5252
parent_def_path: DefPath,
53+
parent_def_id: DefId,
5354
map: Vec<MapEntry<'ast>>,
5455
definitions: Definitions)
5556
-> NodeCollector<'ast> {
@@ -60,8 +61,14 @@ impl<'ast> NodeCollector<'ast> {
6061
definitions: definitions,
6162
};
6263

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+
6370
collector.insert_entry(parent_node, RootInlinedParent(parent));
64-
collector.create_def(parent_node, DefPathData::InlinedRoot(parent_def_path));
71+
collector.create_def(parent_node, DefPathData::InlinedRoot(root_path));
6572

6673
collector
6774
}
@@ -126,11 +133,16 @@ impl<'ast> Visitor<'ast> for NodeCollector<'ast> {
126133
// Pick the def data. This need not be unique, but the more
127134
// information we encapsulate into
128135
let def_data = match i.node {
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,
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,
134146
};
135147

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

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

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

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

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

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

0 commit comments

Comments
 (0)