Commit Graph

64975 Commits

Author SHA1 Message Date
Alex Crichton
db69d894e7 Reset submodule management to what master does
Basically just translate what's done on master in Rust to Python here.
2017-05-17 09:15:44 -07:00
bors
7b5c3d2b20 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
2017-05-17 15:42:55 +00:00
Tatsuyuki Ishi
182a4ff037 Whitelist strings crate for license
As we can't wait for the maintainer.
2017-05-18 00:30:55 +09:00
Tatsuyuki Ishi
510d6b8afb Move submodule initialization to bootstrap.py 2017-05-18 00:30:55 +09:00
Tatsuyuki Ishi
e119a63901 Add metadata suffix, close rust-lang/cargo#4028 2017-05-18 00:30:55 +09:00
Tatsuyuki Ishi
0e79b9790a 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.
2017-05-18 00:30:54 +09:00
Sylvestre Ledru
1b6a182cf1 Improve the error management when /proc is not mounted
This PR does two things:
* Triggers an error on GNU/Linux & Android when /proc/self/exe doesn't exist
* Handle the error properly
2017-05-17 15:14:30 +02:00
bors
2b6ed3a051 Auto merge of #42041 - Keruspe:master, r=alexcrichton
rustbuild: fix bash completion installation dir
2017-05-17 12:50:14 +00:00
Diggory Hardy
7ab35b703a loop_break_value doc: remove note about other loops 2017-05-17 13:00:10 +01:00
Niko Matsakis
19bf544b25 introduce local-scope to prevent storagelive/storagedead in statics
cc #36799
2017-05-17 07:39:57 -04:00
bors
208d23a996 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.
2017-05-17 08:14:55 +00:00
kennytm
b384b18d5d
Refactor: Move the mutable parts out of LintStore. Fix #42007.
* #42007 happens because the Session LintStore is emptied when linting.
* The Session LintStore is emptied because the checker (Early/LateContext)
  wants ownership.
* The checker wants ownership because it wants to mutate the pass objects
  and lint levels.

The ownership of the whole store is not essential, only the lint levels and
pass objects need to be owned. Therefore, these parts are extracted out of
the LintStore into a separate structure `LintSession`. The "check crates"
methods can operate on `&mut LintSession` instead of `&mut LintStore`.

This is a minor BREAKING CHANGE for lint writers since the `LintContext`
trait is changed: the `mut_lints` and `level_stack` methods are removed.
But no one outside of `librustc/lint/context.rs` is using these functions,
so it should be safe.
2017-05-17 16:09:39 +08:00
bors
42e3732d7d 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)
2017-05-17 04:21:06 +00:00
bors
d8215fc238 Auto merge of #42049 - Mark-Simulacrum:rollup, r=Mark-Simulacrum
Rollup of 5 pull requests

- Successful merges: #41937, #41957, #42017, #42039, #42046
- Failed merges:
2017-05-17 01:57:45 +00:00
Austin Bonander
e616d12cbb Document the proc_macro feature in the Unstable Book 2017-05-16 17:08:43 -07:00
Mark Simulacrum
c3d22eb0f2 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!
2017-05-16 17:31:52 -06:00
Mark Simulacrum
afb9b2013d 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
2017-05-16 17:31:51 -06:00
Mark Simulacrum
52abafa464 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
2017-05-16 17:31:50 -06:00
Mark Simulacrum
4066c8ec71 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.
2017-05-16 17:31:50 -06:00
Mark Simulacrum
8f61055c52 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
2017-05-16 17:31:49 -06:00
bors
86319e473e 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*
2017-05-16 23:27:36 +00:00
John Kåre Alsaker
1a7375b7e0 Add an option to run rustbuild on low priority
This is a resurrection of #40776, combining their Windows setup with an
additional setup on Unix to set the program group's niceness to +10
(low-but-not-lowest priority) when the `low_priority` option is on.
2017-05-16 16:25:57 -05:00
bors
0f68728fb3 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:
2017-05-16 20:42:52 +00:00
steveklabnik
ff399a098e Update the various books to latest
This includes a draft of chapter 20 of the book!
2017-05-16 16:01:23 -04:00
Diggory Hardy
3f980beb3e loop_break_value: fix tests (but ignore one expected not to compile) 2017-05-16 18:54:41 +01:00
bors
b28cf7564a 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
2017-05-16 17:18:23 +00:00
Michael Woerister
08660afe90 Remove unreachable branches in traits::project 2017-05-16 17:31:18 +02:00
Marc-Antoine Perennou
dda2d756fa rustbuild: fix bash completion installation dir
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 17:22:52 +02:00
Michael Woerister
42051ceb16 Use tcx.type_of(impl) instead of TraitRef::self_ty() for getting Self in relevant_impls_for(). 2017-05-16 17:12:11 +02:00
Alex Crichton
c9f616cba0 Update cargo submodule
This pulls in a fix for #41797 to the master branch, I'll send a separate PR for
the beta branch.
2017-05-16 07:56:20 -07:00
Marc-Antoine Perennou
08cc29e762 update lzma-sys to 0.1.4
fixes build when DESTDIR is set

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 16:28:36 +02:00
Mark Simulacrum
9678ad2b0d Rollup merge of #42028 - faso:patch-1, r=apasel422
Typo
2017-05-16 08:18:36 -06:00
Mark Simulacrum
c2bf21072e 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">
2017-05-16 08:18:35 -06:00
Mark Simulacrum
6b4f3a73d2 Rollup merge of #42005 - jseyfried:fix_macro_regression, r=nrc
Fix regression in `macro_rules!` name matching

Fixes #41803.
r? @nrc
2017-05-16 08:18:34 -06:00
Mark Simulacrum
4bf04704c3 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.
2017-05-16 08:18:32 -06:00
Mark Simulacrum
4c72793a20 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
2017-05-16 08:18:31 -06:00
Mark Simulacrum
18171a8861 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
2017-05-16 08:18:30 -06:00
Mark Simulacrum
efe285e0ff Rollup merge of #41982 - gamazeps:thread-yield-now, r=GuillaumeGomez
[Doc] Explain why `thread::yield_now` could be used.

Part of #29378.

r? @steveklabnik
2017-05-16 08:18:29 -06:00
Mark Simulacrum
7a9cf929d5 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`
```
2017-05-16 08:18:28 -06:00
Michael Woerister
0a77a58857 Add test cases for cyclic specialization graph construction 2017-05-16 15:04:32 +02:00
Michael Woerister
d731b04af1 Don't use queries::try_get() in assoc_ty projection 2017-05-16 15:03:20 +02:00
Raphaël Huchet
7a50784336 improve collapse toggle render (css) 2017-05-16 10:34:55 +02:00
bors
4d09a0eb5d Auto merge of #41771 - clarcharr:resize_default, r=nikomatsakis
Add Vec::resize_default.

As suggested by #41758.
2017-05-16 08:14:29 +00:00
faso
bf2e0c2fe1 Typo 2017-05-16 10:56:07 +03:00
Andre Bogus
282b40249e (hopefully) fix pprust error 2017-05-16 09:21:30 +02:00
est31
6dbd706906 put option_try macro def under #[cfg(unix)] 2017-05-16 08:53:02 +02:00
Marc-Antoine Perennou
f72fce598c rustbuild: pass sysconfdir to install_sh
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 08:21:27 +02:00
Marc-Antoine Perennou
e8a74c32a4 rustbuild: allow configuring sysconfdir
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 08:21:27 +02:00
Marc-Antoine Perennou
93f3b0c913 rustbuild: pass bindir to install_sh
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 08:21:27 +02:00
Marc-Antoine Perennou
0a8b8febb0 configure: allow configuring bindir
Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
2017-05-16 08:21:27 +02:00