Skip to content

Commit 40df3cd

Browse files
committed
---
yaml --- r: 231789 b: refs/heads/auto c: 3610c73 h: refs/heads/master i: 231787: 7ea3b7c v: v3
1 parent d0e99bb commit 40df3cd

File tree

113 files changed

+3300
-732
lines changed

Some content is hidden

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

113 files changed

+3300
-732
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ refs/tags/release-0.3: b5f0d0f648d9a6153664837026ba1be43d3e2503
88
refs/tags/release-0.3.1: 495bae036dfe5ec6ceafd3312b4dca48741e845b
99
refs/tags/release-0.4: e828ea2080499553b97dfe33b3f4d472b4562ad7
1010
refs/tags/release-0.5: 7e3bcfbf21278251ee936ad53e92e9b719702d73
11-
refs/heads/auto: f44fbf08f95e86e0eabdb492e8d003ccfcefa258
11+
refs/heads/auto: 3610c731f3b0182f79bf002cb30eb994b9ddfed9
1212
refs/tags/release-0.6: b4ebcfa1812664df5e142f0134a5faea3918544c
1313
refs/tags/0.1: b19db808c2793fe2976759b85a355c3ad8c8b336
1414
refs/tags/0.2: 1754d02027f2924bed83b0160ee340c7f41d5ea1

branches/auto/configure

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1180,16 +1180,27 @@ 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+
11831194
# Use the REG program to figure out where VS is installed
11841195
# We need to figure out where cl.exe and link.exe are, so we do some
11851196
# munging and some probing here. We also look for the default
11861197
# INCLUDE and LIB variables for MSVC so we can set those in the
11871198
# build system as well.
1188-
install=$(reg QUERY \
1199+
install=$(cmd //c reg QUERY \
11891200
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\14.0' \
11901201
-v InstallDir)
11911202
if [ -z "$install" ]; then
1192-
install=$(reg QUERY \
1203+
install=$(cmd //c reg QUERY \
11931204
'HKLM\SOFTWARE\Wow6432Node\Microsoft\VisualStudio\12.0' \
11941205
-v InstallDir)
11951206
fi
@@ -1222,9 +1233,9 @@ do
12221233
eval CFG_MSVC_LINK_$bits="\"$bindir/link.exe\""
12231234

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

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

branches/auto/mk/rt.mk

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -259,8 +259,10 @@ 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, so just make the file
263-
# available, the compilation of libstd won't actually build it.
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.
264266
ifeq ($$(findstring darwin,$$(OSTYPE_$(1))),darwin)
265267
# See comment above
266268
$$(BACKTRACE_LIB_$(1)):
@@ -273,7 +275,7 @@ $$(BACKTRACE_LIB_$(1)):
273275
touch $$@
274276
else
275277

276-
ifeq ($$(CFG_WINDOWSY_$(1)),1)
278+
ifeq ($$(findstring msvc,$(1)),msvc)
277279
# See comment above
278280
$$(BACKTRACE_LIB_$(1)):
279281
touch $$@
@@ -296,16 +298,25 @@ endif
296298
# ./configure script. This is done to force libbacktrace to *not* use the
297299
# atomic/sync functionality because it pulls in unnecessary dependencies and we
298300
# 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+
299309
$$(BACKTRACE_BUILD_DIR_$(1))/Makefile: $$(BACKTRACE_DEPS) $$(MKFILE_DEPS)
300310
@$$(call E, configure: libbacktrace for $(1))
301311
$$(Q)rm -rf $$(BACKTRACE_BUILD_DIR_$(1))
302312
$$(Q)mkdir -p $$(BACKTRACE_BUILD_DIR_$(1))
303-
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && \
313+
$$(Q)(cd $$(BACKTRACE_BUILD_DIR_$(1)) && env \
314+
PWD= \
304315
CC="$$(CC_$(1))" \
305316
AR="$$(AR_$(1))" \
306317
RANLIB="$$(AR_$(1)) s" \
307318
CFLAGS="$$(CFG_GCCISH_CFLAGS_$(1):-Werror=) -fno-stack-protector" \
308-
$(S)src/libbacktrace/configure --target=$(1) --host=$(CFG_BUILD))
319+
$(S)src/libbacktrace/configure --build=$(CFG_GNU_TRIPLE_$(CFG_BUILD)) --host=$(CFG_GNU_TRIPLE_$(1)))
309320
$$(Q)echo '#undef HAVE_ATOMIC_FUNCTIONS' >> \
310321
$$(BACKTRACE_BUILD_DIR_$(1))/config.h
311322
$$(Q)echo '#undef HAVE_SYNC_FUNCTIONS' >> \
@@ -317,7 +328,7 @@ $$(BACKTRACE_LIB_$(1)): $$(BACKTRACE_BUILD_DIR_$(1))/Makefile $$(MKFILE_DEPS)
317328
INCDIR=$(S)src/libbacktrace
318329
$$(Q)cp $$(BACKTRACE_BUILD_DIR_$(1))/.libs/libbacktrace.a $$@
319330

320-
endif # endif for windowsy
331+
endif # endif for msvc
321332
endif # endif for ios
322333
endif # endif for darwin
323334

branches/auto/src/doc/grammar.md

Lines changed: 8 additions & 11 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 ;
309+
| const_item | static_item | trait_item | impl_item | extern_block_item ;
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,13 +688,12 @@ 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 '}' ] ;
692691
```
693692

694693
### While let loops
695694

696695
```antlr
697-
while_let_expr : "while" "let" pat '=' expr '{' block '}' ;
696+
while_let_expr : [ lifetime ':' ] ? "while" "let" pat '=' expr '{' block '}' ;
698697
```
699698

700699
### Return expressions
@@ -754,8 +753,6 @@ return_expr : "return" expr ? ;
754753
```antlr
755754
closure_type := [ 'unsafe' ] [ '<' lifetime-list '>' ] '|' arg-list '|'
756755
[ ':' bound-list ] [ '->' type ]
757-
procedure_type := 'proc' [ '<' lifetime-list '>' ] '(' arg-list ')'
758-
[ ':' bound-list ] [ '->' type ]
759756
lifetime-list := lifetime | lifetime ',' lifetime-list
760757
arg-list := ident ':' type | ident ':' type ',' arg-list
761758
bound-list := bound | bound '+' bound-list

branches/auto/src/doc/reference.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3200,16 +3200,6 @@ 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-
32133203
Multiple match patterns may be joined with the `|` operator. A range of values
32143204
may be specified with `...`. For example:
32153205

branches/auto/src/doc/trpl/choosing-your-guarantees.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
% Choosing your Guarantees
22

3-
One important feature of Rust as language is that it lets us control the costs and guarantees
3+
One important feature of Rust is that it lets us control the costs and guarantees
44
of a program.
55

66
There are various &ldquo;wrapper type&rdquo; abstractions in the Rust standard library which embody
@@ -18,9 +18,9 @@ Before proceeding, it is highly recommended that one reads about [ownership][own
1818

1919
## `Box<T>`
2020

21-
[`Box<T>`][box] is pointer which is &ldquo;owned&rdquo;, or a &ldquo;box&rdquo;. While it can hand
22-
out references to the contained data, it is the only owner of the data. In particular, when
23-
something like the following occurs:
21+
[`Box<T>`][box] is an &ldquo;owned&rdquo; pointer, or a &ldquo;box&rdquo;. While it can hand
22+
out references to the contained data, it is the only owner of the data. In particular, consider
23+
the following:
2424

2525
```rust
2626
let x = Box::new(1);
@@ -40,7 +40,7 @@ allowed to share references to this by the regular borrowing rules, checked at c
4040

4141
[box]: ../std/boxed/struct.Box.html
4242

43-
## `&T` and `&mut T`
43+
## `&T` and `&mut T`
4444

4545
These are immutable and mutable references respectively. They follow the &ldquo;read-write lock&rdquo;
4646
pattern, such that one may either have only one mutable reference to some data, or any number of
@@ -243,7 +243,7 @@ Many of the types above cannot be used in a threadsafe manner. Particularly, `Rc
243243
`RefCell<T>`, which both use non-atomic reference counts (_atomic_ reference counts are those which
244244
can be incremented from multiple threads without causing a data race), cannot be used this way. This
245245
makes them cheaper to use, but we need thread safe versions of these too. They exist, in the form of
246-
`Arc<T>` and `Mutex<T>`/`RWLock<T>`
246+
`Arc<T>` and `Mutex<T>`/`RwLock<T>`
247247

248248
Note that the non-threadsafe types _cannot_ be sent between threads, and this is checked at compile
249249
time.

branches/auto/src/doc/trpl/deref-coercions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,8 @@ Vectors can `Deref` to a slice.
8989

9090
## Deref and method calls
9191

92-
`Deref` will also kick in when calling a method. In other words, these are
93-
the same two things in Rust:
92+
`Deref` will also kick in when calling a method. Consider the following
93+
example.
9494

9595
```rust
9696
struct Foo;
@@ -99,13 +99,13 @@ impl Foo {
9999
fn foo(&self) { println!("Foo"); }
100100
}
101101

102-
let f = Foo;
102+
let f = &&Foo;
103103

104104
f.foo();
105105
```
106106

107-
Even though `f` isn’t a reference, and `foo` takes `&self`, this works.
108-
That’s because these things are the same:
107+
Even though `f` is a `&&Foo` and `foo` takes `&self`, this works. That’s
108+
because these things are the same:
109109

110110
```rust,ignore
111111
f.foo();

branches/auto/src/doc/trpl/the-stack-and-the-heap.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ local variables and some other information. This is called a ‘stack frame’,
3838
for the purpose of this tutorial, we’re going to ignore the extra information
3939
and just consider the local variables we’re allocating. So in this case, when
4040
`main()` is run, we’ll allocate a single 32-bit integer for our stack frame.
41-
This is automatically handled for you, as you can see, we didn’t have to write
41+
This is automatically handled for you, as you can see; we didn’t have to write
4242
any special Rust code or anything.
4343

4444
When the function is over, its stack frame gets deallocated. This happens
@@ -51,7 +51,7 @@ we’ll throw them all away at the same time as well, we can get rid of it very
5151
fast too.
5252

5353
The downside is that we can’t keep values around if we need them for longer
54-
than a single function. We also haven’t talked about what that name, ‘stack’
54+
than a single function. We also haven’t talked about what the word, ‘stack’,
5555
means. To do that, we need a slightly more complicated example:
5656

5757
```rust

branches/auto/src/etc/platform-intrinsics/aarch64.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,48 @@
336336
"ret": "i8",
337337
"args": ["0"]
338338
},
339+
{
340+
"intrinsic": "ld2{0[0].width}_{0[0].data_type}",
341+
"width": [64, 128],
342+
"llvm": "ld2.{0[0].llvm_name}.{1.llvm_name}",
343+
"ret": ["[i(8-64);2]","[f(32-64);2]"],
344+
"args": ["0.0SPc/0.0"]
345+
},
346+
{
347+
"intrinsic": "ld3{0[0].width}_{0[0].data_type}",
348+
"width": [64, 128],
349+
"llvm": "ld3.{0[0].llvm_name}.{1.llvm_name}",
350+
"ret": ["[i(8-64);3]","[f(32-64);3]"],
351+
"args": ["0.0SPc/0.0"]
352+
},
353+
{
354+
"intrinsic": "ld4{0[0].width}_{0[0].data_type}",
355+
"width": [64, 128],
356+
"llvm": "ld4.{0[0].llvm_name}.{1.llvm_name}",
357+
"ret": ["[i(8-64);4]","[f(32-64);4]"],
358+
"args": ["0.0SPc/0.0"]
359+
},
360+
{
361+
"intrinsic": "ld2{0[0].width}_dup_{0[0].data_type}",
362+
"width": [64, 128],
363+
"llvm": "ld2.{0[0].llvm_name}.{1.llvm_name}",
364+
"ret": ["[i(8-64);2]","[f(32-64);2]"],
365+
"args": ["0.0SPc"]
366+
},
367+
{
368+
"intrinsic": "ld3{0[0].width}_dup_{0[0].data_type}",
369+
"width": [64, 128],
370+
"llvm": "ld3.{0[0].llvm_name}.{1.llvm_name}",
371+
"ret": ["[i(8-64);3]","[f(32-64);3]"],
372+
"args": ["0.0SPc"]
373+
},
374+
{
375+
"intrinsic": "ld4{0[0].width}_dup_{0[0].data_type}",
376+
"width": [64, 128],
377+
"llvm": "ld4.{0[0].llvm_name}.{1.llvm_name}",
378+
"ret": ["[i(8-64);4]","[f(32-64);4]"],
379+
"args": ["0.0SPc"]
380+
},
339381
{
340382
"intrinsic": "padd{0.width}_{0.data_type}",
341383
"width": [64, 128],

0 commit comments

Comments
 (0)