Commit Graph

92679 Commits

Author SHA1 Message Date
YOSHIOKA Takuma a0e112ba52 Implement BorrowMut<str> for String
Closes rust-lang/rfcs#1282.
2019-04-30 17:50:38 +09:00
bors f843ad60ef 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
2019-04-30 02:27:07 +00:00
Mazdak Farrokhzad 116dcff2c3 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">
2019-04-30 03:28:39 +02:00
Mazdak Farrokhzad ada68c9d19 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.
2019-04-30 03:28:38 +02:00
Mazdak Farrokhzad 1ec56d8550 Rollup merge of #60238 - topecongiro:rustfmt-1.2.2, r=alexcrichton
Update rustfmt to 1.2.2
2019-04-30 03:28:37 +02:00
Mazdak Farrokhzad c54b77ca2d Rollup merge of #59869 - jethrogb:jb/sgx-iovec, r=sfackler
SGX target: implemented vectored I/O

r? @sfackler

Includes #59857
2019-04-30 03:28:35 +02:00
Jethro Beekman 09f4008da5 SGX target: implemented vectored I/O 2019-04-29 16:48:22 -07:00
Jethro Beekman 7e624ce2c2 SGX target: don't unwind on usercall index out of bounds 2019-04-29 16:46:29 -07:00
bors 03122e1bac 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
2019-04-29 23:35:01 +00:00
Nicholas Nethercote 7bcb0cffb6 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`.
2019-04-30 08:51:57 +10:00
Guillaume Gomez 10b9370286 Fix line number display in source view 2019-04-29 23:13:30 +02:00
bors 00859e3e65 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
2019-04-29 20:40:49 +00:00
Mazdak Farrokhzad 04942105ef Rollup merge of #60360 - rasendubi:const-labeled-break, r=Centril
Add test case for labeled break in const assignment

Fixes #51350.
2019-04-29 22:22:46 +02:00
Mazdak Farrokhzad 4369f03620 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
2019-04-29 22:22:45 +02:00
Mazdak Farrokhzad 49946dd1b6 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.
2019-04-29 22:22:44 +02:00
Mazdak Farrokhzad c9b70144a3 Rollup merge of #60356 - JohnTitor:stabilize-as-mut-ptr, r=Centril
Stabilize str::as_mut_ptr

Closes #58215
2019-04-29 22:22:42 +02:00
Mazdak Farrokhzad 3091961621 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
2019-04-29 22:22:41 +02:00
Mazdak Farrokhzad ead8d81301 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
2019-04-29 22:22:40 +02:00
Mazdak Farrokhzad 67b7f5779d 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.
2019-04-29 22:22:38 +02:00
Mazdak Farrokhzad bdf3a01065 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());
```
2019-04-29 22:22:36 +02:00
Mazdak Farrokhzad eb3c53071a Rollup merge of #59946 - mernen:patch-2, r=ehuss
Fix equivalent string in escape_default docs

This newline should be escaped.
2019-04-29 22:22:34 +02:00
bors a55c2eb325 Auto merge of #60355 - Manishearth:clippyup, r=centril
Update clippy

r? @centril
2019-04-29 17:44:15 +00:00
Manish Goregaokar 505cae2a76 Update clippy 2019-04-29 08:48:17 -07:00
bors 96d565be01 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
2019-04-29 14:50:17 +00:00
ljedrz d536ec4d39 hir: remove LoweredNodeId 2019-04-29 12:12:11 +02:00
bors 00acb7b243 Auto merge of #60364 - JohnTitor:stabilize-const-needs-drop, r=oli-obk
const-stabilize: std::mem::needs_drop

Closes #51929

r? @oli-obk
2019-04-29 09:48:11 +00:00
bors 1b6caa7cd6 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
2019-04-29 05:18:12 +00:00
Yuki OKUSHI 1c17489bfe const-stabilize std::mem::needs_drop 2019-04-29 12:41:06 +09:00
bors c7fcbfbf1f Auto merge of #60182 - matklad:lexer-cleanup, r=petrochenkov
Lexer cleanup

another couple of tiny cleanups
2019-04-29 01:22:12 +00:00
bors 272000c94e 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
2019-04-28 20:42:09 +00:00
flip1995 2e5f0b3c49 Remove unused TyCtxt argument from allow_two_phase_borrow function 2019-04-28 22:17:15 +02:00
Alexey Shmalko 7cafacdd82 Add test case for labeled break in const assignment
See https://github.com/rust-lang/rust/issues/51350 for more information.
2019-04-28 23:12:35 +03:00
Nickolay Ponomarev 35f1c2fd13 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
2019-04-28 23:01:26 +03:00
Vadim Petrochenkov fbbec76701 resolve: Consider erroneous imports used to avoid duplicate diagnostics 2019-04-28 22:36:57 +03:00
flip1995 86ed3116ba Fix lint findings in librustdoc 2019-04-28 21:19:27 +02:00
flip1995 e1da67e69c Fix lint findings in librustc_mir 2019-04-28 21:19:27 +02:00
flip1995 654d045b6f Fix lint findings in librustc_traits 2019-04-28 21:19:27 +02:00
flip1995 1526f7a4ed Fix lint findings in librustc_typeck 2019-04-28 21:19:26 +02:00
flip1995 02f7de1be5 Fix lint findings in librustc_metadata 2019-04-28 21:19:26 +02:00
flip1995 6c272b78dc Fix lint findings in librustc 2019-04-28 21:19:26 +02:00
flip1995 8af35fe3f0 Update *.stderr files 2019-04-28 21:19:26 +02:00
flip1995 90ba09d299 Add tests 2019-04-28 21:19:25 +02:00
flip1995 747d288be4 Implement internal lints
- USAGE_OF_QUALIFIED_TY

- TY_PASS_BY_REFERENCE
2019-04-28 21:19:25 +02:00
Yuki OKUSHI 4c0f01cc27 Stabilize str::as_mut_ptr 2019-04-29 02:33:50 +09:00
bors bdfdbcd44d 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)
2019-04-28 15:40:00 +00:00
Yuki OKUSHI 52356cad4e Add test 2019-04-28 22:54:06 +09:00
Mazdak Farrokhzad 3f30082625 Float 'incomplete_features' out to a const for visibility. 2019-04-28 15:13:35 +02:00
bors 012c300706 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
2019-04-28 12:50:06 +00:00
Mazdak Farrokhzad fe52f8e377 Rollup merge of #60347 - JohnTitor:remove-flags, r=matthewjasper
Remove `-Z two-phase-borrows` and `-Z two-phase-beyond-autoref`

fixes #60331
2019-04-28 14:17:12 +02:00
Mazdak Farrokhzad 634e2daaa5 Rollup merge of #60325 - Centril:doc-ast-exprkind-type, r=oli-obk
Document ast::ExprKind::Type

r? @oli-obk
2019-04-28 14:17:11 +02:00