]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAdd x86_64-linux-android target
Marco A L Barbosa [Thu, 20 Apr 2017 17:02:42 +0000 (14:02 -0300)]
Add x86_64-linux-android target

7 years agoUpdate libc to include x86_64-linux-android support
Marco A L Barbosa [Thu, 20 Apr 2017 16:59:41 +0000 (13:59 -0300)]
Update libc to include x86_64-linux-android support

7 years agoAuto merge of #41357 - frewsxcv:rollup, r=frewsxcv
bors [Tue, 18 Apr 2017 04:15:13 +0000 (04:15 +0000)]
Auto merge of #41357 - frewsxcv:rollup, r=frewsxcv

Rollup of 3 pull requests

- Successful merges: #41262, #41310, #41344
- Failed merges:

7 years agoRollup merge of #41344 - Diggsey:remove-natvis-nbsp, r=alexcrichton
Corey Farwell [Tue, 18 Apr 2017 03:21:19 +0000 (23:21 -0400)]
Rollup merge of #41344 - Diggsey:remove-natvis-nbsp, r=alexcrichton

Remove non-breaking spaces from natvis files

Visual studio will see natvis files with non-breaking spaces as invalid XML, and will ignore them.

7 years agoRollup merge of #41310 - eddyb:demand-const-eval, r=nikomatsakis
Corey Farwell [Tue, 18 Apr 2017 03:21:18 +0000 (23:21 -0400)]
Rollup merge of #41310 - eddyb:demand-const-eval, r=nikomatsakis

[on-demand] Turn monomorphic_const_eval into a proper query, not just a cache.

The error definitions and reporting logic, alongside with `eval_length` were moved to `librustc`.
Both local and cross-crate constant evaluation is on-demand now, but the latter is only used for `enum` discriminants, to replace the manual insertion into the cache which was done when decoding variants.

r? @nikomatsakis

7 years agoRollup merge of #41262 - jonhoo:compiler-barrier-rename, r=alexcrichton
Corey Farwell [Tue, 18 Apr 2017 03:21:17 +0000 (23:21 -0400)]
Rollup merge of #41262 - jonhoo:compiler-barrier-rename, r=alexcrichton

Rename compiler_barrier to compiler_fence

This addresses concerns raised following the merge of #41092. Specifically:

> The naming of these seems surprising: the multithreaded functions (and both the single and multithreaded intrinsics themselves) are fences, but this is a barrier. It's not incorrect, but the latter is both inconsistent with the existing functions and slightly confusing with another type in std (e.g., `Barrier`).

`compiler_fence` carries the same semantic implication that this is a compiler-only operation, while being more in line with the fence/barrier concepts already in use in `std`.

7 years agoAuto merge of #41340 - eddyb:demand-assoc-defids, r=nikomatsakis
bors [Tue, 18 Apr 2017 01:18:14 +0000 (01:18 +0000)]
Auto merge of #41340 - eddyb:demand-assoc-defids, r=nikomatsakis

rustc: move associated_item_def_ids to an on-demand query.

r? @nikomatsakis

7 years agoAuto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov
bors [Mon, 17 Apr 2017 22:22:56 +0000 (22:22 +0000)]
Auto merge of #41282 - arielb1:missing-impl-item, r=petrochenkov

libsyntax/parse: fix missing kind error reporting

Fixes #41161.
Fixes #41239.

7 years agolibsyntax/parse: improve associated item error reporting
Ariel Ben-Yehuda [Thu, 13 Apr 2017 19:37:05 +0000 (22:37 +0300)]
libsyntax/parse: improve associated item error reporting

Fixes #41161.
Fixes #41239.

7 years agoAuto merge of #41345 - frewsxcv:rollup, r=frewsxcv
bors [Mon, 17 Apr 2017 17:56:29 +0000 (17:56 +0000)]
Auto merge of #41345 - frewsxcv:rollup, r=frewsxcv

Rollup of 3 pull requests

- Successful merges: #41012, #41280, #41290
- Failed merges:

7 years agoRollup merge of #41290 - GuillaumeGomez:put-back-hoedown, r=steveklabnik
Corey Farwell [Mon, 17 Apr 2017 17:26:21 +0000 (13:26 -0400)]
Rollup merge of #41290 - GuillaumeGomez:put-back-hoedown, r=steveklabnik

Hoedown big comeback!

```bash
> cargo +local test
   Compiling libc v0.2.20
   Compiling sysinfo v0.3.4 (file:///Users/imperio/rust/sysinfo)
    Finished dev [unoptimized + debuginfo] target(s) in 3.2 secs
     Running target/debug/deps/disk_list-dbd70897f1f7e080

running 1 test
test test_disks ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured

     Running target/debug/deps/sysinfo-8ad11103abdf5941

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured

   Doc-tests sysinfo
WARNING: src/sysinfo.rs -  (line 45) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.
WARNING: src/sysinfo.rs -  (line 48) test will be run in the next rustdoc version. If it's not supposed to, please update your documentation and make it compliant to common mark specifications.

running 1 test
test src/sysinfo.rs -  (line 14) ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured
```

r? @rust-lang/docs

7 years agoRollup merge of #41280 - QuietMisdreavus:rustdoc-toc, r=GuillaumeGomez
Corey Farwell [Mon, 17 Apr 2017 17:26:20 +0000 (13:26 -0400)]
Rollup merge of #41280 - QuietMisdreavus:rustdoc-toc, r=GuillaumeGomez

rustdoc: add a list of headings to the sidebar

It's another misdreavus rustdoc PR, which means it's time for Bikeshed City once again! `:3`

In an effort to aid navigation in long documentation pages, this PR adds a listing of headings to the sidebars of pages where such headings exist. For example, for structs, links to their fields, inherent methods, and trait implementations are available where applicable.

Examples:

* Modules/Crate roots
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019930/1000fa3a-2052-11e7-98ff-ddf5af18b3e6.png)
* Enums
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019954/33497f9e-2052-11e7-88cf-df46f1b3b8a3.png)
* Primitives
  ![image](https://cloud.githubusercontent.com/assets/5217170/25019978/4820bbc6-2052-11e7-8b5a-96a864eb2a5b.png)
* Traits
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020093/bd1bc9f2-2052-11e7-9cd1-00a0ad8007bc.png)
* Structs
  ![image](https://cloud.githubusercontent.com/assets/5217170/25020145/d75206b0-2052-11e7-88cc-9e9525084775.png)

Open questions:

* Right now, these kinds of pages (and also unions) are the only pages that will receive the name header - pages for functions, constants, macros, etc, won't have the corresponding name in their sidebar. Should I print the name regardless and only add table-of-contents links for pages that have them? This would make them match, for example, a struct with no public fields, no methods, and no trait implementations. The latter would still have a "Struct MyStruct" line above the module contents, with no header links to speak of, whereas a function wouldn't even have "Function my\_function".
* This is only a header listing, but there has been requests to include a more-complete listing of fields/methods/traits/etc, for example in #41123.

7 years agoRollup merge of #41012 - durka:vis-matcher, r=petrochenkov
Corey Farwell [Mon, 17 Apr 2017 17:26:19 +0000 (13:26 -0400)]
Rollup merge of #41012 - durka:vis-matcher, r=petrochenkov

:vis matcher for macro_rules

Resurrection of @DanielKeep's implementation posted with [RFC 1575](https://github.com/rust-lang/rfcs/pull/1575).

@jseyfried was of the opinion that this doesn't need an RFC.

Needed before merge:

- [x] sign-off from @DanielKeep since I stole his code
- [x] feature gate
- [x] docs

7 years agoRemove non-breaking spaces
Diggory Blake [Mon, 17 Apr 2017 16:49:35 +0000 (17:49 +0100)]
Remove non-breaking spaces

7 years agoAdd hoedown COPYRIGHT back
Guillaume Gomez [Fri, 14 Apr 2017 15:17:06 +0000 (17:17 +0200)]
Add hoedown COPYRIGHT back

7 years agoRemove hoedown from tidy check
Guillaume Gomez [Fri, 14 Apr 2017 11:03:48 +0000 (13:03 +0200)]
Remove hoedown from tidy check

7 years agoHoedown big comeback!
Guillaume Gomez [Thu, 13 Apr 2017 23:23:14 +0000 (01:23 +0200)]
Hoedown big comeback!

7 years agorustdoc: add a list of headings to the sidebar
QuietMisdreavus [Mon, 21 Nov 2016 21:52:51 +0000 (15:52 -0600)]
rustdoc: add a list of headings to the sidebar

7 years agorustc: move associated_item_def_ids to an on-demand query.
Eduard-Mihai Burtescu [Mon, 17 Apr 2017 15:15:22 +0000 (18:15 +0300)]
rustc: move associated_item_def_ids to an on-demand query.

7 years agoAuto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnik
bors [Mon, 17 Apr 2017 15:10:23 +0000 (15:10 +0000)]
Auto merge of #41264 - alexeyzab:41158-fix-docs, r=steveklabnik

Fix old docs

Fixes #41158

7 years agoAdjust description
alexey zabelin [Mon, 17 Apr 2017 14:48:23 +0000 (10:48 -0400)]
Adjust description

7 years agoAuto merge of #41157 - aidanhs:aphs-debug-appveyor-cache, r=TimNN
bors [Sun, 16 Apr 2017 22:24:36 +0000 (22:24 +0000)]
Auto merge of #41157 - aidanhs:aphs-debug-appveyor-cache, r=TimNN

Add a comment for disabling errexit, try to debug appveyor cache

Comments added as requested.

Also, lets add some cache debugging to appveyor. I *think* this is how to ignore errors in cmd.exe (and I did try it on my own machine), but I'm not 100% sure how appveyor runs them. In the worst case it'll fail but I guess that isn't the end of the world since the build has already failed by this point.

r? @TimNN

7 years agoAuto merge of #40409 - mbrubeck:calloc, r=sfackler
bors [Sun, 16 Apr 2017 19:13:52 +0000 (19:13 +0000)]
Auto merge of #40409 - mbrubeck:calloc, r=sfackler

Specialize Vec::from_elem to use calloc

Fixes #38723.  This specializes the implementation for `u8` only, but it could be extended to other zeroable types if desired.

I haven't tested this extensively, but I did verify that it gives the expected performance boost for large `vec![0; n]` allocations with both alloc_system and jemalloc, on Linux.  (I have not tested or even built the Windows code.)

7 years agoAuto merge of #41329 - nagisa:bitflags-repr-options, r=eddyb
bors [Sun, 16 Apr 2017 16:47:18 +0000 (16:47 +0000)]
Auto merge of #41329 - nagisa:bitflags-repr-options, r=eddyb

Compress ReprOptions a little bit

r? @eddyb

7 years agoAuto merge of #41308 - eddyb:order-must-be-preserved, r=nagisa
bors [Sun, 16 Apr 2017 13:44:22 +0000 (13:44 +0000)]
Auto merge of #41308 - eddyb:order-must-be-preserved, r=nagisa

[rustbuild] Side-step HashMap iteration to preserve command-line step order.

The new `HashMap` was introduced by #41227 and it accidentally randomized step order.

r? @alexcrichton

7 years agoCompress ReprOptions a little bit
Simonas Kazlauskas [Sun, 16 Apr 2017 13:17:13 +0000 (16:17 +0300)]
Compress ReprOptions a little bit

7 years agorustc: use monomorphic const_eval for cross-crate enum discriminants.
Eduard-Mihai Burtescu [Sat, 15 Apr 2017 01:14:44 +0000 (04:14 +0300)]
rustc: use monomorphic const_eval for cross-crate enum discriminants.

7 years agorustc: expose monomorphic const_eval through on-demand.
Eduard-Mihai Burtescu [Fri, 14 Apr 2017 16:00:08 +0000 (19:00 +0300)]
rustc: expose monomorphic const_eval through on-demand.

7 years agorustc_const_eval: move ConstEvalErr to the rustc crate.
Eduard-Mihai Burtescu [Thu, 13 Apr 2017 13:40:03 +0000 (16:40 +0300)]
rustc_const_eval: move ConstEvalErr to the rustc crate.

7 years agoAuto merge of #41320 - Mark-Simulacrum:cleanup-methodmatch, r=arielb1
bors [Sat, 15 Apr 2017 22:15:53 +0000 (22:15 +0000)]
Auto merge of #41320 - Mark-Simulacrum:cleanup-methodmatch, r=arielb1

Remove MethodMatchResult and MethodMatchedData.

These two enums were unused.

Fixes #41318.

r? @nikomatsakis

7 years agosatisfy completely useless tidy check
Alex Burka [Sat, 15 Apr 2017 21:39:19 +0000 (21:39 +0000)]
satisfy completely useless tidy check

7 years agoAuto merge of #41319 - eddyb:demand-adt-sized-constraint, r=arielb1
bors [Sat, 15 Apr 2017 19:44:17 +0000 (19:44 +0000)]
Auto merge of #41319 - eddyb:demand-adt-sized-constraint, r=arielb1

rustc: provide adt_sized_constraint as an on-demand query.

By using `queries::adt_sized_constraint::try_get`, we can detect cycles without a separate stack.
r? @nikomatsakis

7 years agoreduce macro rule duplication in test
Alex Burka [Mon, 3 Apr 2017 00:26:14 +0000 (00:26 +0000)]
reduce macro rule duplication in test

7 years agofeature gate :vis matcher
Alex Burka [Mon, 3 Apr 2017 00:09:07 +0000 (00:09 +0000)]
feature gate :vis matcher

7 years agodocument :vis in unstable book
Alex Burka [Sun, 2 Apr 2017 20:04:27 +0000 (20:04 +0000)]
document :vis in unstable book

7 years agowiden :vis follow set
Alex Burka [Sun, 2 Apr 2017 19:06:40 +0000 (19:06 +0000)]
widen :vis follow set

7 years agomove NtVis enum variant to stave off comment rot
Alex Burka [Sun, 2 Apr 2017 18:34:38 +0000 (18:34 +0000)]
move NtVis enum variant to stave off comment rot

7 years agoparse interpolated visibility tokens
Alex Burka [Sun, 2 Apr 2017 04:46:51 +0000 (04:46 +0000)]
parse interpolated visibility tokens

7 years agoupdate print_visibility for new pub(restricted) syntax
Alex Burka [Sun, 2 Apr 2017 04:46:33 +0000 (04:46 +0000)]
update print_visibility for new pub(restricted) syntax

7 years agoupdate :vis implementation to current rust
Alex Burka [Sun, 2 Apr 2017 04:21:12 +0000 (04:21 +0000)]
update :vis implementation to current rust

7 years agoImplementation of the `vis` macro matcher.
Daniel Keep [Sun, 24 Apr 2016 16:04:01 +0000 (02:04 +1000)]
Implementation of the `vis` macro matcher.

7 years agoAuto merge of #39881 - king6cong:sys, r=japaric
bors [Sat, 15 Apr 2017 17:17:17 +0000 (17:17 +0000)]
Auto merge of #39881 - king6cong:sys, r=japaric

code format

7 years agoSpecialize Vec::from_elem for other numeric types
Matt Brubeck [Fri, 10 Mar 2017 16:19:42 +0000 (08:19 -0800)]
Specialize Vec::from_elem for other numeric types

7 years agoSpecialize Vec::from_elem<u8> to use calloc or memset
Matt Brubeck [Fri, 10 Mar 2017 01:53:01 +0000 (17:53 -0800)]
Specialize Vec::from_elem<u8> to use calloc or memset

Fixes #38723.

7 years agoAuto merge of #41321 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 15 Apr 2017 14:42:22 +0000 (14:42 +0000)]
Auto merge of #41321 - frewsxcv:rollup, r=frewsxcv

Rollup of 2 pull requests

- Successful merges: #41306, #41311
- Failed merges:

7 years agoRollup merge of #41311 - tedsta:fuchsia_error_codes, r=eddyb
Corey Farwell [Sat, 15 Apr 2017 14:41:51 +0000 (10:41 -0400)]
Rollup merge of #41311 - tedsta:fuchsia_error_codes, r=eddyb

Update magenta error codes

Update magenta error codes to match recent changes here: https://github.com/fuchsia-mirror/magenta/blob/master/system/public/magenta/errors.h

7 years agoRollup merge of #41306 - nateozem:support/docs-mir, r=frewsxcv
Corey Farwell [Sat, 15 Apr 2017 14:41:50 +0000 (10:41 -0400)]
Rollup merge of #41306 - nateozem:support/docs-mir, r=frewsxcv

add 'mir' to rustc help menu and man doc

add 'mir' to '--emit' flag list for 'rustc'.
This is added because 'rustc' can now generate MIR (referencing to
"Teach rustc --emit=mir #39891").

7 years agoRemove MethodMatchResult and MethodMatchedData.
Mark Simulacrum [Sat, 15 Apr 2017 13:23:56 +0000 (07:23 -0600)]
Remove MethodMatchResult and MethodMatchedData.

These two enums were unused.

7 years agorustc: provide adt_sized_constraint as an on-demand query.
Eduard-Mihai Burtescu [Sat, 15 Apr 2017 12:40:38 +0000 (15:40 +0300)]
rustc: provide adt_sized_constraint as an on-demand query.

7 years agoAuto merge of #41316 - suchithjn225:issue-41272, r=eddyb
bors [Sat, 15 Apr 2017 12:13:27 +0000 (12:13 +0000)]
Auto merge of #41316 - suchithjn225:issue-41272, r=eddyb

Do not desugar if-let-else to match arm guards

Fixes #41272
Changed the desugaring code

**Before**
```rust
match <sub_expr> {
     <pat> => <body>,
     [_ if <else_opt_if_cond> => <else_opt_if_body>,]
     _ => [<else_opt> | ()]
}
```

**After**
```rust
match <sub_expr> {
    <pat> => <body>,
     _       => [<else_opt> | ()]
}
```
With this fix, it doesn't cause E0301

7 years agoAesthetic issue. Corrected indentation
Suchith J N [Sat, 15 Apr 2017 12:10:54 +0000 (17:40 +0530)]
Aesthetic issue. Corrected indentation

7 years agoFixed aesthetics of if let block
Suchith J N [Sat, 15 Apr 2017 12:05:30 +0000 (17:35 +0530)]
Fixed aesthetics of if let block

7 years agoFixed aesthetics and test
Suchith J N [Sat, 15 Apr 2017 11:51:53 +0000 (17:21 +0530)]
Fixed aesthetics and test

7 years ago[41272] - Fixed to conform to rust project style
Suchith J N [Sat, 15 Apr 2017 06:47:25 +0000 (12:17 +0530)]
[41272] - Fixed to conform to rust project style

7 years agoAuto merge of #41286 - lukaramu:std-collections-docs, r=frewsxcv
bors [Sat, 15 Apr 2017 04:46:27 +0000 (04:46 +0000)]
Auto merge of #41286 - lukaramu:std-collections-docs, r=frewsxcv

Various improvements in std::collections docs

The meat of this PR are:
* changes to (almost all?) iterator struct docs in std::collections such that they use the standard iterator boilerplate and state where they are created
* a bunch of added links (at least as much as possible given std::collections mostly being a facade and whatnot :sweat_smile:)
* an example for `Bound`
* changed phrasing for some summary sentences to be less redundant as well as more consistant with others in the module

There also are various other fixes, e.g. removing parens from method names in the module docs, changing some imperatives to 3rd person, etc.

r? @steveklabnik

7 years ago[41272] - code for desugaring iflet changed
Suchith J N [Sat, 15 Apr 2017 04:44:09 +0000 (10:14 +0530)]
[41272] - code for desugaring iflet changed

7 years agocode format
king6cong [Sat, 15 Apr 2017 03:43:35 +0000 (11:43 +0800)]
code format

7 years agoAuto merge of #41312 - frewsxcv:rollup, r=frewsxcv
bors [Sat, 15 Apr 2017 02:06:20 +0000 (02:06 +0000)]
Auto merge of #41312 - frewsxcv:rollup, r=frewsxcv

Rollup of 2 pull requests

- Successful merges: #41125, #41309
- Failed merges:

7 years agoRollup merge of #41309 - frewsxcv:sg-implement-rfc-1268, r=nikomatsakis
Corey Farwell [Sat, 15 Apr 2017 02:05:42 +0000 (22:05 -0400)]
Rollup merge of #41309 - frewsxcv:sg-implement-rfc-1268, r=nikomatsakis

Implement RFC 1268.

Rebased version of https://github.com/rust-lang/rust/pull/40097.

Tracking issue: https://github.com/rust-lang/rust/issues/29864.

7 years agoRollup merge of #41125 - lukaramu:std-hash-docs, r=frewsxcv
Corey Farwell [Sat, 15 Apr 2017 02:05:41 +0000 (22:05 -0400)]
Rollup merge of #41125 - lukaramu:std-hash-docs, r=frewsxcv

Improve std::hash docs

Fixes #29357.

For details on what exactly I've done, see the commit descriptions.

There are some things I'm not sure about, but would like to address before merging this so the issue can be closed; any feedback on these points would really be appriciated:
* [x] ~I didn't touch the module level docs at all. On the one hand, I think they could use a short overview over the module; on the other hand, the module really isn't that big and I don't know if I could really do anything beyond just duplicating the type's summaries...~
* [x] ~I feel like the module-level examples are quite long-winded and not to the point, but I couldn't really think of anything better. Any ideas?~
* [x] ~Should `Hasher` get an example for implementing it? There is one in the module documentation, but it only "implements" it via `unimplemented!` and I'm not sure what the value of that is.~
* [x] ~Should `Hasher`'s `write_{int}` methods get examples?~

If there's anything else you'd like to see in std::hash's docs, please let me know!

r? @rust-lang/docs

7 years agoAdd Unstable Book entry for 'overlapping-marker-traits'.
Corey Farwell [Sat, 15 Apr 2017 00:38:10 +0000 (20:38 -0400)]
Add Unstable Book entry for 'overlapping-marker-traits'.

7 years agoupdate tests slightly
Niko Matsakis [Thu, 30 Mar 2017 12:54:28 +0000 (08:54 -0400)]
update tests slightly

7 years agoName files what tidy wants them to be namd
Sean Griffin [Fri, 17 Mar 2017 23:20:18 +0000 (19:20 -0400)]
Name files what tidy wants them to be namd

7 years agoPut overlapping impls behind feature gate, add tests
Sean Griffin [Fri, 17 Mar 2017 18:16:29 +0000 (14:16 -0400)]
Put overlapping impls behind feature gate, add tests

I've added some explicit tests that negative impls are allowed to
overlap, and also to make sure that the feature doesn't interfere with
specialization. I've not added an explicit test for positive overlapping
with negative, as that's already tested elsewhere.

7 years agoFurther update with response to feedback
Sean Griffin [Fri, 17 Mar 2017 16:43:15 +0000 (12:43 -0400)]
Further update with response to feedback

7 years agoUpdate with response to feedback
Sean Griffin [Fri, 3 Mar 2017 14:09:09 +0000 (09:09 -0500)]
Update with response to feedback

7 years agoImplement RFC 1268
Sean Griffin [Sat, 25 Feb 2017 21:16:27 +0000 (16:16 -0500)]
Implement RFC 1268

This patch allows overlap to occur between any two impls of a trait for
traits which have no associated items.

Several compile-fail tests around coherence had to be changed to add at
least one item to the trait they test against.

Ref #29864

7 years agoUpdate magenta error codes
Theodore DeRego [Sat, 15 Apr 2017 01:37:57 +0000 (18:37 -0700)]
Update magenta error codes

7 years ago[rustbuild] Side-step HashMap iteration to preserve command-line step order.
Eduard-Mihai Burtescu [Sat, 15 Apr 2017 00:33:12 +0000 (03:33 +0300)]
[rustbuild] Side-step HashMap iteration to preserve command-line step order.

7 years agoAuto merge of #41305 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 14 Apr 2017 23:15:31 +0000 (23:15 +0000)]
Auto merge of #41305 - frewsxcv:rollup, r=frewsxcv

Rollup of 4 pull requests

- Successful merges: #40702, #41172, #41249, #41303
- Failed merges:

7 years agoadd 'mir' as part of the --emit flag list in rustc --help menu and man doc.
nate [Fri, 14 Apr 2017 20:08:07 +0000 (13:08 -0700)]
add 'mir' as part of the --emit flag list in rustc --help menu and man doc.
This is added because 'rustc' can now generate MIR (referencing to
"Teach rustc --emit=mir #39891").

7 years agoRollup merge of #41303 - CryZe:patch-5, r=japaric
Corey Farwell [Fri, 14 Apr 2017 21:41:06 +0000 (17:41 -0400)]
Rollup merge of #41303 - CryZe:patch-5, r=japaric

Compile WASM as WASM instead of asm.js

Looks like the LinkerFlavor change introduced in #40018 accidentally uses GCC for the WebAssembly target, causing Rust to never actually pass the post link args to emscripten. This then causes the code to be compiled as asm.js instead of WebAssembly, because the Binaryen tools never run due to the missing linker argument.

7 years agoRollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv
Corey Farwell [Fri, 14 Apr 2017 21:41:05 +0000 (17:41 -0400)]
Rollup merge of #41249 - GuillaumeGomez:rustdoc-render, r=steveklabnik,frewsxcv

Fix invalid associated type rendering in rustdoc

Fixes #41036.

r? @rust-lang/docs

7 years agoRollup merge of #41172 - Aaron1011:rustdoc-overflow, r=frewsxcv
Corey Farwell [Fri, 14 Apr 2017 21:41:04 +0000 (17:41 -0400)]
Rollup merge of #41172 - Aaron1011:rustdoc-overflow, r=frewsxcv

Fix rustdoc infinitely recursing when an external crate reexports itself

Previously, rustdoc's LibEmbargoVisitor unconditionally visited the
child modules of an external crate. If a module re-exported its parent
via `pub use super::*`, rustdoc would re-walk the parent, leading to
infinite recursion.

This commit makes LibEmbargoVisitor store already visited modules in an
FxHashSet, ensuring that each module is only walked once.

Fixes #40936

7 years agoRollup merge of #40702 - mrhota:global_asm, r=nagisa
Corey Farwell [Fri, 14 Apr 2017 21:41:03 +0000 (17:41 -0400)]
Rollup merge of #40702 - mrhota:global_asm, r=nagisa

Implement global_asm!() (RFC 1548)

This is a first attempt. ~~One (potential) problem I haven't solved is how to handle multiple usages of `global_asm!` in a module/crate. It looks like `LLVMSetModuleInlineAsm` overwrites module asm, and `LLVMAppendModuleInlineAsm` is not provided in LLVM C headers ðŸ˜¦~~

I can provide more detail as needed, but honestly, there's not a lot going on here.

r? @eddyb

CC @Amanieu @jackpot51

Tracking issue: #35119

7 years agostd::collections docs: Address issues that came up in PR #41286
lukaramu [Fri, 14 Apr 2017 21:36:27 +0000 (23:36 +0200)]
std::collections docs: Address issues that came up in PR #41286

* Bound:
  * Added another example using RangeArgument to illustrate how Bound maps
    to range endpoints.
  * Added a note to the existing example that says that it's better to use
    range syntax in most cases
  * Added missing /// line
* binary_heap::PeakMut: s/Object representing/Structure wrapping
* added collections/hash_set/struct.HashSet.html to linkchecker whitelist

7 years agoAuto merge of #41302 - rkruppe:dec2flt-assoc-consts, r=BurntSushi
bors [Fri, 14 Apr 2017 19:33:28 +0000 (19:33 +0000)]
Auto merge of #41302 - rkruppe:dec2flt-assoc-consts, r=BurntSushi

Use associated constants in core::num::dec2flt

7 years agoCompile WASM as WASM instead of asm.js
Christopher Serr [Fri, 14 Apr 2017 17:17:03 +0000 (19:17 +0200)]
Compile WASM as WASM instead of asm.js

Looks like the LinkerFlavor change introduced in #40018 accidentally uses GCC for the WebAssembly target, causing Rust to never actually pass the post link args to emscripten. This then causes the code to be compiled as asm.js instead of WebAssembly, because the Binaryen tools never run due to the missing linker argument.

7 years agoAuto merge of #41153 - petrochenkov:umove, r=pnkfelix
bors [Fri, 14 Apr 2017 16:28:14 +0000 (16:28 +0000)]
Auto merge of #41153 - petrochenkov:umove, r=pnkfelix

Fix move checking for nested union fields

Fixes https://github.com/rust-lang/rust/issues/41126
r? @arielb1

7 years agoUse associated constants in core::num::dec2flt
Robin Kruppe [Fri, 14 Apr 2017 15:14:20 +0000 (17:14 +0200)]
Use associated constants in core::num::dec2flt

7 years agoAdd a comment for disabling errexit
Aidan Hobson Sayers [Sat, 8 Apr 2017 07:39:31 +0000 (08:39 +0100)]
Add a comment for disabling errexit

7 years agoAuto merge of #41122 - palango:mod-desc-floats, r=frewsxcv
bors [Fri, 14 Apr 2017 13:24:27 +0000 (13:24 +0000)]
Auto merge of #41122 - palango:mod-desc-floats, r=frewsxcv

Improve module description for std::f32 and std::f64

Fixes #29353, see discussion there.

7 years agoComply with windows symbol name conventions
A.J. Gardner [Fri, 14 Apr 2017 04:41:03 +0000 (23:41 -0500)]
Comply with windows symbol name conventions

7 years agoAuto merge of #41294 - frewsxcv:rollup, r=frewsxcv
bors [Fri, 14 Apr 2017 02:02:13 +0000 (02:02 +0000)]
Auto merge of #41294 - frewsxcv:rollup, r=frewsxcv

Rollup of 4 pull requests

- Successful merges: #41279, #41281, #41287, #41292
- Failed merges:

7 years agoRollup merge of #41292 - est31:master, r=BurntSushi
Corey Farwell [Fri, 14 Apr 2017 02:01:28 +0000 (22:01 -0400)]
Rollup merge of #41292 - est31:master, r=BurntSushi

Avoid to use floating point match

Its going to be forbidden, see issue #41255.

7 years agoRollup merge of #41287 - nikomatsakis:incr-comp-refactor-trans, r=eddyb
Corey Farwell [Fri, 14 Apr 2017 02:01:27 +0000 (22:01 -0400)]
Rollup merge of #41287 - nikomatsakis:incr-comp-refactor-trans, r=eddyb

Miscellneous refactorings of trans

This doesn't achieve any particular goal yet, but it's a collection of refactorings with the common goal of turning `SharedCrateContext` etc into stuff that we can use with on-demand and actually expect to hash in a stable fashion for incremental. Not there yet, clearly.

r? @eddyb
cc @michaelwoerister

7 years agoRollup merge of #41281 - steveklabnik:update-submodules2, r=guillaumegomez
Corey Farwell [Fri, 14 Apr 2017 02:01:26 +0000 (22:01 -0400)]
Rollup merge of #41281 - steveklabnik:update-submodules2, r=guillaumegomez

bump book repos

Not ready to merge yet; I'd like to see what tidy says.

7 years agoRollup merge of #41279 - arielb1:adjustment-composition, r=nikomatsakis
Corey Farwell [Fri, 14 Apr 2017 02:01:25 +0000 (22:01 -0400)]
Rollup merge of #41279 - arielb1:adjustment-composition, r=nikomatsakis

rustc_typeck: consolidate adjustment composition

Instead of having `write_adjustment` overwrite the previous adjustment, have `apply_adjustment` compose a new adjustment on top of the previous one. This is important because `NeverToAny` adjustments can be present on expressions during coercion.

Fixes #41213.

r? @nikomatsakis

7 years agoAvoid to use floating point match
est31 [Fri, 14 Apr 2017 00:58:54 +0000 (02:58 +0200)]
Avoid to use floating point match

Its going to be forbidden, see issue 41255.

7 years agomake `write_metadata` take `tcx` intead of `SharedCrateContext`
Niko Matsakis [Thu, 13 Apr 2017 22:21:51 +0000 (18:21 -0400)]
make `write_metadata` take `tcx` intead of `SharedCrateContext`

7 years agorefactor `metadata_symbol_name`
Niko Matsakis [Thu, 13 Apr 2017 22:08:36 +0000 (18:08 -0400)]
refactor `metadata_symbol_name`

7 years agopull stats out of `SharedCrateContext`
Niko Matsakis [Thu, 13 Apr 2017 21:11:54 +0000 (17:11 -0400)]
pull stats out of `SharedCrateContext`

shared mutable state is bad

7 years agoremove `LinkMeta` from `SharedCrateContext`
Niko Matsakis [Thu, 13 Apr 2017 19:55:48 +0000 (15:55 -0400)]
remove `LinkMeta` from `SharedCrateContext`

A number of things were using `crate_hash` that really ought to be using
`crate_disambiguator` (e.g., to create the plugin symbol names). They
have been updated.

It is important to remove `LinkMeta` from `SharedCrateContext` since it
contains a hash of the entire crate, and hence it will change
whenever **anything** changes (which would then require
rebuilding **everything**).

7 years agouse `tcx.crate_name(LOCAL_CRATE)` rather than `LinkMeta::crate_name`
Niko Matsakis [Thu, 13 Apr 2017 18:58:20 +0000 (14:58 -0400)]
use `tcx.crate_name(LOCAL_CRATE)` rather than `LinkMeta::crate_name`

7 years agokill `CrateContextList` as a thing
Niko Matsakis [Thu, 13 Apr 2017 17:57:45 +0000 (13:57 -0400)]
kill `CrateContextList` as a thing

7 years agorewrite post-processing routines not to require a `CrateContext`
Niko Matsakis [Thu, 13 Apr 2017 17:14:37 +0000 (13:14 -0400)]
rewrite post-processing routines not to require a `CrateContext`

These do some low-level munging on the LLVM data structures. Unclear
that they need to operate as a "second pass" but leave it for now.

7 years agocreate `ModuleTranslation` all in one big loop
Niko Matsakis [Thu, 13 Apr 2017 16:46:37 +0000 (12:46 -0400)]
create `ModuleTranslation` all in one big loop

7 years agomove `assert_module_sources` call down below
Niko Matsakis [Thu, 13 Apr 2017 16:38:27 +0000 (12:38 -0400)]
move `assert_module_sources` call down below

7 years agomerge the "predeclare" and "declare" phases so we run them per-CGU
Niko Matsakis [Thu, 13 Apr 2017 16:38:03 +0000 (12:38 -0400)]
merge the "predeclare" and "declare" phases so we run them per-CGU

7 years agoredirect `exported_symbols` through `shared`
Niko Matsakis [Thu, 13 Apr 2017 16:07:56 +0000 (12:07 -0400)]
redirect `exported_symbols` through `shared`