Skip to content

Commit c3d7793

Browse files
committed
---
yaml --- r: 130959 b: refs/heads/auto c: 76c02af h: refs/heads/master i: 130957: d150702 130955: 29a2df4 130951: 11dd2c0 130943: 181bf2a v: v3
1 parent f019bd8 commit c3d7793

Some content is hidden

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

47 files changed

+133
-751
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: d24c82420bf7c3c57376c5064d1195c22023715d
16+
refs/heads/auto: 76c02af434a7447824b3c0c105c4af57d3d6c50e
1717
refs/heads/servo: af82457af293e2a842ba6b7759b70288da276167
1818
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1919
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336

branches/auto/mk/docs.mk

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -76,22 +76,21 @@ endif
7676

7777
# Check for the various external utilities for the EPUB/PDF docs:
7878

79-
ifeq ($(CFG_LUALATEX),)
80-
$(info cfg: no lualatex found, deferring to xelatex)
79+
ifeq ($(CFG_PDFLATEX),)
80+
$(info cfg: no pdflatex found, deferring to xelatex)
8181
ifeq ($(CFG_XELATEX),)
82-
$(info cfg: no xelatex found, deferring to pdflatex)
83-
ifeq ($(CFG_PDFLATEX),)
84-
$(info cfg: no pdflatex found, disabling LaTeX docs)
82+
$(info cfg: no xelatex found, deferring to lualatex)
83+
ifeq ($(CFG_LUALATEX),)
84+
$(info cfg: no lualatex found, disabling LaTeX docs)
8585
NO_PDF_DOCS = 1
8686
else
87-
CFG_LATEX := $(CFG_PDFLATEX)
87+
CFG_LATEX := $(CFG_LUALATEX)
8888
endif
8989
else
9090
CFG_LATEX := $(CFG_XELATEX)
91-
XELATEX = 1
9291
endif
9392
else
94-
CFG_LATEX := $(CFG_LUALATEX)
93+
CFG_LATEX := $(CFG_PDFLATEX)
9594
endif
9695

9796

@@ -188,25 +187,12 @@ doc/$(1).tex: $$(D)/$(1).md doc/footer.tex doc/version.tex | doc/
188187
ifneq ($(NO_PDF_DOCS),1)
189188
ifeq ($$(SHOULD_BUILD_PDF_DOC_$(1)),1)
190189
DOC_TARGETS += doc/$(1).pdf
191-
ifneq ($(XELATEX),1)
192190
doc/$(1).pdf: doc/$(1).tex
193191
@$$(call E, latex compiler: $$@)
194192
$$(Q)$$(CFG_LATEX) \
195193
-interaction=batchmode \
196194
-output-directory=doc \
197195
$$<
198-
else
199-
# The version of xelatex on the snap bots seemingly ingores -output-directory
200-
# So we'll output to . and move to the doc directory manually.
201-
# This will leave some intermediate files in the build directory.
202-
doc/$(1).pdf: doc/$(1).tex
203-
@$$(call E, latex compiler: $$@)
204-
$$(Q)$$(CFG_LATEX) \
205-
-interaction=batchmode \
206-
-output-directory=. \
207-
$$<
208-
$$(Q)mv ./$(1).pdf $$@
209-
endif # XELATEX
210196
endif # SHOULD_BUILD_PDF_DOCS_$(1)
211197
endif # NO_PDF_DOCS
212198

branches/auto/src/doc/index.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,10 +43,6 @@ discussion about Rust.
4343
There is also a [developer forum](http://discuss.rust-lang.org/), where the
4444
development of Rust itself is discussed.
4545

46-
# Specification
47-
48-
Rust does not have an exact specification, but an effort to describe as much of
49-
the language in as much detail as possible is in [the manual](rust.html).
5046

5147
# Guides
5248

branches/auto/src/doc/rust.md

Lines changed: 20 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -349,7 +349,7 @@ enclosed within two `U+0022` (double-quote) characters,
349349
with the exception of `U+0022` itself,
350350
which must be _escaped_ by a preceding `U+005C` character (`\`),
351351
or a _raw byte string literal_.
352-
It is equivalent to a `&'static [u8]` borrowed array of unsigned 8-bit integers.
352+
It is equivalent to a `&'static [u8]` borrowed vector of unsigned 8-bit integers.
353353

354354
Some additional _escapes_ are available in either byte or non-raw byte string
355355
literals. An escape starts with a `U+005C` (`\`) and continues with one of
@@ -2555,8 +2555,6 @@ The currently implemented features of the reference compiler are:
25552555
which is considered wildly unsafe and will be
25562556
obsoleted by language improvements.
25572557

2558-
* `tuple_indexing` - Allows use of tuple indexing (expressions like `expr.0`)
2559-
25602558
If a feature is promoted to a language feature, then all existing programs will
25612559
start to receive compilation warnings about #[feature] directives which enabled
25622560
the new feature (because the directive is no longer necessary). However, if
@@ -2811,17 +2809,16 @@ When the type providing the field inherits mutabilty, it can be [assigned](#assi
28112809
Also, if the type of the expression to the left of the dot is a pointer,
28122810
it is automatically dereferenced to make the field access possible.
28132811

2814-
### Array expressions
2812+
### Vector expressions
28152813

28162814
~~~~ {.ebnf .gram}
2817-
array_expr : '[' "mut" ? vec_elems? ']' ;
2815+
vec_expr : '[' "mut" ? vec_elems? ']' ;
28182816
2819-
array_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
2817+
vec_elems : [expr [',' expr]*] | [expr ',' ".." expr] ;
28202818
~~~~
28212819

2822-
An [array](#vector,-array,-and-slice-types) _expression_ is written by
2823-
enclosing zero or more comma-separated expressions of uniform type in square
2824-
brackets.
2820+
A [_vector_](#vector-types) _expression_ is written by enclosing zero or
2821+
more comma-separated expressions of uniform type in square brackets.
28252822

28262823
In the `[expr ',' ".." expr]` form, the expression after the `".."`
28272824
must be a constant expression that can be evaluated at compile time, such
@@ -2830,7 +2827,7 @@ as a [literal](#literals) or a [static item](#static-items).
28302827
~~~~
28312828
[1i, 2, 3, 4];
28322829
["a", "b", "c", "d"];
2833-
[0i, ..128]; // array with 128 zeros
2830+
[0i, ..128]; // vector with 128 zeros
28342831
[0u8, 0u8, 0u8, 0u8];
28352832
~~~~
28362833

@@ -2840,9 +2837,9 @@ as a [literal](#literals) or a [static item](#static-items).
28402837
idx_expr : expr '[' expr ']' ;
28412838
~~~~
28422839

2843-
[Array](#vector,-array,-and-slice-types)-typed expressions can be indexed by writing a
2840+
[Vector](#vector-types)-typed expressions can be indexed by writing a
28442841
square-bracket-enclosed expression (the index) after them. When the
2845-
array is mutable, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
2842+
vector is mutable, the resulting [lvalue](#lvalues,-rvalues-and-temporaries) can be assigned to.
28462843

28472844
Indices are zero-based, and may be of any integral type. Vector access
28482845
is bounds-checked at run-time. When the check fails, it will put the
@@ -2903,7 +2900,7 @@ This means that arithmetic operators can be overridden for user-defined types.
29032900
The default meaning of the operators on standard types is given here.
29042901

29052902
* `+`
2906-
: Addition and array/string concatenation.
2903+
: Addition and vector/string concatenation.
29072904
Calls the `add` method on the `std::ops::Add` trait.
29082905
* `-`
29092906
: Subtraction.
@@ -3206,7 +3203,7 @@ for_expr : "for" pat "in" no_struct_literal_expr '{' block '}' ;
32063203
A `for` expression is a syntactic construct for looping over elements
32073204
provided by an implementation of `std::iter::Iterator`.
32083205

3209-
An example of a for loop over the contents of an array:
3206+
An example of a for loop over the contents of a vector:
32103207

32113208
~~~~
32123209
# type Foo = int;
@@ -3264,7 +3261,7 @@ match_pat : pat [ '|' pat ] * [ "if" expr ] ? ;
32643261

32653262
A `match` expression branches on a *pattern*. The exact form of matching that
32663263
occurs depends on the pattern. Patterns consist of some combination of
3267-
literals, destructured arrays or enum constructors, structures and
3264+
literals, destructured vectors or enum constructors, structures and
32683265
tuples, variable binding specifications, wildcards (`..`), and placeholders
32693266
(`_`). A `match` expression has a *head expression*, which is the value to
32703267
compare to the patterns. The type of the patterns must equal the type of the
@@ -3293,11 +3290,11 @@ between `_` and `..` is that the pattern `C(_)` is only type-correct if `C` has
32933290
exactly one argument, while the pattern `C(..)` is type-correct for any enum
32943291
variant `C`, regardless of how many arguments `C` has.
32953292

3296-
Used inside a array pattern, `..` stands for any number of elements, when the
3293+
Used inside a vector pattern, `..` stands for any number of elements, when the
32973294
`advanced_slice_patterns` feature gate is turned on. This wildcard can be used
3298-
at most once for a given array, which implies that it cannot be used to
3295+
at most once for a given vector, which implies that it cannot be used to
32993296
specifically match elements that are at an unknown distance from both ends of a
3300-
array, like `[.., 42, ..]`. If followed by a variable name, it will bind the
3297+
vector, like `[.., 42, ..]`. If followed by a variable name, it will bind the
33013298
corresponding slice to the variable. Example:
33023299

33033300
~~~~
@@ -3430,7 +3427,7 @@ let message = match x {
34303427
~~~~
34313428

34323429
Range patterns only work on scalar types
3433-
(like integers and characters; not like arrays and structs, which have sub-components).
3430+
(like integers and characters; not like vectors and structs, which have sub-components).
34343431
A range pattern may not be a sub-range of another range pattern inside the same `match`.
34353432

34363433
Finally, match patterns can accept *pattern guards* to further refine the
@@ -3538,10 +3535,10 @@ http://www.unicode.org/glossary/#unicode_scalar_value)
35383535
(ie. a code point that is not a surrogate),
35393536
represented as a 32-bit unsigned word in the 0x0000 to 0xD7FF
35403537
or 0xE000 to 0x10FFFF range.
3541-
A `[char]` array is effectively an UCS-4 / UTF-32 string.
3538+
A `[char]` vector is effectively an UCS-4 / UTF-32 string.
35423539

35433540
A value of type `str` is a Unicode string,
3544-
represented as a array of 8-bit unsigned bytes holding a sequence of UTF-8 codepoints.
3541+
represented as a vector of 8-bit unsigned bytes holding a sequence of UTF-8 codepoints.
35453542
Since `str` is of unknown size, it is not a _first class_ type,
35463543
but can only be instantiated through a pointer type,
35473544
such as `&str` or `String`.
@@ -3652,7 +3649,7 @@ Such recursion has restrictions:
36523649

36533650
* Recursive types must include a nominal type in the recursion
36543651
(not mere [type definitions](#type-definitions),
3655-
or other structural types such as [arrays](#vector,-array,-and-slice-types) or [tuples](#tuple-types)).
3652+
or other structural types such as [vectors](#vector-types) or [tuples](#tuple-types)).
36563653
* A recursive `enum` item must have at least one non-recursive constructor
36573654
(in order to give the recursion a basis case).
36583655
* The size of a recursive type must be finite;
@@ -4156,7 +4153,7 @@ heap data.
41564153
### Built in types
41574154

41584155
The runtime provides C and Rust code to assist with various built-in types,
4159-
such as arrays, strings, and the low level communication system (ports,
4156+
such as vectors, strings, and the low level communication system (ports,
41604157
channels, tasks).
41614158

41624159
Support for other built-in types such as simple types, tuples and

branches/auto/src/liballoc/heap.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
// FIXME: #13996: mark the `allocate` and `reallocate` return value as `noalias`
1313
// and `nonnull`
1414

15+
use core::ptr::RawPtr;
1516
#[cfg(not(test))] use core::raw;
1617
#[cfg(stage0, not(test))] use util;
1718

@@ -69,6 +70,11 @@ pub unsafe fn reallocate_inplace(ptr: *mut u8, size: uint, align: uint,
6970
/// the value returned by `usable_size` for the requested size.
7071
#[inline]
7172
pub unsafe fn deallocate(ptr: *mut u8, size: uint, align: uint) {
73+
// FIXME(14395) This is only required for DST ~[T], it should be removed once
74+
// we fix that representation to not use null pointers.
75+
if ptr.is_null() {
76+
return;
77+
}
7278
imp::deallocate(ptr, size, align)
7379
}
7480

branches/auto/src/librustc/back/link.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -929,6 +929,9 @@ fn link_args(cmd: &mut Command,
929929
cmd.arg("-nodefaultlibs");
930930
}
931931

932+
// Rust does its' own LTO
933+
cmd.arg("-fno-lto").arg("-fno-use-linker-plugin");
934+
932935
// If we're building a dylib, we don't use --gc-sections because LLVM has
933936
// already done the best it can do, and we also don't want to eliminate the
934937
// metadata. If we're building an executable, however, --gc-sections drops

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ static KNOWN_FEATURES: &'static [(&'static str, Status)] = &[
7070
("unboxed_closures", Active),
7171
("import_shadowing", Active),
7272
("advanced_slice_patterns", Active),
73-
("tuple_indexing", Active),
7473

7574
// if you change this list without updating src/doc/rust.md, cmr will be sad
7675

@@ -339,11 +338,6 @@ impl<'a> Visitor<()> for Context<'a> {
339338
"unboxed closures are a work-in-progress \
340339
feature with known bugs");
341340
}
342-
ast::ExprTupField(..) => {
343-
self.gate_feature("tuple_indexing",
344-
e.span,
345-
"tuple indexing is experimental");
346-
}
347341
_ => {}
348342
}
349343
visit::walk_expr(self, e, ());

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

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,6 @@ impl<'a> Visitor<()> for ShowSpanVisitor<'a> {
2828
self.sess.span_note(e.span, "expression");
2929
visit::walk_expr(self, e, ());
3030
}
31-
32-
fn visit_mac(&mut self, macro: &ast::Mac, e: ()) {
33-
visit::walk_mac(self, macro, e);
34-
}
3531
}
3632

3733
pub fn run(sess: &Session, krate: &ast::Crate) {

branches/auto/src/librustc/lint/builtin.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1056,7 +1056,6 @@ impl UnnecessaryParens {
10561056
ast::ExprUnary(_, ref x) |
10571057
ast::ExprCast(ref x, _) |
10581058
ast::ExprField(ref x, _, _) |
1059-
ast::ExprTupField(ref x, _, _) |
10601059
ast::ExprIndex(ref x, _) => {
10611060
// &X { y: 1 }, X { y: 1 }.y
10621061
contains_exterior_struct_lit(&**x)

branches/auto/src/librustc/middle/borrowck/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -807,7 +807,7 @@ impl<'a, 'tcx> BorrowckCtxt<'a, 'tcx> {
807807
out.push_str(token::get_name(fname).get());
808808
}
809809
mc::PositionalField(idx) => {
810-
out.push_char('.');
810+
out.push_char('#'); // invent a notation here
811811
out.push_str(idx.to_string().as_slice());
812812
}
813813
}

branches/auto/src/librustc/middle/cfg/construct.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -467,8 +467,7 @@ impl<'a, 'tcx> CFGBuilder<'a, 'tcx> {
467467
ast::ExprCast(e, _) |
468468
ast::ExprUnary(_, e) |
469469
ast::ExprParen(e) |
470-
ast::ExprField(e, _, _) |
471-
ast::ExprTupField(e, _, _) => {
470+
ast::ExprField(e, _, _) => {
472471
self.straightline(expr, pred, [e])
473472
}
474473

branches/auto/src/librustc/middle/check_const.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,6 @@ fn check_expr(v: &mut CheckCrateVisitor, e: &Expr, is_const: bool) {
173173
ExprAddrOf(MutImmutable, _) |
174174
ExprParen(..) |
175175
ExprField(..) |
176-
ExprTupField(..) |
177176
ExprIndex(..) |
178177
ExprTup(..) |
179178
ExprRepeat(..) |

branches/auto/src/librustc/middle/check_static.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ impl<'a, 'tcx> Visitor<bool> for CheckStaticVisitor<'a, 'tcx> {
106106
}
107107

108108
match e.node {
109-
ast::ExprField(..) | ast::ExprTupField(..) | ast::ExprVec(..) |
109+
ast::ExprField(..) | ast::ExprVec(..) |
110110
ast::ExprBlock(..) | ast::ExprTup(..) => {
111111
visit::walk_expr(self, e, is_const);
112112
}

branches/auto/src/librustc/middle/const_eval.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -225,8 +225,6 @@ impl<'a, 'tcx> ConstEvalVisitor<'a, 'tcx> {
225225

226226
ast::ExprField(ref base, _, _) => self.classify(&**base),
227227

228-
ast::ExprTupField(ref base, _, _) => self.classify(&**base),
229-
230228
ast::ExprIndex(ref base, ref idx) =>
231229
join(self.classify(&**base), self.classify(&**idx)),
232230

branches/auto/src/librustc/middle/dead.rs

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -145,17 +145,6 @@ impl<'a, 'tcx> MarkSymbolVisitor<'a, 'tcx> {
145145
}
146146
}
147147

148-
fn handle_tup_field_access(&mut self, lhs: &ast::Expr, idx: uint) {
149-
match ty::get(ty::expr_ty_adjusted(self.tcx, lhs)).sty {
150-
ty::ty_struct(id, _) => {
151-
let fields = ty::lookup_struct_fields(self.tcx, id);
152-
let field_id = fields[idx].id;
153-
self.live_symbols.insert(field_id.node);
154-
},
155-
_ => ()
156-
}
157-
}
158-
159148
fn handle_field_pattern_match(&mut self, lhs: &ast::Pat, pats: &[ast::FieldPat]) {
160149
let id = match self.tcx.def_map.borrow().get(&lhs.id) {
161150
&def::DefVariant(_, id, _) => id,
@@ -266,9 +255,6 @@ impl<'a, 'tcx> Visitor<MarkSymbolVisitorContext> for MarkSymbolVisitor<'a, 'tcx>
266255
ast::ExprField(ref lhs, ref ident, _) => {
267256
self.handle_field_access(&**lhs, &ident.node);
268257
}
269-
ast::ExprTupField(ref lhs, idx, _) => {
270-
self.handle_tup_field_access(&**lhs, idx.node);
271-
}
272258
_ => ()
273259
}
274260

branches/auto/src/librustc/middle/expr_use_visitor.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -324,10 +324,6 @@ impl<'d,'t,'tcx,TYPER:mc::Typer<'tcx>> ExprUseVisitor<'d,'t,TYPER> {
324324
self.select_from_expr(&**base);
325325
}
326326

327-
ast::ExprTupField(ref base, _, _) => { // base.<n>
328-
self.select_from_expr(&**base);
329-
}
330-
331327
ast::ExprIndex(ref lhs, ref rhs) => { // lhs[rhs]
332328
if !self.walk_overloaded_operator(expr, &**lhs, [rhs.clone()]) {
333329
self.select_from_expr(&**lhs);

0 commit comments

Comments
 (0)