Skip to content

Commit 321408f

Browse files
committed
---
yaml --- r: 234435 b: refs/heads/tmp c: 6bb2c5d h: refs/heads/master i: 234433: 789765e 234431: 091a817 v: v3
1 parent 394e114 commit 321408f

File tree

261 files changed

+1839
-10831
lines changed

Some content is hidden

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

261 files changed

+1839
-10831
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ refs/tags/0.11.0: e1247cb1d0d681be034adb4b558b5a0c0d5720f9
2525
refs/tags/0.12.0: f0c419429ef30723ceaf6b42f9b5a2aeb5d2e2d1
2626
refs/heads/beta: d2e13e822a73e0ea46ae9e21afdd3155fc997f6d
2727
refs/tags/1.0.0-alpha: e42bd6d93a1d3433c486200587f8f9e12590a4d7
28-
refs/heads/tmp: 24e54aebd09de2a75c1c6ef9763ee05c9d281e71
28+
refs/heads/tmp: 6bb2c5d32299b4664c3876793b4e759d8fbc0008
2929
refs/tags/1.0.0-alpha.2: 4c705f6bc559886632d3871b04f58aab093bfa2f
3030
refs/tags/homu-tmp: ab792abf1fcc28afbd315426213f6428da25c085
3131
refs/tags/1.0.0-beta: 8cbb92b53468ee2b0c2d3eeb8567005953d40828

branches/tmp/RELEASES.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Version 1.2.0 (2015-08-07)
1+
Version 1.2.0 (August 2015)
22
===========================
33

44
* ~1200 changes, numerous bugfixes
@@ -156,7 +156,7 @@ Misc
156156
[ad]: https://github.com/rust-lang/rust/pull/27382
157157
[win]: https://github.com/rust-lang/rust/pull/25350
158158

159-
Version 1.1.0 (2015-06-25)
159+
Version 1.1.0 (June 2015)
160160
=========================
161161

162162
* ~850 changes, numerous bugfixes
@@ -267,7 +267,7 @@ Misc
267267
[`split_off`]: https://doc.rust-lang.org/nightly/collections/linked_list/struct.LinkedList.html#method.split_off
268268
[drop]: https://github.com/rust-lang/rust/pull/24935
269269

270-
Version 1.0.0 (2015-05-15)
270+
Version 1.0.0 (May 2015)
271271
========================
272272

273273
* ~1500 changes, numerous bugfixes

branches/tmp/configure

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,27 +1180,16 @@ do
11801180
# MSVC requires cmake because that's how we're going to build LLVM
11811181
probe_need CFG_CMAKE cmake
11821182

1183-
# There are three builds of cmake on windows: MSVC, MinGW and Cygwin
1184-
# The Cygwin build does not have generators for Visual Studio, so
1185-
# detect that here and error.
1186-
if ! "$CFG_CMAKE" --help | sed -n '/^Generators/,$p' | grep 'Visual Studio' > /dev/null
1187-
then
1188-
err "cmake does not support Visual Studio generators.\n\n \
1189-
This is likely due to it being an msys/cygwin build of cmake, \
1190-
rather than the required windows version, built using MinGW \
1191-
or Visual Studio."
1192-
fi
1193-
11941183
# Use the REG program to figure out where VS is installed
11951184
# We need to figure out where cl.exe and link.exe are, so we do some
11961185
# munging and some probing here. We also look for the default
11971186
# INCLUDE and LIB variables for MSVC so we can set those in the
11981187
# build system as well.
1199-
install=$(cmd //c reg QUERY \
1188+
install=$(reg QUERY \
12001189
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
12011190
-v InstallDir)
12021191
if [ -z "$install" ]; then
1203-
install=$(cmd //c reg QUERY \
1192+
install=$(reg QUERY \
12041193
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
12051194
-v InstallDir)
12061195
fi
@@ -1233,9 +1222,9 @@ do
12331222
eval CFG_MSVC_LINK_$bits="\"$bindir/link.exe\""
12341223

12351224
vcvarsall="${CFG_MSVC_ROOT}/VC/vcvarsall.bat"
1236-
include_path=$(cmd //V:ON //c "$vcvarsall" $msvc_part \& echo !INCLUDE!)
1225+
include_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %INCLUDE%")
12371226
need_ok "failed to learn about MSVC's INCLUDE"
1238-
lib_path=$(cmd //V:ON //c "$vcvarsall" $msvc_part \& echo !LIB!)
1227+
lib_path=$(cmd /c "\"$vcvarsall\" $msvc_part && cmd /c echo %LIB%")
12391228
need_ok "failed to learn about MSVC's LIB"
12401229

12411230
eval CFG_MSVC_INCLUDE_PATH_${bits}="\"$include_path\""

branches/tmp/mk/crates.mk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ TARGET_CRATES := libc std flate arena term \
5454
log graphviz core rbml alloc \
5555
rustc_unicode rustc_bitflags \
5656
alloc_system
57-
RUSTC_CRATES := rustc rustc_typeck rustc_mir rustc_borrowck rustc_resolve rustc_driver \
57+
RUSTC_CRATES := rustc rustc_typeck rustc_borrowck rustc_resolve rustc_driver \
5858
rustc_trans rustc_back rustc_llvm rustc_privacy rustc_lint \
5959
rustc_data_structures rustc_front rustc_platform_intrinsics
6060
HOST_CRATES := syntax $(RUSTC_CRATES) rustdoc fmt_macros
@@ -70,12 +70,11 @@ DEPS_std := core libc rand alloc collections rustc_unicode \
7070
DEPS_graphviz := std
7171
DEPS_syntax := std term serialize log fmt_macros arena libc rustc_bitflags
7272
DEPS_rustc_driver := arena flate getopts graphviz libc rustc rustc_back rustc_borrowck \
73-
rustc_typeck rustc_mir rustc_resolve log syntax serialize rustc_llvm \
73+
rustc_typeck rustc_resolve log syntax serialize rustc_llvm \
7474
rustc_trans rustc_privacy rustc_lint rustc_front
7575

7676
DEPS_rustc_trans := arena flate getopts graphviz libc rustc rustc_back \
7777
log syntax serialize rustc_llvm rustc_front rustc_platform_intrinsics
78-
DEPS_rustc_mir := rustc rustc_front syntax
7978
DEPS_rustc_typeck := rustc syntax rustc_front rustc_platform_intrinsics
8079
DEPS_rustc_borrowck := rustc rustc_front log graphviz syntax
8180
DEPS_rustc_resolve := rustc rustc_front log syntax

branches/tmp/mk/main.mk

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -172,18 +172,6 @@ RUST_LIB_FLAGS_ST3 += -C prefer-dynamic
172172
# by not emitting them.
173173
RUSTFLAGS_STAGE0 += -Z no-landing-pads
174174

175-
# Enable MIR to "always build" for crates where this works. This is
176-
# just temporary while MIR is being actively built up -- it's just a
177-
# poor man's unit testing infrastructure. Anyway we only want this for
178-
# stage1/stage2.
179-
define ADD_MIR_FLAG
180-
RUSTFLAGS1_$(1) += -Z always-build-mir
181-
RUSTFLAGS2_$(1) += -Z always-build-mir
182-
endef
183-
$(foreach crate,$(TARGET_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
184-
$(foreach crate,$(RUSTC_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
185-
$(foreach crate,$(HOST_CRATES),$(eval $(call ADD_MIR_FLAG,$(crate))))
186-
187175
# platform-specific auto-configuration
188176
include $(CFG_SRC_DIR)mk/platform.mk
189177

branches/tmp/mk/rt.mk

Lines changed: 6 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -259,10 +259,8 @@ BACKTRACE_NAME_$(1) := $$(call CFG_STATIC_LIB_NAME_$(1),backtrace)
259259
BACKTRACE_LIB_$(1) := $$(RT_OUTPUT_DIR_$(1))/$$(BACKTRACE_NAME_$(1))
260260
BACKTRACE_BUILD_DIR_$(1) := $$(RT_OUTPUT_DIR_$(1))/libbacktrace
261261

262-
# We don't use this on platforms that aren't linux-based (with the exception of
263-
# msys2/mingw builds on windows, which use it to read the dwarf debug
264-
# information) so just make the file available, the compilation of libstd won't
265-
# actually build it.
262+
# We don't use this on platforms that aren't linux-based, so just make the file
263+
# available, the compilation of libstd won't actually build it.
266264
ifeq ($$(findstring darwin,$$(OSTYPE_$(1))),darwin)
267265
# See comment above
268266
$$(BACKTRACE_LIB_$(1)):
@@ -275,7 +273,7 @@ $$(BACKTRACE_LIB_$(1)):
275273
touch $$@
276274
else
277275

278-
ifeq ($$(findstring msvc,$(1)),msvc)
276+
ifeq ($$(CFG_WINDOWSY_$(1)),1)
279277
# See comment above
280278
$$(BACKTRACE_LIB_$(1)):
281279
touch $$@
@@ -298,25 +296,16 @@ endif
298296
# ./configure script. This is done to force libbacktrace to *not* use the
299297
# atomic/sync functionality because it pulls in unnecessary dependencies and we
300298
# never use it anyway.
301-
#
302-
# We also use `env PWD=` to clear the PWD environment variable, and then
303-
# execute the command in a new shell. This is necessary to workaround a
304-
# buildbot/msys2 bug: the shell is launched with PWD set to a windows-style path,
305-
# which results in all further uses of `pwd` also printing a windows-style path,
306-
# which breaks libbacktrace's configure script. Clearing PWD within the same
307-
# shell is not sufficient.
308-
309299
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
310300
@$$(call E, configure: libbacktrace for $(1))
311301
$$(Q)rm -rf $$(BACKTRACE_BUILD_DIR_$(1))
312302
$$(Q)mkdir -p $$(BACKTRACE_BUILD_DIR_$(1))
313-
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && env \
314-
PWD= \
303+
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && \
315304
CC="$$(CC_$(1))" \
316305
AR="$$(AR_$(1))" \
317306
RANLIB="$$(AR_$(1)) s" \
318307
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) -fno-stack-protector" \
319-
$(S)src/libbacktrace/configure --build=$(CFG_GNU_TRIPLE_$(CFG_BUILD)) --host=$(CFG_GNU_TRIPLE_$(1)))
308+
$(S)src/libbacktrace/configure --target=$(1) --host=$(CFG_BUILD))
320309
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
321310
$$(BACKTRACE_BUILD_DIR_$(1))/config.h
322311
$$(Q)echo '#undef HAVE_SYNC_FUNCTIONS' >> \
@@ -328,7 +317,7 @@ $$(BACKTRACE_LIB_$(1)): $$(BACKTRACE_BUILD_DIR_$(1))/Makefile $$(MKFILE_DEPS)
328317
INCDIR=$(S)src/libbacktrace
329318
$$(Q)cp $$(BACKTRACE_BUILD_DIR_$(1))/.libs/libbacktrace.a $$@
330319

331-
endif # endif for msvc
320+
endif # endif for windowsy
332321
endif # endif for ios
333322
endif # endif for darwin
334323

branches/tmp/mk/target.mk

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,6 @@ $$(TLIB$(1)_T_$(2)_H_$(3))/stamp.$(4): \
9393
$$(LLVM_LIBDIR_RUSTFLAGS_$(2)) \
9494
$$(LLVM_STDCPP_RUSTFLAGS_$(2)) \
9595
$$(RUSTFLAGS_$(4)) \
96-
$$(RUSTFLAGS$(1)_$(4)) \
9796
$$(RUSTFLAGS$(1)_$(4)_T_$(2)) \
9897
--out-dir $$(@D) \
9998
-C extra-filename=-$$(CFG_FILENAME_EXTRA) \

branches/tmp/src/doc/grammar.md

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ type_path_tail : '<' type_expr [ ',' type_expr ] + '>'
281281
## Macros
282282

283283
```antlr
284-
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ';'
284+
expr_macro_rules : "macro_rules" '!' ident '(' macro_rule * ')' ';'
285285
| "macro_rules" '!' ident '{' macro_rule * '}' ;
286286
macro_rule : '(' matcher * ')' "=>" '(' transcriber * ')' ';' ;
287287
matcher : '(' matcher * ')' | '[' matcher * ']'
@@ -306,7 +306,7 @@ transcriber : '(' transcriber * ')' | '[' transcriber * ']'
306306

307307
```antlr
308308
item : vis ? mod_item | fn_item | type_item | struct_item | enum_item
309-
| const_item | static_item | trait_item | impl_item | extern_block_item ;
309+
| const_item | static_item | trait_item | impl_item | extern_block ;
310310
```
311311

312312
### Type Parameters
@@ -636,31 +636,31 @@ lambda_expr : '|' ident_list '|' expr ;
636636
### While loops
637637

638638
```antlr
639-
while_expr : [ lifetime ':' ] ? "while" no_struct_literal_expr '{' block '}' ;
639+
while_expr : [ lifetime ':' ] "while" no_struct_literal_expr '{' block '}' ;
640640
```
641641

642642
### Infinite loops
643643

644644
```antlr
645-
loop_expr : [ lifetime ':' ] ? "loop" '{' block '}';
645+
loop_expr : [ lifetime ':' ] "loop" '{' block '}';
646646
```
647647

648648
### Break expressions
649649

650650
```antlr
651-
break_expr : "break" [ lifetime ] ?;
651+
break_expr : "break" [ lifetime ];
652652
```
653653

654654
### Continue expressions
655655

656656
```antlr
657-
continue_expr : "continue" [ lifetime ] ?;
657+
continue_expr : "continue" [ lifetime ];
658658
```
659659

660660
### For expressions
661661

662662
```antlr
663-
for_expr : [ lifetime ':' ] ? "for" pat "in" no_struct_literal_expr '{' block '}' ;
663+
for_expr : [ lifetime ':' ] "for" pat "in" no_struct_literal_expr '{' block '}' ;
664664
```
665665

666666
### If expressions
@@ -688,12 +688,13 @@ match_pat : pat [ '|' pat ] * [ "if" expr ] ? ;
688688
```antlr
689689
if_let_expr : "if" "let" pat '=' expr '{' block '}'
690690
else_tail ? ;
691+
else_tail : "else" [ if_expr | if_let_expr | '{' block '}' ] ;
691692
```
692693

693694
### While let loops
694695

695696
```antlr
696-
while_let_expr : [ lifetime ':' ] ? "while" "let" pat '=' expr '{' block '}' ;
697+
while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
697698
```
698699

699700
### Return expressions
@@ -753,6 +754,8 @@ return_expr : "return" expr ? ;
753754
```antlr
754755
closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
755756
[ ':' bound-list ] [ '->' type ]
757+
procedure_type := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
758+
[ ':' bound-list ] [ '->' type ]
756759
lifetime-list := lifetime | lifetime ',' lifetime-list
757760
arg-list := ident ':' type | ident ':' type ',' arg-list
758761
bound-list := bound | bound '+' bound-list

branches/tmp/src/doc/index.md

Lines changed: 17 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,13 @@ series of small examples.
2020

2121
[rbe]: http://rustbyexample.com/
2222

23-
# Language Reference
24-
25-
Rust does not have an exact specification yet, but an effort to describe as much of
26-
the language in as much detail as possible is in [the reference](reference.html).
27-
28-
# Standard Library Reference
23+
# The Standard Library
2924

3025
We have [API documentation for the entire standard
3126
library](std/index.html). There's a list of crates on the left with more
3227
specific sections, or you can use the search bar at the top to search for
3328
something if you know its name.
3429

35-
# Tools
36-
37-
[Cargo](https://crates.io) is the Rust's package manager providing access to libraries
38-
beyond the standard one, and its website contains lots of good documentation.
39-
40-
[`rustdoc`](book/documentation.html) is the Rust's documentation generator, a tool converting
41-
annotated source code into HTML docs.
42-
43-
A bunch of non-official tools are available, such as [Racer](https://github.com/phildawes/racer)
44-
(code completion engine), or [rustfmt](https://github.com/nrc/rustfmt) (source code formatter),
45-
or text editor plugins.
46-
4730
# Community & Getting Help
4831

4932
If you need help with something, or just want to talk about Rust with others,
@@ -71,10 +54,25 @@ There is an active [subreddit](https://reddit.com/r/rust) with lots of
7154
discussion and news about Rust.
7255

7356
There is also a [user forum](https://users.rust-lang.org), for all
74-
user-oriented discussion, and a [developer
57+
user-oriented discussion, and a [developer
7558
forum](https://internals.rust-lang.org/), where the development of Rust
7659
itself is discussed.
7760

61+
# Specification
62+
63+
Rust does not have an exact specification, but an effort to describe as much of
64+
the language in as much detail as possible is in [the reference](reference.html).
65+
66+
# Tools
67+
68+
Rust is still a young language, so there isn't a ton of tooling yet, but the
69+
tools we have are really nice.
70+
71+
[Cargo](https://crates.io) is Rust's package manager, and its website contains
72+
lots of good documentation.
73+
74+
[`rustdoc`](book/documentation.html) is used to generate documentation for Rust code.
75+
7876
# FAQs
7977

8078
There are questions that are asked quite often, so we've made FAQs for them:

branches/tmp/src/doc/nomicon/vec-drain.md

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,14 @@ impl<'a, T> Drop for Drain<'a, T> {
129129
130130
impl<T> Vec<T> {
131131
pub fn drain(&mut self) -> Drain<T> {
132-
unsafe {
133-
let iter = RawValIter::new(&self);
134-
135-
// this is a mem::forget safety thing. If Drain is forgotten, we just
136-
// leak the whole Vec's contents. Also we need to do this *eventually*
137-
// anyway, so why not do it now?
138-
self.len = 0;
132+
// this is a mem::forget safety thing. If Drain is forgotten, we just
133+
// leak the whole Vec's contents. Also we need to do this eventually
134+
// anyway, so why not do it now?
135+
self.len = 0;
139136
137+
unsafe {
140138
Drain {
141-
iter: iter,
139+
iter: RawValIter::new(&self),
142140
vec: PhantomData,
143141
}
144142
}

branches/tmp/src/doc/nomicon/vec-final.md

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,16 +155,13 @@ impl<T> Vec<T> {
155155
}
156156

157157
pub fn drain(&mut self) -> Drain<T> {
158+
// this is a mem::forget safety thing. If this is forgotten, we just
159+
// leak the whole Vec's contents. Also we need to do this *eventually*
160+
// anyway, so why not do it now?
161+
self.len = 0;
158162
unsafe {
159-
let iter = RawValIter::new(&self);
160-
161-
// this is a mem::forget safety thing. If Drain is forgotten, we just
162-
// leak the whole Vec's contents. Also we need to do this *eventually*
163-
// anyway, so why not do it now?
164-
self.len = 0;
165-
166163
Drain {
167-
iter: iter,
164+
iter: RawValIter::new(&self),
168165
vec: PhantomData,
169166
}
170167
}

branches/tmp/src/doc/reference.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,6 +3200,16 @@ let z = match x { &0 => "zero", _ => "some" };
32003200
assert_eq!(y, z);
32013201
```
32023202

3203+
A pattern that's just an identifier, like `Nil` in the previous example, could
3204+
either refer to an enum variant that's in scope, or bind a new variable. The
3205+
compiler resolves this ambiguity by forbidding variable bindings that occur in
3206+
`match` patterns from shadowing names of variants that are in scope. For
3207+
example, wherever `List` is in scope, a `match` pattern would not be able to
3208+
bind `Nil` as a new name. The compiler interprets a variable pattern `x` as a
3209+
binding _only_ if there is no variant named `x` in scope. A convention you can
3210+
use to avoid conflicts is simply to name variants with upper-case letters, and
3211+
local variables with lower-case letters.
3212+
32033213
Multiple match patterns may be joined with the `|` operator. A range of values
32043214
may be specified with `...`. For example:
32053215

branches/tmp/src/doc/trpl/advanced-linking.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ formal `#[link(...)]` attribute on `extern` blocks instead.
3434

3535
# Static linking
3636

37-
Static linking refers to the process of creating output that contains all
38-
required libraries and so doesn't need libraries installed on every system where
37+
Static linking refers to the process of creating output that contain all
38+
required libraries and so don't need libraries installed on every system where
3939
you want to use your compiled project. Pure-Rust dependencies are statically
4040
linked by default so you can use created binaries and libraries without
4141
installing Rust everywhere. By contrast, native libraries

0 commit comments

Comments
 (0)