Commit Graph

56777 Commits

Author SHA1 Message Date
Felix S. Klock II
09e6a98380 Fix issue #36036.
We were treating an associated type as unsized even when the concrete
instantiation was actually sized. Fix is to normalize before checking
if it is sized.
2016-09-05 12:57:00 +02:00
Manish Goregaokar
20ec61e043 Rollup merge of #36245 - alexcrichton:add-back-accident, r=arielb1
Add back feature accidentally removed

This feature was accidentally removed in
https://github.com/rust-lang/rust/pull/35957.
2016-09-05 14:53:09 +08:00
Manish Goregaokar
e19a564191 Rollup merge of #36242 - semarie:local-rebuild, r=alexcrichton
Use libraries from local-rust-root directory in configure when using …

…--enable-local-rebuild

When using --enable-local-rebuild configure options, the configure
script will test rustc version. But when running it, it will not use the
libraries in the local-rust-root directory.

So use `LD_LIBRARY_PATH` environment variable to correct it.

Under OpenBSD, we use `--enable-local-rebuild` for rebuilding rustc-1.11.0 using rustc-1.11.0. But as it is in use in -current (the developpment branch of OpenBSD), system libraries could easily have ABI/API changes. The (unofficial) bootstrap (rustc-1.11.0 used for building rustc-1.11.0) include several system libraries to permit it to run. The build system use libraries in stage0/lib directory. But the configure script doesn't.

Due to my special use of `--enable-local-rebuild`, I dunno if this PR is suitable for inclusion. But it corrects a difference between build and configure use of the binary.

r? @alexcrichton
2016-09-05 14:53:09 +08:00
Manish Goregaokar
b16fbeb8c1 Rollup merge of #36065 - acrrd:new_format_E0496, r=GuillaumeGomez
Update E0496 to new format

Fixes #36000.
Part of #35233.

r? @GuillaumeGomez
2016-09-05 14:53:08 +08:00
Manish Goregaokar
75e3bc3bd8 Rollup merge of #35983 - GuillaumeGomez:e0060_bonus, r=jonathandturner
E0060 and E0061 improvement

Fixes #35290.

r? @jonathandturner
2016-09-05 14:53:08 +08:00
Manish Goregaokar
acf98d99f9 Rollup merge of #35845 - frewsxcv:result-into-iter, r=GuillaumeGomez
Indicate where `core::result::IntoIter` is created.

None
2016-09-05 14:53:08 +08:00
bors
2dbf600d15 Auto merge of #36242 - semarie:local-rebuild, r=alexcrichton
Use libraries from local-rust-root directory in configure when using …

…--enable-local-rebuild

When using --enable-local-rebuild configure options, the configure
script will test rustc version. But when running it, it will not use the
libraries in the local-rust-root directory.

So use `LD_LIBRARY_PATH` environment variable to correct it.

Under OpenBSD, we use `--enable-local-rebuild` for rebuilding rustc-1.11.0 using rustc-1.11.0. But as it is in use in -current (the developpment branch of OpenBSD), system libraries could easily have ABI/API changes. The (unofficial) bootstrap (rustc-1.11.0 used for building rustc-1.11.0) include several system libraries to permit it to run. The build system use libraries in stage0/lib directory. But the configure script doesn't.

Due to my special use of `--enable-local-rebuild`, I dunno if this PR is suitable for inclusion. But it corrects a difference between build and configure use of the binary.

r? @alexcrichton
2016-09-04 23:50:04 -07:00
Jeffrey Seyfried
2c88b4b790 Load macros from extern crates in the InvocationCollector fold. 2016-09-05 04:53:35 +00:00
Jeffrey Seyfried
d986bbe674 Implement stackless expansion. 2016-09-05 04:53:34 +00:00
Jeffrey Seyfried
c07ff8d26a Add module ext::placeholders with placeholder() and PlaceholderExpander. 2016-09-05 04:53:33 +00:00
Jeffrey Seyfried
7a3ae576fa Refactor expand_invoc(.., fld) -> self.expand_invoc(..). 2016-09-05 04:53:33 +00:00
Jeffrey Seyfried
79fa9eb643 Refactor SyntaxEnv. 2016-09-05 04:53:32 +00:00
Jeffrey Seyfried
4ed2c0ea7c Refactor expand_* into expander.fold_*. 2016-09-05 04:53:30 +00:00
Jeffrey Seyfried
503a10b34a Clean up module processing. 2016-09-05 04:53:25 +00:00
Jeffrey Seyfried
2a83574c6a Refactor out expand_item (with better semantics than before). 2016-09-05 04:53:23 +00:00
Jeffrey Seyfried
8be8cf8540 Refactor away expand_item. 2016-09-05 04:53:22 +00:00
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