Skip to content

Commit d9e2284

Browse files
committed
---
yaml --- r: 119002 b: refs/heads/auto c: 37b8ce0 h: refs/heads/master v: v3
1 parent e2f35c8 commit d9e2284

Some content is hidden

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

48 files changed

+239
-756
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ refs/heads/try3: 9387340aab40a73e8424c48fd42f0c521a4875c0
1313
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
1414
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1515
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
16-
refs/heads/auto: d77cb22bb6e5852c99d4c8f5d9de4b33b1b9381b
16+
refs/heads/auto: 37b8ce006475bba311d275d631cd3494937355fc
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/src/doc/guide-container.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ The standard library provides three owned map/set types:
2626
implement `Eq` and `Hash`
2727
* `collections::TrieMap` and `collections::TrieSet`, requiring the keys to be `uint`
2828
* `collections::TreeMap` and `collections::TreeSet`, requiring the keys
29-
to implement `Ord`
29+
to implement `TotalOrd`
3030

3131
These maps do not use managed pointers so they can be sent between tasks as
3232
long as the key and value types are sendable. Neither the key or value type has

branches/auto/src/doc/rust.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2270,7 +2270,7 @@ impl<T: PartialEq> PartialEq for Foo<T> {
22702270

22712271
Supported traits for `deriving` are:
22722272

2273-
* Comparison traits: `PartialEq`, `Eq`, `PartialOrd`, `Ord`.
2273+
* Comparison traits: `PartialEq`, `TotalEq`, `PartialOrd`, `TotalOrd`.
22742274
* Serialization: `Encodable`, `Decodable`. These require `serialize`.
22752275
* `Clone`, to create `T` from `&T` via a copy.
22762276
* `Hash`, to iterate over the bytes in a data type.

branches/auto/src/doc/tutorial.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2619,8 +2619,8 @@ fn main() {
26192619
}
26202620
~~~
26212621

2622-
The full list of derivable traits is `PartialEq`, `Eq`, `PartialOrd`,
2623-
`Ord`, `Encodable`, `Decodable`, `Clone`,
2622+
The full list of derivable traits is `PartialEq`, `TotalEq`, `Ord`,
2623+
`TotalOrd`, `Encodable`, `Decodable`, `Clone`,
26242624
`Hash`, `Rand`, `Default`, `Zero`, `FromPrimitive` and `Show`.
26252625

26262626
# Crates and the module system

branches/auto/src/etc/2014-06-rewrite-bytes-macros.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
#!/usr/bin/env python
1+
#!/bin/env python
22
#
33
# Copyright 2014 The Rust Project Developers. See the COPYRIGHT
44
# file at the top-level directory of this distribution and at

branches/auto/src/etc/generate-deriving-span-tests.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,8 @@ def write_file(name, string):
119119
('Clone', [], 1),
120120
('PartialEq', [], 2),
121121
('PartialOrd', ['PartialEq'], 8),
122-
('Eq', ['PartialEq'], 1),
123-
('Ord', ['Eq', 'PartialOrd', 'PartialEq'], 1),
122+
('TotalEq', ['PartialEq'], 1),
123+
('TotalOrd', ['TotalEq', 'PartialOrd', 'PartialEq'], 1),
124124
('Show', [], 1),
125125
('Hash', [], 1)]:
126126
traits[trait] = (ALL, supers, errs)

branches/auto/src/etc/vim/syntax/rust.vim

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ syn keyword rustTrait Ascii AsciiCast OwnedAsciiCast AsciiStr IntoBytes
8282
syn keyword rustTrait ToCStr
8383
syn keyword rustTrait Char
8484
syn keyword rustTrait Clone
85-
syn keyword rustTrait Eq Ord PartialEq PartialOrd Ordering Equiv
85+
syn keyword rustTrait Eq Ord TotalEq TotalOrd Ordering Equiv
8686
syn keyword rustEnumVariant Less Equal Greater
8787
syn keyword rustTrait Container Mutable Map MutableMap Set MutableSet
8888
syn keyword rustTrait FromIterator Extendable
@@ -104,7 +104,7 @@ syn keyword rustTrait Tuple5 Tuple6 Tuple7 Tuple8
104104
syn keyword rustTrait Tuple9 Tuple10 Tuple11 Tuple12
105105
syn keyword rustTrait CloneableVector ImmutableCloneableVector MutableCloneableVector
106106
syn keyword rustTrait ImmutableVector MutableVector
107-
syn keyword rustTrait ImmutableEqVector ImmutableOrdVector MutableOrdVector
107+
syn keyword rustTrait ImmutableEqVector ImmutableTotalOrdVector MutableTotalOrdVector
108108
syn keyword rustTrait Vector VectorVector OwnedVector MutableVectorAllocating
109109
syn keyword rustTrait String
110110
syn keyword rustTrait Vec

branches/auto/src/libcollections/vec.rs

Lines changed: 0 additions & 118 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,6 @@ impl<T> Vec<T> {
8585
/// # use std::vec::Vec;
8686
/// let vec: Vec<int> = Vec::with_capacity(10);
8787
/// ```
88-
#[inline]
8988
pub fn with_capacity(capacity: uint) -> Vec<T> {
9089
if mem::size_of::<T>() == 0 {
9190
Vec { len: 0, cap: uint::MAX, ptr: 0 as *mut T }
@@ -111,7 +110,6 @@ impl<T> Vec<T> {
111110
/// let vec = Vec::from_fn(3, |idx| idx * 2);
112111
/// assert_eq!(vec, vec!(0, 2, 4));
113112
/// ```
114-
#[inline]
115113
pub fn from_fn(length: uint, op: |uint| -> T) -> Vec<T> {
116114
unsafe {
117115
let mut xs = Vec::with_capacity(length);
@@ -195,7 +193,6 @@ impl<T: Clone> Vec<T> {
195193
/// let slice = [1, 2, 3];
196194
/// let vec = Vec::from_slice(slice);
197195
/// ```
198-
#[inline]
199196
pub fn from_slice(values: &[T]) -> Vec<T> {
200197
values.iter().map(|x| x.clone()).collect()
201198
}
@@ -210,7 +207,6 @@ impl<T: Clone> Vec<T> {
210207
/// let vec = Vec::from_elem(3, "hi");
211208
/// println!("{}", vec); // prints [hi, hi, hi]
212209
/// ```
213-
#[inline]
214210
pub fn from_elem(length: uint, value: T) -> Vec<T> {
215211
unsafe {
216212
let mut xs = Vec::with_capacity(length);
@@ -357,7 +353,6 @@ impl<T:Clone> Clone for Vec<T> {
357353
}
358354

359355
impl<T> FromIterator<T> for Vec<T> {
360-
#[inline]
361356
fn from_iter<I:Iterator<T>>(mut iterator: I) -> Vec<T> {
362357
let (lower, _) = iterator.size_hint();
363358
let mut vector = Vec::with_capacity(lower);
@@ -369,7 +364,6 @@ impl<T> FromIterator<T> for Vec<T> {
369364
}
370365

371366
impl<T> Extendable<T> for Vec<T> {
372-
#[inline]
373367
fn extend<I: Iterator<T>>(&mut self, mut iterator: I) {
374368
let (lower, _) = iterator.size_hint();
375369
self.reserve_additional(lower);
@@ -1035,7 +1029,6 @@ impl<T> Vec<T> {
10351029
/// vec.push_all_move(vec!(box 2, box 3, box 4));
10361030
/// assert_eq!(vec, vec!(box 1, box 2, box 3, box 4));
10371031
/// ```
1038-
#[inline]
10391032
pub fn push_all_move(&mut self, other: Vec<T>) {
10401033
self.extend(other.move_iter());
10411034
}
@@ -1313,7 +1306,6 @@ impl<T:PartialEq> Vec<T> {
13131306
/// let vec = vec!(1, 2, 3);
13141307
/// assert!(vec.contains(&1));
13151308
/// ```
1316-
#[inline]
13171309
pub fn contains(&self, x: &T) -> bool {
13181310
self.as_slice().contains(x)
13191311
}
@@ -1552,11 +1544,8 @@ pub mod raw {
15521544

15531545
#[cfg(test)]
15541546
mod tests {
1555-
extern crate test;
1556-
15571547
use std::prelude::*;
15581548
use std::mem::size_of;
1559-
use test::Bencher;
15601549
use super::{unzip, raw, Vec};
15611550

15621551
#[test]
@@ -1847,111 +1836,4 @@ mod tests {
18471836
let mut v = vec![BadElem(1), BadElem(2), BadElem(0xbadbeef), BadElem(4)];
18481837
v.truncate(0);
18491838
}
1850-
1851-
#[bench]
1852-
fn bench_new(b: &mut Bencher) {
1853-
b.iter(|| {
1854-
let v: Vec<int> = Vec::new();
1855-
assert_eq!(v.capacity(), 0);
1856-
assert!(v.as_slice() == []);
1857-
})
1858-
}
1859-
1860-
#[bench]
1861-
fn bench_with_capacity_0(b: &mut Bencher) {
1862-
b.iter(|| {
1863-
let v: Vec<int> = Vec::with_capacity(0);
1864-
assert_eq!(v.capacity(), 0);
1865-
assert!(v.as_slice() == []);
1866-
})
1867-
}
1868-
1869-
1870-
#[bench]
1871-
fn bench_with_capacity_5(b: &mut Bencher) {
1872-
b.iter(|| {
1873-
let v: Vec<int> = Vec::with_capacity(5);
1874-
assert_eq!(v.capacity(), 5);
1875-
assert!(v.as_slice() == []);
1876-
})
1877-
}
1878-
1879-
#[bench]
1880-
fn bench_with_capacity_100(b: &mut Bencher) {
1881-
b.iter(|| {
1882-
let v: Vec<int> = Vec::with_capacity(100);
1883-
assert_eq!(v.capacity(), 100);
1884-
assert!(v.as_slice() == []);
1885-
})
1886-
}
1887-
1888-
#[bench]
1889-
fn bench_from_fn_0(b: &mut Bencher) {
1890-
b.iter(|| {
1891-
let v: Vec<int> = Vec::from_fn(0, |_| 5);
1892-
assert!(v.as_slice() == []);
1893-
})
1894-
}
1895-
1896-
#[bench]
1897-
fn bench_from_fn_5(b: &mut Bencher) {
1898-
b.iter(|| {
1899-
let v: Vec<int> = Vec::from_fn(5, |_| 5);
1900-
assert!(v.as_slice() == [5, 5, 5, 5, 5]);
1901-
})
1902-
}
1903-
1904-
#[bench]
1905-
fn bench_from_slice_0(b: &mut Bencher) {
1906-
b.iter(|| {
1907-
let v: Vec<int> = Vec::from_slice([]);
1908-
assert!(v.as_slice() == []);
1909-
})
1910-
}
1911-
1912-
#[bench]
1913-
fn bench_from_slice_5(b: &mut Bencher) {
1914-
b.iter(|| {
1915-
let v: Vec<int> = Vec::from_slice([1, 2, 3, 4, 5]);
1916-
assert!(v.as_slice() == [1, 2, 3, 4, 5]);
1917-
})
1918-
}
1919-
1920-
#[bench]
1921-
fn bench_from_iter_0(b: &mut Bencher) {
1922-
b.iter(|| {
1923-
let v0: Vec<int> = vec!();
1924-
let v1: Vec<int> = FromIterator::from_iter(v0.move_iter());
1925-
assert!(v1.as_slice() == []);
1926-
})
1927-
}
1928-
1929-
#[bench]
1930-
fn bench_from_iter_5(b: &mut Bencher) {
1931-
b.iter(|| {
1932-
let v0: Vec<int> = vec!(1, 2, 3, 4, 5);
1933-
let v1: Vec<int> = FromIterator::from_iter(v0.move_iter());
1934-
assert!(v1.as_slice() == [1, 2, 3, 4, 5]);
1935-
})
1936-
}
1937-
1938-
#[bench]
1939-
fn bench_extend_0(b: &mut Bencher) {
1940-
b.iter(|| {
1941-
let v0: Vec<int> = vec!();
1942-
let mut v1: Vec<int> = vec!(1, 2, 3, 4, 5);
1943-
v1.extend(v0.move_iter());
1944-
assert!(v1.as_slice() == [1, 2, 3, 4, 5]);
1945-
})
1946-
}
1947-
1948-
#[bench]
1949-
fn bench_extend_5(b: &mut Bencher) {
1950-
b.iter(|| {
1951-
let v0: Vec<int> = vec!(1, 2, 3, 4, 5);
1952-
let mut v1: Vec<int> = vec!(1, 2, 3, 4, 5);
1953-
v1.extend(v0.move_iter());
1954-
assert!(v1.as_slice() == [1, 2, 3, 4, 5, 1, 2, 3, 4, 5]);
1955-
})
1956-
}
19571839
}

branches/auto/src/librustc/front/feature_gate.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
//! enabled.
1717
//!
1818
//! Features are enabled in programs via the crate-level attributes of
19-
//! `#![feature(...)]` with a comma-separated list of features.
19+
//! #![feature(...)] with a comma-separated list of features.
2020
2121
use middle::lint;
2222

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -193,7 +193,7 @@ pub fn get_struct_fields(cstore: &cstore::CStore,
193193

194194
pub fn get_type(tcx: &ty::ctxt,
195195
def: ast::DefId)
196-
-> ty::Polytype {
196+
-> ty::ty_param_bounds_and_ty {
197197
let cstore = &tcx.sess.cstore;
198198
let cdata = cstore.get_crate_data(def.krate);
199199
decoder::get_type(&*cdata, def.node, tcx)
@@ -206,7 +206,7 @@ pub fn get_trait_def(tcx: &ty::ctxt, def: ast::DefId) -> ty::TraitDef {
206206
}
207207

208208
pub fn get_field_type(tcx: &ty::ctxt, class_id: ast::DefId,
209-
def: ast::DefId) -> ty::Polytype {
209+
def: ast::DefId) -> ty::ty_param_bounds_and_ty {
210210
let cstore = &tcx.sess.cstore;
211211
let cdata = cstore.get_crate_data(class_id.krate);
212212
let all_items = reader::get_doc(ebml::Doc::new(cdata.data()), tag_items);
@@ -224,7 +224,7 @@ pub fn get_field_type(tcx: &ty::ctxt, class_id: ast::DefId,
224224
def)).to_string()
225225
});
226226
let ty = decoder::item_type(def, the_field, tcx, &*cdata);
227-
ty::Polytype {
227+
ty::ty_param_bounds_and_ty {
228228
generics: ty::Generics {types: VecPerParamSpace::empty(),
229229
regions: VecPerParamSpace::empty()},
230230
ty: ty

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -422,7 +422,7 @@ pub fn get_trait_def(cdata: Cmd,
422422
}
423423

424424
pub fn get_type(cdata: Cmd, id: ast::NodeId, tcx: &ty::ctxt)
425-
-> ty::Polytype {
425+
-> ty::ty_param_bounds_and_ty {
426426

427427
let item = lookup_item(id, cdata.data());
428428

@@ -432,7 +432,7 @@ pub fn get_type(cdata: Cmd, id: ast::NodeId, tcx: &ty::ctxt)
432432
let tp_defs = item_ty_param_defs(item, tcx, cdata, tag_items_data_item_ty_param_bounds);
433433
let rp_defs = item_region_param_defs(item, cdata);
434434

435-
ty::Polytype {
435+
ty::ty_param_bounds_and_ty {
436436
generics: ty::Generics {types: tp_defs,
437437
regions: rp_defs},
438438
ty: t

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

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -196,11 +196,11 @@ fn encode_item_variances(ebml_w: &mut Encoder,
196196

197197
fn encode_bounds_and_type(ebml_w: &mut Encoder,
198198
ecx: &EncodeContext,
199-
pty: &ty::Polytype) {
200-
encode_ty_type_param_defs(ebml_w, ecx, &pty.generics.types,
199+
tpt: &ty::ty_param_bounds_and_ty) {
200+
encode_ty_type_param_defs(ebml_w, ecx, &tpt.generics.types,
201201
tag_items_data_item_ty_param_bounds);
202-
encode_region_param_defs(ebml_w, &pty.generics.regions);
203-
encode_type(ecx, ebml_w, pty.ty);
202+
encode_region_param_defs(ebml_w, &tpt.generics.regions);
203+
encode_type(ecx, ebml_w, tpt.ty);
204204
}
205205

206206
fn encode_variant_id(ebml_w: &mut Encoder, vid: DefId) {
@@ -772,8 +772,8 @@ fn encode_info_for_method(ecx: &EncodeContext,
772772
encode_stability(ebml_w, stab);
773773

774774
// The type for methods gets encoded twice, which is unfortunate.
775-
let pty = lookup_item_type(ecx.tcx, m.def_id);
776-
encode_bounds_and_type(ebml_w, ecx, &pty);
775+
let tpt = lookup_item_type(ecx.tcx, m.def_id);
776+
encode_bounds_and_type(ebml_w, ecx, &tpt);
777777

778778
let elem = ast_map::PathName(m.ident.name);
779779
encode_path(ebml_w, impl_path.chain(Some(elem).move_iter()));
@@ -785,7 +785,7 @@ fn encode_info_for_method(ecx: &EncodeContext,
785785
}
786786

787787
for &ast_method in ast_method_opt.iter() {
788-
let any_types = !pty.generics.types.is_empty();
788+
let any_types = !tpt.generics.types.is_empty();
789789
if any_types || is_default_impl || should_inline(ast_method.attrs.as_slice()) {
790790
encode_inlined_item(ecx, ebml_w,
791791
IIMethodRef(local_def(parent_id), false,
@@ -1218,8 +1218,8 @@ fn encode_info_for_item(ecx: &EncodeContext,
12181218
fn_style_static_method_family(
12191219
method_ty.fty.fn_style));
12201220

1221-
let pty = ty::lookup_item_type(tcx, method_def_id);
1222-
encode_bounds_and_type(ebml_w, ecx, &pty);
1221+
let tpt = ty::lookup_item_type(tcx, method_def_id);
1222+
encode_bounds_and_type(ebml_w, ecx, &tpt);
12231223
}
12241224

12251225
_ => {
@@ -1242,8 +1242,8 @@ fn encode_info_for_item(ecx: &EncodeContext,
12421242
// this.
12431243
if method_ty.explicit_self != SelfStatic {
12441244
// FIXME: I feel like there is something funny going on.
1245-
let pty = ty::lookup_item_type(tcx, method_def_id);
1246-
encode_bounds_and_type(ebml_w, ecx, &pty);
1245+
let tpt = ty::lookup_item_type(tcx, method_def_id);
1246+
encode_bounds_and_type(ebml_w, ecx, &tpt);
12471247
}
12481248
encode_method_sort(ebml_w, 'p');
12491249
encode_inlined_item(ecx, ebml_w,

0 commit comments

Comments
 (0)