]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAuto merge of #41920 - arielb1:inline-drop, r=eddyb
bors [Sat, 13 May 2017 13:59:19 +0000 (13:59 +0000)]
Auto merge of #41920 - arielb1:inline-drop, r=eddyb

remove the #[inline] attribute from drop_in_place

Apparently LLVM has exponential code growth while inlining landing pads
if that attribute is present.

Fixes #41696.

beta-nominating  because regression.
r? @eddyb

7 years agoadd min-llvm-version
Ariel Ben-Yehuda [Sat, 13 May 2017 11:38:15 +0000 (14:38 +0300)]
add min-llvm-version

7 years agoAuto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sat, 13 May 2017 11:35:59 +0000 (11:35 +0000)]
Auto merge of #41965 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 15 pull requests

- Successful merges: #41820, #41860, #41876, #41896, #41912, #41916, #41918, #41921, #41923, #41934, #41935, #41940, #41942, #41943, #41951
- Failed merges:

7 years agoAuto merge of #41861 - arthurprs:update-jemalloc, r=alexcrichton
bors [Sat, 13 May 2017 09:12:09 +0000 (09:12 +0000)]
Auto merge of #41861 - arthurprs:update-jemalloc, r=alexcrichton

Update jemalloc to 4.5.0

* pointing jemalloc submodule to the 4.5.0 HEAD + generated configure script
* removed the now unnecessary extra config for windows. jemalloc is now much better at configuring itself overall.

Let's see what the CI think.

7 years agoAuto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddyb
bors [Sat, 13 May 2017 05:22:08 +0000 (05:22 +0000)]
Auto merge of #41847 - alexcrichton:less-unstable-annotations, r=eddyb

rustc: Add a new `-Z force-unstable-if-unmarked` flag

This commit adds a new `-Z` flag to the compiler for use when bootstrapping the
compiler itself. We want to be able to use crates.io crates, but we also want
the usage of such crates to be as ergonomic as possible! To that end compiler
crates are a little tricky in that the crates.io crates are not annotated as
unstable, nor do they expect to pull in unstable dependencies.

To cover all these situations it's intended that the compiler will forever now
bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose
of forcing crates.io crates to themselves be unstable while also allowing them
to use other "unstable" crates.io crates. This should mean that adding a
dependency to compiler no longer requires upstream modification with
unstable/staged_api attributes for inclusion!

7 years agoRollup merge of #41951 - Eijebong:master, r=GuillaumeGomez
Mark Simulacrum [Sat, 13 May 2017 00:57:38 +0000 (18:57 -0600)]
Rollup merge of #41951 - Eijebong:master, r=GuillaumeGomez

rustdoc: Break words in the location box of the sidebar.

This prevents long names from overflowing.

Before:
![before](https://img.bananium.fr/eijebong/afcfe18b-393e-4d3b-bc11-fe3def6659b9.png)

After:
![after](https://img.bananium.fr/eijebong/9483466b-3b6c-4509-ab0f-fd0c6572ef27.png)

7 years agoRollup merge of #41943 - malbarbo:android-openssl, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:37 +0000 (18:57 -0600)]
Rollup merge of #41943 - malbarbo:android-openssl, r=alexcrichton

bootstrap: openssl android support

7 years agoRollup merge of #41942 - tommyip:master, r=Mark-Simulacrum
Mark Simulacrum [Sat, 13 May 2017 00:57:37 +0000 (18:57 -0600)]
Rollup merge of #41942 - tommyip:master, r=Mark-Simulacrum

Fix unexpected panic with the -Z treat-err-as-bug option

This fix an issue where the compiler panics even if there is no error when passed with the `-Z treat-err-as-bug` option.

Fixes #35886.

r? @Mark-Simulacrum

7 years agoRollup merge of #41940 - est31:master, r=eddyb
Mark Simulacrum [Sat, 13 May 2017 00:57:36 +0000 (18:57 -0600)]
Rollup merge of #41940 - est31:master, r=eddyb

config.toml.example: point out that optimize = false won't speed up a full bootstrap

Originally I've learned about this by @eddyb pointing this out to me over IRC, and after having told someone today the same over IRC I've thought that this is a common mistake and should be prevented by a note in config.toml.example

r? @eddyb

7 years agoRollup merge of #41935 - iKevinY:detect-empty-files, r=Mark-Simulacrum
Mark Simulacrum [Sat, 13 May 2017 00:57:35 +0000 (18:57 -0600)]
Rollup merge of #41935 - iKevinY:detect-empty-files, r=Mark-Simulacrum

Add tidy check to detect empty files

Addresses #18439.

7 years agoRollup merge of #41934 - est31:remove_unused_macros, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:34 +0000 (18:57 -0600)]
Rollup merge of #41934 - est31:remove_unused_macros, r=nagisa

Remove unused macros from the codebase

Thanks to the lint I've implemented in #41907 I've found some unused macros inside the rustc codebase.

7 years agoRollup merge of #41923 - eddyb:issue-41744, r=arielb1
Mark Simulacrum [Sat, 13 May 2017 00:57:33 +0000 (18:57 -0600)]
Rollup merge of #41923 - eddyb:issue-41744, r=arielb1

rustc_trans: do not attempt to truncate an i1 const to i1.

Fixes #41744 by skipping the truncation when it'd be a noop anyway.

7 years agoRollup merge of #41921 - GuillaumeGomez:fix-search-style, r=steveklabnik
Mark Simulacrum [Sat, 13 May 2017 00:57:32 +0000 (18:57 -0600)]
Rollup merge of #41921 - GuillaumeGomez:fix-search-style, r=steveklabnik

Fix search when looking to sources

Before:

<img width="1440" alt="screen shot 2017-05-11 at 22 33 28" src="https://cloud.githubusercontent.com/assets/3050060/25970761/03fd2ade-369a-11e7-9fd6-783c23455589.png">

After:

<img width="1440" alt="screen shot 2017-05-11 at 22 34 05" src="https://cloud.githubusercontent.com/assets/3050060/25970770/09ac71ce-369a-11e7-9038-559f414e07b5.png">

r? @rust-lang/docs

7 years agoRollup merge of #41918 - brson:lic, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:32 +0000 (18:57 -0600)]
Rollup merge of #41918 - brson:lic, r=alexcrichton

Annotate the license exceptions

7 years agoRollup merge of #41916 - mglagla:typo, r=sfackler
Mark Simulacrum [Sat, 13 May 2017 00:57:31 +0000 (18:57 -0600)]
Rollup merge of #41916 - mglagla:typo, r=sfackler

Fix typo in Iterator::size_hint example comment

7 years agoRollup merge of #41912 - oli-obk:patch-3, r=eddyb
Mark Simulacrum [Sat, 13 May 2017 00:57:30 +0000 (18:57 -0600)]
Rollup merge of #41912 - oli-obk:patch-3, r=eddyb

Upgrade some comments to doc comments

7 years agoRollup merge of #41896 - tshepang:too-long, r=steveklabnik
Mark Simulacrum [Sat, 13 May 2017 00:57:29 +0000 (18:57 -0600)]
Rollup merge of #41896 - tshepang:too-long, r=steveklabnik

doc: break into 2 sentences

7 years agoRollup merge of #41876 - oli-obk:diagnosing_diagnostics, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:28 +0000 (18:57 -0600)]
Rollup merge of #41876 - oli-obk:diagnosing_diagnostics, r=nagisa

Refactor suggestion diagnostic API to allow for multiple suggestions

r? @jonathandturner

cc @nrc @petrochenkov

7 years agoRollup merge of #41860 - mbrubeck:docs, r=nagisa
Mark Simulacrum [Sat, 13 May 2017 00:57:27 +0000 (18:57 -0600)]
Rollup merge of #41860 - mbrubeck:docs, r=nagisa

Remove wrong or outdated info from CString docs.

None

7 years agoRollup merge of #41820 - devurandom:patch-1, r=alexcrichton
Mark Simulacrum [Sat, 13 May 2017 00:57:26 +0000 (18:57 -0600)]
Rollup merge of #41820 - devurandom:patch-1, r=alexcrichton

bootstrap: Output name of failed config in case of errors

7 years agoAuto merge of #41955 - alexcrichton:update-sccache, r=eddyb
bors [Sat, 13 May 2017 00:49:06 +0000 (00:49 +0000)]
Auto merge of #41955 - alexcrichton:update-sccache, r=eddyb

Update sccache binaries to mozilla/sccache@d3627d766

This commit updates the sccache binaries to fix a cache load failure seen
on #41926, fixed by mozilla/sccache#119

7 years agoAuto merge of #41926 - arielb1:box-mir, r=eddyb
bors [Fri, 12 May 2017 17:34:39 +0000 (17:34 +0000)]
Auto merge of #41926 - arielb1:box-mir, r=eddyb

box large variants in MIR

Operand: 72 -> 24 B
Statement: 192 -> 96 B
Terminator: 256 -> 112 B
librustc translation memory usage: 1795 -> 1669 MB

next step would be interning lvalues, I suppose?

cc #36799 (@urschrei - does ostn15_phf compile with this PR?)

r? @eddyb

7 years agoAdd tidy check to detect empty files
Kevin Yap [Fri, 12 May 2017 07:16:52 +0000 (00:16 -0700)]
Add tidy check to detect empty files

Addresses #18439.

7 years agoUpdate sccache binaries to mozilla/sccache@d3627d766
Alex Crichton [Fri, 12 May 2017 16:07:10 +0000 (09:07 -0700)]
Update sccache binaries to mozilla/sccache@d3627d766

This commit updates the sccache binaries to fix a cache load failure seen
on #41926, fixed by mozilla/sccache#119

7 years agorustdoc: Break words in the location box of the sidebar.
Bastien Orivel [Fri, 12 May 2017 13:39:54 +0000 (15:39 +0200)]
rustdoc: Break words in the location box of the sidebar.

This prevents long names from overflowing.

7 years agoFix unexpected panic with the -Z treat-err-as-bug option
Tommy Ip [Fri, 12 May 2017 11:48:18 +0000 (12:48 +0100)]
Fix unexpected panic with the -Z treat-err-as-bug option

This fix an issue where the compiler panics even if there is no
error when passed with the `-Z treat-err-as-bug` option.

Fixes #35886.

7 years agoconfig.toml.example: add note that optimize = false won't speed up a full bootstrap
est31 [Fri, 12 May 2017 11:29:08 +0000 (13:29 +0200)]
config.toml.example: add note that optimize = false won't speed up a full bootstrap

7 years agoDon't use a DUMMY_SP for reporting issues with crate imports
Oliver Schneider [Fri, 12 May 2017 09:21:34 +0000 (11:21 +0200)]
Don't use a DUMMY_SP for reporting issues with crate imports

7 years agoWeave the span of an import through the resolve code
Oliver Schneider [Fri, 12 May 2017 09:21:11 +0000 (11:21 +0200)]
Weave the span of an import through the resolve code

7 years agoRemove some unused macros from the rust codebase
est31 [Fri, 12 May 2017 06:21:00 +0000 (08:21 +0200)]
Remove some unused macros from the rust codebase

Removes unused macros from:
  * libcore
  * libcollections
    The last use of these two macros was removed in commit
    b64c9d56700e2c41207166fe8709711ff02488ff
    when the char_range_at_reverse function was been removed.
  * librustc_errors
    Their last use was removed by commits
    2f2c3e178325dc1837badcd7573c2c0905fab979
    and 11dc974a38fd533aa692cea213305056cd3a6902.
  * libsyntax_ext
  * librustc_trans
    Also, put the otry macro in back/msvc/mod.rs under the
    same cfg argument as the places that use it.

7 years agoAuto merge of #41757 - alexcrichton:stabilize-crt-static, r=japaric
bors [Fri, 12 May 2017 07:33:10 +0000 (07:33 +0000)]
Auto merge of #41757 - alexcrichton:stabilize-crt-static, r=japaric

rustc: Stabilize `-C target-feature=+crt-static`

This commit stabilizes the `crt-static` feature accepted by the compiler. Note
that this does not stabilize the `#[cfg]` attribute for `crt-static` as
that's going to be covered by #29717. This only stabilizes a few small pieces:

* The `crt-static` feature as accepted by the `-C target-feature` flag, and its
  connection with the platform-specific definition of `crt-static`.
* The semantics of `--print cfg` printing out activated `crt-static` feature, if
  available.

This should be enough to get the benefits of `crt-static` on stable Rust with
MSVC and with musl, but sidsteps the issue of stabilizing #29717 first.

Closes #37406

7 years agoAuto merge of #41716 - nikomatsakis:issue-41677, r=arielb1
bors [Fri, 12 May 2017 05:02:10 +0000 (05:02 +0000)]
Auto merge of #41716 - nikomatsakis:issue-41677, r=arielb1

enforce WF conditions after generalizing

Add a `WF(T')` obligation after generalizing `T` to `T'`, if `T'` contains an unconstrained type variable in a bivariant context.

Fixes #41677.

Beta nominating -- regression.

r? @arielb1

7 years agorustc: Remove #![unstable] annotation
Alex Crichton [Mon, 8 May 2017 21:36:44 +0000 (14:36 -0700)]
rustc: Remove #![unstable] annotation

These are now no longer necessary with `-Z force-unstable-if-unmarked`

7 years agorustbuild: Use `-Z force-unstable-if-unmarked`
Alex Crichton [Mon, 8 May 2017 21:36:33 +0000 (14:36 -0700)]
rustbuild: Use `-Z force-unstable-if-unmarked`

7 years agobox large variants in MIR
Ariel Ben-Yehuda [Thu, 11 May 2017 22:38:26 +0000 (01:38 +0300)]
box large variants in MIR

Operand: 72 -> 24 B
Statement: 192 -> 96 B
Terminator: 256 -> 112 B
librustc translation memory usage: 1795 -> 1669 MB

next step would be interning lvalues, I suppose?

7 years agoAuto merge of #41684 - jethrogb:feature/ntstatus, r=alexcrichton
bors [Thu, 11 May 2017 22:37:38 +0000 (22:37 +0000)]
Auto merge of #41684 - jethrogb:feature/ntstatus, r=alexcrichton

Windows io::Error: also format NTSTATUS error codes

`NTSTATUS` errors may be encoded as `HRESULT`, see [[MS-ERREF]](https://msdn.microsoft.com/en-us/library/cc231198.aspx). These error codes can still be formatted using `FormatMessageW` but require some different parameters to be passed in.

I wasn't sure if this needed a test and if so, how to test it. Presumably we wouldn't want to make our tests dependent on localization-dependent strings returned from `FormatMessageW`.

Users that get an `err: NTSTATUS` will need to do `io::Error::from_raw_os_error(err|0x1000_0000)` (the equivalent of [`HRESULT_FROM_NT`](https://msdn.microsoft.com/en-us/library/ms693780(VS.85).aspx))

7 years agorustc_trans: do not attempt to truncate an i1 const to i1.
Eduard-Mihai Burtescu [Thu, 11 May 2017 21:14:31 +0000 (00:14 +0300)]
rustc_trans: do not attempt to truncate an i1 const to i1.

7 years agoFix search when looking to sources
Guillaume Gomez [Thu, 11 May 2017 20:28:13 +0000 (22:28 +0200)]
Fix search when looking to sources

7 years agoremove the #[inline] attribute from drop_in_place
Ariel Ben-Yehuda [Thu, 11 May 2017 20:09:31 +0000 (23:09 +0300)]
remove the #[inline] attribute from drop_in_place

Apparently LLVM has exponential code growth while inlining landing pads
if that attribute is present.

Fixes #41696.

7 years agoAnnotate the license exceptions
Brian Anderson [Thu, 11 May 2017 19:19:21 +0000 (19:19 +0000)]
Annotate the license exceptions

7 years agocorrect various error messages that changed
Niko Matsakis [Wed, 3 May 2017 01:25:15 +0000 (21:25 -0400)]
correct various error messages that changed

The new messages seem universally better. I think these result because
we recognize that we are in an invariant context more often.

7 years agoadd a WF obligation if a type variable appears in bivariant position
Niko Matsakis [Tue, 2 May 2017 21:34:31 +0000 (17:34 -0400)]
add a WF obligation if a type variable appears in bivariant position

7 years agoreplace the type generalizer with one based on variance
Niko Matsakis [Tue, 2 May 2017 19:03:34 +0000 (15:03 -0400)]
replace the type generalizer with one based on variance

7 years agoFix typo in size_hint example comment
Martin Glagla [Thu, 11 May 2017 18:38:15 +0000 (20:38 +0200)]
Fix typo in size_hint example comment

7 years agoAuto merge of #41913 - nikomatsakis:issue-41849-variance-cycle, r=eddyb
bors [Thu, 11 May 2017 16:56:17 +0000 (16:56 +0000)]
Auto merge of #41913 - nikomatsakis:issue-41849-variance-cycle, r=eddyb

do not fetch variance for items when equating

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

r? @eddyb

7 years agoAdd test
Jethro Beekman [Wed, 3 May 2017 17:24:49 +0000 (10:24 -0700)]
Add test

7 years agoUpgrade some comments to doc comments
Oliver Schneider [Thu, 11 May 2017 14:57:45 +0000 (16:57 +0200)]
Upgrade some comments to doc comments

7 years agodo not fetch variance for items when equating
Niko Matsakis [Thu, 11 May 2017 14:54:19 +0000 (10:54 -0400)]
do not fetch variance for items when equating

Fixes #41849. Problem was that evaluating the constant expression
required evaluating a trait, which would equate types, which would
request variance information, which it would then discard. However,
computing the variance information would require determining the type of
a field, which would evaluate the constant expression.

(This problem will potentially arise *later* as we move to more sophisticated
constants, however, where we need to check subtyping. We can tackle that
when we come to it.)

7 years agoAuto merge of #41864 - malbarbo:android-docker, r=alexcrichton
bors [Thu, 11 May 2017 14:05:37 +0000 (14:05 +0000)]
Auto merge of #41864 - malbarbo:android-docker, r=alexcrichton

Add disabled android host builders

Introduce the concept of disabled builder. A disabled builder is one that is not run by travis. It is intended to be run by the user who wants a rustc for a tier 2 or 3 platform. Off corse, there is no guarantee that it will work.

7 years agoAddress PR reviews
Oliver Schneider [Thu, 11 May 2017 13:26:22 +0000 (15:26 +0200)]
Address PR reviews

7 years agoAuto merge of #41863 - malbarbo:update-android-builder, r=alexcrichton
bors [Thu, 11 May 2017 11:27:43 +0000 (11:27 +0000)]
Auto merge of #41863 - malbarbo:update-android-builder, r=alexcrichton

ci: Update android ndk and sdk

Make install-sdk.sh and install-ndk.sh more generic so future updates can be made directly on Dockerfile. Update ndk to r13b, which will be necessary to make host builds for android (in the future). Update sdk to r25.2.5 (maybe some emulator performance improvement).

7 years agoAuto merge of #41905 - frewsxcv:rollup, r=frewsxcv
bors [Thu, 11 May 2017 07:06:58 +0000 (07:06 +0000)]
Auto merge of #41905 - frewsxcv:rollup, r=frewsxcv

Rollup of 5 pull requests

- Successful merges: #41192, #41724, #41873, #41877, #41889
- Failed merges:

7 years agodoc: break into 2 sentences
Tshepang Lekhonkhobe [Thu, 11 May 2017 04:27:01 +0000 (06:27 +0200)]
doc: break into 2 sentences

7 years agoRollup merge of #41889 - est31:master, r=estebank
Corey Farwell [Thu, 11 May 2017 04:21:28 +0000 (00:21 -0400)]
Rollup merge of #41889 - est31:master, r=estebank

Remove debug message

It was added by me in #41293. Sorry about that!

Thanks goes to @alexbool for finding it.

7 years agoRollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister
Corey Farwell [Thu, 11 May 2017 04:21:27 +0000 (00:21 -0400)]
Rollup merge of #41877 - eddyb:gdb-force-rust, r=michaelwoerister

compiletest: force GDB to print values in the Rust format.

Based on @nodakai's https://github.com/rust-lang/rust/issues/40557#issuecomment-294368330 and @infinity0's https://github.com/rust-lang/rust/issues/40557#issuecomment-300133591.
Fixes #40557.

7 years agoRollup merge of #41873 - michaelwoerister:fix-filemap-hash-lookup, r=nikomatsakis
Corey Farwell [Thu, 11 May 2017 04:21:26 +0000 (00:21 -0400)]
Rollup merge of #41873 - michaelwoerister:fix-filemap-hash-lookup, r=nikomatsakis

ICH: Handle case of removed FileMaps.

This PR fixes a bug introduced in #41709 where removing a source file between compilation sessions would cause an ICE:
https://travis-ci.org/rust-icci/crossbeam/jobs/230582234#L633

r? @nikomatsakis

7 years agoRollup merge of #41724 - achernyak:master, r=nikomatsakis
Corey Farwell [Thu, 11 May 2017 04:21:25 +0000 (00:21 -0400)]
Rollup merge of #41724 - achernyak:master, r=nikomatsakis

More Queries for Crate Metadata

This covers a little bit of clean up and the following parts of #41417:
* `fn item_attrs(&self, def_id: DefId) -> Vec<ast::Attribute>;`
* `fn fn_arg_names(&self, did: DefId) -> Vec<ast::Name>;`
* `fn trait_of_item(&self, def_id: DefId) -> Option<DefId>;`
* `fn impl_parent(&self, impl_def_id: DefId) -> Option<DefId>;`
* ` fn is_foreign_item(&self, did: DefId) -> bool;`
* `fn is_exported_symbol(&self, def_id: DefId) -> bool;`

r? @nikomatsakis

7 years agoRollup merge of #41192 - zackw:eprintln, r=alexcrichton
Corey Farwell [Thu, 11 May 2017 04:21:24 +0000 (00:21 -0400)]
Rollup merge of #41192 - zackw:eprintln, r=alexcrichton

Add `eprint!` and `eprintln!` macros to the prelude.

These are exactly the same as `print!` and `println!` except that they write to stderr instead of stdout.  Issues #39228 and #40528; previous PR #39229; accepted RFC rust-lang/rfcs#1869; proposed revision to The Book rust-lang/book#615.

I have _not_ revised this any since the original submission; I will do that later this week.  I wanted to get this PR in place since it's been quite a while since the RFC was merged.

Known outstanding review comments:

* [x] @steveklabnik requested a new chapter for the unstable version of The Book -- please see if the proposed revisions to the second edition cover it.
* [x] @nodakai asked if it were possible to merge the internal methods `_print` and `_eprint` - not completely, since they both refer to different internal globals which we don't want to expose, but I will see if some duplication can be factored out.

Please let me know if I missed anything.

7 years agoAuto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum
bors [Thu, 11 May 2017 04:14:34 +0000 (04:14 +0000)]
Auto merge of #41900 - nrc:update-rls, r=Mark-Simulacrum

Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug

7 years agoUpdate RLS
Nick Cameron [Wed, 10 May 2017 23:12:28 +0000 (11:12 +1200)]
Update RLS

Pulls in crucial dependency updates which fix a serious RLS bug

7 years agoAuto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa
bors [Wed, 10 May 2017 21:32:33 +0000 (21:32 +0000)]
Auto merge of #41862 - GuillaumeGomez:improve-e0477, r=nagisa

Improve E0477 error message

Part of #41816.

r? @nagisa

7 years agoSkip print-stdout-eprint-stderr test on emscripten
Zack Weinberg [Wed, 10 May 2017 19:28:25 +0000 (15:28 -0400)]
Skip print-stdout-eprint-stderr test on emscripten

7 years agoAuto merge of #41887 - steveklabnik:rollup, r=steveklabnik
bors [Wed, 10 May 2017 17:10:13 +0000 (17:10 +0000)]
Auto merge of #41887 - steveklabnik:rollup, r=steveklabnik

Rollup of 5 pull requests

- Successful merges: #41531, #41536, #41809, #41854, #41886
- Failed merges:

7 years agoUpdate jemalloc to 4.5.0
arthurprs [Tue, 9 May 2017 18:14:42 +0000 (20:14 +0200)]
Update jemalloc to 4.5.0

7 years agoRemove debug message
est31 [Wed, 10 May 2017 16:20:23 +0000 (18:20 +0200)]
Remove debug message

7 years agoRollup merge of #41886 - RalfJung:unique-doc-typo, r=steveklabnik
Steve Klabnik [Wed, 10 May 2017 15:18:34 +0000 (17:18 +0200)]
Rollup merge of #41886 - RalfJung:unique-doc-typo, r=steveklabnik

fix typo in Unique::empty doc

Subject says it all

7 years agoRollup merge of #41854 - gamazeps:thread-spawn-doc, r=steveklabnik
Steve Klabnik [Wed, 10 May 2017 15:18:33 +0000 (17:18 +0200)]
Rollup merge of #41854 - gamazeps:thread-spawn-doc, r=steveklabnik

[Doc] Improve `thread::spawn` documentation

Part of #29378

- Add two examples to `thread::spawn` doumentation that show common uses of threads.
- Add a link to `thread::Builder` in the `thread::spawn` documentation for configuring threads.
- Add a link to `thread::spawn` in `thread::Builder` in order to avoid documentation duplication.

r? @steveklabnik

7 years agoRollup merge of #41809 - gamazeps:thread-docs, r=steveklabnik
Steve Klabnik [Wed, 10 May 2017 15:18:32 +0000 (17:18 +0200)]
Rollup merge of #41809 - gamazeps:thread-docs, r=steveklabnik

[DOC] Improve the thread::park and thread::unpark documentation

Part of #29378 .

Takes care of the documentation for `park`, `park_duration` and also improves the `unpark` example.

- `park should` have its module documentation inlined here, and cleaned up.
- `park_timeout` could use links to `park`.

7 years agoRollup merge of #41536 - steveklabnik:arc-and-send, r=burntsushi
Steve Klabnik [Wed, 10 May 2017 15:18:31 +0000 (17:18 +0200)]
Rollup merge of #41536 - steveklabnik:arc-and-send, r=burntsushi

Improve docs on Arc<T> and Send/Sync

This is something I always forget, so let's actually
explain in the docs.

I didn't fully link up everything here, but I'd like to make sure that the wording is okay before I bother.

7 years agoRollup merge of #41531 - steveklabnik:gh40159, r=nagisa
Steve Klabnik [Wed, 10 May 2017 15:18:30 +0000 (17:18 +0200)]
Rollup merge of #41531 - steveklabnik:gh40159, r=nagisa

Add more ways to create a PathBuf to docs

The best way to do this wasn't in the documentation, and the ways that
were there needed some extra text to elaborate.

Fixes #40159

/cc @nagisa

7 years agofix typo in Unique::empty doc
Ralf Jung [Wed, 10 May 2017 15:05:54 +0000 (17:05 +0200)]
fix typo in Unique::empty doc

7 years agoUpdate a compile-fail test
Oliver Schneider [Wed, 10 May 2017 14:02:49 +0000 (16:02 +0200)]
Update a compile-fail test

7 years agorustc: Add a new `-Z force-unstable-if-unmarked` flag
Alex Crichton [Mon, 8 May 2017 20:36:26 +0000 (13:36 -0700)]
rustc: Add a new `-Z force-unstable-if-unmarked` flag

This commit adds a new `-Z` flag to the compiler for use when bootstrapping the
compiler itself. We want to be able to use crates.io crates, but we also want
the usage of such crates to be as ergonomic as possible! To that end compiler
crates are a little tricky in that the crates.io crates are not annotated as
unstable, nor do they expect to pull in unstable dependencies.

To cover all these situations it's intended that the compiler will forever now
bootstrap with `-Z force-unstable-if-unmarked`. This flags serves a dual purpose
of forcing crates.io crates to themselves be unstable while also allowing them
to use other "unstable" crates.io crates. This should mean that adding a
dependency to compiler no longer requires upstream modification with
unstable/staged_api attributes for inclusion!

7 years agoFix up stability annotations per feedback.
Zack Weinberg [Thu, 20 Apr 2017 21:37:12 +0000 (17:37 -0400)]
Fix up stability annotations per feedback.

7 years agoRevise the eprint(ln)! feature.
Zack Weinberg [Thu, 13 Apr 2017 14:48:09 +0000 (10:48 -0400)]
Revise the eprint(ln)! feature.

 * Factor out the nigh-identical bodies of `_print` and `_eprint` to a helper
   function `print_to` (I was sorely tempted to call it `_doprnt`).
 * Update the issue number for the unstable `eprint` feature.
 * Add entries to the "unstable book" for `eprint` and `eprint_internal`.
 * Style corrections to the documentation.

7 years agoAdd `eprint!` and `eprintln!` macros to the prelude.
Zack Weinberg [Sat, 21 Jan 2017 18:38:11 +0000 (13:38 -0500)]
Add `eprint!` and `eprintln!` macros to the prelude.

These are exactly the same as `print!` and `println!` except that
they write to stderr instead of stdout.  Issue #39228.

7 years agoFix tidy issues
Oliver Schneider [Wed, 10 May 2017 11:58:41 +0000 (13:58 +0200)]
Fix tidy issues

7 years agocompiletest: force GDB to print values in the Rust format.
Eduard-Mihai Burtescu [Wed, 10 May 2017 11:37:29 +0000 (14:37 +0300)]
compiletest: force GDB to print values in the Rust format.

7 years agoAuto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichton
bors [Wed, 10 May 2017 11:37:22 +0000 (11:37 +0000)]
Auto merge of #41815 - Yamakaky:improve-backtrace-bottom, r=alexcrichton

Improve cleaning of the bottom of the backtrace

Following https://github.com/rust-lang/rust/pull/40264. It only cleans the bottom of the trace (after the main). It handles correctly the normal main, tests, benchmarks and threads.

I kept `skipped_before` since it will be used later for the cleaning of the top.

7 years agoExample usage of multiple suggestions
Oliver Schneider [Wed, 10 May 2017 11:19:29 +0000 (13:19 +0200)]
Example usage of multiple suggestions

7 years agoRefactor suggestion diagnostic API to allow for multiple suggestions
Oliver Schneider [Tue, 9 May 2017 08:04:24 +0000 (10:04 +0200)]
Refactor suggestion diagnostic API to allow for multiple suggestions

7 years agoICH: Handle case of removed FileMaps.
Michael Woerister [Wed, 10 May 2017 09:00:08 +0000 (11:00 +0200)]
ICH: Handle case of removed FileMaps.

7 years agoAuto merge of #41764 - scottmcm:faster-reverse, r=brson
bors [Wed, 10 May 2017 08:54:50 +0000 (08:54 +0000)]
Auto merge of #41764 - scottmcm:faster-reverse, r=brson

Make [u8]::reverse() 5x faster

Since LLVM doesn't vectorize the loop for us, do unaligned reads of a larger type and use LLVM's bswap intrinsic to do the reversing of the actual bytes.  cfg!-restricted to x86 and x86_64, as I assume it wouldn't help on things like ARMv5.

Also makes [u16]::reverse() a more modest 1.5x faster by loading/storing u32 and swapping the u16s with ROT16.

Thank you ptr::*_unaligned for making this easy :)

Benchmark results (from my i5-2500K):
```text
# Before
test slice::reverse_u8      ... bench:  273,836 ns/iter (+/- 15,592) =  3829 MB/s
test slice::reverse_u16     ... bench:  139,793 ns/iter (+/- 17,748) =  7500 MB/s
test slice::reverse_u32     ... bench:   74,997 ns/iter  (+/- 5,130) = 13981 MB/s
test slice::reverse_u64     ... bench:   47,452 ns/iter  (+/- 2,213) = 22097 MB/s

# After
test slice::reverse_u8      ... bench:   52,170 ns/iter (+/- 3,962) = 20099 MB/s
test slice::reverse_u16     ... bench:   93,330 ns/iter (+/- 4,412) = 11235 MB/s
test slice::reverse_u32     ... bench:   74,731 ns/iter (+/- 1,425) = 14031 MB/s
test slice::reverse_u64     ... bench:   47,556 ns/iter (+/- 3,025) = 22049 MB/s
```

If you're curious about the assembly, instead of doing this
```
movzx eax, byte ptr [rdi]
movzx ecx, byte ptr [rsi]
mov byte ptr [rdi], cl
mov byte ptr [rsi], al
```
it does this
```
mov rax, qword ptr [rdx]
mov rbx, qword ptr [r11 + rcx - 8]
bswap rbx
mov qword ptr [rdx], rbx
bswap rax
mov qword ptr [r11 + rcx - 8], rax
```

7 years agoFix typos in doc
Felix Raimundo [Wed, 10 May 2017 08:44:58 +0000 (10:44 +0200)]
Fix typos in  doc

7 years agoAuto merge of #41659 - bluss:clone-split-whitespace, r=aturon
bors [Wed, 10 May 2017 03:27:36 +0000 (03:27 +0000)]
Auto merge of #41659 - bluss:clone-split-whitespace, r=aturon

impl Clone for .split_whitespace()

Use custom closure structs for the predicates so that the iterator's
clone can simply be derived. This should also reduce virtual call
overhead by not using function pointers.

Fixes #41655

7 years agoAuto merge of #41548 - brson:relnotes, r=brson
bors [Tue, 9 May 2017 23:11:53 +0000 (23:11 +0000)]
Auto merge of #41548 - brson:relnotes, r=brson

Update release notes for 1.17

[Rendered](https://github.com/brson/rust/blob/relnotes/RELEASES.md).

cc @steveklabnik

7 years agoAdd disabled android host builders
Marco A L Barbosa [Fri, 5 May 2017 20:19:18 +0000 (17:19 -0300)]
Add disabled android host builders

7 years agoresolved merge conflicts
achernyak [Tue, 9 May 2017 19:40:42 +0000 (14:40 -0500)]
resolved merge conflicts

7 years agoAuto merge of #41830 - jonhoo:update-cargo, r=alexcrichton
bors [Tue, 9 May 2017 19:31:35 +0000 (19:31 +0000)]
Auto merge of #41830 - jonhoo:update-cargo, r=alexcrichton

Bump cargo for rust-lang/cargo#4000

rust-lang/cargo#4000 recently landed, which fixes warnings about using `-Z` when `CARGO_INCREMENTAL` is set while running stable/beta builds. As #41751 has now landed, these warnings will turn to errors in the next release, so getting the cargo fix in place is necessary unless we want people confused about why they can no longer compile anything on stable/beta.

7 years agoImprove E0477 error message
Guillaume Gomez [Tue, 9 May 2017 18:51:18 +0000 (20:51 +0200)]
Improve E0477 error message

7 years agoci: Update android ndk and sdk
Marco A L Barbosa [Sat, 6 May 2017 00:46:16 +0000 (21:46 -0300)]
ci: Update android ndk and sdk

7 years agoRemove wrong or outdated info from CString docs.
Matt Brubeck [Tue, 9 May 2017 17:55:47 +0000 (10:55 -0700)]
Remove wrong or outdated info from CString docs.

7 years agoDon't show the std frames before user code on unwinding.
Yamakaky [Sat, 4 Mar 2017 15:27:52 +0000 (10:27 -0500)]
Don't show the std frames before user code on unwinding.

When `RUST_BACKTRACE=1`, remove all frames after
`__rust_maybe_catch_panic`. Tested on `main`, threads, tests and
benches. Cleaning of the top of the stacktrace is let to a future PR.

Fixes #40201

See #41815

7 years agoFix warnings in examples
Felix Raimundo [Tue, 9 May 2017 17:06:56 +0000 (19:06 +0200)]
Fix warnings in  examples

7 years agoFix link
Felix Raimundo [Tue, 9 May 2017 17:02:43 +0000 (19:02 +0200)]
Fix  link

7 years agoImprove docs on Arc<T> and Send/Sync
steveklabnik [Tue, 25 Apr 2017 15:24:06 +0000 (11:24 -0400)]
Improve docs on Arc<T> and Send/Sync

This is something I always forget, so let's actually
explain in the docs.

7 years agoAdd more ways to create a PathBuf to docs
steveklabnik [Tue, 25 Apr 2017 10:38:26 +0000 (06:38 -0400)]
Add more ways to create a PathBuf to docs

The best way to do this wasn't in the documentation, and the ways that
were there needed some extra text to elaborate.

Fixes #40159

7 years agoAuto merge of #41814 - gamazeps:thread-struct-doc, r=steveklabnik
bors [Tue, 9 May 2017 16:31:07 +0000 (16:31 +0000)]
Auto merge of #41814 - gamazeps:thread-struct-doc, r=steveklabnik

[Doc] improve `thread::Thread` and `thread::Builder` documentations

Part of #29378

- Adds information about the stack_size when using `Builder`. This might be considered too low level, but I assume that if someone wants to create their own builder instead of using `thread::spawn` they may be interested in that info.
- Updates the `thread::Thread` structure doc, mostly by explaining how to get one, the previous example was removed because it was not related to `thread::Thread`, but rather to `thread::Builder::name`.
  Not much is present there, mostly because this API is not often used (the only method that seems useful is `unpark`, which is documented in #41809).

7 years agoBump cargo for rust-lang/cargo#4000
Jon Gjengset [Mon, 8 May 2017 16:07:38 +0000 (12:07 -0400)]
Bump cargo for rust-lang/cargo#4000

Also relies on rust-lang/cargo#4010

7 years agoAddress review comments
Felix Raimundo [Tue, 9 May 2017 14:57:03 +0000 (16:57 +0200)]
Address review comments