Skip to content

Commit b0bc027

Browse files
committed
---
yaml --- r: 69373 b: refs/heads/auto c: df67942 h: refs/heads/master i: 69371: d3f66cb v: v3
1 parent a2ab414 commit b0bc027

Some content is hidden

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

80 files changed

+1484
-1458
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1414
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1515
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1616
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
17-
refs/heads/auto: 5109ce691c5b8cc6c4ef189bec33e9131e2899bf
17+
refs/heads/auto: df67942dccc33379051e66f075615e579f3bdb49
1818
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1919
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c

branches/auto/doc/tutorial-container.md

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -108,14 +108,12 @@ impl Iterator<int> for ZeroStream {
108108
## Container iterators
109109
110110
Containers implement iteration over the contained elements by returning an
111-
iterator object. For example, vector slices several iterators available:
111+
iterator object. For example, vector slices have four iterators available:
112112
113-
* `iter()` and `rev_iter()`, for immutable references to the elements
114-
* `mut_iter()` and `mut_rev_iter()`, for mutable references to the elements
115-
* `consume_iter()` and `consume_rev_iter`, to move the elements out by-value
116-
117-
A typical mutable container will implement at least `iter()`, `mut_iter()` and
118-
`consume_iter()` along with the reverse variants if it maintains an order.
113+
* `vector.iter()`, for immutable references to the elements
114+
* `vector.mut_iter()`, for mutable references to the elements
115+
* `vector.rev_iter()`, for immutable references to the elements in reverse order
116+
* `vector.mut_rev_iter()`, for mutable references to the elements in reverse order
119117
120118
### Freezing
121119

branches/auto/mk/tests.mk

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -537,10 +537,6 @@ TEST_SREQ$(1)_T_$(2)_H_$(3) = \
537537

538538
# Rules for the cfail/rfail/rpass/bench/perf test runner
539539

540-
# The tests select when to use debug configuration on their own;
541-
# remove directive, if present, from CFG_RUSTC_FLAGS (issue #7898).
542-
CTEST_RUSTC_FLAGS = $$(subst --cfg debug,,$$(CFG_RUSTC_FLAGS))
543-
544540
CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
545541
--compile-lib-path $$(HLIB$(1)_H_$(3)) \
546542
--run-lib-path $$(TLIB$(1)_T_$(2)_H_$(3)) \
@@ -552,7 +548,7 @@ CTEST_COMMON_ARGS$(1)-T-$(2)-H-$(3) := \
552548
--target $(2) \
553549
--adb-path=$(CFG_ADB) \
554550
--adb-test-dir=$(CFG_ADB_TEST_DIR) \
555-
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CTEST_RUSTC_FLAGS) --target=$(2)" \
551+
--rustcflags "$(RUSTC_FLAGS_$(2)) $$(CFG_RUSTC_FLAGS) --target=$(2)" \
556552
$$(CTEST_TESTARGS)
557553

558554
CTEST_DEPS_rpass_$(1)-T-$(2)-H-$(3) = $$(RPASS_TESTS)

branches/auto/src/libextra/num/bigint.rs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -732,11 +732,6 @@ impl Ord for Sign {
732732
}
733733
}
734734

735-
impl TotalEq for Sign {
736-
fn equals(&self, other: &Sign) -> bool {
737-
*self == *other
738-
}
739-
}
740735
impl TotalOrd for Sign {
741736

742737
fn cmp(&self, other: &Sign) -> Ordering {

branches/auto/src/libextra/num/rational.rs

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -110,25 +110,6 @@ cmp_impl!(impl TotalEq, equals)
110110
cmp_impl!(impl Ord, lt, gt, le, ge)
111111
cmp_impl!(impl TotalOrd, cmp -> cmp::Ordering)
112112

113-
impl<T: Clone + Integer + Ord> Orderable for Ratio<T> {
114-
#[inline]
115-
fn min(&self, other: &Ratio<T>) -> Ratio<T> {
116-
if *self < *other { self.clone() } else { other.clone() }
117-
}
118-
119-
#[inline]
120-
fn max(&self, other: &Ratio<T>) -> Ratio<T> {
121-
if *self > *other { self.clone() } else { other.clone() }
122-
}
123-
124-
#[inline]
125-
fn clamp(&self, mn: &Ratio<T>, mx: &Ratio<T>) -> Ratio<T> {
126-
if *self > *mx { mx.clone()} else
127-
if *self < *mn { mn.clone() } else { self.clone() }
128-
}
129-
}
130-
131-
132113
/* Arithmetic */
133114
// a/b * c/d = (a*c)/(b*d)
134115
impl<T: Clone + Integer + Ord>

branches/auto/src/librustc/metadata/common.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,6 @@ pub static tag_misc_info: uint = 0x7f;
180180
pub static tag_misc_info_crate_items: uint = 0x80;
181181

182182
pub static tag_item_method_provided_source: uint = 0x81;
183-
pub static tag_item_impl_vtables: uint = 0x82;
184183

185184
pub struct LinkMeta {
186185
name: @str,

branches/auto/src/librustc/metadata/csearch.rs

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ use metadata::cstore;
1616
use metadata::decoder;
1717
use metadata;
1818
use middle::ty;
19-
use middle::typeck;
2019

2120
use std::vec;
2221
use reader = extra::ebml::reader;
@@ -217,14 +216,6 @@ pub fn get_impl_trait(tcx: ty::ctxt,
217216
decoder::get_impl_trait(cdata, def.node, tcx)
218217
}
219218

220-
// Given a def_id for an impl, return information about its vtables
221-
pub fn get_impl_vtables(tcx: ty::ctxt,
222-
def: ast::def_id) -> typeck::impl_res {
223-
let cstore = tcx.cstore;
224-
let cdata = cstore::get_crate_data(cstore, def.crate);
225-
decoder::get_impl_vtables(cdata, def.node, tcx)
226-
}
227-
228219
pub fn get_impl_method(cstore: @mut cstore::CStore,
229220
def: ast::def_id,
230221
mname: ast::ident)

branches/auto/src/librustc/metadata/decoder.rs

Lines changed: 3 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,12 +21,9 @@ use metadata::tydecode::{parse_ty_data, parse_def_id,
2121
parse_type_param_def_data,
2222
parse_bare_fn_ty_data, parse_trait_ref_data};
2323
use middle::ty;
24-
use middle::typeck;
25-
use middle::astencode::vtable_decoder_helpers;
26-
2724

2825
use std::hash::HashUtil;
29-
use std::uint;
26+
use std::int;
3027
use std::io::WriterUtil;
3128
use std::io;
3229
use std::option;
@@ -203,9 +200,9 @@ fn each_reexport(d: ebml::Doc, f: &fn(ebml::Doc) -> bool) -> bool {
203200
return true;
204201
}
205202

206-
fn variant_disr_val(d: ebml::Doc) -> Option<uint> {
203+
fn variant_disr_val(d: ebml::Doc) -> Option<int> {
207204
do reader::maybe_get_doc(d, tag_disr_val).chain |val_doc| {
208-
do reader::with_doc_data(val_doc) |data| { uint::parse_bytes(data, 10u) }
205+
do reader::with_doc_data(val_doc) |data| { int::parse_bytes(data, 10u) }
209206
}
210207
}
211208

@@ -413,21 +410,6 @@ pub fn get_impl_trait(cdata: cmd,
413410
}
414411
}
415412

416-
pub fn get_impl_vtables(cdata: cmd,
417-
id: ast::node_id,
418-
tcx: ty::ctxt) -> typeck::impl_res
419-
{
420-
let item_doc = lookup_item(id, cdata.data);
421-
let vtables_doc = reader::get_doc(item_doc, tag_item_impl_vtables);
422-
let mut decoder = reader::Decoder(vtables_doc);
423-
424-
typeck::impl_res {
425-
trait_vtables: decoder.read_vtable_res(tcx, cdata),
426-
self_vtables: decoder.read_vtable_param_res(tcx, cdata)
427-
}
428-
}
429-
430-
431413
pub fn get_impl_method(intr: @ident_interner, cdata: cmd, id: ast::node_id,
432414
name: ast::ident) -> Option<ast::def_id> {
433415
let items = reader::get_doc(reader::Doc(cdata.data), tag_items);

branches/auto/src/librustc/metadata/encoder.rs

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,11 @@ use metadata::decoder;
1717
use metadata::tyencode;
1818
use middle::ty::{node_id_to_type, lookup_item_type};
1919
use middle::ty;
20-
use middle::typeck;
21-
use middle::astencode;
2220
use middle;
2321

2422
use std::hash::HashUtil;
2523
use std::hashmap::{HashMap, HashSet};
24+
use std::int;
2625
use std::io;
2726
use std::str;
2827
use std::uint;
@@ -163,15 +162,6 @@ fn encode_trait_ref(ebml_w: &mut writer::Encoder,
163162
ebml_w.end_tag();
164163
}
165164

166-
fn encode_impl_vtables(ebml_w: &mut writer::Encoder,
167-
ecx: &EncodeContext,
168-
vtables: &typeck::impl_res) {
169-
ebml_w.start_tag(tag_item_impl_vtables);
170-
astencode::encode_vtable_res(ecx, ebml_w, vtables.trait_vtables);
171-
astencode::encode_vtable_param_res(ecx, ebml_w, vtables.self_vtables);
172-
ebml_w.end_tag();
173-
}
174-
175165
// Item info table encoding
176166
fn encode_family(ebml_w: &mut writer::Encoder, c: char) {
177167
ebml_w.start_tag(tag_items_data_item_family);
@@ -300,9 +290,9 @@ fn encode_discriminant(ecx: &EncodeContext,
300290

301291
fn encode_disr_val(_: &EncodeContext,
302292
ebml_w: &mut writer::Encoder,
303-
disr_val: uint) {
293+
disr_val: int) {
304294
ebml_w.start_tag(tag_disr_val);
305-
let s = uint::to_str(disr_val);
295+
let s = int::to_str(disr_val);
306296
ebml_w.writer.write(s.as_bytes());
307297
ebml_w.end_tag();
308298
}
@@ -1019,8 +1009,6 @@ fn encode_info_for_item(ecx: &EncodeContext,
10191009
let trait_ref = ty::node_id_to_trait_ref(
10201010
tcx, ast_trait_ref.ref_id);
10211011
encode_trait_ref(ebml_w, ecx, trait_ref, tag_item_trait_ref);
1022-
let impl_vtables = ty::lookup_impl_vtables(tcx, def_id);
1023-
encode_impl_vtables(ebml_w, ecx, &impl_vtables);
10241012
}
10251013
encode_path(ecx, ebml_w, path, ast_map::path_name(item.ident));
10261014
ebml_w.end_tag();
@@ -1455,9 +1443,6 @@ fn encode_lang_items(ecx: &EncodeContext, ebml_w: &mut writer::Encoder) {
14551443
ebml_w.start_tag(tag_lang_items);
14561444

14571445
for ecx.tcx.lang_items.each_item |def_id, i| {
1458-
let def_id = match def_id {
1459-
Some(id) => id, None => { loop }
1460-
};
14611446
if def_id.crate != local_crate {
14621447
loop;
14631448
}

branches/auto/src/librustc/metadata/tydecode.rs

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ fn parse_trait_store(st: &mut PState) -> ty::TraitStore {
186186
}
187187

188188
fn parse_substs(st: &mut PState, conv: conv_did) -> ty::substs {
189-
let regions = parse_region_substs(st, |x,y| conv(x,y));
189+
let self_r = parse_opt(st, |st| parse_region(st) );
190190

191191
let self_ty = parse_opt(st, |st| parse_ty(st, |x,y| conv(x,y)) );
192192

@@ -196,28 +196,12 @@ fn parse_substs(st: &mut PState, conv: conv_did) -> ty::substs {
196196
st.pos = st.pos + 1u;
197197

198198
return ty::substs {
199-
regions: regions,
199+
self_r: self_r,
200200
self_ty: self_ty,
201201
tps: params
202202
};
203203
}
204204

205-
fn parse_region_substs(st: &mut PState, conv: conv_did) -> ty::RegionSubsts {
206-
match next(st) {
207-
'e' => ty::ErasedRegions,
208-
'n' => {
209-
let mut regions = opt_vec::Empty;
210-
while peek(st) != '.' {
211-
let r = parse_region(st);
212-
regions.push(r);
213-
}
214-
assert_eq!(next(st), '.');
215-
ty::NonerasedRegions(regions)
216-
}
217-
_ => fail!("parse_bound_region: bad input")
218-
}
219-
}
220-
221205
fn parse_bound_region(st: &mut PState) -> ty::bound_region {
222206
match next(st) {
223207
's' => ty::br_self,

branches/auto/src/librustc/metadata/tyencode.rs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -120,28 +120,13 @@ fn enc_opt<T>(w: @io::Writer, t: Option<T>, enc_f: &fn(T)) {
120120
}
121121

122122
fn enc_substs(w: @io::Writer, cx: @ctxt, substs: &ty::substs) {
123-
enc_region_substs(w, cx, &substs.regions);
123+
do enc_opt(w, substs.self_r) |r| { enc_region(w, cx, r) }
124124
do enc_opt(w, substs.self_ty) |t| { enc_ty(w, cx, t) }
125125
w.write_char('[');
126126
for substs.tps.iter().advance |t| { enc_ty(w, cx, *t); }
127127
w.write_char(']');
128128
}
129129

130-
fn enc_region_substs(w: @io::Writer, cx: @ctxt, substs: &ty::RegionSubsts) {
131-
match *substs {
132-
ty::ErasedRegions => {
133-
w.write_char('e');
134-
}
135-
ty::NonerasedRegions(ref regions) => {
136-
w.write_char('n');
137-
for regions.iter().advance |&r| {
138-
enc_region(w, cx, r);
139-
}
140-
w.write_char('.');
141-
}
142-
}
143-
}
144-
145130
fn enc_region(w: @io::Writer, cx: @ctxt, r: ty::Region) {
146131
match r {
147132
ty::re_bound(br) => {

0 commit comments

Comments
 (0)