Commit Graph

67281 Commits

Author SHA1 Message Date
Alex Crichton
4dec2a8f81 rustc: Fix a borrow mut error with debug assertions 2017-09-05 07:37:28 -07:00
Alex Crichton
4af1284053 Ignore failing incremental tests
These should hopefully get fixed with red/green, but until that time alas!
2017-09-05 07:37:27 -07:00
Alex Crichton
52b67f988d rustc: Move original_crate_name to a query 2017-09-05 07:37:27 -07:00
Alex Crichton
d6c88f4936 rustc: Move crate_hash to a query 2017-09-05 07:37:27 -07:00
Alex Crichton
ebc1fd321d rustc: Move crate_disambiguator to queries 2017-09-05 07:37:11 -07:00
Alex Crichton
2d4445f784 rustc: Move {plugin,derive}_registrar_fn to queries 2017-09-05 07:37:11 -07:00
Alex Crichton
205bc9a80a rustc: Migrate CStore::native_libraries to a query 2017-09-05 07:37:11 -07:00
Alex Crichton
98b74c580f rustc: Migrate CStore::expored_symbols to a query 2017-09-05 07:37:11 -07:00
Alex Crichton
ed6f868bf7 rustc: Move impl_defaultness to a query 2017-09-05 07:37:11 -07:00
Alex Crichton
dff0c074e4 rustc: Move a few more cstore methods to queries
This comit applies the following changes:

* Deletes the `is_allocator` query as it's no longer used
* Moves the `is_sanitizer_runtime` method to a query
* Moves the `is_profiler_runtime` method to a query
* Moves the `panic_strategy` method to a query
* Moves the `is_no_builtins` method to a query
* Deletes the cstore method of `is_compiler_builtins`. The query was added in
  #42588 but the `CrateStore` method was not deleted

A good bit of these methods were used late in linking during trans so a new
dedicated structure was created to ship a calculated form of this information
over to the linker rather than having to ship the whole of `TyCtxt` over to
linking.
2017-09-05 07:37:11 -07: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
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
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
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
Oliver Schneider
c4d5a1e17b
Produce expansion info for more builtin macros 2017-09-04 11:03:19 +02: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
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
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
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
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
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
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
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
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