Commit Graph

67521 Commits

Author SHA1 Message Date
Felix S. Klock II
f2892ad281 Emit EndRegion statements when given -Z mir-emit-validate=N (for N > 0).
This way the miri test suite does not have to be updated to explcitly
request `-Z emit-end-regions`.
2017-09-05 15:28:08 +02:00
Felix S. Klock II
c11f3e36c8 Update regression test to explicit enable EndRegion emission. 2017-09-05 15:19:55 +02:00
Felix S. Klock II
8da717daa4 Update mir-opt/end_region_*.rs tests to explicit enable EndRegion emission. 2017-09-05 15:19:55 +02:00
Felix S. Klock II
f1c721caa7 Skip EndRegion emission by default. Use -Z emit-end-regions to reenable it.
The main intent is to fix cases where EndRegion emission is believed
to be causing excess peak memory pressure.

It may also be a welcome change to people inspecting the MIR output
who find the EndRegions to be a distraction.
2017-09-05 15:19:55 +02:00
Ariel Ben-Yehuda
d14ed92f6b Avoid hashing when creating a DepNode from a HirId
Instead, combine the already-present DefPathHash with the 32-bit
ItemLocalIndex.

Should fix #44323.
2017-09-05 15:19:07 +03:00
Wonwoo Choi
258ec30116 Expect pipe symbol after closure parameter lists 2017-09-05 18:25:42 +09:00
bors
2f1ef9ef11 Auto merge of #44308 - eddyb:local-index, r=arielb1
[MIR] Restrict ProjectionElem::Index and Storage{Live,Dead} to Local.

(see #44285)

r? @nikomatsakis
2017-09-05 04:56:03 +00:00
Wangshan Lu
280e6d8f17 Fix link typo in 1.20.0 release notes 2017-09-05 12:27:14 +08:00
Jacob Kiesel
b762283e57 Add panic unit tests 2017-09-04 21:39:46 -06:00
bors
2f681bf602 Auto merge of #44248 - oli-obk:spans, r=jseyfried
Produce expansion info for more builtin macros

r? @jseyfried

fixes #43268
2017-09-05 02:21:02 +00:00
Max Comstock
7d94ca618c Removed the incorrect documentation for from_str 2017-09-04 22:16:15 -04:00
kennytm
aa6bd117bb
Fix missing line numbers on i686. 2017-09-05 08:41:43 +08:00
Alexander von Gluck IV
1c5bf2468b std/time: Give an example to get UNIX_EPOCH in seconds 2017-09-04 19:21:58 -05:00
Eh2406
b88ec735aa #12808 is closed remove the FIXME 2017-09-04 20:06:39 -04:00
Eh2406
e90f4236e0 #33490 is closed remove the FIXME 2017-09-04 19:59:16 -04:00
bors
22d65983b9 Auto merge of #43067 - pornel:libdeps, r=nrc
Compact display of static lib dependencies

Fixes #33173

Instead of displaying one dependency per line, I've changed the format to display them all in one line.

As a bonus they're in format of linker flags (`-lfoo`), so the output can be copy&pasted if one is actually going to link as suggested.
2017-09-04 23:06:59 +00:00
est31
76fae7197b Fix tests 2017-09-05 00:23:34 +02:00
Niels Egberts
69c472897f Make slice::split_at_mut example demonstrate mutability
Moved the examples from split_at_mut to split_at so the example at
split_at_mut can just demonstrate mutability.
2017-09-04 22:59:34 +01:00
est31
b8cf07ee1f Improve DefIndex formatting to be more semantic 2017-09-04 22:57:22 +02:00
Jonathan A. Kollasch
fcefe36ce7 bootstrap: only include docs in extended distribution if enabled
Issue #44163
2017-09-04 15:42:11 -05:00
Evgeniy A. Dushistov
49f1fc5bb7 Add test for #22706
Closes #22706
2017-09-04 19:24:19 +03:00
Simon Sapin
9412fd7371 Only include git-commit-hash in tarballs when available
… instead of writing an empty file.
2017-09-04 16:30:36 +02:00
Ralf Jung
adbb820352 rustbook: remove dead test functions 2017-09-04 13:04:53 +02:00
bors
088216fb99 Auto merge of #44194 - QuietMisdreavus:hey-how-do-i-use-this-new-fangled-thing, r=aturon
expand on using rustup custom toolchains in CONTRIBUTING.md

fixes #42484

Should i include more notes about how to use a local build *without* rustup? It can kinda feel like a cop-out otherwise. Other means that come to mind are setting `$RUSTC` directly and fully installing it.

cc @rust-lang/docs
2017-09-04 10:33:53 +00:00
Lance Roy
94301c405c Additional traits for std::mem::ManuallyDrop
Add pass-through implementations for all of the derivable traits. These
cannot be derived since ManuallyDrop is a union.
2017-09-04 02:29:16 -07:00
Oliver Schneider
c4d5a1e17b
Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02:00
Lance Roy
6276dbd953 Derive std::mem::ManuallyDrop from Clone and Copy.
Although types that don't implement Drop can't be Copyable, this can
still be useful when ManuallyDrop is used inside a generic type. This
doesn't derive from Copy as that would require T: Copy + Clone, instead
it provides an impl of Clone for T: Clone.
2017-09-04 01:00:15 -07:00
bors
a36d93d383 Auto merge of #44300 - Manishearth:clippyup, r=oli-obk
Resync clippy to v0.0.156

None
2017-09-04 07:12:42 +00:00
Eduard-Mihai Burtescu
4e2be14986 Make the LocalKey facade of thread_local! inlineable cross-crate. 2017-09-04 08:24:06 +03:00
Eduard-Mihai Burtescu
e74f96e43f rustc_mir: use Local instead of Lvalue in Storage{Live,Dead}. 2017-09-04 08:01:46 +03:00
bors
e22a3cf7e1 Auto merge of #44268 - kennytm:fix-python-bootstrap-test, r=Mark-Simulacrum
rustbuild: Remove invalid doctest from bootstrap.py
2017-09-04 04:30:12 +00:00
bors
a3beb8fe61 Auto merge of #44272 - Dushistov:master, r=alexcrichton
add test for not optimized `pow` with constant power

Closes #34947
2017-09-04 00:03:44 +00:00
Clar Charr
4260e4395e impl Debug for SplitWhitespace. 2017-09-03 19:13:01 -04:00
Manish Goregaokar
9e644e2da6
Resync clippy to v0.0.156 2017-09-03 14:33:28 -07:00
bors
0006d3e01c Auto merge of #44263 - durka:stabilize-discriminant, r=dtolnay
stabilize mem::discriminant (closes #24263)
2017-09-03 21:32:29 +00:00
Zaki Manian
3333262f05 Minor documentation improvements for StmtKind 2017-09-03 12:27:31 -07:00
bors
981ce7d8dd Auto merge of #44261 - alexcrichton:u128-ffi-unsafe, r=eddyb
rustc: Flag {i,u}128 as unsafe for FFI

These don't appear to have a stable ABI as noted in #41799 and the work in
compiler-builtins definitely seems to be confirming it!
2017-09-03 18:57:21 +00:00
Eduard-Mihai Burtescu
2f42cd8489 rustc_mir: use Local in ProjectionElem::Index. 2017-09-03 21:55:41 +03:00
bors
c8642daf93 Auto merge of #44191 - arielb1:on-unimplemented-label, r=nikomatsakis
More general `on_unimplemented`, with uses in `Try`

Allow `on_unimplemented` directives to specify both the label and the primary message of the trait error, and allow them to be controlled by flags - currently only to be desugaring-sensitive.

e.g.
```Rust
#[rustc_on_unimplemented(
    on(all(direct, from_desugaring="?"),
        message="the `?` operator can only be used in a \
        function that returns `Result` \
        (or another type that implements `{Try}`)",
        label="cannot use the `?` operator in a function that returns `{Self}`"),
)]
```

r? @nikomatsakis
2017-09-03 16:25:46 +00:00
Eduard-Mihai Burtescu
c911925243 rustc_mir: implement visit_local instead/along visit_lvalue where possible. 2017-09-03 19:14:31 +03:00
bors
2f2b8b34c2 Auto merge of #44253 - eddyb:nice-scope, r=nikomatsakis
rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree.

r? @nikomatsakis
2017-09-03 12:46:14 +00:00
Ariel Ben-Yehuda
291b4eddce add error message for the other case too 2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
efa09ea554 on_unimplemented: add method-name checks and use them in Try 2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
6dec953c5a address review comments 2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
02b3ae63e2 enable desugaring-sensitive error messages and use them in Try
Maybe I should allow error messages to check the *specific* desugaring?
Thanks @huntiep for the idea!
2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
6866aea5af implement improved on_unimplemented directives 2017-09-03 13:10:54 +03:00
Ariel Ben-Yehuda
cf07ebd2a2 move the on_unimplemented logic to its own file 2017-09-03 13:10:53 +03:00
Ariel Ben-Yehuda
243aa12d6e refactor and centralize on_unimplemented parsing 2017-09-03 13:10:53 +03:00
bors
23ade23cbc Auto merge of #44252 - eddyb:what-is-dead-may-never-die, r=nikomatsakis
Better StorageLive / StorageDead placement for constants.

Fixes problems in miri (see https://github.com/solson/miri/pull/324#issuecomment-326555552) caused by the new scope rules in #43932.
What I've tried to do here is always have a `StorageLive` but no `StorageDead` for `'static` slots.
It might not work perfectly in all cases, but it should unblock miri.

r? @nikomatsakis cc @oli-obk
2017-09-03 08:40:11 +00:00
bors
fc54bf949d Auto merge of #44195 - alexcrichton:remove-used-unsafe, r=nikomatsakis
rustc: Remove the `used_unsafe` field on TyCtxt

Now that lint levels are available for the entire compilation, this can be an
entirely local lint in `effect.rs`

cc #44137
2017-09-03 03:24:59 +00:00