]> git.lizzy.rs Git - rust.git/log
rust.git
7 years agoAuto merge of #42086 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Thu, 18 May 2017 23:06:11 +0000 (23:06 +0000)]
Auto merge of #42086 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update the Cargo submodules

More info [here](https://github.com/rust-lang/rust/pull/42070#issuecomment-302469046) as to what's going on.

7 years agoUpdate the Cargo submodules
Alex Crichton [Thu, 18 May 2017 16:52:00 +0000 (09:52 -0700)]
Update the Cargo submodules

7 years agoAuto merge of #42055 - michaelwoerister:reenable-incremental-cc, r=nikomatsakis
bors [Thu, 18 May 2017 09:32:28 +0000 (09:32 +0000)]
Auto merge of #42055 - michaelwoerister:reenable-incremental-cc, r=nikomatsakis

Enable cross-crate incremental compilation by default.

Now that direct metadata hashing has been implemented for a while and we haven't seen any problems with it over at [rust-icci](https://travis-ci.org/rust-icci/), let's re-enable cross crate support for incremental compilation again.

r? @nikomatsakis

7 years agoEnable cross-crate incremental compilation by default.
Michael Woerister [Wed, 17 May 2017 12:04:53 +0000 (14:04 +0200)]
Enable cross-crate incremental compilation by default.

7 years agoAuto merge of #42073 - mersinvald:update-cargo-submodule, r=Mark-Simulacrum
bors [Thu, 18 May 2017 03:11:07 +0000 (03:11 +0000)]
Auto merge of #42073 - mersinvald:update-cargo-submodule, r=Mark-Simulacrum

Cargo submodule update

Required for https://github.com/rust-lang/rust/pull/41910
r? @Mark-Simulacrum

7 years agoAuto merge of #41639 - ishitatsuyuki:unify-tools, r=alexcrichton
bors [Thu, 18 May 2017 00:36:03 +0000 (00:36 +0000)]
Auto merge of #41639 - ishitatsuyuki:unify-tools, r=alexcrichton

Unify tools building

Close #41601

Time saving for up to 10 minutes. Cargo is now only compiled once.

Downsides:

- Out of tree Cargo.lock maintenance
- Cargo.toml `[replace]` version maintenance

7 years agoCargo submodule update
Mike Lubinets [Wed, 17 May 2017 22:55:15 +0000 (01:55 +0300)]
Cargo submodule update

7 years agoAuto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakis
bors [Wed, 17 May 2017 21:44:08 +0000 (21:44 +0000)]
Auto merge of #41911 - michaelwoerister:querify_trait_def, r=nikomatsakis

Remove interior mutability from TraitDef by turning fields into queries

This PR gets rid of anything `std::cell` in `TraitDef` by
- moving the global list of trait impls from `TraitDef` into a query,
- moving the list of trait impls relevent for some self-type from `TraitDef` into a query
- moving the specialization graph of trait impls into a query, and
- moving `TraitDef::object_safety` into a query.

I really like how querifying things not only helps with incremental compilation and on-demand, but also just plain makes the code cleaner `:)`

There are also some smaller fixes in the PR. Commits can be reviewed separately.

r? @eddyb or @nikomatsakis

7 years agoReset submodule management to what master does
Alex Crichton [Wed, 17 May 2017 16:15:44 +0000 (09:15 -0700)]
Reset submodule management to what master does

Basically just translate what's done on master in Rust to Python here.

7 years agoAuto merge of #41857 - dhardy:master, r=steveklabnik
bors [Wed, 17 May 2017 15:42:55 +0000 (15:42 +0000)]
Auto merge of #41857 - dhardy:master, r=steveklabnik

loop_break_value: add documentation for book

Some notes at the top of the file.

r? @steveklabnik

7 years agoWhitelist strings crate for license
Tatsuyuki Ishi [Wed, 17 May 2017 15:30:15 +0000 (00:30 +0900)]
Whitelist strings crate for license

As we can't wait for the maintainer.

7 years agoMove submodule initialization to bootstrap.py
Tatsuyuki Ishi [Sat, 13 May 2017 05:21:35 +0000 (14:21 +0900)]
Move submodule initialization to bootstrap.py

7 years agoAdd metadata suffix, close rust-lang/cargo#4028
Tatsuyuki Ishi [Fri, 12 May 2017 10:24:04 +0000 (19:24 +0900)]
Add metadata suffix, close rust-lang/cargo#4028

7 years agoUnify all stage2 tools into a workspace
Tatsuyuki Ishi [Sat, 29 Apr 2017 23:11:58 +0000 (08:11 +0900)]
Unify all stage2 tools into a workspace

This avoids double compiled Cargo. Hopefully this would speed up (extended) compilation for ~10m.

Notes: when updating Cargo submodule, the replacement version may also need to be updated.

7 years agoAuto merge of #42041 - Keruspe:master, r=alexcrichton
bors [Wed, 17 May 2017 12:50:14 +0000 (12:50 +0000)]
Auto merge of #42041 - Keruspe:master, r=alexcrichton

rustbuild: fix bash completion installation dir

7 years agoloop_break_value doc: remove note about other loops
Diggory Hardy [Wed, 17 May 2017 12:00:10 +0000 (13:00 +0100)]
loop_break_value doc: remove note about other loops

7 years agoAuto merge of #41961 - kennytm:fix-35829, r=petrochenkov
bors [Wed, 17 May 2017 08:14:55 +0000 (08:14 +0000)]
Auto merge of #41961 - kennytm:fix-35829, r=petrochenkov

Fix #35829 (`quote!()` does not handle `br#"…"#`)

Fix issue #35829 (syntax extension's `quote_expr!()` does not handle `b"…"` and proc_macro's `quote!()` does not handle `r#"…"#`)

* Handles `b"…"`, `br#"…"#` and `...` for `quote_expr!()`.
* Refactored the match statement to allow it to complain loudly on any unhandled token.
* Similarly, proc_macro's `quote!()` did not handle `br#"…"#` or `r#"…"#`, so this PR fixes it too.

7 years agoAuto merge of #41476 - abonander:book_proc_macro, r=nrc
bors [Wed, 17 May 2017 04:21:06 +0000 (04:21 +0000)]
Auto merge of #41476 - abonander:book_proc_macro, r=nrc

Document the `proc_macro` feature in the Unstable Book

Discusses the `proc_macro` feature flag and the features it enables:

* Implicit enable of `extern_use_macros` feature and how to import proc macros
* Error handling in proc macros (using panic messages)
* Function-like proc macros using `#[proc_macro]` and a usage example for creating and invoking
* Attribute-like proc macros using `#[proc_macro_attribute]` and a usage example for creating and invoking

[Rendered](https://github.com/abonander/rust/blob/book_proc_macro/src/doc/unstable-book/src/language-features/proc-macro.md)

7 years agoAuto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
bors [Wed, 17 May 2017 01:57:45 +0000 (01:57 +0000)]
Auto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrum

Rollup of 5 pull requests

- Successful merges: #41937, #41957, #42017, #42039, #42046
- Failed merges:

7 years agoDocument the `proc_macro` feature in the Unstable Book
Austin Bonander [Sun, 23 Apr 2017 06:05:35 +0000 (23:05 -0700)]
Document the `proc_macro` feature in the Unstable Book

7 years agoRollup merge of #42046 - steveklabnik:update-books, r=frewsxcv
Mark Simulacrum [Tue, 16 May 2017 23:31:52 +0000 (17:31 -0600)]
Rollup merge of #42046 - steveklabnik:update-books, r=frewsxcv

Update the various books to latest

This includes a draft of chapter 20 of the book!

7 years agoRollup merge of #42039 - alexcrichton:update-cargo, r=aturon
Mark Simulacrum [Tue, 16 May 2017 23:31:51 +0000 (17:31 -0600)]
Rollup merge of #42039 - alexcrichton:update-cargo, r=aturon

Update cargo submodule

This pulls in a fix for #41797 to the master branch, I'll send a separate PR for
the beta branch. Note that the Cargo PR in question to pull in is https://github.com/rust-lang/cargo/pull/4046

7 years agoRollup merge of #42017 - nikomatsakis:issue-41677, r=arielb1
Mark Simulacrum [Tue, 16 May 2017 23:31:50 +0000 (17:31 -0600)]
Rollup merge of #42017 - nikomatsakis:issue-41677, r=arielb1

avoid cycles in mir-dump, take 2

This fixes #41697, for real this time, but I'm not sure how best to add a regression test. I was considering maybe adding some flag so that the MIR dumping doesn't actually get written to files (e.g., overloading the directory flag so you can specify nil or something).

cc @dwrensha @oli-obk

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 #41907 - est31:macro_unused, r=jseyfried
bors [Tue, 16 May 2017 23:27:36 +0000 (23:27 +0000)]
Auto merge of #41907 - est31:macro_unused, r=jseyfried

Add lint for unused macros

Addresses parts of #34938, to add a lint for unused macros.

We now output warnings by default when we encounter a macro that we didn't use for expansion.

Issues to be resolved before this PR is ready for merge:

- [x] fix the NodeId issue described above
- [x] remove all unused macros from rustc and the libraries or set `#[allow(unused_macros)]` next to them if they should be kept for some reason. This is needed for successful boostrap and bors to accept the PR. -> #41934
- [x] ~~implement the full extent of #34938, that means the macro match arm checking as well.~~ *let's not do this for now*

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 agoUpdate the various books to latest
steveklabnik [Tue, 16 May 2017 20:00:13 +0000 (16:00 -0400)]
Update the various books to latest

This includes a draft of chapter 20 of the book!

7 years agoloop_break_value: fix tests (but ignore one expected not to compile)
Diggory Hardy [Tue, 16 May 2017 17:54:41 +0000 (18:54 +0100)]
loop_break_value: fix tests (but ignore one expected not to compile)

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 agoRemove unreachable branches in traits::project
Michael Woerister [Tue, 16 May 2017 15:31:18 +0000 (17:31 +0200)]
Remove unreachable branches in traits::project

7 years agorustbuild: fix bash completion installation dir
Marc-Antoine Perennou [Tue, 16 May 2017 15:22:52 +0000 (17:22 +0200)]
rustbuild: fix bash completion installation dir

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
7 years agoUse tcx.type_of(impl) instead of TraitRef::self_ty() for getting Self in relevant_imp...
Michael Woerister [Tue, 16 May 2017 15:12:00 +0000 (17:12 +0200)]
Use tcx.type_of(impl) instead of TraitRef::self_ty() for getting Self in relevant_impls_for().

7 years agoUpdate cargo submodule
Alex Crichton [Tue, 16 May 2017 14:56:20 +0000 (07:56 -0700)]
Update cargo submodule

This pulls in a fix for #41797 to the master branch, I'll send a separate PR for
the beta branch.

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 agoAdd test cases for cyclic specialization graph construction
Michael Woerister [Tue, 16 May 2017 13:04:32 +0000 (15:04 +0200)]
Add test cases for cyclic specialization graph construction

7 years agoDon't use queries::try_get() in assoc_ty projection
Michael Woerister [Tue, 16 May 2017 13:03:20 +0000 (15:03 +0200)]
Don't use queries::try_get() in assoc_ty projection

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 agoput option_try macro def under #[cfg(unix)]
est31 [Tue, 16 May 2017 06:53:02 +0000 (08:53 +0200)]
put option_try macro def under #[cfg(unix)]

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 agofix typo making maps public
Niko Matsakis [Tue, 16 May 2017 01:23:51 +0000 (21:23 -0400)]
fix typo making maps public

7 years agoavoid cycles in mir-dump, take 2
Niko Matsakis [Thu, 11 May 2017 21:52:39 +0000 (17:52 -0400)]
avoid cycles in mir-dump, take 2

7 years agoremove compile-flags
Niko Matsakis [Tue, 16 May 2017 01:12:40 +0000 (21:12 -0400)]
remove compile-flags

7 years agomove issue-41697 to a mir-opt test
Niko Matsakis [Tue, 16 May 2017 01:02:38 +0000 (21:02 -0400)]
move issue-41697 to a mir-opt test

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 agoShare lists of blanket impls in results of relevant_impls_for() query.
Michael Woerister [Mon, 15 May 2017 13:09:30 +0000 (15:09 +0200)]
Share lists of blanket impls in results of relevant_impls_for() query.

7 years agoRe-introduce cycle-check in assoc. item resolution.
Michael Woerister [Mon, 15 May 2017 10:21:28 +0000 (12:21 +0200)]
Re-introduce cycle-check in assoc. item resolution.

7 years agoRemove interior mutability from TraitDef by turning fields into queries.
Michael Woerister [Thu, 11 May 2017 14:01:19 +0000 (16:01 +0200)]
Remove interior mutability from TraitDef by turning fields into queries.

7 years agoFix instability in GlobalMetadata::Impls ICH.
Michael Woerister [Thu, 11 May 2017 13:47:15 +0000 (15:47 +0200)]
Fix instability in GlobalMetadata::Impls ICH.

7 years agoMake incr. comp. test case dependent on specific ICH instead of SVH
Michael Woerister [Thu, 11 May 2017 13:46:22 +0000 (15:46 +0200)]
Make incr. comp. test case dependent on specific ICH instead of SVH

7 years agoICH: Hash lists of local trait impls as part of the HIR.
Michael Woerister [Mon, 8 May 2017 21:36:37 +0000 (23:36 +0200)]
ICH: Hash lists of local trait impls as part of the HIR.

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 agoAddress review comments
est31 [Mon, 15 May 2017 05:35:19 +0000 (07:35 +0200)]
Address review comments

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 agolibrustc_incremental: remove unused macro in test case
est31 [Sun, 14 May 2017 03:06:21 +0000 (05:06 +0200)]
librustc_incremental: remove unused macro in test case

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).