Commit Graph

97958 Commits

Author SHA1 Message Date
Mazdak Farrokhzad
f362387c40
Rollup merge of #63772 - pietroalbini:mirrors-libc, r=alexcrichton
ci: move libc mirrors to the rust-lang-ci-mirrors bucket

Finishing up #63485. Already moved the objects.

r? @alexcrichton
2019-08-21 17:31:42 +02:00
Mazdak Farrokhzad
ddb6314998
Rollup merge of #63747 - RalfJung:miri, r=RalfJung
update Miri

Fixes https://github.com/rust-lang/rust/issues/63673

r? @oli-obk
2019-08-21 17:31:41 +02:00
Mazdak Farrokhzad
70436969e0
Rollup merge of #63717 - petrochenkov:eager, r=matthewjasper
Fix nested eager expansions in arguments of `format_args`

Fixes https://github.com/rust-lang/rust/issues/63460
Fixes https://github.com/rust-lang/rust/issues/63685 (regression from making `format_args` opaque - https://github.com/rust-lang/rust/pull/63114)

r? @matthewjasper
2019-08-21 17:31:39 +02:00
Mazdak Farrokhzad
d034ccabe4
Rollup merge of #61236 - GuillaumeGomez:system-theme, r=Mark-Simulacrum
take into account the system theme

Fixes #61079.

The CSS can now take into account the system theme. I used it to generate some content on the document and from there, if no theme has already been selected, it'll look at the system level theme.

r? @QuietMisdreavus
cc @fenhl
2019-08-21 17:31:38 +02:00
bors
7b0085a613 Auto merge of #63779 - Centril:rollup-sx96dli, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #63721 (Do not emit JSON dumps of diagnostic codes)
 - #63753 (Bump toml dependency.)
 - #63755 (Use dedicated type for spans in pre-expansion gating.)
 - #63759 (Allow 'default async fn' to parse.)
 - #63760 (Update books)
 - #63762 (`async_await` was stabilized in 1.39.0, not 1.38.0.)
 - #63766 (Remove some duplication when resolving constants)

Failed merges:

r? @ghost
2019-08-21 11:40:23 +00:00
Guillaume Gomez
1bd94241b7 Replaced skipStorage with saveTheme variable 2019-08-21 12:49:01 +02:00
Vadim Petrochenkov
fe2dc91972 Add a regression test for issue #63460 2019-08-21 12:53:11 +03:00
Mazdak Farrokhzad
b25ec04384
Rollup merge of #63766 - oli-obk:const_eval_dedup, r=zackmdavis
Remove some duplication when resolving constants
2019-08-21 11:52:29 +02:00
Mazdak Farrokhzad
0e8a1a4e78
Rollup merge of #63762 - rust-lang:fix-async-date, r=Mark-Simulacrum
`async_await` was stabilized in 1.39.0, not 1.38.0.

r? @Mark-Simulacrum
2019-08-21 11:52:28 +02:00
Mazdak Farrokhzad
e276e06913
Rollup merge of #63760 - ehuss:update-books, r=ehuss
Update books

## nomicon

25 commits in 8a7d05615e5bc0a7fb961b4919c44f5221ee54da..38b9a76bc8b59ac862663807fc51c9b757337fd6
2019-08-07 07:46:59 -0500 to 2019-08-19 10:04:32 -0400
- Fix transmute_copy link
- some edits
- drop parenthetical
- clarify dangling
- fix def.n of dangling
- fold uninit integer rule with reading uninit memory
- refactor null a bit
- resolve some nits
- raw ptrs must be initialized like integers
- Apply suggestions from code review
- explain when metadata is invalid
- mention !
- add more cases of UB
- avoid redundant UB
- stick to broader UB for raw ptr offsets/derefs for now
- be more precise about dangling
- subsume the NonNull things as library types
- handle recursion in the heading
- Define 'producing'
- NonNull, NonZero*
- list more ptr offset computations
- UB
- Fix typo in subtyping
- Add colon to `MySuperSliceable` too
- Fix typo `str::mem` to `std::mem`

## reference

2 commits in b4b3536839042a6743fc76f0d9ad2a812020aeaa..d191a0cdd3b92648e0f1e53b13140a14677cc65b
2019-08-07 02:29:50 +0200 to 2019-08-15 08:42:23 +0200
- Fix warning in stable-check (rust-lang-nursery/reference#653)
- our closure syntax comes from Ruby (rust-lang-nursery/reference#650)

## rust-by-example

5 commits in f2c15ba5ee89ae9469a2cf60494977749901d764..580839d90aacd537f0293697096fa8355bc4e673
2019-08-07 10:14:25 -0300 to 2019-08-17 23:17:50 -0300
- macros.md: Changing Sometime to more appropriate adverb form Sometimes (rust-lang/rust-by-example#1243)
- Add colon after "See Also" (rust-lang/rust-by-example#1242)
- Update enter_question_mark.md (rust-lang/rust-by-example#1208)
- Add destructuring bind examples (rust-lang/rust-by-example#1238)
- Change initial parameters in `fibonacci()` call. (rust-lang/rust-by-example#1241)

## embedded-book

1 commits in c5da1e11915d3f28266168baaf55822f7e3fe999..432ca26686c11d396eed6a59499f93ce1bf2433c
2019-08-05 23:02:10 +0000 to 2019-08-09 23:20:22 +0000
- semihosting: add comment adding feature flag to panic-semihosting  (rust-embedded/book#203)
2019-08-21 11:52:26 +02:00
Mazdak Farrokhzad
67e39ed51c
Rollup merge of #63759 - Centril:parse-default-async-fn, r=petrochenkov
Allow 'default async fn' to parse.

- Parse default async fn. Fixes #63716.

(`cherry-pick`ed from 3rd commit in https://github.com/rust-lang/rust/pull/63749.)

r? @petrochenkov
2019-08-21 11:52:25 +02:00
Mazdak Farrokhzad
b6556744b5
Rollup merge of #63755 - Centril:simplify-prexp-gating, r=petrochenkov
Use dedicated type for spans in pre-expansion gating.

- Simplify the overall pre-expansion gating "experience".
2019-08-21 11:52:23 +02:00
Mazdak Farrokhzad
61ae1ccb14
Rollup merge of #63753 - ehuss:bump-toml, r=Mark-Simulacrum
Bump toml dependency.

Just removing an old/duplicated dependency from the workspace.
2019-08-21 11:52:21 +02:00
Mazdak Farrokhzad
d7c162aefd
Rollup merge of #63721 - Mark-Simulacrum:decouple-error-index, r=matthewjasper
Do not emit JSON dumps of diagnostic codes

This decouples the error index generator from libsyntax for the most part (though it still depends on librustdoc for the markdown parsing and generation).

Fixes #34588
2019-08-21 11:52:20 +02:00
Vadim Petrochenkov
93d369bc2b resolve/expand: Rename some things for clarity and add comments 2019-08-21 11:53:39 +03:00
Vadim Petrochenkov
a83c35692f expand: Do not do questionable span adjustment before eagerly expanding an expression
Maybe it made sense when it was introduced, but now it's doing something incorrect.
2019-08-21 11:53:39 +03:00
Vadim Petrochenkov
96032aa5ef expand: Keep the correct current expansion ID for eager expansions
Solve the problem of `ParentScope` entries for eager expansions not exising in the resolver map by creating them on demand.
2019-08-21 11:53:39 +03:00
Vadim Petrochenkov
1dd56aa304 Add a test for an opaque macro eagerly expanding its arguments 2019-08-21 11:53:39 +03:00
Guillaume Gomez
c076d30ce4 take into account the system theme 2019-08-21 10:08:29 +02:00
Ralf Jung
4d50b249d7 update Miri 2019-08-21 09:37:23 +02:00
Pietro Albini
9b8514bb87
ci: move libc mirrors to the rust-lang-ci-mirrors bucket 2019-08-21 09:14:21 +02:00
Oliver Scherer
7dbc4b95fc Remove some duplication when resolving constants 2019-08-21 02:29:08 +02:00
Mazdak Farrokhzad
418eb181ca
async_await was stabilized in 1.39.0, not 1.38.0. 2019-08-21 00:23:08 +02:00
Eric Huss
13c1db9819 Update books 2019-08-20 14:03:13 -07:00
Mazdak Farrokhzad
7ee4f1da8c Allow 'default async fn' to parse. 2019-08-20 22:57:23 +02:00
bors
bea0372a1a Auto merge of #63752 - Centril:rollup-nlxwety, r=Centril
Rollup of 4 pull requests

Successful merges:

 - #62497 (Fix double resolving custom libdir)
 - #63209 (Stabilize `async_await` in Rust 1.39.0)
 - #63746 (Cherry-pick src/test changes with Centril's changes)
 - #63750 (rustc_metadata: replace LazySeq<T> with Lazy<[T]>.)

Failed merges:

r? @ghost
2019-08-20 18:33:16 +00:00
Mazdak Farrokhzad
777a12c3a4 Use dedicated type for spans in pre-expansion gating. 2019-08-20 20:26:37 +02:00
Eric Huss
7d92cf4826 Bump toml dependency.
Just removing an old/duplicated dependency from the workspace.
2019-08-20 10:46:35 -07:00
Mazdak Farrokhzad
e3e8b7f12a
Rollup merge of #63750 - eddyb:lazy-seq, r=Zoxc
rustc_metadata: replace LazySeq<T> with Lazy<[T]>.

Part of #59953, split out for separate landing (see https://github.com/rust-lang/rust/pull/59953#issuecomment-502460092).

r? @Zoxc
2019-08-20 19:42:21 +02:00
Mazdak Farrokhzad
234614a705
Rollup merge of #63746 - sd234678:remove-unneeded-comment-decoration-from-src/test, r=Centril
Cherry-pick src/test changes with Centril's changes

None
2019-08-20 19:42:20 +02:00
Mazdak Farrokhzad
3f7e7c2fd3
Rollup merge of #63209 - Centril:stabilize-async-await, r=cramertj
Stabilize `async_await` in Rust 1.39.0

Here we stabilize:
- free and inherent `async fn`s,
- the `<expr>.await` expression form,
- and the `async move? { ... }` block form.

Closes https://github.com/rust-lang/rust/issues/62149.
Closes https://github.com/rust-lang/rust/issues/50547.

All the blockers are now closed.

<details>
- [x] FCP in https://github.com/rust-lang/rust/issues/62149
- [x] https://github.com/rust-lang/rust/issues/61949; PR in https://github.com/rust-lang/rust/pull/62849.
- [x] https://github.com/rust-lang/rust/issues/62517; PR in https://github.com/rust-lang/rust/pull/63376.
- [x] https://github.com/rust-lang/rust/issues/63225; PR in https://github.com/rust-lang/rust/pull/63501
- [x] https://github.com/rust-lang/rust/issues/63388; PR in https://github.com/rust-lang/rust/pull/63499
- [x] https://github.com/rust-lang/rust/issues/63500; PR in https://github.com/rust-lang/rust/pull/63501
- [x] https://github.com/rust-lang/rust/issues/62121#issuecomment-506884048
    - [x] Some tests for control flow (PR https://github.com/rust-lang/rust/pull/63387):
          - `?`
          - `return` in `async` blocks
          - `break`
    - [x] https://github.com/rust-lang/rust/pull/61775#issuecomment-506883180, i.e. tests for https://github.com/rust-lang/rust/pull/60944 with `async fn`s instead). PR in https://github.com/rust-lang/rust/pull/63383

</details>

r? @cramertj
2019-08-20 19:42:18 +02:00
Mazdak Farrokhzad
4593f40b29
Rollup merge of #62497 - o01eg:fix-62496, r=alexcrichton
Fix double resolving custom libdir

Fixes #62496

Related issue is https://bugs.gentoo.org/672816
2019-08-20 19:42:16 +02:00
Eduard-Mihai Burtescu
e7ceaa9748 rustc_metadata: replace LazySeq<T> with Lazy<[T]>. 2019-08-20 18:36:05 +03:00
bors
5a56e05abd Auto merge of #63744 - Centril:rollup-g4l3ra9, r=Centril
Rollup of 7 pull requests

Successful merges:

 - #63216 (avoid unnecessary reservations in std::io::Take::read_to_end)
 - #63265 (Implement `nth_back` for ChunksExactMut)
 - #63691 (Fix bug in iter::Chain::size_hint)
 - #63722 (Don't use stage naming in RUSTFLAGS environment variables)
 - #63723 (Consolidate sigemptyset workarounds)
 - #63736 (Restore the rustc_plugin crate in the sysroot)
 - #63743 (Allow git to merge `Cargo.lock`)

Failed merges:

r? @ghost
2019-08-20 15:01:24 +00:00
Mazdak Farrokhzad
218bcf2e01
Rollup merge of #63743 - alexcrichton:allow-lock-merge, r=Mark-Simulacrum
Allow git to merge `Cargo.lock`

This commit backs out #46539 in order to fully leverage #63579 where
`git` should be able to merge `Cargo.lock` nowadays with only minimal
conflicts.
2019-08-20 16:26:44 +02:00
Mazdak Farrokhzad
cadf6b9343
Rollup merge of #63736 - SimonSapin:plugin, r=eddyb
Restore the rustc_plugin crate in the sysroot

It was accidentally removed in a rebase of https://github.com/rust-lang/rust/pull/62727

Fixes https://github.com/rust-lang/rust/issues/63729 (rls build failure)
2019-08-20 16:26:43 +02:00
Mazdak Farrokhzad
3662a9fb04
Rollup merge of #63723 - josephlr:sigemptyset, r=alexcrichton
Consolidate sigemptyset workarounds

In sys/unix/process, we work around the sigemptyset linking issues
on android in two different ways. This change consolidates these
workarounds, and avoids duplicating bindings from `libc`.
2019-08-20 16:26:41 +02:00
Mazdak Farrokhzad
af77aedb0e
Rollup merge of #63722 - Mark-Simulacrum:bootstrap-rustflags, r=alexcrichton
Don't use stage naming in RUSTFLAGS environment variables

This patch supports less behavior than before, since specifiying stage 1
vs stage 2 is no longer possible, but that is presumably a somewhat rare
use case anyway, so not supporting it seems acceptable (and it can be
readded easily if desired).

Fixes #33609
2019-08-20 16:26:40 +02:00
Mazdak Farrokhzad
ff352cd65a
Rollup merge of #63691 - timvermeulen:chain-size-hint, r=scottmcm
Fix bug in iter::Chain::size_hint

`Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
2019-08-20 16:26:38 +02:00
Mazdak Farrokhzad
60649e3a2e
Rollup merge of #63265 - JohnTitor:implement-nth-back-for-chunksexactmut, r=scottmcm
Implement `nth_back` for ChunksExactMut

This is a part of #54054.

r? @scottmcm
2019-08-20 16:26:37 +02:00
Mazdak Farrokhzad
a5299dd5d1
Rollup merge of #63216 - oconnor663:take_read_to_end, r=sfackler
avoid unnecessary reservations in std::io::Take::read_to_end

Prevously the `read_to_end` implementation for `std::io::Take` used its
own `limit` as a cap on the `reservation_size`. However, that could
still result in an over-allocation like this:

1. Call `reader.take(5).read_to_end(&mut vec)`.
2. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
3. `read` writes 5 bytes.
4. `read_to_end_with_reservation` reserves 5 bytes and calls `read`.
5. `read` writes 0 bytes.
6. The read loop ends with `vec` having length 5 and capacity 10.

The reservation of 5 bytes was correct for the read at step 2 but
unnecessary for the read at step 4. By that second read, `Take::limit`
is 0, but the `read_to_end_with_reservation` loop is still using the
same `reservation_size` it started with.

Solve this by having `read_to_end_with_reservation` take a closure,
which lets it get a fresh `reservation_size` for each read. This is an
implementation detail which doesn't affect any public API.
2019-08-20 16:26:34 +02:00
Alex Crichton
815ce8cb1d Allow git to merge Cargo.lock
This commit backs out #46539 in order to fully leverage #63579 where
`git` should be able to merge `Cargo.lock` nowadays with only minimal
conflicts.
2019-08-20 06:56:46 -07:00
Mark Rousskov
72e2cfd934 Remove serialization of diagnostics to files
This is no longer used by the index generator and was always an unstable
compiler detail, so strip it out.

This also leaves in RUSTC_ERROR_METADATA_DST since the stage0 compiler
still needs it to be set.
2019-08-20 09:55:31 -04:00
Mark Rousskov
99ce39b30a Load error codes via build script instead of JSON parsing
This scans the tree for `error_codes.rs` and loads all of them.
2019-08-20 09:55:31 -04:00
Simon Sapin
c561abeea2 Restore the rustc_plugin crate in the sysroot
It was accidentally removed in a rebase of https://github.com/rust-lang/rust/pull/62727

Fixes https://github.com/rust-lang/rust/issues/63729
2019-08-20 13:30:50 +02:00
bors
51879c3aba Auto merge of #63587 - flip1995:clippyup, r=flip1995
Update Clippy and cargo

r? @Manishearth  @oli-obk
2019-08-20 11:24:31 +00:00
bors
14890954ce Auto merge of #63709 - matklad:decomposed-tokens, r=petrochenkov
Move token gluing to token stream parsing

work towards #63689, this moves token gluing from the lexer to the token tree layer. This is only a minimal step, but I like the negative diff here.

r? @petrochenkov
2019-08-20 07:44:44 +00:00
flip1995
96c3ec12f6
Update Cargo.lock 2019-08-20 09:32:53 +02:00
flip1995
4f5629567d
Update cargo 2019-08-20 09:32:12 +02:00
flip1995
82dec85b40
Update Clippy 2019-08-20 09:32:12 +02:00