Commit Graph

67423 Commits

Author SHA1 Message Date
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
bors
5e9431a6f5 Auto merge of #44176 - nrc:update-rls, r=alexcrichton
Update rls

And expose the `CFG_VERSION` env var to tools so they can determine the version of Rust.

This gets the RLS back on master and so completes the PR dance for the generators PR.

r? @alexcrichton
2017-09-03 00:51:47 +00:00
bors
6f667301e2 Auto merge of #44108 - mattico:match-pipe, r=petrochenkov
Implement RFC 1925

cc #44101
2017-09-02 22:22:54 +00:00
MarkMcCaskey
570ae39973 Merge branch 'master' of git://github.com/rust-lang/rust 2017-09-02 17:01:34 -04:00
Ralf Jung
12d84cc009 update gcc crate
Use gcc::Build rather than deprecated gcc::Config.
Fixes #43973
2017-09-02 21:51:18 +02:00
bors
744dd6c1d5 Auto merge of #44066 - cuviper:powerpc64-extern-abi, r=alexcrichton
powerpc64: improve extern struct ABI

These fixes all have to do with the 64-bit PowerPC ELF ABI for big-endian
targets.  The ELF v2 ABI for powerpc64le already worked well.

- Return after marking return aggregates indirect. Fixes #42757.
- Pass one-member float aggregates as direct argument values.
- Aggregate arguments less than 64-bit must be written in the least-
  significant bits of the parameter space.
- Larger aggregates are instead padded at the tail.
  (i.e. filling MSBs, padding the remaining LSBs.)

New tests were also added for the single-float aggregate, and a 3-byte
aggregate to check that it's filled into LSBs.  Overall, at least these
formerly-failing tests now pass on powerpc64:

- run-make/extern-fn-struct-passing-abi
- run-make/extern-fn-with-packed-struct
- run-pass/extern-pass-TwoU16s.rs
- run-pass/extern-pass-TwoU8s.rs
- run-pass/struct-return.rs
2017-09-02 19:46:51 +00:00
Matt Ickstadt
f2250c4b01 Add test for #33185
Closes #33185
2017-09-02 13:01:34 -05:00
Matt Ickstadt
ad5fc2a313 Add test for #35676
Closes #35676
2017-09-02 12:45:15 -05:00
bors
204c0a47e7 Auto merge of #43886 - oli-obk:clippy, r=nrc
Add clippy as a submodule

~~This builds clippy as part of `./x.py build` (locally and in CI).~~

This allows building clippy with `./x.py build src/tools/clippy`

~~Needs https://github.com/nrc/dev-tools-team/issues/18#issuecomment-322456461 to be resolved before it can be merged.~~ Contributers can simply open a PR to clippy and point the submodule at the `pull/$pr_number/head` branch.

This does **not** build clippy or test the clippy test suite at all as per https://github.com/nrc/dev-tools-team/issues/18#issuecomment-321411418

r? @nrc

cc @Manishearth @llogiq @mcarton @alexcrichton
2017-09-02 17:17:14 +00:00
Evgeniy A. Dushistov
94a9a300d0 add test for not optimized pow with constant power
Closes #34947
2017-09-02 19:10:00 +03:00
kennytm
4d06185688
Remove invalid doctest from bootstrap.py.
Make sure that if the test is failed, the CI will stop the build.
2017-09-02 22:11:25 +08:00
bors
8d83c1516c Auto merge of #44259 - Mark-Simulacrum:update-cargo, r=alexcrichton
Update cargo

This includes https://github.com/rust-lang/cargo/pull/4447 which fixes a bug in Cargo that is needed to fix https://github.com/rust-lang/rust/issues/44237.

r? @alexcrichton
2017-09-02 13:43:53 +00:00
Niko Matsakis
80447c38aa limit and clear cache obligations opportunistically
Keep **all** the obligations for every projection is wasteful of
memory and compilation time. We only really care about those
subobligations that may inform the result of the projection (i.e., may
help to resolve any inference variables that appear within).
Therefore, we can clear the subobligations from the cache that don't
potentially affect the result of the projection. On every cache hit,
we also take the opportunity to check if the type variables have been
resolved *yet* and, if so, clear out the pending obligations.

Fixes #43613
2017-09-02 08:35:48 -04:00
Kornel
2354089ece Minor compilation fix 2017-09-02 12:14:30 +01:00
bors
cc1fc8894b Auto merge of #44256 - GuillaumeGomez:update-html-diff-rs, r=Mark-Simulacrum
Update html-diff-rs version

r? @nrc
2017-09-02 11:07:49 +00:00
bors
efceda220e Auto merge of #44104 - llogiq:lowercase-lints, r=nikomatsakis
add a lowercase suggestion to unknown_lints

I recently wrote some tests for a clippy lint, copied the (uppercase) lint name into my test file and forgot to toggle the case. This PR adds a suggestion that would have saved me 10 minutes of debugging, so it's likely a net win 🙂 . Also it adds a UI test for the `unknown_lints` lint.
2017-09-02 08:38:12 +00:00
Eduard-Mihai Burtescu
1d5c0ba75f Allow Drop types in const's too, with #![feature(drop_types_in_const)]. 2017-09-02 09:08:51 +03:00
Alex Burka
d516434981 stabilize mem::discriminant (closes #24263) 2017-09-02 01:59:54 -04:00
Alex Crichton
549dd10527 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-01 22:32:44 -07:00
Mark Simulacrum
1b758fb6e3 Update cargo.
This includes https://github.com/rust-lang/cargo/pull/4447 which fixes
a bug in Cargo that is needed to fix
https://github.com/rust-lang/rust/issues/44237.
2017-09-01 21:15:47 -06:00
Josh Stone
40b14736a0 x86: return single-float aggregates in a float register
Following Clang's lead, and anecdotal evidence from the `float_one` part
of `run-make/extern-fn-struct-passing-abi`, use a floating point
register to return single-float aggregates, except on MSVC targets.
2017-09-01 18:21:29 -07:00
Josh Stone
f7c9704024 Exclude all windows-gnu from the float_one test 2017-09-01 18:21:29 -07:00
Josh Stone
afcc58abd3 Exclude x86_64-pc-windows-gnu from the float_one test 2017-09-01 18:21:29 -07:00
Josh Stone
a9bb599fb1 powerpc64: improve extern struct ABI
These fixes all have to do with the 64-bit PowerPC ELF ABI for big-endian
targets.  The ELF v2 ABI for powerpc64le already worked well.

- Return after marking return aggregates indirect. Fixes #42757.
- Pass one-member float aggregates as direct argument values.
- Aggregate arguments less than 64-bit must be written in the least-
  significant bits of the parameter space.
- Larger aggregates are instead padded at the tail.
  (i.e. filling MSBs, padding the remaining LSBs.)

New tests were also added for the single-float aggregate, and a 3-byte
aggregate to check that it's filled into LSBs.  Overall, at least these
formerly-failing tests now pass on powerpc64:

- run-make/extern-fn-struct-passing-abi
- run-make/extern-fn-with-packed-struct
- run-pass/extern-pass-TwoU16s.rs
- run-pass/extern-pass-TwoU8s.rs
- run-pass/struct-return.rs
2017-09-01 18:21:29 -07:00
Eduard-Mihai Burtescu
02ec0ae066 rustc_mir: always emit StorageLive even without a matching StorageDead. 2017-09-02 02:17:38 +03:00
Eduard-Mihai Burtescu
dc563efd98 rustc_mir: actually "promote" constants' MIR to 'static by removing StorageDead's. 2017-09-02 02:17:28 +03:00
Guillaume Gomez
7befbbc020 Update html-diff-rs version 2017-09-02 00:16:55 +02:00
Matt Ickstadt
22ca03bde6 Fix unstable book example 2017-09-01 16:16:36 -05:00
Eduard-Mihai Burtescu
8bdfd8a003 rustc: rename CodeExtent to Scope and RegionMaps to ScopeTree. 2017-09-01 23:27:48 +03:00
Matt Ickstadt
eb143c344e Fix arm visitor 2017-09-01 14:39:46 -05:00
kennytm
7169fe57d6
Fallback to dladdr-based resolve_symbol if backtrace failed.
This programs compiled without -g on macOS still provide the resolve to
actual symbols, instead of `<unknown>` everywhere.
2017-09-02 03:24:17 +08:00
John Colanduoni
09f572b7dc
Use env::current_exe for libbacktrace on macOS 2017-09-02 03:24:17 +08:00
John Colanduoni
e3de40e72f
Add upstream pull request link for libbacktrace 2017-09-02 03:24:16 +08:00
John Colanduoni
cd24162667
Enable backtrace tests for macOS and iOS 2017-09-02 03:24:16 +08:00
John Colanduoni
e8121b3d16
Add libbacktrace support for Apple platforms 2017-09-02 03:24:15 +08:00
Matt Ickstadt
f866152991 Implement RFC 1925 2017-09-01 12:46:37 -05:00
bors
f861b6ee46 Auto merge of #44154 - alexcrichton:bump-bootstrap, r=Mark-Simulacrum
Bump to 1.22.0 and update boostrap compiler

Time to get a new nightly!
2017-09-01 16:39:31 +00:00
Alex Crichton
271c63c189 Update git2-rs to fix cross compiles 2017-09-01 07:56:44 -07:00
bors
ed532c0d93 Auto merge of #44238 - nrc:pulldown-warn, r=@QuietMisdreavus
Improve the Pulldown/hoedown warnings

cc #44229

r? @QuietMisdreavus
2017-09-01 13:56:22 +00:00
bors
a59a6d8a56 Auto merge of #44171 - eddyb:scope, r=nikomatsakis
Use hir::ItemLocalId instead of ast::NodeId in rustc::middle::region::CodeExtent.

This is an alternative to @michaelwoerister's #43887, changing `CodeExtent` instead of `ReScope`.

The benefit here is that the same `Region`s are used same-crate and cross-crate, while preserving the incremental recompilation properties of the stable `hir::ItemLocalId`.

Only places which needed to get back to the `ast::NodeId` from `CodeExtent` was its `span` method, used in error reporting - passing the `&RegionMaps` down allowed using `hir_to_node_id`.
`rustc::cfg` and `dataflow` also had to be converted to `hir::ItemLocalId` because of their interactions with `CodeExtent`, especially in `borrowck`, and from that we have 3 more `hir_to_node_id` calls: `cfg::graphviz` node labels, `borrowck` move reporting, and the `unconditional_recursion` lint.

Out of all of those, *only* the lint actually makes a decision (on whether code will compile) based on the result of the conversion, the others only use it to know how to print information to the user.
So I think we're safe to say that the bulk of the code working with a `CodeExtent` is fine with local IDs.

r? @nikomatsakis
2017-09-01 10:40:18 +00:00
Eduard-Mihai Burtescu
e4996ec49c rustc: use hir::ItemLocalId instead of ast::NodeId in CodeExtent. 2017-09-01 11:18:31 +03:00
Eduard-Mihai Burtescu
ea6aca7726 rustc: take TyCtxt and RegionMaps in CodeMap::span. 2017-09-01 11:17:03 +03:00
Eduard-Mihai Burtescu
28ddd7a4ef rustc: use hir::ItemLocalId instead of ast::NodeId in CFG. 2017-09-01 11:17:03 +03:00
Nick Cameron
1d6d09fa6d Fix tests
This is just undoing changes from #41991 because we are not running markdown rendering twice.
2017-09-01 20:07:04 +12:00
Simon Sapin
9abc549aa1 Add git-commit-hash in source and extended tarballs too. 2017-09-01 09:08:59 +02:00
Jacob Kiesel
2e34ff7671 Fix documentation and formatting. 2017-09-01 00:07:26 -06:00
bors
45d31e7310 Auto merge of #44233 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 10 pull requests

- Successful merges: #44192, #44199, #44202, #44203, #44205, #44207, #44209, #44223, #44230, #44231
- Failed merges:
2017-09-01 04:50:00 +00:00