]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddyb
Mazdak Farrokhzad [Tue, 30 Apr 2019 14:10:25 +0000 (16:10 +0200)]
Rollup merge of #60344 - Aaron1011:fix/tower-hyper, r=eddyb

Don't try to render auto-trait bounds with any inference variables

Previously, we checked if the target of a projection type was itself an
inference variable. However, for Rustdoc rendering purposes, there's no
distinction between an inference variable ('_') and a type containing
one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them.

Fixes #60269

Due to the complexity of the original bug, which spans three different
crates (hyper, tower-hyper, and tower), I have been unable to create a
minimized reproduction for the issue.

5 years agoAuto merge of #60389 - Centril:rollup-nefreyr, r=Centril
bors [Tue, 30 Apr 2019 02:27:07 +0000 (02:27 +0000)]
Auto merge of #60389 - Centril:rollup-nefreyr, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #59869 (SGX target: implemented vectored I/O)
 - #60238 (Update rustfmt to 1.2.2)
 - #60276 (Cleanup the MIR visitor)
 - #60380 (Fix line number display in source view)

Failed merges:

r? @ghost

5 years agoRollup merge of #60380 - GuillaumeGomez:fix-line-number-display, r=Manishearth
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:39 +0000 (03:28 +0200)]
Rollup merge of #60380 - GuillaumeGomez:fix-line-number-display, r=Manishearth

Fix line number display in source view

Fixes #60310.

r? rust-lang/rustdoc

cc @Manishearth

screenshot of the fix:

<img width="798" alt="Screenshot 2019-04-29 at 23 12 20" src="https://user-images.githubusercontent.com/3050060/56927541-b7286680-6ad4-11e9-9215-42dc4ef42691.png">

5 years agoRollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebank
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:38 +0000 (03:28 +0200)]
Rollup merge of #60276 - matthewjasper:cleanup-mir-visitor, r=estebank

Cleanup the MIR visitor

* Remove useless `BasicBlock` parameters on methods with `Location`s.
* Prefer `visit_terminator_kind` to `visit_terminator`.
* Remove `Region` from PlaceContexts. `visit_rvalue` should be used when the region is important.
* Remove unused visitor methods.

5 years agoRollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:37 +0000 (03:28 +0200)]
Rollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton

Update rustfmt to 1.2.2

5 years agoRollup merge of #59869 - jethrogb:jb/sgx-iovec, r=sfackler
Mazdak Farrokhzad [Tue, 30 Apr 2019 01:28:35 +0000 (03:28 +0200)]
Rollup merge of #59869 - jethrogb:jb/sgx-iovec, r=sfackler

SGX target: implemented vectored I/O

r? @sfackler

Includes #59857

5 years agoSGX target: implemented vectored I/O
Jethro Beekman [Thu, 11 Apr 2019 02:47:10 +0000 (19:47 -0700)]
SGX target: implemented vectored I/O

5 years agoSGX target: don't unwind on usercall index out of bounds
Jethro Beekman [Thu, 11 Apr 2019 02:46:29 +0000 (19:46 -0700)]
SGX target: don't unwind on usercall index out of bounds

5 years agoAuto merge of #60006 - nnethercote:json-for-pipelining, r=alexcrichton
bors [Mon, 29 Apr 2019 23:35:01 +0000 (23:35 +0000)]
Auto merge of #60006 - nnethercote:json-for-pipelining, r=alexcrichton

In JSON output, emit a directive after metadata is generated.

To implement pipelining, Cargo needs to know when metadata generation is
finished. This is done via a new JSON "directive".

Unfortunately, metadata file writing currently occurs very late during
compilation, so pipelining won't produce a speed-up. Moving metadata
file writing earlier will be a follow-up.

r? @alexcrichton

5 years agoIn JSON output, emit a directive after metadata is generated.
Nicholas Nethercote [Sun, 14 Apr 2019 22:26:08 +0000 (08:26 +1000)]
In JSON output, emit a directive after metadata is generated.

To implement pipelining, Cargo needs to know when metadata generation is
finished. This commit adds code to do that. Unfortunately, metadata file
writing currently occurs very late during compilation, so pipelining
won't produce a speed-up. Moving metadata file writing earlier will be a
follow-up.

The change involves splitting the existing `Emitter::emit` method in
two: `Emitter::emit_diagnostic` and `Emitter::emit_directive`.

The JSON directives look like this:
```
{"directive":"metadata file written: liba.rmeta"}
```
The functionality is behind the `-Z emit-directives` option, and also
requires `--error-format=json`.

5 years agoFix line number display in source view
Guillaume Gomez [Mon, 29 Apr 2019 21:13:30 +0000 (23:13 +0200)]
Fix line number display in source view

5 years agoAuto merge of #60377 - Centril:rollup-42fxe9u, r=Centril
bors [Mon, 29 Apr 2019 20:40:49 +0000 (20:40 +0000)]
Auto merge of #60377 - Centril:rollup-42fxe9u, r=Centril

Rollup of 9 pull requests

Successful merges:

 - #59946 (Fix equivalent string in escape_default docs)
 - #60256 (Option::flatten)
 - #60305 (hir: remove LoweredNodeId)
 - #60334 (Stabilized vectored IO)
 - #60353 (Add test not to forget resolved ICE)
 - #60356 (Stabilize str::as_mut_ptr)
 - #60358 (Clarify the short explanation of E0207)
 - #60359 (resolve: Consider erroneous imports used to avoid duplicate diagnostics)
 - #60360 (Add test case for labeled break in const assignment)

Failed merges:

r? @ghost

5 years agoRollup merge of #60360 - rasendubi:const-labeled-break, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:46 +0000 (22:22 +0200)]
Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril

Add test case for labeled break in const assignment

Fixes #51350.

5 years agoRollup merge of #60359 - petrochenkov:imperruse, r=estebank
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:45 +0000 (22:22 +0200)]
Rollup merge of #60359 - petrochenkov:imperruse, r=estebank

resolve: Consider erroneous imports used to avoid duplicate diagnostics

Supersedes https://github.com/rust-lang/rust/pull/60295
Fixes https://github.com/rust-lang/rust/issues/48244
r? @estebank

5 years agoRollup merge of #60358 - nickolay:patch-1, r=GuillaumeGomez
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:44 +0000 (22:22 +0200)]
Rollup merge of #60358 - nickolay:patch-1, r=GuillaumeGomez

Clarify the short explanation of E0207

After being greatly improved in #33692, https://doc.rust-lang.org/error-index.html#E0207 uses terminology from the related RFC, which is different from the [reference](https://doc.rust-lang.org/reference/items/implementations.html), e.g. "self type" instead of "implementing type" and "trait reference" instead of "implemented trait".

It probably makes no difference to an experienced reader, but for a newbie like me it added to the confusion as you can't look up the definition of the terms being used and can't be sure you've guessed correctly...

I would also move the link to RFC to the top, as it seems to be the only doc that attempts to explain what the third criteria entails), but it seems to go against the accepted style.

5 years agoRollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:42 +0000 (22:22 +0200)]
Rollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril

Stabilize str::as_mut_ptr

Closes #58215

5 years agoRollup merge of #60353 - JohnTitor:add-test, r=Centril
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:41 +0000 (22:22 +0200)]
Rollup merge of #60353 - JohnTitor:add-test, r=Centril

Add test not to forget resolved ICE

closes #55499

I added the example as a test.

r? @pnkfelix

5 years agoRollup merge of #60334 - sfackler:stable-iovec, r=alexcrichton
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:40 +0000 (22:22 +0200)]
Rollup merge of #60334 - sfackler:stable-iovec, r=alexcrichton

Stabilized vectored IO

This renames `std::io::IoVec` to `std::io::IoSlice` and
`std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes
`std::io::IoSlice`, `std::io::IoSliceMut`,
`std::io::Read::read_vectored`, and `std::io::Write::write_vectored`.

Closes #58452

r? @alexcrichton

5 years agoRollup merge of #60305 - ljedrz:remove_LoweredNodeId, r=Zoxc
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:38 +0000 (22:22 +0200)]
Rollup merge of #60305 - ljedrz:remove_LoweredNodeId, r=Zoxc

hir: remove LoweredNodeId

It seems that we no longer need it, because nowadays we just want the `HirId` most of the time.

5 years agoRollup merge of #60256 - ethanboxx:master, r=alexcrichton
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:36 +0000 (22:22 +0200)]
Rollup merge of #60256 - ethanboxx:master, r=alexcrichton

Option::flatten

This PR makes this possible.
```rust
assert_eq!(Some(6), Some(Some(6)).flatten());
assert_eq!(Some(6), Some(Some(6)).into());
```

5 years agoRollup merge of #59946 - mernen:patch-2, r=ehuss
Mazdak Farrokhzad [Mon, 29 Apr 2019 20:22:34 +0000 (22:22 +0200)]
Rollup merge of #59946 - mernen:patch-2, r=ehuss

Fix equivalent string in escape_default docs

This newline should be escaped.

5 years agoAuto merge of #60355 - Manishearth:clippyup, r=centril
bors [Mon, 29 Apr 2019 17:44:15 +0000 (17:44 +0000)]
Auto merge of #60355 - Manishearth:clippyup, r=centril

Update clippy

r? @centril

5 years agoUpdate clippy
Manish Goregaokar [Mon, 29 Apr 2019 05:34:51 +0000 (22:34 -0700)]
Update clippy

5 years agoAuto merge of #60039 - rasendubi:assert-trailing-junk, r=alexcrichton
bors [Mon, 29 Apr 2019 14:50:17 +0000 (14:50 +0000)]
Auto merge of #60039 - rasendubi:assert-trailing-junk, r=alexcrichton

Make assert! ensure the macro is parsed completely

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

5 years agohir: remove LoweredNodeId
ljedrz [Fri, 26 Apr 2019 12:23:30 +0000 (14:23 +0200)]
hir: remove LoweredNodeId

5 years agoAuto merge of #60364 - JohnTitor:stabilize-const-needs-drop, r=oli-obk
bors [Mon, 29 Apr 2019 09:48:11 +0000 (09:48 +0000)]
Auto merge of #60364 - JohnTitor:stabilize-const-needs-drop, r=oli-obk

const-stabilize: std::mem::needs_drop

Closes #51929

r? @oli-obk

5 years agoAuto merge of #60338 - petrochenkov:notidy, r=varkor
bors [Mon, 29 Apr 2019 05:18:12 +0000 (05:18 +0000)]
Auto merge of #60338 - petrochenkov:notidy, r=varkor

tidy: Fix some more false positives for long URLs

A URL that's simply longer than 100 characters is ok regardless of context.

r? @varkor

5 years agoconst-stabilize std::mem::needs_drop
Yuki OKUSHI [Mon, 29 Apr 2019 03:41:06 +0000 (12:41 +0900)]
const-stabilize std::mem::needs_drop

5 years agoAuto merge of #60182 - matklad:lexer-cleanup, r=petrochenkov
bors [Mon, 29 Apr 2019 01:22:12 +0000 (01:22 +0000)]
Auto merge of #60182 - matklad:lexer-cleanup, r=petrochenkov

Lexer cleanup

another couple of tiny cleanups

5 years agoAuto merge of #60317 - flip1995:internal_lints, r=oli-obk
bors [Sun, 28 Apr 2019 20:42:09 +0000 (20:42 +0000)]
Auto merge of #60317 - flip1995:internal_lints, r=oli-obk

Internal lints: usage_of_qualified_ty & ty_pass_by_reference

Closes #59952

Implements internal lints:

- `USAGE_OF_QUALIFIED_TY`
- `TY_PASS_BY_REFERENCE`

r? @oli-obk

5 years agoRemove unused TyCtxt argument from allow_two_phase_borrow function
flip1995 [Sun, 28 Apr 2019 19:13:33 +0000 (21:13 +0200)]
Remove unused TyCtxt argument from allow_two_phase_borrow function

5 years agoAdd test case for labeled break in const assignment
Alexey Shmalko [Sun, 28 Apr 2019 20:12:35 +0000 (23:12 +0300)]
Add test case for labeled break in const assignment

See https://github.com/rust-lang/rust/issues/51350 for more information.

5 years agoClarify the short explanation of E0207
Nickolay Ponomarev [Sun, 28 Apr 2019 19:32:28 +0000 (22:32 +0300)]
Clarify the short explanation of E0207

- Use the terms from the reference <https://doc.rust-lang.org/reference/items/implementations.html>
- Add code snippets to explain the terms

5 years agoresolve: Consider erroneous imports used to avoid duplicate diagnostics
Vadim Petrochenkov [Sun, 28 Apr 2019 18:27:01 +0000 (21:27 +0300)]
resolve: Consider erroneous imports used to avoid duplicate diagnostics

5 years agoFix lint findings in librustdoc
flip1995 [Sat, 27 Apr 2019 16:37:18 +0000 (18:37 +0200)]
Fix lint findings in librustdoc

5 years agoFix lint findings in librustc_mir
flip1995 [Fri, 26 Apr 2019 12:26:49 +0000 (14:26 +0200)]
Fix lint findings in librustc_mir

5 years agoFix lint findings in librustc_traits
flip1995 [Fri, 26 Apr 2019 12:10:46 +0000 (14:10 +0200)]
Fix lint findings in librustc_traits

5 years agoFix lint findings in librustc_typeck
flip1995 [Fri, 26 Apr 2019 11:41:10 +0000 (13:41 +0200)]
Fix lint findings in librustc_typeck

5 years agoFix lint findings in librustc_metadata
flip1995 [Fri, 26 Apr 2019 09:44:42 +0000 (11:44 +0200)]
Fix lint findings in librustc_metadata

5 years agoFix lint findings in librustc
flip1995 [Thu, 25 Apr 2019 20:54:19 +0000 (22:54 +0200)]
Fix lint findings in librustc

5 years agoUpdate *.stderr files
flip1995 [Wed, 24 Apr 2019 21:24:00 +0000 (23:24 +0200)]
Update *.stderr files

5 years agoAdd tests
flip1995 [Wed, 24 Apr 2019 21:23:44 +0000 (23:23 +0200)]
Add tests

5 years agoImplement internal lints
flip1995 [Wed, 24 Apr 2019 21:22:54 +0000 (23:22 +0200)]
Implement internal lints

- USAGE_OF_QUALIFIED_TY

- TY_PASS_BY_REFERENCE

5 years agoStabilize str::as_mut_ptr
Yuki OKUSHI [Sun, 28 Apr 2019 17:33:50 +0000 (02:33 +0900)]
Stabilize str::as_mut_ptr

5 years agoAuto merge of #60352 - Centril:const-incomplete-features, r=oli-obk
bors [Sun, 28 Apr 2019 15:40:00 +0000 (15:40 +0000)]
Auto merge of #60352 - Centril:const-incomplete-features, r=oli-obk

Float 'incomplete_features' out to a const for visibility

Float `let incomplete_features` out to a `const INCOMPLETE_FEATURES` and colocate near `active` features so that it is easier to find and edit.

r? @oli-obk

(use rollup)

5 years agoAdd test
Yuki OKUSHI [Sun, 28 Apr 2019 13:54:06 +0000 (22:54 +0900)]
Add test

5 years agoFloat 'incomplete_features' out to a const for visibility.
Mazdak Farrokhzad [Sun, 28 Apr 2019 13:13:35 +0000 (15:13 +0200)]
Float 'incomplete_features' out to a const for visibility.

5 years agoAuto merge of #60351 - Centril:rollup-5xv3tka, r=Centril
bors [Sun, 28 Apr 2019 12:50:06 +0000 (12:50 +0000)]
Auto merge of #60351 - Centril:rollup-5xv3tka, r=Centril

Rollup of 4 pull requests

Successful merges:

 - #60022 (Document `Item` type in `std::env::SplitPaths` iterator.)
 - #60270 (rustc: Flag metadata compatible with multiple CGUs)
 - #60325 (Document ast::ExprKind::Type)
 - #60347 (Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`)

Failed merges:

r? @ghost

5 years agoRollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:12 +0000 (14:17 +0200)]
Rollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper

Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`

fixes #60331

5 years agoRollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:11 +0000 (14:17 +0200)]
Rollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk

Document ast::ExprKind::Type

r? @oli-obk

5 years agoRollup merge of #60270 - alexcrichton:metadata-multi-cgu, r=oli-obk
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:10 +0000 (14:17 +0200)]
Rollup merge of #60270 - alexcrichton:metadata-multi-cgu, r=oli-obk

rustc: Flag metadata compatible with multiple CGUs

It looks like the `OutputType::Metadata` kind in the compiler was
misclassified in #38571 long ago by accident as incompatible with
codegen units and a single output file. This means that if you emit both
a linkable artifact and metadata it silently turns off multiple codegen
units unintentionally!

This commit corrects the situation to ensure that if `--emit metadata`
is used it doesn't implicitly disable multiple codegen units. This will
ensure we don't accidentally regress compiler performance when striving
to implement pipelined compilation!

5 years agoRollup merge of #60022 - nathankleyn:fix-issue-59543, r=Centril
Mazdak Farrokhzad [Sun, 28 Apr 2019 12:17:08 +0000 (14:17 +0200)]
Rollup merge of #60022 - nathankleyn:fix-issue-59543, r=Centril

Document `Item` type in `std::env::SplitPaths` iterator.

Previously there wasn't any documentation to show what the type of
`Item` was inside `std::env::SplitPaths`. Now, in the same format as
other examples of docs in `std` for `Iterator#Item`, we mention the
type.

This fixes #59543.

r? @steveklabnik

5 years agoRemove unnecessary function
Yuki OKUSHI [Sun, 28 Apr 2019 10:31:54 +0000 (19:31 +0900)]
Remove unnecessary function

5 years agoAuto merge of #60346 - dima74:patch-1, r=GuillaumeGomez
bors [Sun, 28 Apr 2019 09:58:59 +0000 (09:58 +0000)]
Auto merge of #60346 - dima74:patch-1, r=GuillaumeGomez

Fix default value for setting "Auto-hide item methods' documentation"

If I open any documentation page in incognito mode (for example [for `Option` enum](https://doc.rust-lang.org/nightly/std/option/enum.Option.html)), then methods will be collapsed, though [on the settings page](https://doc.rust-lang.org/nightly/settings.html) there will be displayed that "Auto-hide item methods' documentation" option is disabled.

If I understand correctly, property "Auto-hide item methods' documentation" [should be disabled by default](https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/render.rs#L1969), so correct check would be `property === "true"`. This is consistent with other options:

Options which are enabled by default are compared to `"false"`

https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/render.rs#L1965-L1968

https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/static/main.js#L2238
https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/static/main.js#L2321
https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/static/main.js#L2070

Options which are disabled by default are compared to `"true"`

https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/render.rs#L1970-L1972

https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/static/main.js#L1389
https://github.com/rust-lang/rust/blob/938d4ffe16c4430e1dcede570b06227114cb73d5/src/librustdoc/html/static/main.js#L2334

5 years agoRemove two-phase-beyond-autoref
Yuki OKUSHI [Sun, 28 Apr 2019 03:51:04 +0000 (12:51 +0900)]
Remove two-phase-beyond-autoref

5 years agoRemove two-phase-borrows
Yuki OKUSHI [Sun, 28 Apr 2019 03:22:47 +0000 (12:22 +0900)]
Remove two-phase-borrows

5 years agoAuto merge of #60333 - Centril:stabilize-iterator-copied, r=varkor
bors [Sun, 28 Apr 2019 01:46:11 +0000 (01:46 +0000)]
Auto merge of #60333 - Centril:stabilize-iterator-copied, r=varkor

Stabilize Iterator::copied in 1.36.0

Per https://github.com/rust-lang/rust/issues/57127#issuecomment-487289429.

Closes https://github.com/rust-lang/rust/issues/57127.

r? @varkor

5 years agoFix default value for setting "Auto-hide item methods' documentation"
Dmitry Murzin [Sun, 28 Apr 2019 01:25:22 +0000 (04:25 +0300)]
Fix default value for setting "Auto-hide item methods' documentation"

5 years agoDon't try to render auto-trait bounds with any inference variables
Aaron Hill [Sun, 28 Apr 2019 00:33:03 +0000 (20:33 -0400)]
Don't try to render auto-trait bounds with any inference variables

Previously, we checked if the target of a projection type was itself an
inference variable. However, for Rustdoc rendering purposes, there's no
distinction between an inference variable ('_') and a type containing
one (e.g. (MyStruct<u8, _>)) - we don't want to render either of them.

Fixes #60269

Due to the complexity of the original bug, which spans three different
crates (hyper, tower-hyper, and tower), I have been unable to create a
minimized reproduction for the issue.

5 years agoAuto merge of #60313 - cuviper:thinlto-import, r=alexcrichton
bors [Sat, 27 Apr 2019 19:53:00 +0000 (19:53 +0000)]
Auto merge of #60313 - cuviper:thinlto-import, r=alexcrichton

Limit internalization in LLVM 8 ThinLTO

Fixes #60184.
r? @alexcrichton

5 years agotidy: Fix false positives from long URLs
Vadim Petrochenkov [Sat, 27 Apr 2019 17:29:27 +0000 (20:29 +0300)]
tidy: Fix false positives from long URLs

5 years agoAuto merge of #60288 - Zoxc:update-rayon, r=nikomatsakis
bors [Sat, 27 Apr 2019 17:08:11 +0000 (17:08 +0000)]
Auto merge of #60288 - Zoxc:update-rayon, r=nikomatsakis

Update rustc-rayon version

r? @nikomatsakis

5 years agotidy
Steven Fackler [Sat, 27 Apr 2019 16:19:34 +0000 (09:19 -0700)]
tidy

5 years agoStabilized vectored IO
Steven Fackler [Sat, 27 Apr 2019 15:34:08 +0000 (08:34 -0700)]
Stabilized vectored IO

This renames `std::io::IoVec` to `std::io::IoSlice` and
`std::io::IoVecMut` to `std::io::IoSliceMut`, and stabilizes
`std::io::IoSlice`, `std::io::IoSliceMut`,
`std::io::Read::read_vectored`, and `std::io::Write::write_vectored`.

Closes #58452

5 years agoStabilize Iterator::copied in 1.36.0.
Mazdak Farrokhzad [Sat, 27 Apr 2019 14:45:30 +0000 (16:45 +0200)]
Stabilize Iterator::copied in 1.36.0.

5 years agoAuto merge of #60329 - Centril:rollup-wv8g1ex, r=Centril
bors [Sat, 27 Apr 2019 14:06:39 +0000 (14:06 +0000)]
Auto merge of #60329 - Centril:rollup-wv8g1ex, r=Centril

Rollup of 5 pull requests

Successful merges:

 - #60292 (Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>`)
 - #60307 (Make "Implementations on Foreign Types" items in sidebar link to specific impls)
 - #60309 (Add 1.34.1 release notes)
 - #60315 (bootstrap: use correct version numbers for llvm-tools and lldb)
 - #60316 (Use "capacity" as parameter name in with_capacity() methods)

Failed merges:

r? @ghost

5 years agoRollup merge of #60316 - mgeier:rename-capacity-parameter, r=joshtriplett
Mazdak Farrokhzad [Sat, 27 Apr 2019 12:12:42 +0000 (14:12 +0200)]
Rollup merge of #60316 - mgeier:rename-capacity-parameter, r=joshtriplett

Use "capacity" as parameter name in with_capacity() methods

See #60271.

The only place where I didn't change the parameter name is `RawVec`. The problem is that it has a `.cap()` method instead of the usual `.capacity()`:

https://github.com/rust-lang/rust/blob/597f432489f12a3f33419daa039ccef11a12c4fd/src/liballoc/raw_vec.rs#L200-L210

Changing this would be a breaking change, and I guess that's not worth it.

But since I didn't change `.cap()` there, I didn't change the `cap` parameter name to `capacity`, either.

5 years agoRollup merge of #60315 - pietroalbini:fix-tools-version, r=Mark-Simulacrum
Mazdak Farrokhzad [Sat, 27 Apr 2019 12:12:41 +0000 (14:12 +0200)]
Rollup merge of #60315 - pietroalbini:fix-tools-version, r=Mark-Simulacrum

bootstrap: use correct version numbers for llvm-tools and lldb

The current URLs for the `llvm-tools` and `lldb` components are a bit broken right now:

```
https://static.rust-lang.org/dist/2019-04-25/llvm-tools-1.34.1 (fc50f328b 2019-04-24)-aarch64-unknown-linux-gnu.tar.gz
```

This PR uses proper version numbers for those. Tested a dist build locally and everything works.

r? @Mark-Simulacrum

5 years agoRollup merge of #60309 - pietroalbini:relnotes-1.34.1, r=pietroalbini
Mazdak Farrokhzad [Sat, 27 Apr 2019 12:12:40 +0000 (14:12 +0200)]
Rollup merge of #60309 - pietroalbini:relnotes-1.34.1, r=pietroalbini

Add 1.34.1 release notes

This is a backport of the release notes from the 1.34.1 release.

r? @ghost

5 years agoRollup merge of #60307 - dima74:fix/56018, r=GuillaumeGomez
Mazdak Farrokhzad [Sat, 27 Apr 2019 12:12:38 +0000 (14:12 +0200)]
Rollup merge of #60307 - dima74:fix/56018, r=GuillaumeGomez

Make "Implementations on Foreign Types" items in sidebar link to specific impls

This solves #56018 for most cases (though not work for foreign impls with same names)

5 years agoRollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakis
Mazdak Farrokhzad [Sat, 27 Apr 2019 12:12:37 +0000 (14:12 +0200)]
Rollup merge of #60292 - varkor:ty-tuple-substs, r=nikomatsakis

Replace the `&'tcx List<Ty<'tcx>>` in `TyKind::Tuple` with `SubstsRef<'tcx>`

Part of the suggested refactoring for https://github.com/rust-lang/rust/issues/42340. As expected, this is a little messy, because there are many places that the components of tuples are expected to be types, rather than arbitrary kinds. However, it should open up the way for a refactoring of `TyS` itself.

r? @nikomatsakis

5 years agoDocument ast::ExprKind::Type.
Mazdak Farrokhzad [Sat, 27 Apr 2019 10:06:02 +0000 (12:06 +0200)]
Document ast::ExprKind::Type.

5 years agoUpdate rustfmt to 1.2.2
topecongiro [Wed, 24 Apr 2019 15:38:34 +0000 (00:38 +0900)]
Update rustfmt to 1.2.2

5 years agoAuto merge of #59887 - eddyb:safer-metadata, r=Zoxc
bors [Sat, 27 Apr 2019 08:13:23 +0000 (08:13 +0000)]
Auto merge of #59887 - eddyb:safer-metadata, r=Zoxc

rustc_metadata: more safely read/write the index positions.

This is a small part of a larger refactor, that I want to benchmark independently.
The final code would be even cleaner than this, so this is sort of an "worst case" test.

5 years agoAuto merge of #59540 - Zoxc:the-arena-2, r=michaelwoerister
bors [Sat, 27 Apr 2019 05:24:11 +0000 (05:24 +0000)]
Auto merge of #59540 - Zoxc:the-arena-2, r=michaelwoerister

Use arenas to avoid Lrc in queries #1

Based on https://github.com/rust-lang/rust/pull/59536.

5 years agoAuto merge of #60306 - RalfJung:xargo, r=alexcrichton
bors [Fri, 26 Apr 2019 21:46:17 +0000 (21:46 +0000)]
Auto merge of #60306 - RalfJung:xargo, r=alexcrichton

include rustc-std-workspace-alloc in rust-src

This is needed to fix https://github.com/japaric/xargo/issues/240

5 years agoRemove unused MIR visitor methods
Matthew Jasper [Fri, 26 Apr 2019 20:36:36 +0000 (21:36 +0100)]
Remove unused MIR visitor methods

5 years agoRemove region from borrow place contexts
Matthew Jasper [Wed, 24 Apr 2019 18:41:43 +0000 (19:41 +0100)]
Remove region from borrow place contexts

5 years agoUse visit_terminator_kind when possible
Matthew Jasper [Mon, 22 Apr 2019 20:08:52 +0000 (21:08 +0100)]
Use visit_terminator_kind when possible

5 years agoRemove BasicBlock parameter from mir visitor methods
Matthew Jasper [Mon, 22 Apr 2019 20:07:14 +0000 (21:07 +0100)]
Remove BasicBlock parameter from mir visitor methods

5 years agoUpdate handling of Tuple
varkor [Thu, 25 Apr 2019 23:27:33 +0000 (00:27 +0100)]
Update handling of Tuple

5 years agoReplace `&'tcx List<Ty<'tcx>>` in `Tuple` with `SubstsRef<'tcx>`
varkor [Thu, 25 Apr 2019 23:26:57 +0000 (00:26 +0100)]
Replace `&'tcx List<Ty<'tcx>>` in `Tuple` with `SubstsRef<'tcx>`

5 years agoAdd expect_ty method to Kind
varkor [Thu, 25 Apr 2019 23:26:33 +0000 (00:26 +0100)]
Add expect_ty method to Kind

5 years agoMake "Implementations on Foreign Types" items in sidebar link to specific impls
Dmitry Murzin [Fri, 26 Apr 2019 14:06:20 +0000 (17:06 +0300)]
Make "Implementations on Foreign Types" items in sidebar link to specific impls

5 years agoUpdate rustc-rayon version
John Kåre Alsaker [Thu, 25 Apr 2019 20:50:41 +0000 (22:50 +0200)]
Update rustc-rayon version

5 years agoUse "capacity" as parameter name in with_capacity() methods
Matthias Geier [Fri, 26 Apr 2019 16:43:24 +0000 (18:43 +0200)]
Use "capacity" as parameter name in with_capacity() methods

Closes #60271.

5 years agobootstrap: use correct version numbers for llvm-tools and lldb
Pietro Albini [Fri, 26 Apr 2019 16:25:31 +0000 (18:25 +0200)]
bootstrap: use correct version numbers for llvm-tools and lldb

5 years agoAdd flatten option for `Option<Option<T>>`
Ethan Brierley [Fri, 26 Apr 2019 15:58:57 +0000 (16:58 +0100)]
Add flatten option for `Option<Option<T>>`

squashed commit

5 years agoLimit internalization in LLVM 8 ThinLTO
Josh Stone [Fri, 26 Apr 2019 15:58:14 +0000 (08:58 -0700)]
Limit internalization in LLVM 8 ThinLTO

5 years agoupdate release notes for 1.34.1
Pietro Albini [Tue, 23 Apr 2019 14:18:11 +0000 (16:18 +0200)]
update release notes for 1.34.1

5 years agoinclude rustc-std-workspace-alloc in rust-src
Ralf Jung [Fri, 26 Apr 2019 14:19:53 +0000 (16:19 +0200)]
include rustc-std-workspace-alloc in rust-src

5 years agoAuto merge of #60303 - CryZe:patch-6, r=Centril
bors [Fri, 26 Apr 2019 12:49:11 +0000 (12:49 +0000)]
Auto merge of #60303 - CryZe:patch-6, r=Centril

Stabilize pointer::align_offset

Closes #44488

5 years agoRemove feature gates from std and tests
Christopher Serr [Fri, 26 Apr 2019 10:33:42 +0000 (12:33 +0200)]
Remove feature gates from std and tests

5 years agoStabilize pointer::align_offset
Christopher Serr [Fri, 26 Apr 2019 10:15:12 +0000 (12:15 +0200)]
Stabilize pointer::align_offset

Closes #44488

5 years agoAuto merge of #60240 - mati865:musl_toolchain, r=alexcrichton
bors [Fri, 26 Apr 2019 07:32:34 +0000 (07:32 +0000)]
Auto merge of #60240 - mati865:musl_toolchain, r=alexcrichton

 Bootstrap x86_64 musl by itself

It should slightly reduce build time and prepares ground for musl native tests.

NOTE: I haven't tested artifacts yet (only the build).

Can I have double try?

r? @alexcrichton

5 years agoAuto merge of #60167 - varkor:tidy-filelength, r=matthewjasper
bors [Fri, 26 Apr 2019 04:42:10 +0000 (04:42 +0000)]
Auto merge of #60167 - varkor:tidy-filelength, r=matthewjasper

Add a tidy check for files with over 3,000 lines

Files with a large number of lines can cause issues in GitHub (e.g. https://github.com/rust-lang/rust/issues/60015) and also tend to be indicative of opportunities to refactor into less monolithic structures.

This adds a new check to tidy to warn against files that have more than 3,000 lines, as suggested in https://github.com/rust-lang/rust/issues/60015#issuecomment-483868594. (This number was chosen fairly arbitrarily as a reasonable indicator of size.) This check can be ignored with `// ignore-tidy-filelength`.

Existing files with greater than 3,000 lines currently ignore the check, but this helps us spot when files are getting too large. (We might try to split up all files larger than this in the future, as in https://github.com/rust-lang/rust/issues/60015).

5 years agoAuto merge of #60296 - Centril:rollup-qh9la7k, r=Centril
bors [Fri, 26 Apr 2019 01:51:05 +0000 (01:51 +0000)]
Auto merge of #60296 - Centril:rollup-qh9la7k, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #59734 (Prevent failure in case no space left on device in rustdoc)
 - #59940 (Set cfg(test) when rustdoc is running with --test option)
 - #60134 (Fix index-page generation)
 - #60165 (Add Pin::{into_inner,into_inner_unchecked})
 - #60183 (Chalkify: Add builtin Copy/Clone)
 - #60225 (Introduce hir::ExprKind::Use and employ in for loop desugaring.)
 - #60247 (Implement Debug for Place using Place::iterate)
 - #60259 (Derive Default instead of new in applicable lint)
 - #60267 (Add feature-gate for f16c target feature)
 - #60284 (Do not allow const generics to depend on type parameters)
 - #60285 (Do not ICE when checking types against foreign fn)
 - #60289 (Make `-Z allow-features` work for stdlib features)

Failed merges:

r? @ghost

5 years agoRollup merge of #60289 - tmandry:allow-features-include-std, r=cramertj
Mazdak Farrokhzad [Fri, 26 Apr 2019 01:50:26 +0000 (03:50 +0200)]
Rollup merge of #60289 - tmandry:allow-features-include-std, r=cramertj

Make `-Z allow-features` work for stdlib features

r? @cramertj

5 years agoRollup merge of #60285 - estebank:icent, r=varkor
Mazdak Farrokhzad [Fri, 26 Apr 2019 01:50:25 +0000 (03:50 +0200)]
Rollup merge of #60285 - estebank:icent, r=varkor

Do not ICE when checking types against foreign fn

Fix #60275.

5 years agoRollup merge of #60284 - varkor:const-param-of-type-param, r=cramertj
Mazdak Farrokhzad [Fri, 26 Apr 2019 01:50:24 +0000 (03:50 +0200)]
Rollup merge of #60284 - varkor:const-param-of-type-param, r=cramertj

Do not allow const generics to depend on type parameters

Fixes https://github.com/rust-lang/rust/issues/60264. In https://github.com/rust-lang/rust/pull/58191/files/b534cf992d0189032207f395c27ed092c89b40c7#diff-aeb0880081a991f34aef2ab889e1fb7a, it was suggested that there might be a better place for this error, but as this bug already affects stable, it's probably worth merging this now, and refactoring afterwards (I can open an issue for this).