Commit Graph

67261 Commits

Author SHA1 Message Date
bors
ff33b60a80 Auto merge of #44096 - Dushistov:master, r=japaric
Add test for wrong code generation for HashSet creation on arm cpu

This is test for #42918.
To reproduce bug you need machine with arm cpu and compile with optimization.
I tried with rustc 1.19.0-nightly (3d5b8c626 2017-06-09),
if compile test with -C opt-level=3 for target=arm-linux-androideabi
and run on "Qualcomm MSM 8974 arm cpu" then assert fails,
if compile and run with -C opt-level=2 it gives segmentation fault.
So I add `compile-flags: -O`.
With rustc 1.19.0 (0ade33941 2017-07-17) all works fine.
Closes #42918
2017-08-26 23:11:44 +00:00
bors
003a929f99 Auto merge of #44084 - alexcrichton:msvc-ninja, r=Mark-Simulacrum
rustbuild: Automatically enable Ninja on MSVC

Discovered in #43767 it turns out the default MSBuild generator in CMake for
whatever reason isn't supporting many of the configuration options we give to
LLVM. To improve the contributor experience automatically enable Ninja if we
find it to ensure that "flavorful" configurations of LLVM work by default in
more situations.

Closes #43767
2017-08-26 20:21:28 +00:00
Matt Ickstadt
0c3c43c800 Remove Splice struct return value from String::splice 2017-08-26 15:07:32 -05:00
Mark Simulacrum
a947c6a595 Update cargo 2017-08-26 12:30:57 -06:00
bors
315e7022f3 Auto merge of #44082 - pnkfelix:issue-43457, r=eddyb
Fix destruction extent lookup during HIR -> HAIR translation

My method for finding the destruction extent, if any, from cbed41a174 (in #39409), was buggy in that it sometimes failed to find an extent that was nonetheless present.

This fixes that, and is cleaner code to boot.

Fix #43457
2017-08-26 17:48:29 +00:00
bors
32f6056079 Auto merge of #44098 - frewsxcv:rollup, r=frewsxcv
Rollup of 7 pull requests

- Successful merges: #43776, #43966, #43979, #44072, #44086, #44090, #44091
- Failed merges:
2017-08-26 15:17:32 +00:00
Corey Farwell
502a11d53e Rollup merge of #44091 - kallisti5:haiku-fix, r=eddyb
haiku/librustc_back: Remove incorrect no_integrated_as

* Makes rust bootstrap incorrectly search for xxx.s vs xxx.0.s
* Not needed or incorrect fix for another issue.
2017-08-26 06:46:37 -07:00
Corey Farwell
fdf4598f8c Rollup merge of #44090 - GuillaumeGomez:str-doc, r=steveklabnik
Add missing link in string doc

r? @rust-lang/docs
2017-08-26 06:46:36 -07:00
Corey Farwell
cc5c1e39f4 Rollup merge of #44086 - kennytm:htmldocck-python3, r=Mark-Simulacrum
Allow `htmldocck.py` to run using Python 3
2017-08-26 06:46:35 -07:00
Corey Farwell
7e8753d1c1 Rollup merge of #44072 - lukaramu:fix-doc-headings, r=steveklabnik
Fix inconsistent doc headings

This fixes headings reading "Unsafety" and "Example", they should be "Safety" and "Examples" according to RFC 1574.

r? @steveklabnik
2017-08-26 06:46:34 -07:00
Corey Farwell
b4dcdee0fd Rollup merge of #43979 - Jouan:Add-links-for-impls, r=GuillaumeGomez
Add links for impls

Implements a solution for issue #23552
r? @QuietMisdreavus
2017-08-26 06:46:33 -07:00
Corey Farwell
e9a6dccce0 Rollup merge of #43966 - GuillaumeGomez:remove-dup, r=QuietMisdreavus
Remove duplicates in rustdoc

Fixes #43934.

Two things however:

 1. I'm not happy with the current check. It seems completely overkill and unsatisfying.
 2. I have no idea how to test if there is only one element and not two.

r? @rust-lang/docs
2017-08-26 06:46:32 -07:00
Corey Farwell
1412ff5512 Rollup merge of #43776 - zackmdavis:feature_gate_fn_must_use, r=alexcrichton
feature-gate #[must_use] for functions as `fn_must_use`

@eddyb I [was](https://github.com/rust-lang/rust/pull/43728#issuecomment-320854120) [dithering](https://github.com/rust-lang/rust/pull/43728#issuecomment-320856407) on this, but [your comment](https://github.com/rust-lang/rust/issues/43302#issuecomment-321174989) makes it sound like we do want a feature gate for this? Please advise.

r? @eddyb
2017-08-26 06:46:31 -07:00
Ralf Jung
bd24325ce1 Do not include the src/Cargo.toml
distcheck complains that this file references projects not cotnained in the tarball
2017-08-26 15:29:17 +02:00
bors
669d4770f2 Auto merge of #44081 - est31:master, r=eddyb
Fix a byte/char confusion issue in the error emitter

Fixes #44078. Fixes #44023.

The start_col member is given in chars, while the code previously assumed it was given in bytes.

The more basic issue #44080 doesn't get fixed.
2017-08-26 12:50:11 +00:00
bors
e7070dd019 Auto merge of #44071 - alexcrichton:no-cycles, r=nikomatsakis
rustc: Start moving toward "try_get is a bug" for incremental

This PR is an effort to burn down some of the work items on #42633. The basic change here was to leave the `try_get` function exposed but have it return a `DiagnosticBuilder` instead of a `CycleError`. This means that it should be a compiler bug to *not* handle the error as dropping a diagnostic should result in a complier panic.

After that change it was then necessary to update the compiler's callsites of `try_get` to handle the error coming out. These were handled as:

* The `sized_constraint` and `needs_drop_raw` checks take the diagnostic and defer it as a compiler bug. This was a new piece of functionality added to the error handling infrastructure, and the idea is that for both these checks a "real" compiler error should be emitted elsewhere, so it's only a bug if we don't actually emit the complier error elsewhere.
* MIR inlining was updated to just ignore the diagnostic. This is being tracked by https://github.com/rust-lang/rust/issues/43542 which sounded like it either already had some work underway or was planning to change regardless.
* The final case, `item_path`, is still sort of up for debate. At the time of this writing this PR simply removes the invocations of `try_get` there, assuming that the query will always succeed. This turns out to be true for the test suite anyway! It sounds like, though, that this logic was intended to assist in "weird" situations like `RUST_LOG` where debug implementations can trigger at any time. This PR would therefore, however, break those implementations.

I'm unfortunately sort of out of ideas on how to handle `item_path`, but other thoughts would be welcome!

Closes #42633
2017-08-26 08:25:44 +00:00
Evgeniy A. Dushistov
911a15d5a8 Add test for wrong code generation for HashSet creation on arm cpu
This is test for #42918.
To reproduce bug you need machine with arm cpu and compile with optimization.
I tried with rustc 1.19.0-nightly (3d5b8c626 2017-06-09),
if compile test with -C opt-level=3 for target=arm-linux-androideabi
and run on "Qualcomm MSM 8974 arm cpu" then assert fails,
if compile and run with -C opt-level=2 it gives segmentation fault.
So I add `compile-flags: -O`.
With rustc 1.19.0 (0ade33941 2017-07-17) all works fine.
Closes #42918
2017-08-26 08:33:35 +03:00
bors
398aaffc94 Auto merge of #44028 - nrc:rls-update, r=alexcrichton
Update RLS and Cargo

r? @alexcrichton
2017-08-26 01:28:57 +00:00
Nick Cameron
7cb3f45063 Update RLS and Cargo 2017-08-25 18:12:47 -07:00
Alex Crichton
c766aa4e3b rustc: Make report_cycle and CycleError private 2017-08-25 17:37:21 -07:00
Alex Crichton
c77213d0cc rustc: Skip cyclic checks in item_path
This seems like it may be likely to cause bugs with `RUST_LOG` and other
"interesting" scenarios, but it removes the usage of `try_get` for now!
2017-08-25 16:08:35 -07:00
Alex Crichton
82bad957c0 rustc: Add a FIXME for try_get in MIR inlining
It sounds like this is being handled elsewhere, so for now just preserve the
existing behavior of ignoring th error.
2017-08-25 16:08:35 -07:00
Alex Crichton
ecb29c11bb rustc: Fix two instances of try_get
The `sized_constraint` and `needs_drop_raw` queries both use `try_get` to detect
cycles, but in both of these cases the cycle indicates an error has happened
elsewhere in compilation. In these cases we can just delay the diagnostic to get
emitted as a bug later if we ended up forgetting to emit the error diagnostic.
2017-08-25 16:08:35 -07:00
Alex Crichton
97f2c37435 rustc: Change the return of a query's try_get
This alters the return value of the `try_get` function so the error contains a
diagnostic rather than a `CycleError`. This way consumers are forced to take
*some* action (else they get a bug to an un-emitted diagnostic). This action
could be to emit the error itself, or in some cases delay the diagnostic as a
bug and continue.
2017-08-25 16:08:35 -07:00
Alex Crichton
64b0b2bfeb rustc_errors: Add the ability to delay as bugs
This adds a function to `DiagnosticBuilder` to delay the entire diagnostic as a
bug to be emitted at a later time. This'll end up getting used in the compiler
in the subsequent commits...
2017-08-25 16:08:35 -07:00
Alex Crichton
ce322eedff rustc: Fix proc_macro expansions on trait methods
This commit fixes procedural macro attributes being attached to trait methods,
ensuring that they get resolved and expanded as other procedural macro
attributes. The bug here was that `current_module` on the resolver was
accidentally set to be a trait when it's otherwise only ever expecting a
`mod`/block module. The actual fix here came from @jseyfried, I'm just helping
to land it in the compiler!

Closes #42493
2017-08-25 15:57:05 -07:00
bors
83fcd4dbba Auto merge of #43994 - tamird:remove-attributes, r=alexcrichton
*: remove crate_{name,type} attributes

Fixes #41701.

r? @arielb1
2017-08-25 22:54:00 +00:00
Alexander von Gluck IV
6ca124bc9e haiku/librustc_back: Remove incorrect no_integrated_as
* Makes rust bootstrap incorrectly search for xxx.s vs xxx.0.s
* Not needed or incorrect fix for another issue.
2017-08-25 17:12:20 -05:00
Guillaume Gomez
0a6c724dde Add missing link in string doc 2017-08-25 23:09:00 +02:00
Tamir Duberstein
b3f50caee0
*: remove crate_{name,type} attributes
Fixes #41701.
2017-08-25 16:18:21 -04:00
Tamir Duberstein
0463566f27
syntax: clarify field name
The value of this field is meant to indicate whether or not the
crate is rustc's libtest itself - not whether or not it is a test
crate generally.
2017-08-25 16:13:02 -04:00
bors
2aeb5930f3 Auto merge of #44046 - alexcrichton:capture-diagnostics, r=michaelwoerister
rustc: Capture diagnostics from all queries

This commit alters the `rustc::ty::maps` implementation to ensure that all
output diagnostics from the compiler are tracked for the duration of each query.
These are then intended to be replayed back the first time a cached value is
loaded, and otherwise the cache should operate the same as it does today.

Closes #42513
2017-08-25 20:11:25 +00:00
Tamir Duberstein
f2fb45723a
syntax: remove unused field 2017-08-25 16:01:14 -04:00
est31
5a71e12351 Fix a byte/char confusion issue in the error emitter
Fixes #44078. Fixes #44023.

The start_col member is given in chars,
while the code previously assumed it was given in bytes.

The more basic issue #44080 doesn't get fixed.
2017-08-25 21:46:54 +02:00
John Kåre Alsaker
536613554f Clean up YieldFinder 2017-08-25 20:10:23 +02:00
kennytm
6a721317ff
Allow htmldocck to run using Python 3. 2017-08-26 01:31:12 +08:00
bors
a1c3365529 Auto merge of #44053 - alexcrichton:no-choco, r=Mark-Simulacrum
appveyor: Use InnoSetup from our mirror

Chocolatey has been pretty flaky, so let's not rely on it.

Closes #43985
2017-08-25 17:26:15 +00:00
John Kåre Alsaker
c71153113b Add some comments and fix a typo 2017-08-25 19:19:42 +02:00
Alex Crichton
e13f02eb2e rustbuild: Automatically enable Ninja on MSVC
Discovered in #43767 it turns out the default MSBuild generator in CMake for
whatever reason isn't supporting many of the configuration options we give to
LLVM. To improve the contributor experience automatically enable Ninja if we
find it to ensure that "flavorful" configurations of LLVM work by default in
more situations.

Closes #43767
2017-08-25 10:12:02 -07:00
Alex Crichton
b4c54715cd Comment about generators and drops 2017-08-25 07:41:30 -07:00
Alex Crichton
1917ffe314 Add some suggested comments around drops 2017-08-25 07:38:57 -07:00
Felix S. Klock II
d1a15cdfb1 Regression test. 2017-08-25 16:35:42 +02:00
Alex Crichton
ed5bc60d4e Remove unneeded FIXME for now 2017-08-25 07:31:05 -07:00
Alex Crichton
74b93f35da Add a self_arg convenience 2017-08-25 07:19:40 -07:00
Alex Crichton
8c97ffa1d4 Fix merge conflict 2017-08-25 07:18:19 -07:00
Alex Crichton
303a26406a Reorder slightly in visit_basic_block_data 2017-08-25 07:17:37 -07:00
Alex Crichton
b28aeeb04e Fix indentation 2017-08-25 07:16:24 -07:00
Alex Crichton
c872f47276 Merge remote-tracking branch 'origin/master' into gen 2017-08-25 07:15:12 -07:00
Felix S. Klock II
b8d8dc3c23 Fix #43457 (and avoid some unneeded lookups to boot, woo). 2017-08-25 16:08:03 +02:00
bors
a4d11495f9 Auto merge of #43700 - gaurikholkar:struct_lifetimes, r=nikomatsakis
Adding E0623 for structs

This is a fix to #43275

The error message is
```
+error[E0623]: lifetime mismatch
+  --> $DIR/ex3-both-anon-regions-both-are-structs.rs:15:12
+   |
+14 | fn foo(mut x: Vec<Ref>, y: Ref) {
+   |                   ---      --- these structs are declared with different lifetimes...
+15 |     x.push(y);
+   |            ^ ...but data from `y` flows into `x` here
+
+error: aborting due to previous error
```

r? @nikomatsakis
2017-08-25 12:59:04 +00:00