Commit Graph

77126 Commits

Author SHA1 Message Date
Jorge Aparicio
b61a4c20c6 make the const constructor unstable 2018-05-07 12:11:22 +02:00
Jorge Aparicio
2843e648c2 turn ManuallyDrop::new into a constant function 2018-04-21 23:22:27 +02:00
bors
d2577ca1ec Auto merge of #50093 - alexcrichton:android-uwtable, r=michaelwoerister
rustc: Always emit `uwtable` on Android

Long ago (#40549) we enabled the `uwtable` attribute on Windows by default
(even with `-C panic=abort`) to allow unwinding binaries for [stack unwinding
information][winstack]. It looks like this same issue is [plaguing][arm1]
Gecko's Android platforms [as well][arm2]. This commit applies the same fix
as #40549 except that this time it's applied for all Android targets.

Generating a `-C panic=abort` binary for `armv7-linux-androideabi` before this
commit generated a number of `cantunwind` functions (detected with `readelf -u`)
but after this commit they all list appropriate unwind information.

Closes #49867

[winstack]: https://bugzilla.mozilla.org/show_bug.cgi?id=1302078
[arm1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1453220
[arm2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1451741
2018-04-21 16:18:22 +00:00
Alex Crichton
f7439a5a45 rustc: Always emit uwtable on Android
Long ago (#40549) we enabled the `uwtable` attribute on Windows by default
(even with `-C panic=abort`) to allow unwinding binaries for [stack unwinding
information][winstack]. It looks like this same issue is [plaguing][arm1]
Gecko's Android platforms [as well][arm2]. This commit applies the same fix
as #40549 except that this time it's applied for all Android targets.

Generating a `-C panic=abort` binary for `armv7-linux-androideabi` before this
commit generated a number of `cantunwind` functions (detected with `readelf -u`)
but after this commit they all list appropriate unwind information.

Closes #49867

[winstack]: https://bugzilla.mozilla.org/show_bug.cgi?id=1302078
[arm1]: https://bugzilla.mozilla.org/show_bug.cgi?id=1453220
[arm2]: https://bugzilla.mozilla.org/show_bug.cgi?id=1451741
2018-04-21 08:38:44 -07:00
bors
222551f3f3 Auto merge of #50120 - alexcrichton:more-proc-macro-gates, r=petrochenkov
rustc: Tweak custom attribute capabilities

This commit starts to lay some groundwork for the stabilization of custom
attribute invocations and general procedural macros. It applies a number of
changes discussed on [internals] as well as a [recent issue][issue], namely:

* The path used to specify a custom attribute must be of length one and cannot
  be a global path. This'll help future-proof us against any ambiguities and
  give us more time to settle the precise syntax. In the meantime though a bare
  identifier can be used and imported to invoke a custom attribute macro. A new
  feature gate, `proc_macro_path_invoc`, was added to gate multi-segment paths
  and absolute paths.

* The set of items which can be annotated by a custom procedural attribute has
  been restricted. Statements, expressions, and modules are disallowed behind
  two new feature gates: `proc_macro_expr` and `proc_macro_mod`.

* The input to procedural macro attributes has been restricted and adjusted.
  Today an invocation like `#[foo(bar)]` will receive `(bar)` as the input token
  stream, but after this PR it will only receive `bar` (the delimiters were
  removed). Invocations like `#[foo]` are still allowed and will be invoked in
  the same way as `#[foo()]`. This is a **breaking change** for all nightly
  users as the syntax coming in to procedural macros will be tweaked slightly.

* Procedural macros (`foo!()` style) can only be expanded to item-like items by
  default. A separate feature gate, `proc_macro_non_items`, is required to
  expand to items like expressions, statements, etc.

Closes #50038

[internals]: https://internals.rust-lang.org/t/help-stabilize-a-subset-of-macros-2-0/7252
[issue]: https://github.com/rust-lang/rust/issues/50038
2018-04-21 13:50:58 +00:00
bors
e59f78fb45 Auto merge of #50076 - spastorino:fix_exhaust_iter_in_debug, r=pnkfelix
Fix Iter exhaustion in prove_predicates when debug is on

Fixes the issue noted in this comment https://github.com/rust-lang/rust/pull/49885/files#r182560268

r? @pnkfelix
/cc @nikomatsakis
2018-04-21 11:26:09 +00:00
bors
9af69fe232 Auto merge of #50080 - klnusbaum:edition_49591, r=Manishearth
add --edition option

This adds an official `edition` flag to the rust compiler
2018-04-21 05:28:21 +00:00
Alex Crichton
79630d4fdf rustc: Tweak custom attribute capabilities
This commit starts to lay some groundwork for the stabilization of custom
attribute invocations and general procedural macros. It applies a number of
changes discussed on [internals] as well as a [recent issue][issue], namely:

* The path used to specify a custom attribute must be of length one and cannot
  be a global path. This'll help future-proof us against any ambiguities and
  give us more time to settle the precise syntax. In the meantime though a bare
  identifier can be used and imported to invoke a custom attribute macro. A new
  feature gate, `proc_macro_path_invoc`, was added to gate multi-segment paths
  and absolute paths.

* The set of items which can be annotated by a custom procedural attribute has
  been restricted. Statements, expressions, and modules are disallowed behind
  two new feature gates: `proc_macro_expr` and `proc_macro_mod`.

* The input to procedural macro attributes has been restricted and adjusted.
  Today an invocation like `#[foo(bar)]` will receive `(bar)` as the input token
  stream, but after this PR it will only receive `bar` (the delimiters were
  removed). Invocations like `#[foo]` are still allowed and will be invoked in
  the same way as `#[foo()]`. This is a **breaking change** for all nightly
  users as the syntax coming in to procedural macros will be tweaked slightly.

* Procedural macros (`foo!()` style) can only be expanded to item-like items by
  default. A separate feature gate, `proc_macro_non_items`, is required to
  expand to items like expressions, statements, etc.

Closes #50038

[internals]: https://internals.rust-lang.org/t/help-stabilize-a-subset-of-macros-2-0/7252
[issue]: https://github.com/rust-lang/rust/issues/50038
2018-04-20 19:56:16 -07:00
Kurtis Nusbaum
c8c9bf97e3 fix two compile-fail tests that were still using -Zedition 2018-04-20 18:51:59 -07:00
bors
b78853b6fd Auto merge of #50056 - alexcrichton:update-cargo, r=Mark-Simulacrum
Update the Cargo submodule
2018-04-21 00:50:12 +00:00
Kurtis Nusbaum
c1d8aa829c fix some small compile errors 2018-04-20 14:47:23 -07:00
bors
a10bb6b592 Auto merge of #50088 - alexcrichton:std-tweaks, r=sfackler
Tweak some stabilizations in libstd

This commit tweaks a few stable APIs in the `beta` branch before they hit
stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were
deleted (added in #49381, issue at #49657). The `and_modify` APIs added
in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure.

Closes #49581
Closes #49657
2018-04-20 20:40:59 +00:00
bors
05dc5e7d95 Auto merge of #50119 - kennytm:rollup, r=kennytm
Rollup of 7 pull requests

Successful merges:

 - #50031 (Clarified E0015 message.)
 - #50058 (Added build disk usage information)
 - #50081 (Update stdsimd submodule)
 - #50083 (wasm: Increase default stack size to 1MB)
 - #50104 (Disable auto-detection of libxml2 when compiling llvm.)
 - #50114 (Fix bad merge in #49991)
 - #50117 (must explicitly request file name when using with_file_name.)

Failed merges:
2018-04-20 16:45:19 +00:00
kennytm
53232e534c
Rollup merge of #50117 - pnkfelix:fix-issue-50113, r=oli-obk
must explicitly request file name when using with_file_name.

Fix #50113
2018-04-20 23:45:44 +08:00
kennytm
4ede038309
Rollup merge of #50114 - wesleywiser:patch-3, r=michaelwoerister
Fix bad merge in #49991

When I rebased #49991 on `master`, I messed up the merge for this line. I'm reverting this back to the way it was in f15e5c1.

r? @michaelwoerister
2018-04-20 23:45:43 +08:00
kennytm
a543dbf620
Rollup merge of #50104 - mixi:libxml2-llvm, r=alexcrichton
Disable auto-detection of libxml2 when compiling llvm.

This broke cross-compiling rustc with internal llvm (with both the host and target being executable on the machine), because llvm's build system detected libxml2 on the host, therefore auto-enabled libxml2 support, but wouldn't compile as the target didn't have libxml2 installed.
2018-04-20 23:45:42 +08:00
kennytm
fff68f761e
Rollup merge of #50083 - alexcrichton:increase-wasm-stack, r=michaelwoerister
wasm: Increase default stack size to 1MB

This commit increases the dfeault stack size allocated to the
wasm32-unknown-unknown target to 1MB by default. Currently the default stack
size is one wasm page, or 64 kilobytes. This default stack is quite small and
has caused a stack overflow or two in the wild by accident.

The current "best practice" for fixing this is to pass `-Clink-args='-z
stack-size=$bigger'` but that's not great nor always easy to do. A default of
1MB matches more closely with other platforms where it's "pretty big" by
default.

Note that it was tested and if the users uses `-C link-args` to pass a custom
stack size that's still resepected as lld seems to take the first argument, and
where rustc is passing it will always be last.
2018-04-20 23:45:41 +08:00
kennytm
aa078e1c9c
Rollup merge of #50081 - GuillaumeGomez:stdsimd-update, r=alexcrichton
Update stdsimd submodule
2018-04-20 23:45:39 +08:00
kennytm
0c7d6e73e5
Rollup merge of #50058 - krk:patch-1, r=Mark-Simulacrum
Added build disk usage information

Closes https://github.com/rust-lang/rust/issues/50019
2018-04-20 23:45:38 +08:00
kennytm
b0df8f09c1
Rollup merge of #50031 - krk:issue-46336, r=estebank
Clarified E0015 message.

Closes https://github.com/rust-lang/rust/issues/46336
2018-04-20 23:45:37 +08:00
Alex Crichton
924f8c7053 Update the Cargo submodule 2018-04-20 07:18:35 -07:00
Felix S. Klock II
042e1e0279 Fix #50113: must explicitly request file name when using with_file_name. 2018-04-20 16:11:05 +02:00
Wesley Wiser
ee9a4720ee
Fix bad merge in #49991
When I rebased #49991 on `master`, I messed up the merge for this line. I'm reverting this back to the way it was in f15e5c1.
2018-04-20 09:12:59 -04:00
bors
6586074426 Auto merge of #50062 - varkor:xpy-check-rustdoc, r=Mark-Simulacrum
Add rustdoc to x.py check

Modifying rustc can often cause errors in rustdoc, so it's useful to include it in the steps that are checked.

One thing that I was unsure about was when to call `clear_if_dirty` (both in this step, and in other steps in relation to this one) — we want to be sure rustdoc will always be rechecked after modifying previous steps — but does this belong in rustdoc, or the other steps?

Fixes #49917.

r? @Mark-Simulacrum
2018-04-20 12:52:50 +00:00
bors
85f5dd489e Auto merge of #50052 - nnethercote:char_lit, r=Mark-Simulacrum
Avoid allocating when parsing \u{...} literals.

`char_lit` uses an allocation in order to ignore '_' chars in \u{...}
literals. This patch changes it to not do that by processing the chars
more directly.

This improves various rustc-perf benchmark measurements by up to 6%,
particularly regex, futures, clap, coercions, hyper, and encoding.

rustc-perf results, on a stage 2 build with jemalloc disabled:

<details>

```
regex-check
	avg: -5.4%	min: -6.5%	max: -2.7%
futures-check
	avg: -3.5%	min: -5.3%	max: -1.7%
regex-opt
	avg: -2.0%	min: -5.1%	max: -0.2%
regex
	avg: -2.3%	min: -5.0%	max: -0.6%
futures-opt
	avg: -3.0%	min: -4.8%	max: -1.1%
futures
	avg: -3.1%	min: -4.8%	max: -1.3%
clap-rs-check
	avg: -1.8%	min: -3.5%	max: -0.9%
coercions-check
	avg: -2.0%	min: -3.3%	max: -1.0%
hyper-check
	avg: -2.2%	min: -3.1%	max: -1.3%
hyper
	avg: -1.3%	min: -2.4%	max: -0.3%
hyper-opt
	avg: -0.9%	min: -2.3%	max: -0.1%
coercions
	avg: -1.1%	min: -2.2%	max: -0.4%
encoding-check
	avg: -1.7%	min: -2.2%	max: -0.9%
clap-rs-opt
	avg: -0.7%	min: -2.2%	max: 0.0%
coercions-opt
	avg: -1.2%	min: -2.1%	max: -0.3%
clap-rs
	avg: -0.8%	min: -1.9%	max: -0.4%
encoding-opt
	avg: -1.0%	min: -1.9%	max: -0.3%
encoding
	avg: -1.1%	min: -1.9%	max: -0.4%
piston-image-check
	avg: -0.7%	min: -1.3%	max: -0.3%
inflate-opt
	avg: -0.3%	min: -0.9%	max: -0.0%
piston-image
	avg: -0.3%	min: -0.8%	max: -0.1%
piston-image-opt
	avg: -0.3%	min: -0.7%	max: -0.1%
syn-check
	avg: -0.3%	min: -0.6%	max: -0.1%
deep-vector
	avg: 0.1%	min: -0.1%	max: 0.5%
syn-opt
	avg: -0.1%	min: -0.4%	max: 0.0%
html5ever
	avg: -0.2%	min: -0.4%	max: -0.0%
deep-vector-check
	avg: 0.0%	min: -0.3%	max: 0.3%
syn
	avg: -0.2%	min: -0.3%	max: -0.1%
html5ever-check
	avg: -0.3%	min: -0.3%	max: -0.2%
issue-46449-check
	avg: -0.1%	min: -0.2%	max: 0.2%
html5ever-opt
	avg: -0.0%	min: -0.2%	max: 0.1%
deep-vector-opt
	avg: -0.0%	min: -0.2%	max: 0.1%
issue-46449-opt
	avg: -0.0%	min: -0.2%	max: 0.1%
unify-linearly-check
	avg: -0.0%	min: -0.2%	max: 0.1%
helloworld-check
	avg: 0.0%	min: -0.0%	max: 0.2%
parser-check
	avg: -0.0%	min: -0.2%	max: 0.0%
inflate
	avg: 0.0%	min: -0.0%	max: 0.1%
tokio-webpush-simple-check
	avg: -0.1%	min: -0.1%	max: -0.0%
regression-31157-check
	avg: 0.0%	min: -0.1%	max: 0.1%
issue-46449
	avg: 0.0%	min: -0.1%	max: 0.1%
tuple-stress-opt
	avg: 0.0%	min: -0.0%	max: 0.1%
tuple-stress-check
	avg: -0.0%	min: -0.1%	max: 0.1%
tuple-stress
	avg: 0.0%	min: -0.0%	max: 0.1%
deeply-nested-check
	avg: 0.0%	min: -0.0%	max: 0.1%
regression-31157
	avg: -0.0%	min: -0.1%	max: 0.1%
deeply-nested-opt
	avg: -0.0%	min: -0.1%	max: 0.1%
parser-opt
	avg: -0.0%	min: -0.1%	max: 0.0%
parser
	avg: 0.1%	min: 0.0%	max: 0.1%
tokio-webpush-simple
	avg: -0.0%	min: -0.1%	max: 0.1%
regression-31157-opt
	avg: -0.0%	min: -0.1%	max: 0.1%
helloworld-opt
	avg: 0.0%	min: -0.0%	max: 0.1%
unify-linearly-opt
	avg: 0.0%	min: -0.0%	max: 0.1%
unused-warnings-check
	avg: 0.0%	min: 0.0%	max: 0.1%
tokio-webpush-simple-opt
	avg: -0.0%	min: -0.1%	max: 0.0%
helloworld
	avg: -0.0%	min: -0.0%	max: 0.1%
unused-warnings
	avg: 0.0%	min: -0.0%	max: 0.0%
deeply-nested
	avg: -0.0%	min: -0.0%	max: -0.0%
unused-warnings-opt
	avg: 0.0%	min: -0.0%	max: 0.0%
unify-linearly
	avg: 0.0%	min: -0.0%	max: 0.0%
inflate-check
	avg: 0.0%	min: -0.0%	max: 0.0%
```

</details>
2018-04-20 10:40:25 +00:00
Johannes Nixdorf
b92e6c3de0 Disable auto-detection of libxml2 when compiling llvm. 2018-04-20 11:07:24 +02:00
bors
1a4443995c Auto merge of #49991 - wesleywiser:remove_hir_inlining, r=michaelwoerister
Remove HIR inlining

Fixes #49690

r? @michaelwoerister
2018-04-20 08:22:47 +00:00
bors
257d43d0d5 Auto merge of #50069 - alexcrichton:fix-proc-macro, r=nrc
proc_macro: Stay on the "use the cache" path more

Discovered in #50061 we're falling off the "happy path" of using a stringified
token stream more often than we should. This was due to the fact that a
user-written token like `0xf` is equality-different from the stringified token
of `15` (despite being semantically equivalent).

This patch updates the call to `eq_unspanned` with an even more awful solution,
`probably_equal_for_proc_macro`, which ignores the value of each token and
basically only compares the structure of the token stream, assuming that the AST
doesn't change just one token at a time.

While this is a step towards fixing #50061 there is still one regression
from #49154 which needs to be fixed.
2018-04-20 05:34:17 +00:00
Kurtis Nusbaum
320fdaa942 add EDITIONS_NAME_LIST, make edition tracked, enforce that only stable editions are allowed to be used on non-nightly builds 2018-04-19 21:03:21 -07:00
bors
f4a3df1f76 Auto merge of #50051 - nnethercote:no-env-var, r=Mark-Simulacrum
Lazily evaluate EvalErrorKind::*.into() calls.

eval_context.rs calls `ok_or` in multiple places with an eagerly
evaluated `EvalErrorKind::*.into()` argument, which calls
EvalError::from(), which calls env::var("MIRI_BACKTRACE"), which
allocates a String. This code is hot enough for this to have a
measurable effect on some benchmarks.

This patch changes the `ok_or` calls into `ok_or_else`, thus avoiding
the evaluations when they're not needed. As a result, most of the
rustc-perf benchmarks get a measurable speedup, particularly the
shorter-running ones, where the improvement is as high as 6%.

Output from rustc-perf, comparing stage 2 builds with jemalloc disabled:

<details>

```
coercions
	avg: -1.8%	min: -6.0%	max: -0.0%
helloworld-opt
	avg: -3.7%	min: -4.0%	max: -3.4%
helloworld
	avg: -3.7%	min: -3.9%	max: -3.5%
parser
	avg: -3.5%	min: -3.9%	max: -3.1%
unify-linearly-opt
	avg: -3.2%	min: -3.8%	max: -2.8%
unify-linearly
	avg: -3.2%	min: -3.7%	max: -2.8%
parser-opt
	avg: -3.2%	min: -3.6%	max: -2.8%
clap-rs
	avg: -0.9%	min: -3.6%	max: 0.1%
encoding
	avg: -1.9%	min: -3.0%	max: -1.2%
clap-rs-opt
	avg: -0.8%	min: -2.7%	max: -0.1%
helloworld-check
	avg: -1.9%	min: -2.2%	max: -1.7%
deeply-nested-check
	avg: -1.4%	min: -2.1%	max: -0.9%
issue-46449-opt
	avg: -0.7%	min: -2.0%	max: -0.3%
unify-linearly-check
	avg: -1.5%	min: -1.9%	max: -1.2%
issue-46449
	avg: -1.0%	min: -1.8%	max: -0.8%
deeply-nested-opt
	avg: -0.7%	min: -1.7%	max: -0.2%
deeply-nested
	avg: -1.0%	min: -1.6%	max: -0.6%
parser-check
	avg: -1.3%	min: -1.6%	max: -0.8%
encoding-check
	avg: -1.5%	min: -1.6%	max: -1.2%
tuple-stress
	avg: -0.9%	min: -1.5%	max: 0.0%
tuple-stress-opt
	avg: -1.0%	min: -1.5%	max: -0.3%
issue-46449-check
	avg: -1.3%	min: -1.4%	max: -1.0%
encoding-opt
	avg: -1.1%	min: -1.2%	max: -0.9%
regression-31157
	avg: -0.7%	min: -1.2%	max: -0.2%
regression-31157-check
	avg: -0.8%	min: -1.2%	max: -0.5%
futures-check
	avg: -0.8%	min: -1.2%	max: -0.4%
unused-warnings-opt
	avg: -1.0%	min: -1.2%	max: -0.9%
unused-warnings
	avg: -1.0%	min: -1.1%	max: -0.9%
coercions-opt
	avg: -0.6%	min: -1.0%	max: -0.2%
inflate-check
	avg: -0.4%	min: -0.9%	max: -0.1%
regex-check
	avg: -0.8%	min: -0.9%	max: -0.5%
piston-image-check
	avg: -0.8%	min: -0.9%	max: -0.8%
deep-vector
	avg: -0.3%	min: -0.9%	max: 0.1%
futures
	avg: -0.5%	min: -0.8%	max: -0.2%
futures-opt
	avg: -0.5%	min: -0.7%	max: -0.1%
html5ever
	avg: -0.6%	min: -0.7%	max: -0.4%
tokio-webpush-simple-check
	avg: -0.2%	min: -0.7%	max: 0.1%
piston-image-opt
	avg: -0.3%	min: -0.7%	max: -0.1%
regex
	avg: -0.4%	min: -0.7%	max: -0.1%
piston-image
	avg: -0.4%	min: -0.7%	max: -0.2%
regex-opt
	avg: -0.3%	min: -0.7%	max: 0.1%
tokio-webpush-simple-opt
	avg: -0.2%	min: -0.6%	max: 0.0%
coercions-check
	avg: -0.3%	min: -0.6%	max: -0.1%
hyper
	avg: -0.4%	min: -0.6%	max: -0.2%
syn-opt
	avg: -0.3%	min: -0.6%	max: -0.0%
hyper-check
	avg: -0.5%	min: -0.6%	max: -0.3%
syn-check
	avg: -0.4%	min: -0.5%	max: -0.2%
hyper-opt
	avg: -0.3%	min: -0.5%	max: -0.1%
html5ever-opt
	avg: -0.3%	min: -0.5%	max: -0.2%
syn
	avg: -0.2%	min: -0.4%	max: -0.1%
deep-vector-opt
	avg: -0.2%	min: -0.4%	max: 0.1%
tokio-webpush-simple
	avg: -0.2%	min: -0.4%	max: -0.1%
inflate
	avg: -0.2%	min: -0.4%	max: -0.1%
inflate-opt
	avg: -0.2%	min: -0.4%	max: -0.0%
regression-31157-opt
	avg: -0.1%	min: -0.4%	max: 0.0%
html5ever-check
	avg: -0.3%	min: -0.4%	max: -0.2%
unused-warnings-check
	avg: -0.2%	min: -0.3%	max: -0.2%
script-servo-check
	avg: -0.1%	min: -0.3%	max: 0.0%
crates.io-check
	avg: -0.2%	min: -0.3%	max: -0.0%
script-servo
	avg: -0.1%	min: -0.2%	max: 0.0%
clap-rs-check
	avg: 0.0%	min: -0.1%	max: 0.2%
deep-vector-check
	avg: -0.0%	min: -0.2%	max: 0.2%
tuple-stress-check
	avg: -0.1%	min: -0.2%	max: 0.0%
crates.io-opt
	avg: -0.1%	min: -0.2%	max: 0.0%
crates.io
	avg: -0.1%	min: -0.2%	max: -0.0%
script-servo-opt
	avg: -0.0%	min: -0.1%	max: 0.0%
```

</details>
2018-04-20 01:41:34 +00:00
Wesley Wiser
4a77d35c1e Remove HIR inlining
Fixes #49690
2018-04-19 20:33:18 -04:00
Alex Crichton
ca79ba300a Tweak some stabilizations in libstd
This commit tweaks a few stable APIs in the `beta` branch before they hit
stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were
deleted (added in #49381, issue at #49657). The `and_modify` APIs added
in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure.

Closes #49581
Closes #49657
2018-04-19 16:53:12 -07:00
bors
230b97af1c Auto merge of #48553 - seanmonstar:atomic-debug, r=alexcrichton
atomic: remove 'Atomic*' from Debug output

For the same reason that we don't show `Vec { data: [0, 1, 2, 3] }`, but just the array, the `AtomicUsize(1000)` is noisy, and seeing just `1000` is likely better.
2018-04-19 23:08:16 +00:00
Alex Crichton
e58629b990 wasm: Increase default stack size to 1MB
This commit increases the dfeault stack size allocated to the
wasm32-unknown-unknown target to 1MB by default. Currently the default stack
size is one wasm page, or 64 kilobytes. This default stack is quite small and
has caused a stack overflow or two in the wild by accident.

The current "best practice" for fixing this is to pass `-Clink-args='-z
stack-size=$bigger'` but that's not great nor always easy to do. A default of
1MB matches more closely with other platforms where it's "pretty big" by
default.

Note that it was tested and if the users uses `-C link-args` to pass a custom
stack size that's still resepected as lld seems to take the first argument, and
where rustc is passing it will always be last.
2018-04-19 14:51:59 -07:00
Guillaume Gomez
2d266e1d11 Update stdsimd submodule 2018-04-19 23:47:28 +02:00
Kurtis Nusbaum
51f51109ce add --edition option 2018-04-19 13:57:01 -07:00
varkor
261da7108d Ensure CleanTools is run for check rustdoc 2018-04-19 19:20:55 +01:00
varkor
baf940d580 Add rustdoc to x.py check
This can often encounter errors after modifying rustc, so it's useful to include it in the steps that are checked.
2018-04-19 19:06:34 +01:00
bors
8830a03043 Auto merge of #50020 - oli-obk:clippy, r=Manishearth
Update clippy

r? @Manishearth
2018-04-19 16:39:57 +00:00
Santiago Pastorino
55054eede6
Fix Iter exhaustion in prove_predicates when debug is on
ht @tamird
2018-04-19 13:11:14 -03:00
bors
8a28d94ea1 Auto merge of #49900 - pnkfelix:compare-mode-nll-followup-3, r=nikomatsakis
Add src/test/ui regression testing for NLL

This PR changes `x.py test` so that when you are running the `ui` test suite, it will also always run `compiletest` in the new `--compare-mode=nll`, which just double-checks that when running under the experimental NLL mode, the output matches the `<source-name>.nll.stderr` file, if present.

In order to reduce the chance of a developer revolt in response to this change, this PR also includes some changes to make the `--compare-mode=nll` more user-friendly:

 1. It now generates nll-specific .stamp files, and uses them (so that repeated runs can reuse previously cached results).
 2. Each line of terminal output distinguishes whether we are running under `--compare-mode=nll` by printing with the prefix `[ui (nll)]` instead of just the prefix `[ui]`.

Subtask of rust-lang/rust#48879
2018-04-19 11:13:10 +00:00
bors
5fe6b58dfc Auto merge of #49949 - oli-obk:const_signed_pat, r=eddyb
Sign extend constants in range patterns

fixes  #49940

r? @Mark-Simulacrum
2018-04-19 08:41:35 +00:00
Oliver Schneider
b22c9c01fb
Sign extend constants in range patterns 2018-04-19 09:01:27 +02:00
Oliver Schneider
0f1f9a79f2
Update clippy 2018-04-19 08:52:52 +02:00
bors
78fc510743 Auto merge of #49890 - varkor:xpy-check-rustc_trans, r=alexcrichton
Add rustc_trans to x.py check

r? @Mark-Simulacrum

I looked at `bootstrap/compile.rs` and `bootstrap/check.rs` to try to work out which steps were appropriate, but I'm sure I've overlooked some details here, so it's worth checking carefully I've got all the steps right (e.g. I wasn't sure whether we want to build LLVM if necessary with `x.py check`, though I thought it was probably better to than to not).

From a quick test, it seems to be working, though.
2018-04-19 06:19:27 +00:00
bors
883bf4ba2e Auto merge of #49630 - npmccallum:shl, r=alexcrichton
Update Rhs on ShlAssign to default to Self

This matches the behavior on ShrAssign and all other *Assign operations.
2018-04-19 03:53:32 +00:00
Alex Crichton
e9348738fc proc_macro: Stay on the "use the cache" path more
Discovered in #50061 we're falling off the "happy path" of using a stringified
token stream more often than we should. This was due to the fact that a
user-written token like `0xf` is equality-different from the stringified token
of `15` (despite being semantically equivalent).

This patch updates the call to `eq_unspanned` with an even more awful solution,
`probably_equal_for_proc_macro`, which ignores the value of each token and
basically only compares the structure of the token stream, assuming that the AST
doesn't change just one token at a time.

While this is a step towards fixing #50061 there is still one regression
from #49154 which needs to be fixed.
2018-04-18 19:36:48 -07:00
bors
5dc896e9e7 Auto merge of #50048 - glandium:issue50041, r=eddyb
rustc_trans: also check dominators for SSA values in mir::analyze

Fixes #50041
2018-04-19 01:13:29 +00:00
Nicholas Nethercote
9f145022ef Avoid allocating when parsing \u{...} literals.
`char_lit` uses an allocation in order to ignore '_' chars in \u{...}
literals. This patch changes it to not do that by processing the chars
more directly.

This improves various rustc-perf benchmark measurements by up to 6%,
particularly regex, futures, clap, coercions, hyper, and encoding.
2018-04-19 09:17:40 +10:00
varkor
86acb09273
Add rerun-if-env-changed=RUST_CHECK to librustc_llvm 2018-04-19 00:09:41 +01:00