Commit Graph

56812 Commits

Author SHA1 Message Date
Jeffrey Seyfried fca80c983d Generalize `Invocation` to include modifiers/decorators. 2016-09-05 04:53:21 +00:00
Jeffrey Seyfried 3cba93f993 Refactor `with_exts_frame` from a macro to a function. 2016-09-05 04:53:21 +00:00
Jeffrey Seyfried de2e67836e Add `Invocation` and `Expansion`, remove `MacroGenerable`. 2016-09-05 04:53:20 +00:00
Jeffrey Seyfried 9b3bc7a9e9 Remove `syntax::config::strip_unconfigured`, add `syntax::config::features`. 2016-09-05 04:53:16 +00:00
Jeffrey Seyfried 234d68b7d3 Improve `expand_type`. 2016-09-05 04:52:50 +00:00
Jeffrey Seyfried e1e5c14bad In `Parser` and `ExtCtxt`, replace fields `filename` and `mod_path_stack`
with a single field `directory: PathBuf`.
2016-09-05 04:52:48 +00:00
Andrew Cann c9a340e546 Remove expr_ty method completely 2016-09-05 12:28:52 +08:00
Andrew Cann 7c8f5457d2 Undo unnecessary bookkeeping from last commit 2016-09-05 12:28:52 +08:00
Andrew Cann 180534f398 Remove use of expr_ty from coercions code 2016-09-05 12:28:52 +08:00
Andrew Cann bd661481e7 Move write_ty to the bottom of check_pat 2016-09-05 12:28:52 +08:00
Andrew Cann 1749fda9c0 Factor write_ty out of more pattern-checking functions 2016-09-05 12:28:52 +08:00
Andrew Cann c5ff28cd14 Factor write_ty out of pattern-matching functions 2016-09-05 12:26:41 +08:00
Andrew Cann 8c6086a0a3 check_block_with_expected returns the checked type 2016-09-05 12:26:41 +08:00
Andrew Cann f54c47d34b Move check_expr match block into its own method 2016-09-05 12:26:41 +08:00
Andrew Cann f120c71775 Tidy. Rename variables. 2016-09-05 12:26:41 +08:00
Andrew Cann 1c3e8b0a1c Tidy 2016-09-05 12:26:41 +08:00
Andrew Cann adb19ff277 Add AdjustNeverToAny in check_expr 2016-09-05 12:26:41 +08:00
Andrew Cann 9cd8d7a24f Factor write_ty out of function checking functions 2016-09-05 12:26:41 +08:00
Andrew Cann 21720641dc Factor write_ty out of check_expr_closure 2016-09-05 12:26:41 +08:00
Andrew Cann 144b8cf5db Factor write_ty out of check_struct_expr 2016-09-05 12:26:41 +08:00
Andrew Cann f22dd2e2d9 Factor write_ty out of field/indexing methods 2016-09-05 12:26:41 +08:00
Andrew Cann 91b39b5e65 Factor write_ty out of more checking functions 2016-09-05 12:19:07 +08:00
Andrew Cann 06ad8fe261 Factor write_ty out of check_binop* 2016-09-05 12:19:07 +08:00
Andrew Cann c7ea3e8d13 Remove redundant error checking around ExprMethodCall 2016-09-05 12:19:07 +08:00
Andrew Cann b93435fd79 Remove most uses of expr_ty 2016-09-05 12:19:07 +08:00
Andrew Cann 0ddf060b6d Make write_ty and friends return adjusted type 2016-09-05 12:19:07 +08:00
Andrew Paseltiner e4784fc313
Remove mention of `unsafe_no_drop_flag` from Reference and Nomicon 2016-09-04 22:57:27 -04:00
bors 86995dc8c5 Auto merge of #36240 - leeopop:master, r=jseyfried
Allow CompilerControllers to access rustc_plugin::registry::Registry

fixes #36064

I chose to put ructc_plugin::registry::Registry structure
into CompilerState structure, instead of Session structure.
This will preserve dependencies among librustc, libructc_driver, and libructc_plugin.

@jseyfried @sanxiyn
2016-09-04 18:36:42 -07:00
Matt Ickstadt b9a8c1a063 Fix incorrect LLVM Linkage enum
The `Linkage` enum in librustc_llvm got out of sync with the version in LLVM and it caused two variants of the #[linkage=""] attribute to break.

This adds the functions `LLVMRustGetLinkage` and `LLVMRustSetLinkage` which convert between the Rust Linkage enum and the LLVM one, which should stop this from breaking every time LLVM changes it.

Fixes #33992
2016-09-04 16:12:01 -05:00
bors 91f057de35 Auto merge of #36203 - petrochenkov:uvsdot, r=nrc
Replace `_, _` with `..` in patterns

This is how https://github.com/rust-lang/rust/issues/33627 looks in action.

Looks especially nice in leftmost/rightmost positions `(first, ..)`/`(.., last)`.
I haven't touched libsyntax intentionally because the feature is still unstable.
2016-09-04 14:03:01 -07:00
Cobrand 1aa777b51f Updated E0559 to new format
Refactored a method that printed one suggested field name,
into a method that returns an `Option` of a suggestion

Updated test cases accordingly
2016-09-04 22:21:32 +02:00
bors 9cc430d2cf Auto merge of #36144 - japaric:rustbuild-musl, r=alexcrichton
rustbuild: fix building std for musl targets

closes #36143

r? @alexcrichton
2016-09-04 10:22:26 -07:00
Andrew Paseltiner 8d3fd03855
Clean up thread-local storage docs
`std` no longer contains an implementation of scoped TLS.
2016-09-04 10:16:25 -04:00
bors 987b47549e Auto merge of #36255 - Manishearth:rollup, r=Manishearth
Rollup of 7 pull requests

- Successful merges: #36070, #36132, #36200, #36212, #36225, #36231, #36234
- Failed merges:
2016-09-04 06:06:37 -07:00
Manish Goregaokar 55893f0da7 Rollup merge of #36234 - durka:disable-codegen-config, r=alexcrichton
rustbuild: add config.toml option to disable codegen tests

Fixes #36232.

I think it worked? Here's a build log where I tried to bootstrap, it crashed, then I added the setting to config.toml and it continued: https://gist.github.com/durka/cbf97cf04b8e065f1a2cfda4c1b6bf95

r? @alexcrichton
2016-09-04 21:01:00 +08:00
Manish Goregaokar 8ee0b6b6c1 Rollup merge of #36231 - durka:patch-29, r=alexcrichton
indicate where to copy config.toml.example

r? @alexcrichton
2016-09-04 21:01:00 +08:00
Manish Goregaokar eac0ebe35a Rollup merge of #36225 - johnthagen:fix-nightly-docs, r=steveklabnik
Update nightly docs supported Windows versions to match Getting Started page

https://doc.rust-lang.org/book/getting-started.html#tier-1 shows that Windows 7+ is officially supported (implying, for example Windows 10), but the nightly page only listed 7, 8, and Server 2008 R2).
2016-09-04 21:01:00 +08:00
Manish Goregaokar 43440a4a6e Rollup merge of #36212 - razielgn:updated-e0493-to-new-format, r=jonathandturner
Updated e0493 to new format (+ bonus).

Part of #35233.
Fixes #35999.

r? @jonathandturner

I'm not satisfied with the bonus part, there has to be an easier way to reach into the `Drop`'s span implementation. I'm all ears. :)
2016-09-04 21:00:59 +08:00
Manish Goregaokar 8d64649982 Rollup merge of #36132 - nrc:save-std, r=@eddyb
Add --Zsave-analysis-api

This is a save-analysis variation which can be used with libraries distributed without their source (e.g., libstd). It will allow IDEs and other tools to get info about types and create URLs to docs and source, without the unnecessary clutter of internal-only save-analysis info. I'm sure we'll iterate somewhat on the design, but this is a first draft.
2016-09-04 18:02:53 +08:00
Manish Goregaokar 4b889154e1 Rollup merge of #36070 - gavinb:master, r=jonathandturner
Update error format for E0458, E0459

Fixes #35933, #35932
Part of #35233

r? @jonathandturner
2016-09-04 18:02:53 +08:00
bors e77d86c142 Auto merge of #36132 - nrc:save-std, r=@eddyb
Add --Zsave-analysis-api

This is a save-analysis variation which can be used with libraries distributed without their source (e.g., libstd). It will allow IDEs and other tools to get info about types and create URLs to docs and source, without the unnecessary clutter of internal-only save-analysis info. I'm sure we'll iterate somewhat on the design, but this is a first draft.
2016-09-04 02:40:31 -07:00
Vadim Petrochenkov e05e74ac83 Replace `_, _` with `..` 2016-09-04 12:30:33 +03:00
Vadim Petrochenkov 6f7e51e49b Replace `_, _, _` with `..` 2016-09-04 12:27:01 +03:00
bors b7d19899de Auto merge of #36034 - ahmedcharles:orbit, r=eddyb
Remove --{enable|disable}-orbit from configure.

Fixes #35956.

r? @eddyb

There are only two buildbots left, though they are both failing. Is there something to be done there other than wait?
2016-09-03 23:24:32 -07:00
Keunhong Lee ca5dfd0c97 Allow CompilerControllers to access rustc_plugin::registry::Registry structure. 2016-09-04 03:22:56 +00:00
Jake Goldsborough b66410043a adding a check to bootstrap script
and a check to the rust config script
2016-09-03 20:22:12 -07:00
bors 1ca1de6b26 Auto merge of #36124 - eddyb:fast-array-init, r=alexcrichton
Fix optimization regressions for operations on [x; n]-initialized arrays.

Fixes #35662 by using `!=` instead of `<` as the stop condition for `[x; n]` initialization loops.
Also included is cc2009f02d, a hack to run the GVN pass twice, another time after InstCombine.
This hack results in removal of redundant `memset` and `memcpy` calls (from loops over arrays).

cc @nrc Can we get performance numbers on this? Not sure if it regresses anything else.
2016-09-03 17:41:08 -07:00
Guillaume Gomez 1eda14e4c9 E0060 and E0061 improvement 2016-09-04 01:34:11 +02:00
Josh Triplett fe8438d4a2 Fix "field is never used" warning to take unions into account
Rather than saying "struct or union" or adding logic to determine the
type of the item, just change the message to "field is never used",
dropping the "struct".

Update tests accordingly.
2016-09-03 15:29:16 -07:00
bors 70598e04f9 Auto merge of #36119 - arielb1:ctp-again, r=eddyb
fix broken type parameter indexing logic in wfcheck

r? @eddyb

Fixes #36075
2016-09-03 14:31:42 -07:00