]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoRollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov
Mark Simulacrum [Tue, 16 May 2017 23:31:50 +0000 (17:31 -0600)]
Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkov

Fix some clippy warnings in libsyntax

This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.

7 years agoRollup merge of #41937 - nikomatsakis:issue-41936-variance-coerce-unsized-cycle,...
Mark Simulacrum [Tue, 16 May 2017 23:31:49 +0000 (17:31 -0600)]
Rollup merge of #41937 - nikomatsakis:issue-41936-variance-coerce-unsized-cycle, r=eddyb

use equality in the coerce-unsized check

This seems both to be a safe, conservative choice, and it sidesteps the cycle in #41849. Note that, before I converted variance into proper queries, we were using a hybrid of subtyping and equality, due to the presence of a flag that forced invariance if variance had not yet been computed. (Also, Coerce Unsized is unstable.)

Fixes #41936.

r? @eddyb

7 years agoAuto merge of #42038 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Tue, 16 May 2017 20:42:52 +0000 (20:42 +0000)]
Auto merge of #42038 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 8 pull requests

- Successful merges: #41489, #41982, #41994, #41995, #42001, #42005, #42011, #42028
- Failed merges:

7 years agoAuto merge of #41853 - Keruspe:install, r=alexcrichton
bors [Tue, 16 May 2017 17:18:23 +0000 (17:18 +0000)]
Auto merge of #41853 - Keruspe:install, r=alexcrichton

rustbuild: add support for --bindir and --sysconfdir

This depends on https://github.com/rust-lang/rust-installer/pull/59 and we'll need to udpate the rust-installer submodule once it gets merged for it to work

Fixes #41644

7 years agoupdate lzma-sys to 0.1.4
Marc-Antoine Perennou [Tue, 16 May 2017 14:28:36 +0000 (16:28 +0200)]
update lzma-sys to 0.1.4

fixes build when DESTDIR is set

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoRollup merge of #42028 - faso:patch-1, r=apasel422
Mark Simulacrum [Tue, 16 May 2017 14:18:36 +0000 (08:18 -0600)]
Rollup merge of #42028 - faso:patch-1, r=apasel422

Typo

7 years agoRollup merge of #42011 - rap2hpoutre:patch-5, r=GuillaumeGomez
Mark Simulacrum [Tue, 16 May 2017 14:18:35 +0000 (08:18 -0600)]
Rollup merge of #42011 - rap2hpoutre:patch-5, r=GuillaumeGomez

improve collapse toggle render (css)

The `[-]` toggle for functions in docs _seems_ too big. It's just an impression, but it's something I noticed long time ago (maybe I have bad taste). I never thought to fix it, but, today I think: "Ok, why not suggest it.". Feel free to close without explanation!

Preview changes below:

From this:

<img width="1003" alt="capture d ecran 2017-05-15 a 17 14 45" src="https://cloud.githubusercontent.com/assets/1575946/26064816/5c84de86-3992-11e7-976b-41c625cace0f.png">

To this:

<img width="996" alt="capture d ecran 2017-05-15 a 17 15 02" src="https://cloud.githubusercontent.com/assets/1575946/26064854/78325dac-3992-11e7-88f6-2c43db43421c.png">

7 years agoRollup merge of #42005 - jseyfried:fix_macro_regression, r=nrc
Mark Simulacrum [Tue, 16 May 2017 14:18:34 +0000 (08:18 -0600)]
Rollup merge of #42005 - jseyfried:fix_macro_regression, r=nrc

Fix regression in `macro_rules!` name matching

Fixes #41803.
r? @nrc

7 years agoRollup merge of #42001 - ollie27:rustdoc_extern_fn, r=GuillaumeGomez
Mark Simulacrum [Tue, 16 May 2017 14:18:32 +0000 (08:18 -0600)]
Rollup merge of #42001 - ollie27:rustdoc_extern_fn, r=GuillaumeGomez

rustdoc: Display `extern "C" fn` instead of `extern fn`

It was decided in rust-lang-nursery/fmt-rfcs#52 to be explicit about the ABI so rustdoc should follow suit.

7 years agoRollup merge of #41995 - gamazeps:thread-localkey, r=frewsxcv
Mark Simulacrum [Tue, 16 May 2017 14:18:31 +0000 (08:18 -0600)]
Rollup merge of #41995 - gamazeps:thread-localkey, r=frewsxcv

[Doc] Add links to the `thread::LocalKey` doc.

Part of #29378 .

I do not know exactly what should be done for the `cleanup` part, if you have any idea I'll gladly do it.

r? @rust-lang/docs

7 years agoRollup merge of #41994 - gamazeps:thread-builder, r=GuillaumeGomez
Mark Simulacrum [Tue, 16 May 2017 14:18:30 +0000 (08:18 -0600)]
Rollup merge of #41994 - gamazeps:thread-builder, r=GuillaumeGomez

[Doc] Implrove `thread::Builder`'s doc.

Part of #29378 .

- Explains *why* we would use the builder instead ofthe free function.
- Changes the parent-child explanation for a spawned-caller in `thread::Builder::spawn`
- Adds a link to `io::Result` in `thread::Builder`
- Corrects the return type doc in `thread::Builder::spawn`

r? @rust-lang/docs

7 years agoRollup merge of #41982 - gamazeps:thread-yield-now, r=GuillaumeGomez
Mark Simulacrum [Tue, 16 May 2017 14:18:29 +0000 (08:18 -0600)]
Rollup merge of #41982 - gamazeps:thread-yield-now, r=GuillaumeGomez

[Doc] Explain why `thread::yield_now` could be used.

Part of #29378.

r? @steveklabnik

7 years agoRollup merge of #41489 - estebank:trait-bounds-diagnosstic, r=arielb1
Mark Simulacrum [Tue, 16 May 2017 14:18:28 +0000 (08:18 -0600)]
Rollup merge of #41489 - estebank:trait-bounds-diagnosstic, r=arielb1

Make unsatisfied trait bounds note multiline

Make diagnostic note for existing method with unsatisfied trait bounds
multiline for cleaner output.

```
  = note: the method `count` exists but the following trait bounds were not satisfied:
          `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`
          `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>> [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
```

Before:

```
  = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`, `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
```

7 years agoimprove collapse toggle render (css)
Raphaël Huchet [Mon, 15 May 2017 15:16:58 +0000 (17:16 +0200)]
improve collapse toggle render (css)

7 years agoAuto merge of #41771 - clarcharr:resize_default, r=nikomatsakis
bors [Tue, 16 May 2017 08:14:29 +0000 (08:14 +0000)]
Auto merge of #41771 - clarcharr:resize_default, r=nikomatsakis

Add Vec::resize_default.

As suggested by #41758.

7 years agoTypo
faso [Tue, 16 May 2017 07:56:07 +0000 (10:56 +0300)]
Typo

7 years ago(hopefully) fix pprust error
Andre Bogus [Tue, 16 May 2017 07:21:30 +0000 (09:21 +0200)]
(hopefully) fix pprust error

7 years agorustbuild: pass sysconfdir to install_sh
Marc-Antoine Perennou [Fri, 28 Apr 2017 09:08:47 +0000 (11:08 +0200)]
rustbuild: pass sysconfdir to install_sh

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agorustbuild: allow configuring sysconfdir
Marc-Antoine Perennou [Fri, 28 Apr 2017 09:03:58 +0000 (11:03 +0200)]
rustbuild: allow configuring sysconfdir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agorustbuild: pass bindir to install_sh
Marc-Antoine Perennou [Fri, 28 Apr 2017 08:58:46 +0000 (10:58 +0200)]
rustbuild: pass bindir to install_sh

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoconfigure: allow configuring bindir
Marc-Antoine Perennou [Fri, 28 Apr 2017 11:50:50 +0000 (13:50 +0200)]
configure: allow configuring bindir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agorustbuild: allow configuring bindir
Marc-Antoine Perennou [Fri, 28 Apr 2017 09:01:15 +0000 (11:01 +0200)]
rustbuild: allow configuring bindir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoAuto merge of #41565 - rkruppe:llvm-sys, r=eddyb
bors [Tue, 16 May 2017 05:41:11 +0000 (05:41 +0000)]
Auto merge of #41565 - rkruppe:llvm-sys, r=eddyb

Make only rustc_trans depend on rustc_llvm

With these changes, only rustc_trans depends directly on rustc_llvm (and no crate gained a new dependency on trans). This means changing LLVM doesn't rebuild librustc or rustc_metadata, only rustc_trans, rustc_driver and the rustc executable
Also, rustc_driver technically doesn't know about LLVM any more (of course, it still handles a ton of options that conceptually refer to LLVM, but it delegates their implementation to trans).

What I *didn't* implement was merging most or all of rustc_llvm into rustc_trans. I ran into a nasty bug, which was probably just a silly typo somewhere but I probably won't have the time to figure it out in the next week or two. I opened #41699 for that step.

Fixes #41473

7 years agoAuto merge of #41996 - alexcrichton:more-retry, r=Mark-Simulacrum
bors [Tue, 16 May 2017 01:01:31 +0000 (01:01 +0000)]
Auto merge of #41996 - alexcrichton:more-retry, r=Mark-Simulacrum

appveyor: Wrap handle.exe download in a retry

Should help deal with spurious download failures.

7 years agoadressed comments by @kennytm and @petrochenkov
Andre Bogus [Sat, 13 May 2017 19:40:06 +0000 (21:40 +0200)]
adressed comments by @kennytm and @petrochenkov

7 years agoAuto merge of #41843 - cuviper:oxidized-installer, r=alexcrichton
bors [Mon, 15 May 2017 21:55:14 +0000 (21:55 +0000)]
Auto merge of #41843 - cuviper:oxidized-installer, r=alexcrichton

Update to the Rusty rust-installer

This updates the rust-installer submodule to the new version written in Rust (rust-lang/rust-installer#62), now moved to `src/tools/rust-installer` and invoked in `dist.rs` as a cargo-based tool command.  All of the former shell-script invocations now invoke the tool, otherwise keeping the same arguments as before.

As a small bonus, `rustc-src` now also uses the same tarball generator, so it gains a smaller `.tar.xz` too.

Fixes #41569.  r? @alexcrichton

7 years agouse equality in the coerce-unsized check
Niko Matsakis [Fri, 12 May 2017 09:43:48 +0000 (05:43 -0400)]
use equality in the coerce-unsized check

This seems both to be a safe, conservative choice,
and it sidesteps the cycle in #41936.

Fixes #41936.

7 years agoappveyor: Wrap handle.exe download in a retry
Alex Crichton [Sun, 14 May 2017 19:41:42 +0000 (12:41 -0700)]
appveyor: Wrap handle.exe download in a retry

Should help deal with spurious download failures.

7 years agoFix run-make/llvm-pass
Robin Kruppe [Mon, 15 May 2017 13:09:05 +0000 (15:09 +0200)]
Fix run-make/llvm-pass

7 years agoAuto merge of #41992 - ollie27:linkchecker_base, r=alexcrichton
bors [Mon, 15 May 2017 12:59:31 +0000 (12:59 +0000)]
Auto merge of #41992 - ollie27:linkchecker_base, r=alexcrichton

linkchecker: Add support for <base> tag

Add support for the HTML <base> tag as used by mdBook so The Unstable
Book can be checked.

Also cleanup a few things:
* Stop checking the name attribute. It should never have been used and
mdBook has since been fixed not to use it.
* Make sure we only check html files.
* Remove a few unnecessary allocations.

Finally, dead links in The Unstable Book have been fixed.

7 years agoFix regression in `macro_rules!` name matching.
Jeffrey Seyfried [Mon, 15 May 2017 09:26:26 +0000 (09:26 +0000)]
Fix regression in `macro_rules!` name matching.

7 years agoUse AtomicBool instead of a 'static mut' for LLVM init posioning
Robin Kruppe [Sun, 14 May 2017 18:33:37 +0000 (20:33 +0200)]
Use AtomicBool instead of a 'static mut' for LLVM init posioning

7 years agoRemove (direct) rustc_llvm dependency from rustc_driver
Robin Kruppe [Sun, 30 Apr 2017 18:33:25 +0000 (20:33 +0200)]
Remove (direct) rustc_llvm dependency from rustc_driver

This does not actually improve build times, since it still depends
on rustc_trans, but is better layering and fits the multi-backend
future slightly better.

7 years agoRemove rustc_llvm dependency from librustc
Robin Kruppe [Sun, 30 Apr 2017 18:04:35 +0000 (20:04 +0200)]
Remove rustc_llvm dependency from librustc

Consequently, session creation can no longer initialize LLVM.
The few places that use the compiler without going through
rustc_driver/CompilerCalls thus need to be careful to manually
initialize LLVM (via rustc_trans!) immediately after session
creation.

This means librustc is not rebuilt when LLVM changes.

7 years agoAuto merge of #41859 - froydnj:align-float-parts, r=sfackler
bors [Mon, 15 May 2017 08:42:10 +0000 (08:42 +0000)]
Auto merge of #41859 - froydnj:align-float-parts, r=sfackler

fix confusion about parts required for float formatting

The documentation for flt2dec doesn't match up with the actual
implementation, so fix the documentation to align with reality.
Presumably due to the mismatch, the formatting code for floats in
std::fmt can use correspondingly shorter arrays in some places, so fix
those places up as well.

Fixes #41304.

7 years agoAdd links to the `thread::LocalKey` doc.
Felix Raimundo [Sun, 14 May 2017 18:06:54 +0000 (20:06 +0200)]
Add links to the `thread::LocalKey` doc.

Part of #29378 .

7 years agoDon't use sanitize_sh with rust-installer
Josh Stone [Wed, 10 May 2017 19:20:00 +0000 (12:20 -0700)]
Don't use sanitize_sh with rust-installer

There's no shell interpreting the file paths under the new Rusty
rust-installer, so we don't need to use `sanitize_sh` for it.  Plus,
the drive-letter transformation is actually harmful for the now-native
Windows rust-installer to understand those paths.

7 years agoForce tool-rust-installer deps to build-only
Josh Stone [Tue, 9 May 2017 18:43:48 +0000 (11:43 -0700)]
Force tool-rust-installer deps to build-only

7 years agoUse "rust-installer tarball" to create rustc-src too
Josh Stone [Mon, 8 May 2017 22:23:30 +0000 (15:23 -0700)]
Use "rust-installer tarball" to create rustc-src too

This gives us an extra rustc-src.tar.xz, which is 33% smaller than the .tar.gz!

7 years agoUpdate to the oxidized rust-installer
Josh Stone [Mon, 8 May 2017 22:01:13 +0000 (15:01 -0700)]
Update to the oxidized rust-installer

7 years agoMake unsatisfied trait bounds note multiline
Esteban Küber [Mon, 24 Apr 2017 00:57:07 +0000 (17:57 -0700)]
Make unsatisfied trait bounds note multiline

Make diagnostic note for existing method with unsatisfied trait bounds
multiline for cleaner output.

```
  = note: the method `count` exists but the following trait bounds were not satisfied:
          `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`
          `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>> [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`

Before:

```
  = note: the method `count` exists but the following trait bounds were not satisfied: `[closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53] : std::ops::FnMut<(&_,)>`, `std::iter::Filter<std::iter::Fuse<std::iter::Once<&str>>, [closure@../../src/test/compile-fail/issue-36053-2.rs:17:39: 17:53]> : std::iter::Iterator`
```

7 years agorustdoc: Display `extern "C" fn` instead of `extern fn`
Oliver Middleton [Sun, 14 May 2017 23:52:17 +0000 (00:52 +0100)]
rustdoc: Display `extern "C" fn` instead of `extern fn`

7 years agoRemove rustc_llvm dependency from rustc_metadata
Robin Kruppe [Wed, 26 Apr 2017 21:22:45 +0000 (23:22 +0200)]
Remove rustc_llvm dependency from rustc_metadata

Move the code for loading metadata from rlibs and dylibs from
rustc_metadata into rustc_trans, and introduce a trait to avoid
introducing a direct dependency on rustc_trans.

This means rustc_metadata is no longer rebuilt when LLVM changes.

7 years agoImprove `thread::Builder` documentation.
Felix Raimundo [Sun, 14 May 2017 17:35:36 +0000 (19:35 +0200)]
Improve `thread::Builder` documentation.

Part of #29378 .

- In particular explains *why* we would use the builder instead of
  the free function.
- Changes the parent-child explanation for a spawned-caller.
- Add link to `io::Result` in `thread::Builder`
- Corrects the `thread::Builder::spawn` documentation.

7 years agolinkchecker: Add support for <base> tag
Oliver Middleton [Sun, 14 May 2017 16:57:59 +0000 (17:57 +0100)]
linkchecker: Add support for <base> tag

Add support for the HTML <base> tag as used by mdBook so The Unstable
Book can be checked.

Also cleanup a few things:
* Stop checking the name attribute. It should never have been used and
mdBook has since been fixed not to use it.
* Make sure we only check html files.
* Remove a few unnecessary allocations.

Finally, dead links in The Unstable Book have been fixed.

7 years agoFix some dead links in The Unstable Book
Oliver Middleton [Sun, 14 May 2017 16:56:24 +0000 (17:56 +0100)]
Fix some dead links in The Unstable Book

7 years agoAuto merge of #41978 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Sun, 14 May 2017 16:16:17 +0000 (16:16 +0000)]
Auto merge of #41978 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update the Cargo submodule

Brings some nice updates like faster index clones/updates, retries on 500 from
crates.io, etc.

7 years agoExplain why `thread::yield_now` could be used.
Felix Raimundo [Sat, 13 May 2017 19:42:51 +0000 (21:42 +0200)]
Explain why `thread::yield_now` could be used.

Part of #29378.

7 years agoAuto merge of #41969 - Enet4:update-rls-313, r=Mark-Simulacrum
bors [Sun, 14 May 2017 05:57:38 +0000 (05:57 +0000)]
Auto merge of #41969 - Enet4:update-rls-313, r=Mark-Simulacrum

Update RLS to solve serious crash

As a follow-up to rust-lang-nursery/rls#312, this PR contains the fix to the latest experienced RLS crashes, which should hopefully reach the nightly release as soon as possible.

7 years agoAuto merge of #41987 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Sun, 14 May 2017 03:00:34 +0000 (03:00 +0000)]
Auto merge of #41987 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 7 pull requests

- Successful merges: #41612, #41826, #41939, #41946, #41950, #41975, #41979
- Failed merges:

7 years agoRollup merge of #41979 - pftbest:msp430_libcalls, r=alexcrichton
Mark Simulacrum [Sun, 14 May 2017 02:55:13 +0000 (20:55 -0600)]
Rollup merge of #41979 - pftbest:msp430_libcalls, r=alexcrichton

LLVM: Add support for EABI-compliant libcalls on MSP430.

This change will allow rust code to have proper support for division
and multiplication using libgcc.

r? @alexcrichton
cc @awygle

7 years agoRollup merge of #41975 - liranringel:pass-static-crt-to-llvm-cmake-config, r=alexcrichton
Mark Simulacrum [Sun, 14 May 2017 02:55:13 +0000 (20:55 -0600)]
Rollup merge of #41975 - liranringel:pass-static-crt-to-llvm-cmake-config, r=alexcrichton

Pass static crt to llvm cmake configuration

Solves https://github.com/rust-lang/rust/issues/40246

7 years agoRollup merge of #41950 - GuillaumeGomez:rustdoc-links, r=frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:12 +0000 (20:55 -0600)]
Rollup merge of #41950 - GuillaumeGomez:rustdoc-links, r=frewsxcv

Fix anchor invalid redirection to search

Fixes #41933.

r? @rust-lang/docs

7 years agoRollup merge of #41946 - qnighy:disallow-dot-underscore-in-float, r=petrochenkov
Mark Simulacrum [Sun, 14 May 2017 02:55:11 +0000 (20:55 -0600)]
Rollup merge of #41946 - qnighy:disallow-dot-underscore-in-float, r=petrochenkov

Disallow ._ in float literal.

This patch makes lexer stop parsing number literals before `._`, as well as before `.a`. Underscore itself is still allowed like in `4_000_000.000_000_`.

Fixes a half part of #41723. The other is `""_`.

7 years agoRollup merge of #41939 - eddyb:trait-assoc-const-default, r=petrochenkov
Mark Simulacrum [Sun, 14 May 2017 02:55:10 +0000 (20:55 -0600)]
Rollup merge of #41939 - eddyb:trait-assoc-const-default, r=petrochenkov

rustc_resolve: don't deny outer type parameters in embedded constants.

This solves a problem noted at https://github.com/rust-lang/rust/issues/29646#issuecomment-300929548, where an associated const default in a trait couldn't refer to `Self` or type parameters, due to inaccuracies in lexical scoping.

I've also allowed "embedded expressions" (`[T; expr]`,  `[x; expr]`, `typeof expr`) to refer to type parameters in scope. *However*, the typesystem still doesn't handle #34344.
Fully resolving that issue requires breaking cycles more aggressively (e.g. lazy evaluation), *even* in when the expression doesn't depend on type parameters, to type-check it at all, and then also type-level "constant projections" (in the vein of `{expr}` from const generics).

7 years agoRollup merge of #41826 - GuillaumeGomez:add-markdown-content, r=frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:09 +0000 (20:55 -0600)]
Rollup merge of #41826 - GuillaumeGomez:add-markdown-content, r=frewsxcv

Add markdown-[before|after]-content options

cc @nical

r? @rust-lang/docs

7 years agoRollup merge of #41612 - mandeep:add-ops-generics, r=GuillaumeGomez,frewsxcv
Mark Simulacrum [Sun, 14 May 2017 02:55:08 +0000 (20:55 -0600)]
Rollup merge of #41612 - mandeep:add-ops-generics, r=GuillaumeGomez,frewsxcv

Added generic example of std::ops::Add in doc comments

We discussed on IRC how the std::ops examples were potentially missing examples using generics. This PR adds an example to std::ops::Add that shows the use of a generic type T. I'm not sure this is ready for merge as I think the two examples now make the documentation a bit verbose, but I think it's a good starting point. I'd love to hear others thoughts on this. This is in relation to the last item in issue #29365.

7 years agoUpdate rls submodule with important fixes
Eduardo Pinho [Sun, 14 May 2017 00:25:58 +0000 (01:25 +0100)]
Update rls submodule with important fixes

- Updates ls_types to "0.10.0", which prevents RLS crashes

7 years agoAuto merge of #41919 - nrc:save-crate, r=eddyb
bors [Sat, 13 May 2017 22:58:04 +0000 (22:58 +0000)]
Auto merge of #41919 - nrc:save-crate, r=eddyb

Include the crate's root module in save-analysis

r? @eddyb

7 years agoLLVM: Add support for EABI-compliant libcalls on MSP430.
Vadzim Dambrouski [Fri, 12 May 2017 22:37:43 +0000 (01:37 +0300)]
LLVM: Add support for EABI-compliant libcalls on MSP430.

This change will allow rust code to have proper support for division
and multiplication using libgcc libcalls.

7 years agoUpdate the Cargo submodule
Alex Crichton [Sat, 13 May 2017 18:07:33 +0000 (11:07 -0700)]
Update the Cargo submodule

Brings some nice updates like faster index clones/updates, retries on 500 from
crates.io, etc.

7 years agoAuto merge of #41914 - eddyb:region-refactor, r=nikomatsakis
bors [Sat, 13 May 2017 17:56:09 +0000 (17:56 +0000)]
Auto merge of #41914 - eddyb:region-refactor, r=nikomatsakis

rustc: simpler ParameterEnvironment and free regions.

The commits describe the slow transformation but the highlights are:
* `ReEarlyBound` is considered free, with a scope based on the item that defined the lifetime parameter, and the root body of the `RegionMaps` in use, removing the need for `free_substs`
* `liberate_late_bound_regions` and `implicit_region_bound` moved to typeck
* `CodeExtent` not interned at all now - ideally it would be 2 `u32` but it's small anyway

Future work building up on this could include:
* `ParameterEnvironment` becoming just the result of `predicates_of`
  * interning makes my "parent chain" scheme unnecessary
* `implicit_region_bound` could be retrieved from `RegionMaps`
* renaming `CodeExtent` to `Scope`
  * generalizing "call site" to "use site" or something better to include constants
* renaming `RegionMaps` to `ScopeTree` and its API to talk about "parents" explicitly

7 years agoPass static crt to llvm cmake configuration
Liran Ringel [Sat, 13 May 2017 15:12:19 +0000 (17:12 +0200)]
Pass static crt to llvm cmake configuration

7 years agorustc_resolve: don't deny outer type parameters in embedded constants.
Eduard-Mihai Burtescu [Fri, 21 Apr 2017 14:10:22 +0000 (17:10 +0300)]
rustc_resolve: don't deny outer type parameters in embedded constants.

7 years agorustc: don't keep a second reference to the HIR map in middle::region.
Eduard-Mihai Burtescu [Thu, 11 May 2017 14:18:23 +0000 (17:18 +0300)]
rustc: don't keep a second reference to the HIR map in middle::region.

7 years agorustc: stop interning CodeExtent, it's small enough.
Eduard-Mihai Burtescu [Thu, 11 May 2017 13:10:47 +0000 (16:10 +0300)]
rustc: stop interning CodeExtent, it's small enough.

7 years agorustc: remove redundant fn_id's from CodeExtentData.
Eduard-Mihai Burtescu [Thu, 11 May 2017 12:15:36 +0000 (15:15 +0300)]
rustc: remove redundant fn_id's from CodeExtentData.

7 years agorustc: treat ReEarlyBound as free without replacing it with ReFree.
Eduard-Mihai Burtescu [Thu, 11 May 2017 12:05:00 +0000 (15:05 +0300)]
rustc: treat ReEarlyBound as free without replacing it with ReFree.

7 years agorustc_typeck: do not leak late-bound lifetimes from bounds to closures.
Eduard-Mihai Burtescu [Wed, 10 May 2017 13:59:41 +0000 (16:59 +0300)]
rustc_typeck: do not leak late-bound lifetimes from bounds to closures.

7 years agorustc: move liberate_late_bound_regions to rustc_typeck.
Eduard-Mihai Burtescu [Wed, 10 May 2017 10:40:59 +0000 (13:40 +0300)]
rustc: move liberate_late_bound_regions to rustc_typeck.

7 years agorustc: use DefId instead of CodeExtent for FreeRegion's scope.
Eduard-Mihai Burtescu [Sun, 7 May 2017 16:57:51 +0000 (19:57 +0300)]
rustc: use DefId instead of CodeExtent for FreeRegion's scope.

7 years agorustc_mir: remove unnecessary drop scope for constants.
Eduard-Mihai Burtescu [Sun, 7 May 2017 14:30:55 +0000 (17:30 +0300)]
rustc_mir: remove unnecessary drop scope for constants.

7 years agorustc: use call_site_extent for closure environment free regions.
Eduard-Mihai Burtescu [Sun, 7 May 2017 13:49:03 +0000 (16:49 +0300)]
rustc: use call_site_extent for closure environment free regions.

7 years agorustc: uniformly compute ParameterEnvironment's "free outlive scope".
Eduard-Mihai Burtescu [Sun, 7 May 2017 13:22:33 +0000 (16:22 +0300)]
rustc: uniformly compute ParameterEnvironment's "free outlive scope".

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 agoFix anchor invalid redirection to search
Guillaume Gomez [Fri, 12 May 2017 13:31:43 +0000 (15:31 +0200)]
Fix anchor invalid redirection to search

7 years agoFix some clippy warnings in libsyntax
Andre Bogus [Fri, 12 May 2017 18:05:39 +0000 (20:05 +0200)]
Fix some clippy warnings in libsyntax

This is mostly removing stray ampersands, needless returns and lifetimes.

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