Commit Graph

53979 Commits

Author SHA1 Message Date
Jeffrey Seyfried
dbf0326ddc Add comment and clean up expand_annotatable 2016-06-09 00:49:42 +00:00
Jeffrey Seyfried
13e3925e8d Add regression test 2016-06-09 00:45:04 +00:00
Jeffrey Seyfried
51499b6e1f Load macros from extern crates during expansion. 2016-06-09 00:44:17 +00:00
bors
0d531bfb88 Auto merge of #33989 - eddyb:mir-viz, r=nikomatsakis
[MIR] Make scopes debuginfo-specific (visibility scopes).

Fixes #32949 by having MIR (visibility) scopes mimic the lexical structure.
Unlike #33235, this PR also removes all scopes without variable bindings.

Printing of scopes also changed, e.g. for:
```rust
fn foo(x: i32, y: i32) { let a = 0; let b = 0; let c = 0; }
```
Before my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
    let var0: i32;                       // "x" in scope 1 at <anon>:1:8: 1:9
    let var1: i32;                       // "y" in scope 1 at <anon>:1:16: 1:17
    let var2: i32;                       // "a" in scope 3 at <anon>:1:30: 1:31
    let var3: i32;                       // "b" in scope 6 at <anon>:1:41: 1:42
    let var4: i32;                       // "c" in scope 9 at <anon>:1:52: 1:53

    ...

    scope tree:
    0 1 2 3 {
        4 5
        6 {
            7 8
            9 10 11
        }
    }
}
```
After my changes:
```rust
fn foo(arg0: i32, arg1: i32) -> () {
    scope 1 {
        let var0: i32;                   // "x" in scope 1 at <anon>:1:8: 1:9
        let var1: i32;                   // "y" in scope 1 at <anon>:1:16: 1:17
        scope 2 {
            let var2: i32;               // "a" in scope 2 at <anon>:1:30: 1:31
            scope 3 {
                let var3: i32;           // "b" in scope 3 at <anon>:1:41: 1:42
                scope 4 {
                    let var4: i32;       // "c" in scope 4 at <anon>:1:52: 1:53
                }
            }
        }
    }

    ...
}
2016-06-08 13:51:57 -07:00
bors
4b240fe96a Auto merge of #34083 - alexcrichton:dumb-hack, r=nrc
rustc: Try to contain prepends to PATH

This commit attempts to bring our prepends to PATH on Windows when loading
plugins because we've been seeing quite a few issues with failing to spawn a
process on Windows, the leading theory of which is that PATH is too large as a
result of this. Currently this is mostly a stab in the dark as it's not
confirmed to actually fix the problem, but it's probably not a bad change to
have anyway!

cc #33844
Closes #17360
2016-06-08 07:43:29 -07:00
bors
d3e014e295 Auto merge of #34068 - ollie27:rustdoc_redirect_const, r=brson
rustdoc: Fix generating redirect pages for statics and consts

These were missing from the cache for some reason meaning the redirect pages failed to render.
2016-06-08 04:53:34 -07:00
bors
ff1315591f Auto merge of #34010 - jseyfried:decorate_expanded, r=nrc
Run decorators on expanded AST

Fixes #32950.
r? @nrc
2016-06-08 02:05:38 -07:00
bors
368f6ae8cb Auto merge of #34003 - frewsxcv:13727-regressions, r=brson
Add regression tests for #13727.

Fixes https://github.com/rust-lang/rust/issues/13727.
2016-06-07 21:38:30 -07:00
bors
371bf0eda2 Auto merge of #33982 - LeoTestard:remove-check-matcher-old, r=pnkfelix
Remove the old FOLLOW checking (aka `check_matcher_old`).

It was supposed to be removed at the next release cycle but is still in the tree since like 6 months.
Potential breaking change, since some cases (such as #25658) will change from a warning to an error. But the warning stating that it will be a hard error in the next release has been there for 6 months now.
I think it's safe to break this code. ^_^
2016-06-07 17:56:35 -07:00
bors
ec872dc8a3 Auto merge of #34141 - eddyb:trans-abi-memcpy, r=nikomatsakis
trans: always use a memcpy for ABI argument/return casts.

When storing incoming arguments or values returned by call/invoke, always do a `memcpy` from a temporary of the cast type, if there is an ABI cast.
While Clang has gotten smarter ([store](https://godbolt.org/g/EphFuK) vs [memcpy](https://godbolt.org/g/5dikH9)), a `memcpy` will always work.
This is what @dotdash has wanted to do all along, and it fixes #32049.
2016-06-07 14:45:39 -07:00
Eduard Burtescu
e252865b74 trans: always use a memcpy for ABI argument/return casts. 2016-06-08 00:35:01 +03:00
bors
39a523ba13 Auto merge of #34139 - steveklabnik:rollup, r=steveklabnik
Rollup of 13 pull requests

- Successful merges: #33645, #33897, #33945, #34007, #34060, #34070, #34094, #34098, #34099, #34104, #34124, #34125, #34138
- Failed merges:
2016-06-07 11:50:31 -07:00
Eduard Burtescu
0c5930ef25 mir: group span + visibility scope under a new SourceInfo type. 2016-06-07 19:21:56 +03:00
Eduard Burtescu
719a591630 mir: distinguish between variable visibility scopes and SEME scopes. 2016-06-07 18:50:58 +03:00
Steve Klabnik
a0bf3b8b47 Rollup merge of #34138 - hoodie:bug/bool_colors, r=steveklabnik
Bug/bool colors

This is actually #33661 @steveklabnik, sorry about this, github ate my homework
2016-06-07 10:43:58 -04:00
Steve Klabnik
3ff22ccd40 Rollup merge of #34125 - MichaelNecio:book_addition, r=steveklabnik
Noted that shadowing never destroys a value

Fixes issue #33887

r? @steveklabnik
2016-06-07 10:43:58 -04:00
Steve Klabnik
814f685df2 Rollup merge of #34124 - jonas-schievink:remove-useless-optns, r=sanxiyn
Remove old -Z options that do nothing

Technically, this is a [breaking-change], but I'm not sure what the policy for -Z flags is (especially unused ones).
2016-06-07 10:43:58 -04:00
Steve Klabnik
dd1198d025 Rollup merge of #34104 - nagisa:cfg-llvm-up, r=alexcrichton
Require LLVM 3.7

We are using getMCTargetInfo which is 3.7+. I’m not sure whether 3.7 works though.

Fixes https://github.com/rust-lang/rust/issues/34103

r? @alexcrichton
2016-06-07 10:43:57 -04:00
Steve Klabnik
a41de7f8da Rollup merge of #34099 - markrcote:functions-copyedit, r=steveklabnik
Add missing space before parenthesis.
2016-06-07 10:43:57 -04:00
Steve Klabnik
05efef7e19 Rollup merge of #34098 - frankmcsherry:patch-1, r=alexcrichton
Update rc.rs

The original description suggests that the original `Rc<T>` itself is downgraded, which doesn't seem to be what the code does. At the same time, `Rc` is one of those types that can do weird things with only a shared reference, so I thought it would be good to be clear.
2016-06-07 10:43:57 -04:00
Steve Klabnik
31ddf966f5 Rollup merge of #34094 - abenga:doc_changes_variable_bindings, r=steveklabnik
Minor changes to variable bindings chapter

* In "*... name as another binding, that's currently in scope, will ...*", *"
  that's currently in scope"* is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.
2016-06-07 10:43:57 -04:00
Steve Klabnik
46de8f750b Rollup merge of #34070 - chriskrycho:update-reference-deprecated-attribute, r=steveklabnik
Update reference to indicate stabilization of `deprecated` attribute.

None
2016-06-07 10:43:57 -04:00
Steve Klabnik
ee78a02aec Rollup merge of #34060 - JDemler:master, r=steveklabnik
Improved documentation for tests/ directory

This ambigouity problem was already discussed in the [forums](https://users.rust-lang.org/t/problem-using-external-modules-inside-integration-test-submodule/5312/6).
2016-06-07 10:43:56 -04:00
Steve Klabnik
422574400f Rollup merge of #34007 - flo-l:improve-hacking-docs, r=alexcrichton
add documentation on howto build just rustc without libstd to the build system

I searched for days until I found this, maybe this helps other poor souls 😂

for reference #33990
2016-06-07 10:43:56 -04:00
Steve Klabnik
0c42fa6ec0 Rollup merge of #33945 - srinivasreddy:libpanic_unwind, r=nrc
run rustfmt on libpanic_unwind folder
2016-06-07 10:43:56 -04:00
Steve Klabnik
2b94d84413 Rollup merge of #33897 - srinivasreddy:runfail_rustfmt, r=nrc
run rustfmt on test/run-fail folder
2016-06-07 10:43:56 -04:00
Steve Klabnik
98988ba05e Rollup merge of #33645 - withoutboats:woboats_trim_matches_doc, r=steveklabnik
Correct the docs on str::trim_matches

This pattern cannot be a str because str's pattern is not double-ended.
2016-06-07 10:43:55 -04:00
bors
9b2becaf6e Auto merge of #34128 - eddyb:mir-trans-fixes, r=luqmana
[MIR] Fix MIR trans edge cases that showed up on crater.

These fixes cover all of the [regressions found by crater](https://gist.github.com/nikomatsakis/88ce89ed06ef7f7f19bfd1e221d7f7ec) (for #34096).

Two of them were `Pair` edge cases (ZSTs and constants) causing LLVM assertions, the other one was  causing stack overflows in debug scripts compiled in debug mode, due to the `fn_ret_cast` `alloca` ending up in a loop.
2016-06-07 06:31:32 -07:00
bors
f35255038b Auto merge of #34012 - eddyb:tick-erased, r=nikomatsakis
rustc: add ReErased to be used by trait selection, MIR and trans.

`ReErased` replaces `ReStatic` (i.e. `'static`) for erasing regions.
Using a distinct lifetime helps prevent accidental mix-ups between the two.
It also allows cleaner type printing (see test changes), including in symbol names:
```rust
str..pattern..CharSearcher$LT$$u27$static$GT$::drop.30560::h840c2f2afc03bbea // before
str..pattern..CharSearcher::drop.30561::h6bd31d2af614377a // after
```
Not that we should be producing symbols this way, but it's still better.
2016-06-07 00:04:53 -07:00
Eduard Burtescu
02cbc0ef8c trans: don't create allocas anywhere other than the entry block. 2016-06-07 10:04:31 +03:00
Horace Abenga
b014039197 Minor changes to variable bindings chapter
* In "... name as another binding, that's currently in scope, will ...", ",
  that's currently in scope, " is not a parenthetical element, and the commas
  can be omitted.

* Other minor changes.
2016-06-07 09:38:15 +03:00
Corey Farwell
7755d0cda6 Add regression tests for #13727.
Fixes https://github.com/rust-lang/rust/issues/13727.
2016-06-06 21:09:24 -04:00
Eduard Burtescu
11e31091a9 trans: don't forget to cast Pair constants of the wrong type. 2016-06-07 02:21:58 +03:00
Michael Necio
f07aa35549 Noted that shadowing never destroys a value 2016-06-06 18:13:20 -04:00
Jonas Schievink
6e2f966f72 Remove old -Z options that do nothing
Technically, this is a [breaking-change], but I'm not sure what the
policy for -Z flags is (especially unused ones).
2016-06-06 23:43:44 +02:00
Eduard Burtescu
b6d9f8387a trans: use Pair for ignored nil pairs instead of Immediate. 2016-06-07 00:24:21 +03:00
bors
763f9234b0 Auto merge of #34006 - eddyb:mir-const-fixes, r=nikomatsakis
[MIR] Fix double-rounding of float constants and ignore NaN sign in tests.

Fixes #32805 by handling f32 and f64 separately in rustc_const_eval.

Also removes `#[rustc_no_mir]` from a couple libstd tests by ignoring NaN sign.
Turns out that runtime evaluation of `0.0 / 0.0` produces a NaN with the sign bit set,
whereas LLVM constant folds it to a NaN with the sign bit unset, which we were testing for.
2016-06-06 05:08:50 -07:00
Leo Testard
4dab8ae64e Remove the old FOLLOW checking (aka check_matcher_old). 2016-06-06 12:27:34 +02:00
bors
4a4a13a5bc Auto merge of #33920 - cristianoliveira:error-E0174-explanation, r=GuillaumeGomez
Add error description for E0174

Reference for issue: #32777

r? @GuillaumeGomez

Hey Guillaume, sorry for taking too long to do it. I got some unexpected work during the week.

Waiting for your review :)
2016-06-06 01:02:22 -07:00
Eduard-Mihai Burtescu
8519139ab4 Merge pull request #34102 from eddyb/rollup
Rollup of 12 pull requests
2016-06-06 11:02:19 +03:00
Cristian Oliveira
45e647dfe2 Add error description for E0174 2016-06-06 01:02:26 -03:00
Eduard-Mihai Burtescu
c77076074c Rollup merge of #34090 - srinivasreddy:rustfmt_unicode, r=nagisa
run rustfmt on librustc_unicode
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
f7a82e04e3 Rollup merge of #34085 - srinivasreddy:rustfmt_libtest, r=eddyb
run rustfmt on libtest folder
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
61eeffa372 Rollup merge of #34082 - ollie27:rustdoc_css, r=alexcrichton
rustdoc: Fix a few missing colors in the CSS

This adds color to some of the search results and sidebar items which were missing.
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
324a356d78 Rollup merge of #34081 - RustOS-Fork-Holding-Ground:no-core-build-script, r=alexcrichton
No build.rs for libcore

I did a grep and there are no longer any mention of "rustbuild" in core, in `cfg`s or otherwise.
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
594990dbde Rollup merge of #34062 - sanxiyn:no-wget, r=nagisa
Unsupport wget

wget support was removed in #32942 (search for wget in diff), but configure wasn't updated. wget support was introduced in #7498 for Windows, but we now use PowerShell on Windows.
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
f646d93e42 Rollup merge of #34059 - reeze:patch-2, r=GuillaumeGomez
Update comment

The path has changed
2016-06-06 06:48:33 +03:00
Eduard-Mihai Burtescu
9f5be6c2a4 Rollup merge of #34052 - jonas-schievink:issue-32829, r=brson
Add regression test for issue #32829

Closes #32829
2016-06-06 06:48:32 +03:00
Eduard-Mihai Burtescu
d2b8fb4803 Rollup merge of #34048 - shepmaster:corrected-issue-number, r=steveklabnik
Correct issue number in test
2016-06-06 06:48:32 +03:00
Eduard-Mihai Burtescu
0e98d1dc8f Rollup merge of #33955 - zackmdavis:explain_E0429, r=GuillaumeGomez
add explanation for E0429 (`self` use declaration must use brace syntax)

This is an item under #32777.

r? @GuillaumeGomez
2016-06-06 06:48:32 +03:00