Skip to content

Commit ee7f233

Browse files
committed
---
yaml --- r: 212867 b: refs/heads/master c: 49d8573 h: refs/heads/master i: 212865: 89d8980 212863: 9addb74 v: v3
1 parent ddd07c1 commit ee7f233

File tree

168 files changed

+13480
-2197
lines changed

Some content is hidden

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

168 files changed

+13480
-2197
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: 325066051fd4652667d06b2bccc2c63d7ce0812b
2+
refs/heads/master: 49d8573dd2bc06b172142c58d2c0f1356b497f44
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
44
refs/heads/snap-stage3: ba0e1cd8147d452c356aacb29fb87568ca26f111
55
refs/heads/try: 1864973ae17213c5a58c4dd3f9af6d1b6c7d2e05

trunk/RELEASES.md

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,3 @@
1-
Version 1.1.0 (July 2015)
2-
========================
3-
4-
* NNNN changes, numerous bugfixes
5-
6-
Libraries
7-
---------
8-
9-
* The [`std::fs` module has been expanded][fs-expand] to expand the set of
10-
functionality exposed:
11-
* `DirEntry` now supports optimizations like `file_type` and `metadata` which
12-
don't incur a syscall on some platforms.
13-
* A `symlink_metadata` function has been added.
14-
* The `fs::Metadata` structure now lowers to its OS counterpart, providing
15-
access to all underlying information.
16-
17-
[fs-expand]: https://github.com/rust-lang/rust/pull/25844
18-
191
Version 1.0.0 (May 2015)
202
========================
213

trunk/mk/prepare.mk

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -29,34 +29,30 @@ DEFAULT_PREPARE_MAN_CMD = install -m644
2929

3030
# Create a directory
3131
# $(1) is the directory
32-
#
33-
# XXX: These defines are called to generate make steps.
34-
# Adding blank lines means two steps from different defines will not end up on
35-
# the same line.
3632
define PREPARE_DIR
37-
38-
@$(call E, prepare: $(1))
33+
@$(Q)$(call E, prepare: $(1))
3934
$(Q)$(PREPARE_DIR_CMD) $(1)
40-
4135
endef
4236

4337
# Copy an executable
4438
# $(1) is the filename/libname-glob
4539
#
46-
# See above for an explanation on the surrounding blank lines
40+
# Gee, what's up with that $(nop)? See comment below.
4741
define PREPARE_BIN
48-
42+
$(nop)
4943
@$(call E, prepare: $(PREPARE_DEST_BIN_DIR)/$(1))
5044
$(Q)$(PREPARE_BIN_CMD) $(PREPARE_SOURCE_BIN_DIR)/$(1) $(PREPARE_DEST_BIN_DIR)/$(1)
51-
5245
endef
5346

5447
# Copy a dylib or rlib
5548
# $(1) is the filename/libname-glob
5649
#
57-
# See above for an explanation on the surrounding blank lines
50+
# XXX: Don't remove the $(nop) command below!
51+
# Yeah, that's right, it's voodoo. Something in the way this macro is being expanded
52+
# causes it to parse incorrectly. Throwing in that empty command seems to fix the
53+
# problem. I'm sorry, just don't remove the $(nop), alright?
5854
define PREPARE_LIB
59-
55+
$(nop)
6056
@$(call E, prepare: $(PREPARE_WORKING_DEST_LIB_DIR)/$(1))
6157
$(Q)LIB_NAME="$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1))))"; \
6258
MATCHES="$(filter-out %$(notdir $(lastword $(wildcard $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)))), \
@@ -68,18 +64,13 @@ define PREPARE_LIB
6864
echo $$MATCHES ; \
6965
fi
7066
$(Q)$(PREPARE_LIB_CMD) `ls -drt1 $(PREPARE_WORKING_SOURCE_LIB_DIR)/$(1)` $(PREPARE_WORKING_DEST_LIB_DIR)/
71-
7267
endef
7368

7469
# Copy a man page
7570
# $(1) - source dir
76-
#
77-
# See above for an explanation on the surrounding blank lines
7871
define PREPARE_MAN
79-
8072
@$(call E, prepare: $(PREPARE_DEST_MAN_DIR)/$(1))
8173
$(Q)$(PREPARE_MAN_CMD) $(PREPARE_SOURCE_MAN_DIR)/$(1) $(PREPARE_DEST_MAN_DIR)/$(1)
82-
8374
endef
8475

8576
PREPARE_TOOLS = $(filter-out compiletest rustbook error-index-generator, $(TOOLS))

trunk/src/doc/reference.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ extern fn new_i32() -> i32 { 0 }
11111111
extern "stdcall" fn new_i32_stdcall() -> i32 { 0 }
11121112
```
11131113

1114-
Unlike normal functions, extern fns have type `extern "ABI" fn()`. This is the
1114+
Unlike normal functions, extern fns have an `extern "ABI" fn()`. This is the
11151115
same type as the functions declared in an extern block.
11161116

11171117
```

trunk/src/doc/trpl/associated-types.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ trait Graph {
4343
Now, our clients can be abstract over a given `Graph`:
4444

4545
```rust,ignore
46-
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> u32 { ... }
46+
fn distance<G: Graph>(graph: &G, start: &G::N, end: &G::N) -> usize { ... }
4747
```
4848

4949
No need to deal with the `E`dge type here!

trunk/src/doc/trpl/iterators.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,8 @@ has no side effect on the original iterator. Let's try it out with our infinite
285285
iterator from before:
286286

287287
```rust
288-
for i in (1..).take(5) {
288+
# #![feature(step_by)]
289+
for i in (1..).step_by(5).take(5) {
289290
println!("{}", i);
290291
}
291292
```
@@ -294,10 +295,10 @@ This will print
294295

295296
```text
296297
1
297-
2
298-
3
299-
4
300-
5
298+
6
299+
11
300+
16
301+
21
301302
```
302303

303304
`filter()` is an adapter that takes a closure as an argument. This closure

trunk/src/doc/trpl/lifetimes.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -305,7 +305,7 @@ fn substr<'a>(s: &'a str, until: u32) -> &'a str; // expanded
305305
fn get_str() -> &str; // ILLEGAL, no inputs
306306
307307
fn frob(s: &str, t: &str) -> &str; // ILLEGAL, two inputs
308-
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is ambiguous
308+
fn frob<'a, 'b>(s: &'a str, t: &'b str) -> &str; // Expanded: Output lifetime is unclear
309309
310310
fn get_mut(&mut self) -> &mut T; // elided
311311
fn get_mut<'a>(&'a mut self) -> &'a mut T; // expanded

trunk/src/doc/trpl/patterns.md

Lines changed: 3 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -221,27 +221,12 @@ struct Point {
221221
let origin = Point { x: 0, y: 0 };
222222

223223
match origin {
224-
Point { x, y } => println!("({},{})", x, y),
224+
Point { x: x, y: y } => println!("({},{})", x, y),
225225
}
226226
```
227227

228228
[struct]: structs.html
229229

230-
We can use `:` to give a value a different name.
231-
232-
```rust
233-
struct Point {
234-
x: i32,
235-
y: i32,
236-
}
237-
238-
let origin = Point { x: 0, y: 0 };
239-
240-
match origin {
241-
Point { x: x1, y: y1 } => println!("({},{})", x1, y1),
242-
}
243-
```
244-
245230
If we only care about some of the values, we don’t have to give them all names:
246231

247232
```rust
@@ -253,7 +238,7 @@ struct Point {
253238
let origin = Point { x: 0, y: 0 };
254239

255240
match origin {
256-
Point { x, .. } => println!("x is {}", x),
241+
Point { x: x, .. } => println!("x is {}", x),
257242
}
258243
```
259244

@@ -270,7 +255,7 @@ struct Point {
270255
let origin = Point { x: 0, y: 0 };
271256

272257
match origin {
273-
Point { y, .. } => println!("y is {}", y),
258+
Point { y: y, .. } => println!("y is {}", y),
274259
}
275260
```
276261

trunk/src/doc/trpl/traits.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
11
% Traits
22

3-
A trait is a language feature that tells the Rust compiler about
4-
functionality a type must provide.
5-
63
Do you remember the `impl` keyword, used to call a function with [method
74
syntax][methodsyntax]?
85

trunk/src/liballoc/arc.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,15 @@ impl<T: ?Sized> Deref for Arc<T> {
330330
}
331331
}
332332

333+
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
334+
impl<T: ?Sized> AsRef<T> for Arc<T> {
335+
336+
#[inline]
337+
fn as_ref(&self) -> &T {
338+
&self.inner().data
339+
}
340+
}
341+
333342
impl<T: Clone> Arc<T> {
334343
/// Make a mutable reference from the given `Arc<T>`.
335344
///

trunk/src/liballoc/rc.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -156,6 +156,7 @@ use std::boxed;
156156
use core::cell::Cell;
157157
use core::clone::Clone;
158158
use core::cmp::{PartialEq, PartialOrd, Eq, Ord, Ordering};
159+
use core::convert::AsRef;
159160
use core::default::Default;
160161
use core::fmt;
161162
use core::hash::{Hasher, Hash};
@@ -379,6 +380,15 @@ impl<T: ?Sized> Deref for Rc<T> {
379380
}
380381
}
381382

383+
#[stable(feature = "rc_arc_as_ref", since = "1.2.0")]
384+
impl<T: ?Sized> AsRef<T> for Rc<T> {
385+
386+
#[inline(always)]
387+
fn as_ref(&self) -> &T {
388+
&self.inner().value
389+
}
390+
}
391+
382392
#[stable(feature = "rust1", since = "1.0.0")]
383393
impl<T: ?Sized> Drop for Rc<T> {
384394
/// Drops the `Rc<T>`.

trunk/src/librustc/metadata/decoder.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -719,7 +719,7 @@ pub fn get_enum_variants<'tcx>(intr: Rc<IdentInterner>, cdata: Cmd, id: ast::Nod
719719
item, tcx, cdata);
720720
let name = item_name(&*intr, item);
721721
let (ctor_ty, arg_tys, arg_names) = match ctor_ty.sty {
722-
ty::TyBareFn(_, ref f) =>
722+
ty::ty_bare_fn(_, ref f) =>
723723
(Some(ctor_ty), f.sig.0.inputs.clone(), None),
724724
_ => { // Nullary or struct enum variant.
725725
let mut arg_names = Vec::new();

trunk/src/librustc/metadata/tydecode.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ use syntax::abi;
2828
use syntax::ast;
2929
use syntax::parse::token;
3030

31-
// Compact string representation for Ty values. API TyStr &
31+
// Compact string representation for Ty values. API ty_str &
3232
// parse_from_str. Extra parameters are for converting to/from def_ids in the
3333
// data buffer. Whatever format you choose should not contain pipe characters.
3434

trunk/src/librustc/metadata/tyencode.rs

Lines changed: 27 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ pub struct ctxt<'a, 'tcx: 'a> {
4141
pub abbrevs: &'a abbrev_map<'tcx>
4242
}
4343

44-
// Compact string representation for Ty values. API TyStr & parse_from_str.
44+
// Compact string representation for Ty values. API ty_str & parse_from_str.
4545
// Extra parameters are for converting to/from def_ids in the string rep.
4646
// Whatever format you choose should not contain pipe characters.
4747
pub struct ty_abbrev {
@@ -60,9 +60,9 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx>) {
6060
let pos = w.mark_stable_position();
6161

6262
match t.sty {
63-
ty::TyBool => mywrite!(w, "b"),
64-
ty::TyChar => mywrite!(w, "c"),
65-
ty::TyInt(t) => {
63+
ty::ty_bool => mywrite!(w, "b"),
64+
ty::ty_char => mywrite!(w, "c"),
65+
ty::ty_int(t) => {
6666
match t {
6767
ast::TyIs => mywrite!(w, "is"),
6868
ast::TyI8 => mywrite!(w, "MB"),
@@ -71,7 +71,7 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx>) {
7171
ast::TyI64 => mywrite!(w, "MD")
7272
}
7373
}
74-
ty::TyUint(t) => {
74+
ty::ty_uint(t) => {
7575
match t {
7676
ast::TyUs => mywrite!(w, "us"),
7777
ast::TyU8 => mywrite!(w, "Mb"),
@@ -80,80 +80,79 @@ pub fn enc_ty<'a, 'tcx>(w: &mut Encoder, cx: &ctxt<'a, 'tcx>, t: Ty<'tcx>) {
8080
ast::TyU64 => mywrite!(w, "Md")
8181
}
8282
}
83-
ty::TyFloat(t) => {
83+
ty::ty_float(t) => {
8484
match t {
8585
ast::TyF32 => mywrite!(w, "Mf"),
8686
ast::TyF64 => mywrite!(w, "MF"),
8787
}
8888
}
89-
ty::TyEnum(def, substs) => {
89+
ty::ty_enum(def, substs) => {
9090
mywrite!(w, "t[{}|", (cx.ds)(def));
9191
enc_substs(w, cx, substs);
9292
mywrite!(w, "]");
9393
}
94-
ty::TyTrait(box ty::TraitTy { ref principal,
94+
ty::ty_trait(box ty::TyTrait { ref principal,
9595
ref bounds }) => {
9696
mywrite!(w, "x[");
9797
enc_trait_ref(w, cx, principal.0);
9898
enc_existential_bounds(w, cx, bounds);
9999
mywrite!(w, "]");
100100
}
101-
ty::TyTuple(ref ts) => {
101+
ty::ty_tup(ref ts) => {
102102
mywrite!(w, "T[");
103103
for t in ts { enc_ty(w, cx, *t); }
104104
mywrite!(w, "]");
105105
}
106-
ty::TyBox(typ) => { mywrite!(w, "~"); enc_ty(w, cx, typ); }
107-
ty::TyRawPtr(mt) => { mywrite!(w, "*"); enc_mt(w, cx, mt); }
108-
ty::TyRef(r, mt) => {
106+
ty::ty_uniq(typ) => { mywrite!(w, "~"); enc_ty(w, cx, typ); }
107+
ty::ty_ptr(mt) => { mywrite!(w, "*"); enc_mt(w, cx, mt); }
108+
ty::ty_rptr(r, mt) => {
109109
mywrite!(w, "&");
110110
enc_region(w, cx, *r);
111111
enc_mt(w, cx, mt);
112112
}
113-
ty::TyArray(t, sz) => {
113+
ty::ty_vec(t, sz) => {
114114
mywrite!(w, "V");
115115
enc_ty(w, cx, t);
116-
mywrite!(w, "/{}|", sz);
117-
}
118-
ty::TySlice(t) => {
119-
mywrite!(w, "V");
120-
enc_ty(w, cx, t);
121-
mywrite!(w, "/|");
116+
mywrite!(w, "/");
117+
match sz {
118+
Some(n) => mywrite!(w, "{}|", n),
119+
None => mywrite!(w, "|"),
120+
}
122121
}
123-
ty::TyStr => {
122+
ty::ty_str => {
124123
mywrite!(w, "v");
125124
}
126-
ty::TyBareFn(Some(def_id), f) => {
125+
ty::ty_bare_fn(Some(def_id), f) => {
127126
mywrite!(w, "F");
128127
mywrite!(w, "{}|", (cx.ds)(def_id));
129128
enc_bare_fn_ty(w, cx, f);
130129
}
131-
ty::TyBareFn(None, f) => {
130+
ty::ty_bare_fn(None, f) => {
132131
mywrite!(w, "G");
133132
enc_bare_fn_ty(w, cx, f);
134133
}
135-
ty::TyInfer(_) => {
134+
ty::ty_infer(_) => {
136135
cx.diag.handler().bug("cannot encode inference variable types");
137136
}
138-
ty::TyParam(ParamTy {space, idx, name}) => {
137+
ty::ty_param(ParamTy {space, idx, name}) => {
139138
mywrite!(w, "p[{}|{}|{}]", idx, space.to_uint(), token::get_name(name))
140139
}
141-
ty::TyStruct(def, substs) => {
140+
ty::ty_struct(def, substs) => {
142141
mywrite!(w, "a[{}|", (cx.ds)(def));
143142
enc_substs(w, cx, substs);
144143
mywrite!(w, "]");
145144
}
146-
ty::TyClosure(def, substs) => {
145+
ty::ty_closure(def, substs) => {
147146
mywrite!(w, "k[{}|", (cx.ds)(def));
148147
enc_substs(w, cx, substs);
149148
mywrite!(w, "]");
150149
}
151-
ty::TyProjection(ref data) => {
150+
ty::ty_projection(ref data) => {
152151
mywrite!(w, "P[");
153152
enc_trait_ref(w, cx, data.trait_ref);
154153
mywrite!(w, "{}]", token::get_name(data.item_name));
155154
}
156-
ty::TyError => {
155+
ty::ty_err => {
157156
mywrite!(w, "e");
158157
}
159158
}

0 commit comments

Comments
 (0)