]> git.lizzy.rs Git - rust.git/log
rust.git
8 years agoAuto merge of #27253 - bossmc:unbalanced-delimiters-cause-ice, r=nikomatsakis
bors [Sat, 25 Jul 2015 11:20:15 +0000 (11:20 +0000)]
Auto merge of #27253 - bossmc:unbalanced-delimiters-cause-ice, r=nikomatsakis

This introduces a test for #23389 and improves the error behaviour to treat the malformed LHS as an error, not a compiler bug.

The parse phase that precedes the call to `check_lhs_nt_follows` could possibly be enhanced to police the format itself (which the old code suggests was the original intention), but I'm not sure that's any nicer than just parsing the matcher as generic rust code and then policing the specific requirements for being a macro matcher afterwards (as this does).

Fixes #23389

8 years agoAuto merge of #26960 - Manishearth:wrapper-types, r=steveklabnik
bors [Sat, 25 Jul 2015 07:54:48 +0000 (07:54 +0000)]
Auto merge of #26960 - Manishearth:wrapper-types, r=steveklabnik

@steveklabnik had suggested I do this.

This needs much review -- I tried reducing the informal tone but there's room for improvement.

r? @steveklabnik

8 years agoMove wrapper types blog post into trpl
Manish Goregaokar [Sat, 11 Jul 2015 07:08:50 +0000 (12:38 +0530)]
Move wrapper types blog post into trpl

8 years agoAuto merge of #27233 - tbu-:pr_wtf8, r=alexcrichton
bors [Sat, 25 Jul 2015 04:25:33 +0000 (04:25 +0000)]
Auto merge of #27233 - tbu-:pr_wtf8, r=alexcrichton

8 years agoAuto merge of #26963 - Manishearth:improve-diag, r=steveklabnik
bors [Sat, 25 Jul 2015 01:01:32 +0000 (01:01 +0000)]
Auto merge of #26963 - Manishearth:improve-diag, r=steveklabnik

I'll be adding more commits to this PR as the weekend progresses. Was hoping to make this a mega-PR, but getting some eyes on this early would be nice too.

r? @steveklabnik

r? @eddyb on the object safety bits

cc @michaelsproul

Part of #24407

8 years agoAuto merge of #27265 - steveklabnik:rollup, r=steveklabnik
bors [Fri, 24 Jul 2015 19:04:31 +0000 (19:04 +0000)]
Auto merge of #27265 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27137, #27145, #27177, #27193, #27212, #27220, #27229, #27235, #27238, #27244, #27251
- Failed merges:

8 years agoRollup merge of #27251 - dhuseby:adding_snapshots, r=alexcrichton
Steve Klabnik [Fri, 24 Jul 2015 18:56:04 +0000 (14:56 -0400)]
Rollup merge of #27251 - dhuseby:adding_snapshots, r=alexcrichton

@alexcrichton please upload the following snapshot files along with this PR:

https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-bitrig-x86_64-af77768e0eb0f4c7ec5a8e36047a08053b54b230.tar.bz2
https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-freebsd-i386-b049325e5b2efe5f4884f3dafda448c1dac49b4f.tar.bz2
https://github.com/dhuseby/rust-manual-snapshots/raw/master/rust-stage0-2015-07-17-d4432b3-freebsd-x86_64-a59e397188dbfe67456a6301df5ca13c7e238ab9.tar.bz2

8 years agoRollup merge of #27244 - Detegr:master, r=eddyb
Steve Klabnik [Fri, 24 Jul 2015 18:56:04 +0000 (14:56 -0400)]
Rollup merge of #27244 - Detegr:master, r=eddyb

Hi all.
This is my first contribution to Rust and fixes an issue causing an invalid error message to be presented to the user when using unit struct as length of a repeat expression, issue #27008. The solution is based on suggestions by @oli-obk, but as I'm a complete newbie to this, I have no clue if I got them right :)
The biggest concern I have is that if the `NodeId` I'm returning is the correct one or not (it's not meaningful in this case but I think it would be nice to get it right).

8 years agoRollup merge of #27238 - steveklabnik:gh26927, r=huonw
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27238 - steveklabnik:gh26927, r=huonw

FIxes #26927

8 years agoRollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27235 - tbu-:pr_catch_panic_doc, r=steveklabnik

Fixes #27027.

8 years agoRollup merge of #27229 - AlisdairO:diagnostics371, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:03 +0000 (14:56 -0400)]
Rollup merge of #27229 - AlisdairO:diagnostics371, r=Manishearth

As title!

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27220 - AlisdairO:diagnostics120, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27220 - AlisdairO:diagnostics120, r=Manishearth

As title!

I should probably be bunching these up a bit more, but I'm not sure when my time is going to disappear on me.  Once my schedule stabilises I'll try to start batching them into larger PRs.

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27212 - AlisdairO:diagnostics225, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27212 - AlisdairO:diagnostics225, r=Manishearth

As title!

Part of #24407.
r? @Manishearth

8 years agoRollup merge of #27193 - aidanhs:aphs-advanced-linking-doc, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:02 +0000 (14:56 -0400)]
Rollup merge of #27193 - aidanhs:aphs-advanced-linking-doc, r=steveklabnik

Continuation of #25685.

8 years agoRollup merge of #27177 - echochamber:master, r=steveklabnik
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27177 - echochamber:master, r=steveklabnik

Was browsing somebody else's code and came across a snippet using labels. Looking around, it seems like there was an example for this in [rustbyexample](http://rustbyexample.com/flow_control/loop/nested.html) but none in trpl.

8 years agoRollup merge of #27145 - apasel422:diagnostic-407-437-438, r=Manishearth
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27145 - apasel422:diagnostic-407-437-438, r=Manishearth

8 years agoRollup merge of #27137 - dhuseby:fixing_bitrig_linking, r=alexcrichton
Steve Klabnik [Fri, 24 Jul 2015 18:56:01 +0000 (14:56 -0400)]
Rollup merge of #27137 - dhuseby:fixing_bitrig_linking, r=alexcrichton

fixes the linking error on bitrig.

8 years agoAddress comments
Manish Goregaokar [Thu, 23 Jul 2015 06:41:04 +0000 (12:11 +0530)]
Address comments

8 years agoAdd long diagnostic for E0276
Manish Goregaokar [Wed, 22 Jul 2015 15:49:24 +0000 (21:19 +0530)]
Add long diagnostic for E0276

8 years agoAdd long diagnostic explanation for E0275
Manish Goregaokar [Wed, 22 Jul 2015 15:43:22 +0000 (21:13 +0530)]
Add long diagnostic explanation for E0275

8 years agoAdd long diagnostics for E0272-274 (on_unimplemented)
Manish Goregaokar [Wed, 22 Jul 2015 15:31:19 +0000 (21:01 +0530)]
Add long diagnostics for E0272-274 (on_unimplemented)

8 years agoAdd E0270
Manish Goregaokar [Sun, 19 Jul 2015 14:02:48 +0000 (19:32 +0530)]
Add E0270

8 years agoAuto merge of #27087 - nikomatsakis:closure-exploration, r=nrc
bors [Fri, 24 Jul 2015 16:36:32 +0000 (16:36 +0000)]
Auto merge of #27087 - nikomatsakis:closure-exploration, r=nrc

Refactors the "desugaring" of closures to expose the types of the upvars. This is necessary to be faithful with how actual structs work. The reasoning of the particular desugaring that I chose is explained in a fairly detailed comment.

As a side-effect, recursive closure types are prohibited unless a trait object intermediary is used. This fixes #25954 and also eliminates concerns about unrepresentable closure types that have infinite size, I believe. I don't believe this can cause regressions because of #25954.

(As for motivation, besides #25954 etc, this work is also intended as refactoring in support of incremental compilation, since closures are one of the thornier cases encountered when attempting to split node-ids into item-ids and within-item-ids. The goal is to eliminate the "internal def-id" distinction in astdecoding. However, I have to do more work on trans to really make progress there.)

r? @nrc

8 years agoAuto merge of #27136 - dhuseby:fixing_freebsd_linking, r=alexcrichton
bors [Fri, 24 Jul 2015 14:17:48 +0000 (14:17 +0000)]
Auto merge of #27136 - dhuseby:fixing_freebsd_linking, r=alexcrichton

freebsd linking fix.

8 years agominor rebase fixes
Niko Matsakis [Fri, 24 Jul 2015 08:48:32 +0000 (04:48 -0400)]
minor rebase fixes

8 years agoAuto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakis
bors [Fri, 24 Jul 2015 10:12:20 +0000 (10:12 +0000)]
Auto merge of #27215 - pnkfelix:fsk-placer-take-5-just-in, r=nikomatsakis

Macro desugaring of `in PLACE { BLOCK }` into "simpler" expressions following the in-development "Placer" protocol.

Includes Placer API that one can override to integrate support for `in` into one's own type.  (See [RFC 809].)

[RFC 809]: https://github.com/rust-lang/rfcs/blob/master/text/0809-box-and-in-for-stdlib.md

Part of #22181

Replaced PR #26180.

Turns on the `in PLACE { BLOCK }` syntax, while leaving in support for the old `box (PLACE) EXPR` syntax (since we need to support that at least until we have a snapshot with support for `in PLACE { BLOCK }`.

(Note that we are not 100% committed to the `in PLACE { BLOCK }` syntax.  In particular I still want to play around with some other alternatives.  Still, I want to get the fundamental framework for the protocol landed so we can play with implementing it for non `Box` types.)

----

Also, this PR leaves out support for desugaring-based `box EXPR`.  We will hopefully land that in the future, but for the short term there are type-inference issues injected by that change that we want to resolve separately.

8 years agonits
Niko Matsakis [Fri, 24 Jul 2015 01:08:29 +0000 (21:08 -0400)]
nits

8 years agoAdd regression test for #25368. Fixes #25368.
Niko Matsakis [Fri, 24 Jul 2015 01:05:09 +0000 (21:05 -0400)]
Add regression test for #25368. Fixes #25368.

8 years agoAdd regression test for #25954 (cyclic closure type), which is now
Niko Matsakis [Fri, 17 Jul 2015 12:26:14 +0000 (08:26 -0400)]
Add regression test for #25954 (cyclic closure type), which is now
impossible.

8 years agoUnify the upvar variables found in closures with the actual types of the
Niko Matsakis [Fri, 17 Jul 2015 12:22:03 +0000 (08:22 -0400)]
Unify the upvar variables found in closures with the actual types of the
upvars after analysis is done. Remove the `closure_upvars` helper and
just consult this list of type variables directly.

8 years agoDon't be so eager to call unresolved inference variables an error. MC
Niko Matsakis [Fri, 17 Jul 2015 12:21:24 +0000 (08:21 -0400)]
Don't be so eager to call unresolved inference variables an error.  MC
is being used now before the final regionck stage and in some cases SOME
amount of unresolved inference is OK. In fact, we could probably just
allow inference variables as well with only minimal pain.

8 years agoAdd some debugging to help identify when errors get reported.
Niko Matsakis [Fri, 17 Jul 2015 12:21:11 +0000 (08:21 -0400)]
Add some debugging to help identify when errors get reported.

8 years agoRun the analysis process only once per closure, on the way up the tree.
Niko Matsakis [Fri, 17 Jul 2015 12:20:23 +0000 (08:20 -0400)]
Run the analysis process only once per closure, on the way up the tree.
This was the intention before but silly coding caused it to run twice if
there are nested closures.

8 years agoIntroduce ClosureSubsts rather than just having random fields in the
Niko Matsakis [Thu, 16 Jul 2015 13:46:35 +0000 (09:46 -0400)]
Introduce ClosureSubsts rather than just having random fields in the
TyClosure variant; thread this through wherever closure substitutions
are expected, which leads to a net simplification. Simplify trans
treatment of closures in particular.

8 years agointroduce a Vec<Ty> to TyClosure for storing upvar types
Niko Matsakis [Thu, 16 Jul 2015 09:32:45 +0000 (05:32 -0400)]
introduce a Vec<Ty> to TyClosure for storing upvar types

8 years agoAuto merge of #27227 - eternaleye:patch-1, r=alexcrichton
bors [Fri, 24 Jul 2015 07:37:03 +0000 (07:37 +0000)]
Auto merge of #27227 - eternaleye:patch-1, r=alexcrichton

Currently, `rustc` generates nondeterministic archives, which contain system timestamps. These don't really serve any useful purpose, and enabling deterministic archives moves us a little closer to completely deterministic builds. For a small toy library using `std::ops::{Deref,DerefMut}`, this change actually results in a bit-for-bit identical build every time.

8 years agoAuto merge of #27208 - alexcrichton:msvc-less-dllimport, r=brson
bors [Fri, 24 Jul 2015 05:13:39 +0000 (05:13 +0000)]
Auto merge of #27208 - alexcrichton:msvc-less-dllimport, r=brson

Currently you can hit a link error on MSVC by only referencing static items from
a crate (no functions for example) and then link to the crate statically (as all
Rust crates do 99% of the time). A detailed investigation can be found [on
github][details], but the tl;dr is that we need to stop applying dllimport so
aggressively.

This commit alters the application of dllimport on constants to only cases where
the crate the constant originated from will be linked as a dylib in some output
crate type. That way if we're just linking rlibs (like the motivation for this
issue) we won't use dllimport. For the compiler, however, (which has lots of
dylibs) we'll use dllimport.

[details]: https://github.com/rust-lang/rust/issues/26591#issuecomment-123513631

cc #26591

8 years agoAuto merge of #26583 - eefriedman:lint-ffi, r=nrc
bors [Fri, 24 Jul 2015 02:40:42 +0000 (02:40 +0000)]
Auto merge of #26583 - eefriedman:lint-ffi, r=nrc

Makes the lint a bit more accurate, and improves the quality of the diagnostic
messages by explicitly returning an error message.

8 years agoFix license statement
Andy Caldwell [Fri, 24 Jul 2015 01:39:47 +0000 (01:39 +0000)]
Fix license statement

8 years agoswitching to gnu archive format
Dave Huseby [Thu, 23 Jul 2015 22:47:07 +0000 (15:47 -0700)]
switching to gnu archive format

8 years agofixes #27124 for freebsd
Dave Huseby [Mon, 20 Jul 2015 01:54:47 +0000 (18:54 -0700)]
fixes #27124 for freebsd

8 years agoMake ICE an error and use a sensible error message
Andy Caldwell [Fri, 24 Jul 2015 01:10:25 +0000 (01:10 +0000)]
Make ICE an error and use a sensible error message

8 years agoAdd test for issue #23389
Andy Caldwell [Fri, 24 Jul 2015 01:09:52 +0000 (01:09 +0000)]
Add test for issue #23389

8 years agoRewrite the improper_ctypes lint.
Eli Friedman [Thu, 25 Jun 2015 21:48:36 +0000 (14:48 -0700)]
Rewrite the improper_ctypes lint.

Makes the lint a bit more accurate, and improves the quality of the diagnostic
messages by explicitly returning an error message.

The new lint is also a little more aggressive: specifically, it now
rejects tuples, and it recurses into function pointers.

8 years agoAdd unstable attribute to `char::from_u32_unchecked`
Tobias Bucher [Thu, 23 Jul 2015 22:45:21 +0000 (00:45 +0200)]
Add unstable attribute to `char::from_u32_unchecked`

8 years agoAuto merge of #27224 - alexcrichton:configure-lto-right, r=brson
bors [Thu, 23 Jul 2015 23:38:36 +0000 (23:38 +0000)]
Auto merge of #27224 - alexcrichton:configure-lto-right, r=brson

The LTO pass in the compiler forgot to call the `LLVMRustAddBuilderLibraryInfo`
function and configure other options such as merge_functions, vectorize_slp,
etc. This ended up causing linker errors on MSVC targets because the optimizer
didn't have the right knowledge that some system functions are missing on these
platforms.

This commit consolidates creation of PassManagerBuilder instances to one
function which is then called when needed. This ensures that the pass manager is
always correctly configured with the various target-specific information that
LLVM needs.

Overall, this fixes `-C lto -C opt-level=3` on 32-bit MSVC targets.

8 years agoupdate compile-fail/pushpop-unsafe-rejects.rs to reflect switch from saturated to...
Felix S. Klock II [Thu, 23 Jul 2015 21:39:02 +0000 (23:39 +0200)]
update compile-fail/pushpop-unsafe-rejects.rs to reflect switch from saturated to checked arith.

8 years agoreview feedback: common-subexpression-elim across functions in pushpop_safe impl.
Felix S. Klock II [Thu, 23 Jul 2015 14:22:05 +0000 (16:22 +0200)]
review feedback: common-subexpression-elim across functions in pushpop_safe impl.

8 years agoreview feedback: Use checked-arith instead of saturated-arith for `push_unsafe!`...
Felix S. Klock II [Thu, 23 Jul 2015 14:20:59 +0000 (16:20 +0200)]
review feedback: Use checked-arith instead of saturated-arith for `push_unsafe!` and `pop_unsafe!`.

8 years agoeval_const_expr_partial now returns ConstVal::Struct instead of None for unit-struct...
Antti Keränen [Thu, 23 Jul 2015 16:26:36 +0000 (19:26 +0300)]
eval_const_expr_partial now returns ConstVal::Struct instead of None for unit-struct path expressions. Fixes #27008

8 years agoAuto merge of #27226 - eefriedman:leftover-negation-lint, r=alexcrichton
bors [Thu, 23 Jul 2015 19:11:51 +0000 (19:11 +0000)]
Auto merge of #27226 - eefriedman:leftover-negation-lint, r=alexcrichton

r? @pnkfelix

8 years agoadds snapshots for bitrig and freebsd
Dave Huseby [Thu, 23 Jul 2015 17:20:43 +0000 (10:20 -0700)]
adds snapshots for bitrig and freebsd

8 years agoswitching to gnu archive format per review request
Dave Huseby [Thu, 23 Jul 2015 17:13:49 +0000 (10:13 -0700)]
switching to gnu archive format per review request

8 years agoreview feedback fixes
Dave Huseby [Thu, 23 Jul 2015 13:05:59 +0000 (06:05 -0700)]
review feedback fixes

8 years agofixes #27124 for bitrig
Dave Huseby [Sun, 19 Jul 2015 17:04:27 +0000 (10:04 -0700)]
fixes #27124 for bitrig

8 years agoLink Deref{,Mut} to TRPL on coercions.
Steve Klabnik [Thu, 23 Jul 2015 16:57:22 +0000 (12:57 -0400)]
Link Deref{,Mut} to TRPL on coercions.

FIxes #26927

8 years agoAdd diagnostics for E0120
Alisdair Owens [Wed, 22 Jul 2015 16:24:03 +0000 (17:24 +0100)]
Add diagnostics for E0120

8 years agoAuto merge of #27221 - dotdash:no_empty_clean, r=luqmana
bors [Thu, 23 Jul 2015 15:59:20 +0000 (15:59 +0000)]
Auto merge of #27221 - dotdash:no_empty_clean, r=luqmana

When compiling libsyntax this removes about 30k basic blocks that only
contain a single unconditional jump and reduces the peak memory usage by
about 10MB (from 681MB down to 671MB).

8 years agoAdd long diagnostics for E0373
Alisdair Owens [Thu, 23 Jul 2015 09:44:04 +0000 (10:44 +0100)]
Add long diagnostics for E0373

8 years agoUpdate suggestion from parenthesized-box-expr-message to reflect new output spacing.
Felix S. Klock II [Thu, 23 Jul 2015 14:00:58 +0000 (16:00 +0200)]
Update suggestion from parenthesized-box-expr-message to reflect new output spacing.

8 years agofix pretty printing tests by opting into the features that the expanded code needs.
Felix S. Klock II [Thu, 23 Jul 2015 14:00:28 +0000 (16:00 +0200)]
fix pretty printing tests by opting into the features that the expanded code needs.

8 years agofix doc-tests by opting into `placement_in_syntax` feature where necessary.
Felix S. Klock II [Thu, 23 Jul 2015 13:59:58 +0000 (15:59 +0200)]
fix doc-tests by opting into `placement_in_syntax` feature where necessary.

8 years agoReview feedback: add unstable marker to Placer API and put in bound that now works.
Felix S. Klock II [Thu, 23 Jul 2015 14:01:46 +0000 (16:01 +0200)]
Review feedback: add unstable marker to Placer API and put in bound that now works.

8 years agoFix `thread::catch_panic` documentation to mention its return value on success
Tobias Bucher [Thu, 23 Jul 2015 13:43:06 +0000 (15:43 +0200)]
Fix `thread::catch_panic` documentation to mention its return value on success

Fixes #27027.

8 years agoAuto merge of #27203 - marcusklaas:fix-range-span, r=alexcrichton
bors [Thu, 23 Jul 2015 12:52:21 +0000 (12:52 +0000)]
Auto merge of #27203 - marcusklaas:fix-range-span, r=alexcrichton

Right trims the span for certain range expressions.

Closes https://github.com/rust-lang/rust/issues/27162.

8 years agowtf8, char: Replace uses of `mem::transmute` with more specific functions
Tobias Bucher [Thu, 23 Jul 2015 10:24:27 +0000 (12:24 +0200)]
wtf8, char: Replace uses of `mem::transmute` with more specific functions

8 years agoAuto merge of #26588 - eefriedman:foreign-lifetime, r=nrc
bors [Thu, 23 Jul 2015 09:16:08 +0000 (09:16 +0000)]
Auto merge of #26588 - eefriedman:foreign-lifetime, r=nrc

Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes #26587.

8 years agoAdd long diagnostic for E0269
Manish Goregaokar [Sun, 19 Jul 2015 13:43:25 +0000 (19:13 +0530)]
Add long diagnostic for E0269

8 years agoImprove E0260
Manish Goregaokar [Sun, 19 Jul 2015 13:04:06 +0000 (18:34 +0530)]
Improve E0260

8 years agoAdd long diagnostics for E0139 (type parameters in transmute)
Manish Goregaokar [Sat, 18 Jul 2015 08:11:44 +0000 (13:41 +0530)]
Add long diagnostics for E0139 (type parameters in transmute)

8 years agoAdd long diagnostic for E0138
Manish Goregaokar [Sat, 18 Jul 2015 07:42:09 +0000 (13:12 +0530)]
Add long diagnostic for E0138

8 years agoAdd long diagnostic for E0136
Manish Goregaokar [Sat, 18 Jul 2015 07:39:01 +0000 (13:09 +0530)]
Add long diagnostic for E0136

8 years agoReview fixes
Manish Goregaokar [Sat, 11 Jul 2015 20:30:35 +0000 (02:00 +0530)]
Review fixes

8 years agoAdd huge explanation for E0038 (object safety)
Manish Goregaokar [Sat, 11 Jul 2015 10:41:02 +0000 (16:11 +0530)]
Add huge explanation for E0038 (object safety)

8 years agoAdd error explanation for E0022
Manish Goregaokar [Sat, 11 Jul 2015 08:43:25 +0000 (14:13 +0530)]
Add error explanation for E0022

8 years agoAdd error explanation for E0017
Manish Goregaokar [Sat, 11 Jul 2015 08:35:56 +0000 (14:05 +0530)]
Add error explanation for E0017

8 years agoMove E0006 into E0005
Manish Goregaokar [Mon, 29 Jun 2015 17:27:35 +0000 (22:57 +0530)]
Move E0006 into E0005

8 years agoImprove E0001-E0003
Manish Goregaokar [Mon, 29 Jun 2015 17:24:09 +0000 (22:54 +0530)]
Improve E0001-E0003

8 years agoWrite deterministic archives
eternaleye [Thu, 23 Jul 2015 06:54:59 +0000 (23:54 -0700)]
Write deterministic archives

Currently, `rustc` generates nondeterministic archives, which contain system timestamps. These don't really serve any useful purpose, and enabling deterministic archives moves us a little closer to completely deterministic builds. For a small toy library using `std::ops::{Deref,DerefMut}`, this change actually results in a bit-for-bit identical build every time.

8 years agoResolve lifetime parameters for foreign functions.
Eli Friedman [Fri, 26 Jun 2015 06:13:03 +0000 (23:13 -0700)]
Resolve lifetime parameters for foreign functions.

Pretty straightforward; just need to make sure to explicitly handle
the generic parameters of each ast::ForeignItemFn.

Fixes #26587.

8 years agoAuto merge of #27192 - dotdash:inline_eq_slice, r=luqmana
bors [Thu, 23 Jul 2015 02:24:06 +0000 (02:24 +0000)]
Auto merge of #27192 - dotdash:inline_eq_slice, r=luqmana

eq_slice_() used to be a common implementation for two function that
both called it, but of those only eq_slice() is left, so we can as well
directly inline the code.

8 years agoRemove orphaned unsigned_negation lint reference.
Eli Friedman [Thu, 23 Jul 2015 00:47:01 +0000 (17:47 -0700)]
Remove orphaned unsigned_negation lint reference.

8 years agoAuto merge of #27191 - pnkfelix:sidestep-unary-negate-warning, r=alexcrichton
bors [Wed, 22 Jul 2015 23:37:37 +0000 (23:37 +0000)]
Auto merge of #27191 - pnkfelix:sidestep-unary-negate-warning, r=alexcrichton

Work around unary negation to-be-feature-gated warning by replacing references to `-1` as a `ast::NodeId` with `ast::DUMMY_NODE_ID`, which seems like a better notation to use (it is currently also `-1`.

(AFAICT the code is not *relying* on the value `-1` anywhere, it really just needed a dummy value for when the input is `None`.)

8 years agotrans: Consolidate creating pass manager builders
Alex Crichton [Wed, 22 Jul 2015 23:22:51 +0000 (16:22 -0700)]
trans: Consolidate creating pass manager builders

The LTO pass in the compiler forgot to call the `LLVMRustAddBuilderLibraryInfo`
function and configure other options such as merge_functions, vectorize_slp,
etc. This ended up causing linker errors on MSVC targets because the optimizer
didn't have the right knowledge that some system functions are missing on these
platforms.

This commit consolidates creation of PassManagerBuilder instances to one
function which is then called when needed. This ensures that the pass manager is
always correctly configured with the various target-specific information that
LLVM needs.

Overall, this fixes `-C lto -C opt-level=3` on 32-bit MSVC targets.

8 years agoaddress review feedback: remove dupe feature opt-in.
Felix S. Klock II [Wed, 22 Jul 2015 21:25:52 +0000 (23:25 +0200)]
address review feedback: remove dupe feature opt-in.

8 years agoplacate `make tidy`.
Felix S. Klock II [Wed, 22 Jul 2015 21:23:36 +0000 (23:23 +0200)]
placate `make tidy`.

8 years agoAvoid creating basic blocks for empty cleanup scopes
Björn Steinbrink [Wed, 22 Jul 2015 21:15:01 +0000 (23:15 +0200)]
Avoid creating basic blocks for empty cleanup scopes

When compiling libsyntax this removes about 30k basic blocks that only
contain a single unconditional jump and reduces the peak memory usage by
about 10MB (from 681MB down to 671MB).

8 years agoadd diagnostics for E0437 and E0438
Andrew Paseltiner [Wed, 22 Jul 2015 20:52:40 +0000 (16:52 -0400)]
add diagnostics for E0437 and E0438

8 years agoAuto merge of #27188 - pnkfelix:sidestep-warning-for-E0045, r=alexcrichton
bors [Wed, 22 Jul 2015 20:44:39 +0000 (20:44 +0000)]
Auto merge of #27188 - pnkfelix:sidestep-warning-for-E0045, r=alexcrichton

Sidestep warning about repeated E0045 `span_err!` invocation.

(That is, take the two expressions with the same message and unify them into one subroutine.)

8 years agoAdded how to use labels to break nested loops to trpl.
Jason Schein [Tue, 21 Jul 2015 06:18:59 +0000 (23:18 -0700)]
Added how to use labels to break nested loops to trpl.

8 years agoAdditional notes to link-args
Aidan Hobson Sayers [Mon, 15 Jun 2015 17:58:28 +0000 (18:58 +0100)]
Additional notes to link-args

8 years agomusl static linking not glibc
Aidan Hobson Sayers [Mon, 15 Jun 2015 17:54:37 +0000 (18:54 +0100)]
musl static linking not glibc

8 years agoAuto merge of #27219 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 22 Jul 2015 16:58:56 +0000 (16:58 +0000)]
Auto merge of #27219 - steveklabnik:rollup, r=steveklabnik

- Successful merges: #27084, #27127, #27131, #27140, #27146, #27147, #27151, #27154, #27155, #27156, #27157, #27158, #27163, #27164, #27166, #27167, #27170, #27175, #27183, #27201, #27202
- Failed merges: #26778

8 years agoRollup merge of #27202 - apasel422:issue-21174, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27202 - apasel422:issue-21174, r=alexcrichton

8 years agoRollup merge of #27201 - Ticki:master, r=steveklabnik
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27201 - Ticki:master, r=steveklabnik

Just some small changes.

8 years agoRollup merge of #27183 - Dangthrimble:master, r=steveklabnik
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27183 - Dangthrimble:master, r=steveklabnik

Updated "Installing Rust" and "After installation" to provide additional guidance to Windows users on including Rust in the Path system variable.

r? @steveklabnik

8 years agoRollup merge of #27175 - steveklabnik:channels_plus_travis, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:52 +0000 (12:56 -0400)]
Rollup merge of #27175 - steveklabnik:channels_plus_travis, r=alexcrichton

This should help people configure travis to test all three channels.

8 years agoRollup merge of #27170 - steveklabnik:doc_std_io_intoinnererror, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27170 - steveklabnik:doc_std_io_intoinnererror, r=alexcrichton

Mostly adding examples.

r? @alexcrichton

8 years agoRollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27167 - steveklabnik:doc_std_io_take, r=alexcrichton

Better and more consistent links to their creators.

8 years agoRollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichton
Steve Klabnik [Wed, 22 Jul 2015 16:56:51 +0000 (12:56 -0400)]
Rollup merge of #27166 - steveklabnik:doc_std_io_linewriter, r=alexcrichton

Beef up the struct docs, add examples for the methods.

r? @alexcrichton