]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoRollup merge of #59454 - topecongiro:rustfmt-1.2.0, r=nrc
Mazdak Farrokhzad [Fri, 29 Mar 2019 11:32:23 +0000 (12:32 +0100)]
Rollup merge of #59454 - topecongiro:rustfmt-1.2.0, r=nrc

Update rustfmt to 1.2.0

This release includes bug fixes and performance improvements from 1.1.0. Also it adds a new rustfmt tool attribute `#[rustfmt::skip::macros]`, which lets you skip formatting macro calls of your choice.

cc @nrc @Centril @Xanewok

5 years agoRollup merge of #59436 - gnzlbg:update_jemalloc, r=alexcrichton
Mazdak Farrokhzad [Fri, 29 Mar 2019 11:32:21 +0000 (12:32 +0100)]
Rollup merge of #59436 - gnzlbg:update_jemalloc, r=alexcrichton

Update jemalloc-sys to version 0.3.0

This PR updates jemalloc-sys from 0.1.8 to 0.3.0.

5 years agoRollup merge of #59366 - ehuss:update-books, r=QuietMisdreavus
Mazdak Farrokhzad [Fri, 29 Mar 2019 11:32:19 +0000 (12:32 +0100)]
Rollup merge of #59366 - ehuss:update-books, r=QuietMisdreavus

Update books

Update reference, book, rust-by-example, edition-guide, embedded-book

## reference

15 commits in 41493ffce5d0e17d54eaf5ec9a995054e2b9aece..27ad493a10364e907ec476e2ad61e8a1614b57e1
2019-03-05 12:32:22 +0100 to 2019-03-26 02:06:15 +0100
- Document wasm_import_module for #[link]. (rust-lang-nursery/reference#554)
- Fix tidy error. (rust-lang-nursery/reference#552)
- Some minor contributing updates. (rust-lang-nursery/reference#551)
- Document `type_length_limit`. (rust-lang-nursery/reference#546)
- Add some terms to the glossary. (rust-lang-nursery/reference#547)
- Document `target_feature` and `cfg_target_feature`. (rust-lang-nursery/reference#545)
- Remove undocumented page (rust-lang-nursery/reference#539)
- Reorg and update attributes (rust-lang-nursery/reference#537)
- Fix some minor link errors. (rust-lang-nursery/reference#538)
- Add linkchecker. (rust-lang-nursery/reference#521)
- Expand docs on Macros By Example. (rust-lang-nursery/reference#511)
- document #[panic_handler] (rust-lang-nursery/reference#362)
- document #[used] (rust-lang-nursery/reference#361)
- Note that UB is program-global (rust-lang-nursery/reference#490)
- Fix copy-paste error in procedural-macros.md (rust-lang-nursery/reference#533)

## book

16 commits in 9cffbeabec3bcec42d09432bfe7705125c848889..b93ec30bbc7b1b5c2f44223249ab359bed2ed5a6
2019-03-02 08:22:41 -0500 to 2019-03-26 16:54:10 -0400
- Unignore example that now compiles
- Fix code snippet (rust-lang/book#1863)
- Fix mdbook link text in readme (rust-lang/book#1881)
- Wrap to 80 cols
- Make sentence more complete (rust-lang/book#1885)
- consistenly use increment and decrement (rust-lang/book#1884)
- Fix link to Reference's conditional-compilation. (rust-lang/book#1878)
- Fix subject/verb agreement
- Remove nostarch snapshot files that have been incorporated and checked
- haha teach the dictionary steve's name
- Add authorship info to the front page
- fix accidental <ol>'s (rust-lang/book#1866)
- Edits to Macros (rust-lang/book#1848)
- Mention `lock` returns `MutexGuard` wrapped in a `LockResult`
- Add an example that illustrates NLL (rust-lang/book#1842)
- change the parameter name from `type` to `kind` (rust-lang/book#1845)

## rust-by-example

33 commits in 2ce92beabb912d417a7314d6da83ac9b50dc2afb..f68ef3d0f4959f6a7d92a08d9994b117f0f4d32d
2018-11-20 10:10:23 -0500 to 2019-03-12 15:32:12 -0300
- Fix some broken links. (rust-lang/rust-by-example#1161)
- Update links in README (rust-lang/rust-by-example#1167)
- Add score/lifetimes/trait.md (rust-lang/rust-by-example#1168)
- Fix rust-lang/rust-by-example#1147 - No more `open_mode` method (rust-lang/rust-by-example#1164)
- Fix for loop description in list print example (rust-lang/rust-by-example#1162)
- Add link to Cargo chapter in the index page (rust-lang/rust-by-example#1159)
- Fix grammar in sentence about integer notation (rust-lang/rust-by-example#1157)
- Do not use deprecated functions from `std::error::Error` trait (rust-lang/rust-by-example#1151)
- Update new_types.md to clarify conversion to base type (rust-lang/rust-by-example#1148)
- Fix compatibility with Rust 2018 (rust-lang/rust-by-example#1150)
- Hello: Fix hint link in `fmt` chapter. (rust-lang/rust-by-example#1146)
- Clarify pub(restricted) example a bit (rust-lang/rust-by-example#1133)
- Add "literal" to list of macro designators (rust-lang/rust-by-example#1153)
- Minor fixes for the macros chapter (rust-lang/rust-by-example#1113)
- Use new book links instead of the old second-edition ones (rust-lang/rust-by-example#1143)
- Recommend implementing Display over ToString (rust-lang/rust-by-example#1145)
- Remove unused import and format with `rustfmt` (rust-lang/rust-by-example#1144)
- fix typo (rust-lang/rust-by-example#1142)
- Update syntax for 2018 Edition (rust-lang/rust-by-example#1136)
- Added two missing full stops (rust-lang/rust-by-example#1138)
- Removed unnecessary spaces before macro designators in macros/dry (rust-lang/rust-by-example#1139)
- fix install mdbook command (rust-lang/rust-by-example#1128)
- Changed word `function` to `type` in comment of fn area (rust-lang/rust-by-example#1132)
- Added two missing backticks in generics/multi_bounds (rust-lang/rust-by-example#1129)
- Fixed small logic error in error/option_unwrap/and_then (rust-lang/rust-by-example#1127)
- Fix typo (rust-lang/rust-by-example#1125)
- The code of conduct link was dead. I fixed it. (rust-lang/rust-by-example#1122)
- I added a space in the Display fmt for Complex (rust-lang/rust-by-example#1123)
- Fix Rust install link in the index (rust-lang/rust-by-example#1124)
- Update cargo conventions section (rust-lang/rust-by-example#1121)
- Fixed curly braces in the `To and from Strings` chapter to be parentheses (rust-lang/rust-by-example#1120)
- Edit a typo (rust-lang/rust-by-example#1119)
- Fixes rust-lang/rust-by-example#1115 by correcting the typo from into_iterator to into_iter (rust-lang/rust-by-example#1118)

## edition-guide

1 commits in aa0022c875907886cae8f3ef8e9ebf6e2a5e728d..b56ddb11548450a6df4edd1ed571b2bc304eb9e6
2019-02-27 22:10:39 -0800 to 2019-03-10 10:23:16 +0100
- Links fixes (rust-lang-nursery/edition-guide#133)

## embedded-book

6 commits in 9e656ead82bfe869493dec82653a52e27fa6a05c..07fd3880ea0874d82b1d9ed30ad3427ec98b4e8a
2019-03-03 16:03:26 +0000 to 2019-03-27 15:40:52 +0000
- Fix test errors.  (rust-embedded/book#180)
- Update qemu.md  (rust-embedded/book#170)
- Update no-std.md to remove obsolete FAQ link  (rust-embedded/book#177)
- We've come a long way :)  (rust-embedded/book#176)
- Correct link to team  (rust-embedded/book#175)
- Update some book links to their new homes.  (rust-embedded/book#173)

5 years agoAuto merge of #59513 - Centril:rollup, r=Centril
bors [Fri, 29 Mar 2019 08:14:41 +0000 (08:14 +0000)]
Auto merge of #59513 - Centril:rollup, r=Centril

Rollup of 11 pull requests

Successful merges:

 - #58019 (Combine all builtin late lints and make lint checking parallel)
 - #59358 (Use `track_errors` instead of hand rolling)
 - #59394 (warn -> deny duplicate match bindings)
 - #59401 (bootstrap: build crates under libtest with -Z emit-stack-sizes)
 - #59423 (Visit path in `walk_mac`)
 - #59468 (musl: build toolchain libs with -fPIC)
 - #59476 (Use `SmallVec` in `TokenStreamBuilder`.)
 - #59496 (Remove unnecessary with_globals calls)
 - #59498 (Use 'write_all' instead of 'write' in example code)
 - #59503 (Stablize {f32,f64}::copysign().)
 - #59511 (Fix missed fn rename in #59284)

Failed merges:

r? @ghost

5 years agoAuto merge of #58605 - nagisa:fix-the-metadata, r=michaelwoerister
bors [Fri, 29 Mar 2019 05:00:58 +0000 (05:00 +0000)]
Auto merge of #58605 - nagisa:fix-the-metadata, r=michaelwoerister

Use informational target machine for metadata

Since there is nothing to optimise there...

Should fix #58323 but haven’t tested locally.

r? @michaelwoerister

5 years agoRollup merge of #59511 - jethrogb:jb/maybeinit-deprecated, r=Centril
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:41:00 +0000 (02:41 +0100)]
Rollup merge of #59511 - jethrogb:jb/maybeinit-deprecated, r=Centril

Fix missed fn rename in #59284

See https://github.com/rust-lang/rust/pull/59284#issuecomment-477822797

5 years agoRollup merge of #59503 - crlf0710:stablize_copysign, r=SimonSapin
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:58 +0000 (02:40 +0100)]
Rollup merge of #59503 - crlf0710:stablize_copysign, r=SimonSapin

Stablize {f32,f64}::copysign().

Stablization PR for #55169/#58046. Please check if i'm doing it correctly. Is 1.35.0 good to go?

5 years agoRollup merge of #59498 - mbrubeck:write_all, r=Centril
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:57 +0000 (02:40 +0100)]
Rollup merge of #59498 - mbrubeck:write_all, r=Centril

Use 'write_all' instead of 'write' in example code

Using `write` without looping and checking the result can cause silent data loss.  Example code should use `write_all` so that people don't copy this pattern.  (Of course this does not include example code for docs that are specifically about the `write` method.)

5 years agoRollup merge of #59496 - Zoxc:fix-globals, r=oli-obk
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:56 +0000 (02:40 +0100)]
Rollup merge of #59496 - Zoxc:fix-globals, r=oli-obk

Remove unnecessary with_globals calls

5 years agoRollup merge of #59476 - nnethercote:TokenStreamBuilder-SmallVec, r=petrochenkov
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:54 +0000 (02:40 +0100)]
Rollup merge of #59476 - nnethercote:TokenStreamBuilder-SmallVec, r=petrochenkov

Use `SmallVec` in `TokenStreamBuilder`.

This reduces by 12% the number of allocations done for a "clean incremental" of `webrender_api`, which reduces the instruction count by about 0.5%.

r? @petrochenkov

5 years agoRollup merge of #59468 - mati865:musl_toolchain, r=pnkfelix
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:52 +0000 (02:40 +0100)]
Rollup merge of #59468 - mati865:musl_toolchain, r=pnkfelix

musl: build toolchain libs with -fPIC

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

5 years agoRollup merge of #59423 - varkor:walk_mac-visit_path, r=petrochenkov
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:51 +0000 (02:40 +0100)]
Rollup merge of #59423 - varkor:walk_mac-visit_path, r=petrochenkov

Visit path in `walk_mac`

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

5 years agoRollup merge of #59401 - japaric:compiler-builtins-stack-sizes, r=alexcrichton
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:49 +0000 (02:40 +0100)]
Rollup merge of #59401 - japaric:compiler-builtins-stack-sizes, r=alexcrichton

bootstrap: build crates under libtest with -Z emit-stack-sizes

Please see the comment in the diff for the rationale.

This change adds a `.stack_sizes` linker section to `libcompiler_builtins.rlib`
but this section is discarded by the linker by default so it won't affect the
binary size of most programs. It will, however, negatively affect the binary
size of programs that link to a recent release of the `cortex-m-rt` crate
because of the linker script that crate provides, but I have proposed a PR
(rust-embedded/cortex-m-rt#186) to solve the problem (which I originally
introduced :-)).

This change does increase the size of the `libcompiler_builtins.rlib` artifact we
distribute but the increase is in the order of (a few) KBs.

r? @alexcrichton

5 years agoRollup merge of #59394 - mark-i-m:dup-matcher-bindings-2, r=Centril
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:48 +0000 (02:40 +0100)]
Rollup merge of #59394 - mark-i-m:dup-matcher-bindings-2, r=Centril

warn -> deny duplicate match bindings

This is the next step of https://github.com/rust-lang/rust/issues/57742

r? @Centril

- [x] Decide whether to go to deny-by-default or hard error.
     - My preference is to make this deny-by-default, rather than going straight to a hard error. The CI should fail because I haven't updated the ui test yet. I'll update it when we decide which to do.
- [x] Update [test](https://github.com/mark-i-m/rust/blob/c25d6b83441e0c060ee0273193ef27b29e1318cd/src/test/ui/macros/macro-multiple-matcher-bindings.rs)
- [ ] ~Crater run~ see https://github.com/rust-lang/rust/pull/59394#issuecomment-477817351

5 years agoRollup merge of #59358 - JohnTitor:use-track-errors, r=oli-obk
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:46 +0000 (02:40 +0100)]
Rollup merge of #59358 - JohnTitor:use-track-errors, r=oli-obk

Use `track_errors` instead of hand rolling

Fixes #59215

r? @oli-obk

5 years agoRollup merge of #58019 - Zoxc:combine-late-lints, r=estebank
Mazdak Farrokhzad [Fri, 29 Mar 2019 01:40:45 +0000 (02:40 +0100)]
Rollup merge of #58019 - Zoxc:combine-late-lints, r=estebank

Combine all builtin late lints and make lint checking parallel

Blocked on https://github.com/rust-lang/rust/pull/57293.

Cuts runtime of late lint checking from 3.222s to 0.546s with 8 threads on `winapi` (@retep998 ;) )

r? @estebank

5 years agoFix missed fn rename in #59284
Jethro Beekman [Fri, 29 Mar 2019 00:50:01 +0000 (17:50 -0700)]
Fix missed fn rename in #59284

5 years agoUse `SmallVec` in `TokenStreamBuilder`.
Nicholas Nethercote [Thu, 28 Mar 2019 01:27:26 +0000 (12:27 +1100)]
Use `SmallVec` in `TokenStreamBuilder`.

This reduces by 12% the number of allocations done for a "clean
incremental" of `webrender_api`, which reduces the instruction count by
about 0.5%.

It also reduces instruction counts by up to 1.4% across a range of
rustc-perf benchmark runs.

5 years agoAuto merge of #59487 - Centril:rollup, r=Centril
bors [Thu, 28 Mar 2019 21:46:30 +0000 (21:46 +0000)]
Auto merge of #59487 - Centril:rollup, r=Centril

Rollup of 10 pull requests

Successful merges:

 - #58717 (Add FromStr impl for NonZero types)
 - #59091 (Combine input and eval_always query types)
 - #59216 (Type dependent defs wrappers)
 - #59318 (rustc: Update linker flavor inference from filename)
 - #59320 (rustc: Allow using `clang` for wasm32 targets)
 - #59363 (#59361 Moved rustc edition opt to short list)
 - #59371 (ffi: rename VaList::copy to VaList::with_copy)
 - #59398 (Add a way to track Rustfix UI test coverage)
 - #59408 (compiletest: make path normalization smarter)
 - #59429 (When moving out of a for loop head, suggest borrowing it in nll mode)

Failed merges:

r? @ghost

5 years agoUse ErrorReported
Yuki OKUSHI [Thu, 28 Mar 2019 19:42:03 +0000 (04:42 +0900)]
Use ErrorReported

5 years agoRemove unused variable
Yuki OKUSHI [Sun, 24 Mar 2019 18:55:13 +0000 (03:55 +0900)]
Remove unused variable

5 years agoReturn correct values
Yuki OKUSHI [Sun, 24 Mar 2019 18:19:48 +0000 (03:19 +0900)]
Return correct values

5 years agoWIP: remove report_as_error
Yuki OKUSHI [Sun, 24 Mar 2019 05:45:27 +0000 (14:45 +0900)]
WIP: remove report_as_error

5 years agoSet ok value
Yuki OKUSHI [Fri, 22 Mar 2019 15:51:08 +0000 (00:51 +0900)]
Set ok value

5 years agoRemove err_count
Yuki OKUSHI [Fri, 22 Mar 2019 15:03:50 +0000 (00:03 +0900)]
Remove err_count

5 years agoUse track_errors
Yuki OKUSHI [Thu, 21 Mar 2019 19:38:22 +0000 (04:38 +0900)]
Use track_errors

5 years agodeny duplicate matcher bindings by default
mark [Sun, 24 Mar 2019 02:58:55 +0000 (21:58 -0500)]
deny duplicate matcher bindings by default

5 years agoStablize {f32,f64}::copysign().
CrLF0710 [Thu, 28 Mar 2019 19:09:29 +0000 (03:09 +0800)]
Stablize {f32,f64}::copysign().

5 years agoUse write_all instead of write in example code
Matt Brubeck [Thu, 28 Mar 2019 18:28:39 +0000 (11:28 -0700)]
Use write_all instead of write in example code

5 years agoRemove unnecessary with_globals calls
John Kåre Alsaker [Thu, 28 Mar 2019 17:58:43 +0000 (18:58 +0100)]
Remove unnecessary with_globals calls

5 years agoAdd edition-guide to toolstate.
Eric Huss [Thu, 28 Mar 2019 17:23:15 +0000 (10:23 -0700)]
Add edition-guide to toolstate.

Also, add me to reference, alercah has taken a step back from involvement.

5 years agoRun module lint passes in parallel
John Kåre Alsaker [Thu, 31 Jan 2019 03:36:37 +0000 (04:36 +0100)]
Run module lint passes in parallel

5 years agoRemove LintSession and run incremental and whole crate lints in parallel
John Kåre Alsaker [Thu, 31 Jan 2019 02:04:39 +0000 (03:04 +0100)]
Remove LintSession and run incremental and whole crate lints in parallel

5 years agoCombine all builtin late lints
John Kåre Alsaker [Thu, 31 Jan 2019 00:36:11 +0000 (01:36 +0100)]
Combine all builtin late lints

5 years agoRollup merge of #59429 - estebank:for-loop-move-nll, r=petrochenkov
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:44 +0000 (13:35 +0100)]
Rollup merge of #59429 - estebank:for-loop-move-nll, r=petrochenkov

When moving out of a for loop head, suggest borrowing it in nll mode

Follow up to #59195 for NLL.

5 years agoRollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:43 +0000 (13:35 +0100)]
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk

compiletest: make path normalization smarter

Fixes #59109.

5 years agoRollup merge of #59398 - phansch:rustfix_coverage, r=oli-obk
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:41 +0000 (13:35 +0100)]
Rollup merge of #59398 - phansch:rustfix_coverage, r=oli-obk

Add a way to track Rustfix UI test coverage

This came out of the first Rustfix WG meeting.

One of the goals is to enable Rustfix tests for all UI tests that
trigger lints with `MachineApplicable` suggestions. In order to do that
we first want to create a tracking issue that lists all files with
missing `// run-rustfix` headers.

This PR adds a `--rustfix-coverage` flag to `./x.py` and compiletest to
list the files with the missing headers in `/tmp/rustfix_missing_coverage.txt`.

From that file we can create the tracking issue and at some point also
enforce the `// run-rustfix` flag on UI tests with `MachineApplicable`
lints.

5 years agoRollup merge of #59371 - dlrobertson:rename_va_list_copy, r=joshtriplett
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:40 +0000 (13:35 +0100)]
Rollup merge of #59371 - dlrobertson:rename_va_list_copy, r=joshtriplett

ffi: rename VaList::copy to VaList::with_copy

Rename `VaList::copy` to `VaList::with_copy`

r? @joshtriplett

5 years agoRollup merge of #59363 - peterjoel:issue_59361_edition_opt_shortlist, r=nagisa
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:38 +0000 (13:35 +0100)]
Rollup merge of #59363 - peterjoel:issue_59361_edition_opt_shortlist, r=nagisa

#59361 Moved rustc edition opt to short list

Addresses #59361, in case that issue is accepted.

5 years agoRollup merge of #59320 - alexcrichton:wasm-clang, r=sanxiyn
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:36 +0000 (13:35 +0100)]
Rollup merge of #59320 - alexcrichton:wasm-clang, r=sanxiyn

rustc: Allow using `clang` for wasm32 targets

This commit adds support code for using `clang` directly to link the
wasm32-unknown-unknown target. Currently the target is only really
configured to link with LLD directly, but this ensures that `clang` can
be configured as well.

While not immediately useful in the near term it's likely that more
wasm32 targets will pop up over time with Clang's new native support for
WebAssembly in the 8.0.0 release. Getting support into rustc early
should make it easier to experiment with these targets and try out
various changes here and there.

5 years agoRollup merge of #59318 - alexcrichton:check-for-clang, r=michaelwoerister
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:35 +0000 (13:35 +0100)]
Rollup merge of #59318 - alexcrichton:check-for-clang, r=michaelwoerister

rustc: Update linker flavor inference from filename

This commit fixes what is believed to be a preexisting bug in the linker
flavor inference and additionally adds a new features. Previously if the
linker didn't end in `exe` the entire file name was compared to infer
the linker's flavor. This commit fixes the code to instead
unconditionally inspect `file_stem()` which is the relevant part we're
looking at to figure out what the linker flavor is.

Additionally this commit now also adds recognition of `clang` and clang
wrappers that end in `-clang` (which look like gcc wrappers). This
should allow clang-specific wrappers to get correctly inferred to the
`Gcc` linker flavor rather than the default linker flavor configured for
a target.

5 years agoRollup merge of #59216 - stepnivlk:type_dependent_defs-wrappers, r=oli-obk
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:33 +0000 (13:35 +0100)]
Rollup merge of #59216 - stepnivlk:type_dependent_defs-wrappers, r=oli-obk

Type dependent defs wrappers

First of all, forgive me if something would seem lame to you or I offend some rule (although I tried to read through docs), this is my first PR.

Issue: https://github.com/rust-lang/rust/issues/59094

This PR adds 3 helper methods to `TypeckTables`:
* `opt_type_dependent_def`
* `opt_type_dependent_def_id`
* `type_dependent_def_id`

I didn't add `type_dependent_def` as was proposed in the issue simply because it wasn't used anywhere in the code. Only non-option wrapped`type_dependent_defs()[]` accesses were found in clippy which always called `def_id()` on result.
Speaking of clippy, should I open separate PR in its own repo, given it's used as submodule here?

Sry it took me so long, as I said I'm new here and I had tough week :).

5 years agoRollup merge of #59091 - Zoxc:eval_always, r=michaelwoerister
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:31 +0000 (13:35 +0100)]
Rollup merge of #59091 - Zoxc:eval_always, r=michaelwoerister

Combine input and eval_always query types

Hardcoding `Krate` as a dependency of `eval_always` queries doesn't really make sense if we want to use the query system before HIR lowering / hashing. Without that hardcoding they become pretty much identical to `input` queries, so I combined them to a single type. This will regress the `clean` incremental scenario, but that isn't terribly common.

r? @michaelwoerister

5 years agoRollup merge of #58717 - hellow554:nonzero_parse, r=oli-obk
Mazdak Farrokhzad [Thu, 28 Mar 2019 12:35:29 +0000 (13:35 +0100)]
Rollup merge of #58717 - hellow554:nonzero_parse, r=oli-obk

Add FromStr impl for NonZero types

This is a WIP implementation because I do have some questions regarding the solution.

Somebody should ping the lang team on this I guess.
Please see the annotations on the code for more details.

Closes #58604

5 years agofixed shift overflow
Marcel Hellwig [Thu, 28 Mar 2019 08:31:18 +0000 (09:31 +0100)]
fixed shift overflow

Fix according to oli-obk
(https://github.com/rust-lang/rust/pull/58717#issuecomment-477494457)

5 years agoAuto merge of #59478 - Centril:rollup, r=Centril
bors [Thu, 28 Mar 2019 08:56:34 +0000 (08:56 +0000)]
Auto merge of #59478 - Centril:rollup, r=Centril

Rollup of 12 pull requests

Successful merges:

 - #57987 (Fix some AArch64 typos)
 - #58581 (Refactor generic parameter encoder functions)
 - #58803 (fs::copy() unix: set file mode early)
 - #58848 (Prevent cache issues on version updates)
 - #59198 (Do not complain about unmentioned fields in recovered patterns)
 - #59351 (Include llvm-ar with llvm-tools component)
 - #59413 (HirIdify hir::ItemId)
 - #59441 (Remove the block on natvis for lld-link.)
 - #59448 (Use consistent phrasing for all macro summaries)
 - #59456 (Add documentation about `for` used as higher ranked trait bounds)
 - #59472 (Document that `std::io::BufReader` discards contents on drop)
 - #59474 (Fix link capitalization in documentation of std::io::BufWriter.)

Failed merges:

r? @ghost

5 years agoRollup merge of #59474 - czipperz:bufwriter-fix-link-capitalization, r=Centril
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:43 +0000 (08:43 +0100)]
Rollup merge of #59474 - czipperz:bufwriter-fix-link-capitalization, r=Centril

Fix link capitalization in documentation of std::io::BufWriter.

5 years agoRollup merge of #59472 - czipperz:bufreader-document-drop-discards, r=Centril
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:42 +0000 (08:43 +0100)]
Rollup merge of #59472 - czipperz:bufreader-document-drop-discards, r=Centril

Document that `std::io::BufReader` discards contents on drop

Resolves #55546

5 years agoRollup merge of #59456 - czipperz:for-keyword-document-higher-ranked-trait-bounds...
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:40 +0000 (08:43 +0100)]
Rollup merge of #59456 - czipperz:for-keyword-document-higher-ranked-trait-bounds, r=Centril

Add documentation about `for` used as higher ranked trait bounds

Resolves #55416

5 years agoRollup merge of #59448 - benesch:macro-doc, r=Centril
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:39 +0000 (08:43 +0100)]
Rollup merge of #59448 - benesch:macro-doc, r=Centril

Use consistent phrasing for all macro summaries

None

5 years agoRollup merge of #59441 - TheGoddessInari:natvis, r=alexcrichton
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:37 +0000 (08:43 +0100)]
Rollup merge of #59441 - TheGoddessInari:natvis, r=alexcrichton

Remove the block on natvis for lld-link.

Since #56642 bumped minimum LLVM version to 6.0.0, Rust should be able to honor or ignore Windows natvis support with lld-link.

It looks like  https://github.com/llvm-mirror/lld/commit/9133ca57b was in LLVM 7.0, while https://github.com/llvm-mirror/lld/commit/27b9c4285 made it into 6.0, at least if the release branches are anything to go by.

Fixes #59383.

5 years agoRollup merge of #59413 - Zoxc:hirid, r=oli-obk
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:36 +0000 (08:43 +0100)]
Rollup merge of #59413 - Zoxc:hirid, r=oli-obk

HirIdify hir::ItemId

Version of https://github.com/rust-lang/rust/pull/59092.

r? @oli-obk

5 years agoRollup merge of #59351 - phil-opp:llvm-ar, r=alexcrichton
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:34 +0000 (08:43 +0100)]
Rollup merge of #59351 - phil-opp:llvm-ar, r=alexcrichton

Include llvm-ar with llvm-tools component

Adds the `llvm-ar` tool to the `llvm-tools` component. This is useful for [building and linking native code](https://doc.rust-lang.org/cargo/reference/build-scripts.html#case-study-building-some-native-code) in cargo build scripts without needing to use the platform specific `ar`. According to #58663 it is also useful for WASM.

 `llvm-ar` is very small (~82KB), so it does not significantly increase the size of the `llvm-tools` component.

Fixes #58663

5 years agoRollup merge of #59198 - estebank:recovered-pattern, r=zackmdavis
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:32 +0000 (08:43 +0100)]
Rollup merge of #59198 - estebank:recovered-pattern, r=zackmdavis

Do not complain about unmentioned fields in recovered patterns

When the parser has to recover from malformed code in a pattern, do not
complain about missing fields.

Fix #59145.

5 years agoRollup merge of #58848 - GuillaumeGomez:fix-cache-issues, r=Mark-Simulacrum,ollie27
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:30 +0000 (08:43 +0100)]
Rollup merge of #58848 - GuillaumeGomez:fix-cache-issues, r=Mark-Simulacrum,ollie27

Prevent cache issues on version updates

Fixes #58827.

cc @rust-lang/infra

5 years agoRollup merge of #58803 - haraldh:fs_copy_fix, r=alexcrichton
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:29 +0000 (08:43 +0100)]
Rollup merge of #58803 - haraldh:fs_copy_fix, r=alexcrichton

fs::copy() unix: set file mode early

A convenience method like fs::copy() should try to prevent pitfalls a
normal user doesn't think about.

In case of an empty umask, setting the file mode early prevents
temporarily world readable or even writeable files,
because the default mode is 0o666.

In case the target is a named pipe or special device node, setting the
file mode can lead to unwanted side effects, like setting permissons on
`/dev/stdout` or for root setting permissions on `/dev/null`.

copy_file_range() returns EINVAL, if the destination is a FIFO/pipe or
a device like "/dev/null", so fallback to io::copy, too.

Fixes: https://github.com/rust-lang/rust/issues/26933
Fixed: https://github.com/rust-lang/rust/issues/37885

5 years agoRollup merge of #58581 - varkor:const-generics-encoder-refactor, r=eddyb
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:27 +0000 (08:43 +0100)]
Rollup merge of #58581 - varkor:const-generics-encoder-refactor, r=eddyb

Refactor generic parameter encoder functions

Addresses https://github.com/rust-lang/rust/pull/58503#discussion_r257488950.

r? @eddyb

5 years agoRollup merge of #57987 - parched:va-args, r=joshtriplett
Mazdak Farrokhzad [Thu, 28 Mar 2019 07:43:23 +0000 (08:43 +0100)]
Rollup merge of #57987 - parched:va-args, r=joshtriplett

Fix some AArch64 typos

cc @dlrobertson

5 years agoAuto merge of #59336 - gnzlbg:hint_black_box, r=alexcrichton
bors [Thu, 28 Mar 2019 05:44:01 +0000 (05:44 +0000)]
Auto merge of #59336 - gnzlbg:hint_black_box, r=alexcrichton

Moves test::black_box to core::hint and fix black_box on wasm32 and asm.js

This changes removes a cyclic dependency between the "test" and "libtest"
crates, where "libtest" depends on "test" for "black_box", but "test" depends on
"libtest" for everything else.

I've chosen the "hint" module because there seems to be enough consensus in the
discussion of RFC2360 that this module is where such an intrinsic would belong,
but this PR does not implement that RFC! If that RFC ever gets merged, the API, docs,
etc. of this API will need to change. This PR just move the implementation of the
already existing API.

For backwards compatibility reasons I've chosen to also keep the "test" feature
gate for these instead of adding a new feature gate. If we change the feature
gate, we'll potentially all benchmarks, and while that's something that we could
do, it seems unnecessary to do that now - if RFC2360 gets merged, we'll need to
do that anyways. Backwards compatibility is also why we continue to re-export
"black_box" from the "test" crate.

This PR also fixes black_box on the wasm32 target, which now supports inline assembly, and uses volatile loads on the asm.js target.

r? @Amanieu (cc @rust-lang/libs)

5 years agoFix link capitalization in documentation of std::io::BufWriter.
Chris Gregory [Thu, 28 Mar 2019 03:01:24 +0000 (23:01 -0400)]
Fix link capitalization in documentation of std::io::BufWriter.

5 years agoDocument that `std::io::BufReader` discards contents on drop
Chris Gregory [Thu, 28 Mar 2019 02:11:13 +0000 (22:11 -0400)]
Document that `std::io::BufReader` discards contents on drop

Resolves #55546

5 years agoAuto merge of #59471 - cuviper:rollup, r=cuviper
bors [Thu, 28 Mar 2019 02:00:57 +0000 (02:00 +0000)]
Auto merge of #59471 - cuviper:rollup, r=cuviper

Rollup of 18 pull requests

Successful merges:

 - #57293 (Make some lints incremental)
 - #57565 (syntax: Remove warning for unnecessary path disambiguators)
 - #58253 (librustc_driver => 2018)
 - #58837 (librustc_interface => 2018)
 - #59268 (Add suggestion to use `&*var` when `&str: From<String>` is expected)
 - #59283 (Make ASCII case conversions more than 4× faster)
 - #59284 (adjust MaybeUninit API to discussions)
 - #59372 (add rustfix-able suggestions to trim_{left,right} deprecations)
 - #59390 (Make `ptr::eq` documentation mention fat-pointer behavior)
 - #59393 (Refactor tuple comparison tests)
 - #59420 ([CI] record docker image info for reuse)
 - #59421 (Reject integer suffix when tuple indexing)
 - #59430 (Renames `EvalContext` to `InterpretCx`)
 - #59439 (Generalize diagnostic for `x = y` where `bool` is the expected type)
 - #59449 (fix: Make incremental artifact deletion more robust)
 - #59451 (Add `Default` to `std::alloc::System`)
 - #59459 (Add some tests)
 - #59460 (Include id in Thread's Debug implementation)

Failed merges:

r? @ghost

5 years agoMove link to rust book to next line to pass 100 column limit
Chris Gregory [Thu, 28 Mar 2019 01:46:25 +0000 (21:46 -0400)]
Move link to rust book to next line to pass 100 column limit

5 years agoRollup merge of #59460 - xfix:include-id-in-thread-debug, r=Amanieu
Josh Stone [Thu, 28 Mar 2019 01:15:44 +0000 (18:15 -0700)]
Rollup merge of #59460 - xfix:include-id-in-thread-debug, r=Amanieu

Include id in Thread's Debug implementation

Since Rust 1.19.0, `id` is a stable method, so there is no reason to not include it in Debug implementation.

5 years agoRollup merge of #59459 - JohnTitor:add-tests, r=Centril
Josh Stone [Thu, 28 Mar 2019 01:15:42 +0000 (18:15 -0700)]
Rollup merge of #59459 - JohnTitor:add-tests, r=Centril

Add some tests

close #52977

It seems that there are no tests for this issue, so I opened this PR.
off-topic: I noticed [this test](https://github.com/rust-lang/rust/blob/master/src/test/ui/existential_types/nested_existential_types.rs)'s indents are bad, could I include commit to fix this, or should I separate?

r? @oli-obk

5 years agoRollup merge of #59451 - TimDiekmann:patch-1, r=sfackler
Josh Stone [Thu, 28 Mar 2019 01:15:41 +0000 (18:15 -0700)]
Rollup merge of #59451 - TimDiekmann:patch-1, r=sfackler

Add `Default` to `std::alloc::System`

`System` is a unit struct, thus, it can be constructed without any additional information. Therefore `Default` is a noop. However, in generic code, a `T: Default` may happen as in

```rust
#[derive(Default)]
struct Foo<A> {
    allocator: A
}
```

Does this need a feature gate?
Should I also add `PartialEq/Eq/PartialOrd/Ord/Hash`?

5 years agoRollup merge of #59449 - Marwes:issue_57958, r=michaelwoerister
Josh Stone [Thu, 28 Mar 2019 01:15:39 +0000 (18:15 -0700)]
Rollup merge of #59449 - Marwes:issue_57958, r=michaelwoerister

fix: Make incremental artifact deletion more robust

Should fix the intermittent errors reported in #57958

cc #48614

5 years agoRollup merge of #59439 - Centril:generalize-assign-to-bool-diagnostic, r=oli-obk
Josh Stone [Thu, 28 Mar 2019 01:15:38 +0000 (18:15 -0700)]
Rollup merge of #59439 - Centril:generalize-assign-to-bool-diagnostic, r=oli-obk

Generalize diagnostic for `x = y` where `bool` is the expected type

Extracted out of https://github.com/rust-lang/rust/pull/59288.

Currently we special case a diagnostic for `if x = y { ...` since the expected type is `bool` in this case and we instead suggest `if x == y`. This PR generalizes this such that given an expression of form `x = y` (`ExprKind::Assign(..)`) where the expected type is `bool`, we emit a suggestion `x == y`.

r? @oli-obk

Let's do a perf run to make sure this was not the source of regressions in #59288.

5 years agoRollup merge of #59430 - kenta7777:rename-evalcontext-to-interpretcx, r=oli-obk
Josh Stone [Thu, 28 Mar 2019 01:15:36 +0000 (18:15 -0700)]
Rollup merge of #59430 - kenta7777:rename-evalcontext-to-interpretcx, r=oli-obk

Renames `EvalContext` to `InterpretCx`

This PR renames `EvalContext` to `InterpretCx` in `src/librustc_mir`.
This PR is related to #54395 .

5 years agoRollup merge of #59421 - estebank:tuple-index-suffix, r=petrochenkov
Josh Stone [Thu, 28 Mar 2019 01:15:35 +0000 (18:15 -0700)]
Rollup merge of #59421 - estebank:tuple-index-suffix, r=petrochenkov

Reject integer suffix when tuple indexing

Fix #59418.

r? @varkor

5 years agoRollup merge of #59420 - cuviper:ci-image-info, r=alexcrichton
Josh Stone [Thu, 28 Mar 2019 01:15:33 +0000 (18:15 -0700)]
Rollup merge of #59420 - cuviper:ci-image-info, r=alexcrichton

[CI] record docker image info for reuse

This writes an extra `dist/image-$image.txt` which contains the S3 URL
of the cached image and the `sha256` digest of the docker entry point.
This will be uploaded with the rest of the deployed artifacts in the
Travis `after_success` script.

cc rust-lang/rustup.rs#1724
r? @alexcrichton

5 years agoRollup merge of #59393 - czipperz:refactor_tuple_comparison_tests, r=shepmaster
Josh Stone [Thu, 28 Mar 2019 01:15:32 +0000 (18:15 -0700)]
Rollup merge of #59393 - czipperz:refactor_tuple_comparison_tests, r=shepmaster

Refactor tuple comparison tests

5 years agoRollup merge of #59390 - czipperz:ptr_eq_smart_pointer, r=Centril,steveklabnik
Josh Stone [Thu, 28 Mar 2019 01:15:30 +0000 (18:15 -0700)]
Rollup merge of #59390 - czipperz:ptr_eq_smart_pointer, r=Centril,steveklabnik

Make `ptr::eq` documentation mention fat-pointer behavior

Resolves #59214

5 years agoRollup merge of #59372 - euclio:rename-trim, r=rkruppe
Josh Stone [Thu, 28 Mar 2019 01:15:28 +0000 (18:15 -0700)]
Rollup merge of #59372 - euclio:rename-trim, r=rkruppe

add rustfix-able suggestions to trim_{left,right} deprecations

Fixes #53802 (technically already fixed by #58002, but that issue is about these methods).

5 years agoRollup merge of #59284 - RalfJung:maybe-uninit, r=sfackler
Josh Stone [Thu, 28 Mar 2019 01:15:27 +0000 (18:15 -0700)]
Rollup merge of #59284 - RalfJung:maybe-uninit, r=sfackler

adjust MaybeUninit API to discussions

uninitialized -> uninit
into_initialized -> assume_init
read_initialized -> read
set -> write

5 years agoRollup merge of #59283 - SimonSapin:branchless-ascii-case, r=joshtriplett
Josh Stone [Thu, 28 Mar 2019 01:15:25 +0000 (18:15 -0700)]
Rollup merge of #59283 - SimonSapin:branchless-ascii-case, r=joshtriplett

Make ASCII case conversions more than 4× faster

Reformatted output of `./x.py bench src/libcore --test-args ascii` below. The `libcore` benchmark calls `[u8]::make_ascii_lowercase`. `lookup` has code (effectively) identical to that before this PR, and ~~`branchless`~~ `mask_shifted_bool_match_range` after this PR.

~~See [code comments](https://github.com/rust-lang/rust/pull/59283/commits/ce933f77c865a15670855ac5941fe200752b739f#diff-01076f91a26400b2db49663d787c2576R3796) in `u8::to_ascii_uppercase` in `src/libcore/num/mod.rs` for an explanation of the branchless algorithm.~~

**Update:** the algorithm was simplified while keeping the performance. See `branchless` v.s. `mask_shifted_bool_match_range` benchmarks.

Credits to @raphlinus for the idea in https://twitter.com/raphlinus/status/1107654782544736261, which extends this algorithm to “fake SIMD” on `u32` to convert four bytes at a time. The `fake_simd_u32` benchmarks implements this with [`let (before, aligned, after) = bytes.align_to_mut::<u32>()`](https://doc.rust-lang.org/std/primitive.slice.html#method.align_to_mut). Note however that this is buggy when addition carries/overflows into the next byte (which does not happen if the input is known to be ASCII).

This could be fixed (to optimize `[u8]::make_ascii_lowercase` and `[u8]::make_ascii_uppercase` in `src/libcore/slice/mod.rs`) either with some more bitwise trickery that I didn’t quite figure out, or by using “real” SIMD intrinsics for byte-wise addition. I did not pursue this however because the current (incorrect) fake SIMD algorithm is only marginally faster than the one-byte-at-a-time branchless algorithm. This is because LLVM auto-vectorizes the latter, as can be seen on https://rust.godbolt.org/z/anKtbR.

Benchmark results on Linux x64 with Intel i7-7700K: (updated from https://github.com/rust-lang/rust/pull/59283#issuecomment-474146863)

```rust
6830 bytes string:

alloc_only                          ... bench:    112 ns/iter (+/- 0) = 62410 MB/s
black_box_read_each_byte            ... bench:  1,733 ns/iter (+/- 8) = 4033 MB/s
lookup_table                        ... bench:  1,766 ns/iter (+/- 11) = 3958 MB/s
branch_and_subtract                 ... bench:    417 ns/iter (+/- 1) = 16762 MB/s
branch_and_mask                     ... bench:    401 ns/iter (+/- 1) = 17431 MB/s
branchless                          ... bench:    365 ns/iter (+/- 0) = 19150 MB/s
libcore                             ... bench:    367 ns/iter (+/- 1) = 19046 MB/s
fake_simd_u32                       ... bench:    361 ns/iter (+/- 2) = 19362 MB/s
fake_simd_u64                       ... bench:    361 ns/iter (+/- 1) = 19362 MB/s
mask_mult_bool_branchy_lookup_table ... bench:  6,309 ns/iter (+/- 19) = 1107 MB/s
mask_mult_bool_lookup_table         ... bench:  4,183 ns/iter (+/- 29) = 1671 MB/s
mask_mult_bool_match_range          ... bench:    339 ns/iter (+/- 0) = 20619 MB/s
mask_shifted_bool_match_range       ... bench:    339 ns/iter (+/- 1) = 20619 MB/s

32 bytes string:

alloc_only                          ... bench:     15 ns/iter (+/- 0) = 2133 MB/s
black_box_read_each_byte            ... bench:     29 ns/iter (+/- 0) = 1103 MB/s
lookup_table                        ... bench:     24 ns/iter (+/- 4) = 1333 MB/s
branch_and_subtract                 ... bench:     16 ns/iter (+/- 0) = 2000 MB/s
branch_and_mask                     ... bench:     16 ns/iter (+/- 0) = 2000 MB/s
branchless                          ... bench:     16 ns/iter (+/- 0) = 2000 MB/s
libcore                             ... bench:     15 ns/iter (+/- 0) = 2133 MB/s
fake_simd_u32                       ... bench:     17 ns/iter (+/- 0) = 1882 MB/s
fake_simd_u64                       ... bench:     16 ns/iter (+/- 0) = 2000 MB/s
mask_mult_bool_branchy_lookup_table ... bench:     42 ns/iter (+/- 0) = 761 MB/s
mask_mult_bool_lookup_table         ... bench:     35 ns/iter (+/- 0) = 914 MB/s
mask_mult_bool_match_range          ... bench:     16 ns/iter (+/- 0) = 2000 MB/s
mask_shifted_bool_match_range       ... bench:     16 ns/iter (+/- 0) = 2000 MB/s

7 bytes string:

alloc_only                          ... bench:     14 ns/iter (+/- 0) = 500 MB/s
black_box_read_each_byte            ... bench:     22 ns/iter (+/- 0) = 318 MB/s
lookup_table                        ... bench:     16 ns/iter (+/- 0) = 437 MB/s
branch_and_subtract                 ... bench:     16 ns/iter (+/- 0) = 437 MB/s
branch_and_mask                     ... bench:     16 ns/iter (+/- 0) = 437 MB/s
branchless                          ... bench:     19 ns/iter (+/- 0) = 368 MB/s
libcore                             ... bench:     20 ns/iter (+/- 0) = 350 MB/s
fake_simd_u32                       ... bench:     18 ns/iter (+/- 0) = 388 MB/s
fake_simd_u64                       ... bench:     21 ns/iter (+/- 0) = 333 MB/s
mask_mult_bool_branchy_lookup_table ... bench:     20 ns/iter (+/- 0) = 350 MB/s
mask_mult_bool_lookup_table         ... bench:     19 ns/iter (+/- 0) = 368 MB/s
mask_mult_bool_match_range          ... bench:     19 ns/iter (+/- 0) = 368 MB/s
mask_shifted_bool_match_range       ... bench:     19 ns/iter (+/- 0) = 368 MB/s
```

5 years agoRollup merge of #59268 - estebank:from-string, r=QuietMisdreavus
Josh Stone [Thu, 28 Mar 2019 01:15:24 +0000 (18:15 -0700)]
Rollup merge of #59268 - estebank:from-string, r=QuietMisdreavus

Add suggestion to use `&*var` when `&str: From<String>` is expected

Fix #53879.

5 years agoRollup merge of #58837 - Centril:librustc_interface_2018, r=petrochenkov
Josh Stone [Thu, 28 Mar 2019 01:15:22 +0000 (18:15 -0700)]
Rollup merge of #58837 - Centril:librustc_interface_2018, r=petrochenkov

librustc_interface => 2018

r? @oli-obk

This will likely produce an ICE for some reason... so super-WIP.

5 years agoRollup merge of #58253 - taiki-e:librustc_driver-2018, r=petrochenkov
Josh Stone [Thu, 28 Mar 2019 01:15:21 +0000 (18:15 -0700)]
Rollup merge of #58253 - taiki-e:librustc_driver-2018, r=petrochenkov

librustc_driver => 2018

Transitions `librustc_driver` to Rust 2018; cc #58099

r? @Centril

5 years agoRollup merge of #57565 - petrochenkov:turbowarn, r=Centril
Josh Stone [Thu, 28 Mar 2019 01:15:19 +0000 (18:15 -0700)]
Rollup merge of #57565 - petrochenkov:turbowarn, r=Centril

syntax: Remove warning for unnecessary path disambiguators

`rustfmt` is now stable and it removes unnecessary turbofishes, so removing the warning as discussed in https://github.com/rust-lang/rust/pull/43540 (where it was introduced).
One hardcoded warning less.

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

r? @nikomatsakis

5 years agoRollup merge of #57293 - Zoxc:incr-passes3, r=michaelwoerister
Josh Stone [Thu, 28 Mar 2019 01:15:18 +0000 (18:15 -0700)]
Rollup merge of #57293 - Zoxc:incr-passes3, r=michaelwoerister

Make some lints incremental

Blocked on https://github.com/rust-lang/rust/pull/57253

r? @michaelwoerister

5 years agoVisit path in `walk_mac`
varkor [Mon, 25 Mar 2019 23:37:00 +0000 (23:37 +0000)]
Visit path in `walk_mac`

5 years agoUpdate books
Eric Huss [Fri, 22 Mar 2019 15:52:45 +0000 (08:52 -0700)]
Update books

5 years agomusl: build toolchain libs with -fPIC
Mateusz Mikuła [Wed, 27 Mar 2019 17:37:21 +0000 (18:37 +0100)]
musl: build toolchain libs with -fPIC

5 years agoAdd higher-ranked trait bounds link
Chris Gregory [Wed, 27 Mar 2019 16:03:14 +0000 (12:03 -0400)]
Add higher-ranked trait bounds link

5 years agoClarify behavior of dbg macro
Nikhil Benesch [Wed, 27 Mar 2019 15:22:55 +0000 (11:22 -0400)]
Clarify behavior of dbg macro

5 years agoAuto merge of #59415 - varkor:values_since_snapshot, r=eddyb
bors [Wed, 27 Mar 2019 13:20:16 +0000 (13:20 +0000)]
Auto merge of #59415 - varkor:values_since_snapshot, r=eddyb

Refactor InferenceFudger (née RegionFudger)

- Rename `RegionFudger` (and related methods) to `InferenceFudger`.
- Take integer and float inference variables into account.
- Refactor `types_created_since_snapshot` and `vars_created_since_snapshot` with the [new version of ena](https://github.com/rust-lang-nursery/ena/pull/21).
- Some other refactoring in the area.

r? @eddyb

5 years agoInclude id in Thread's Debug implementation
Konrad Borowski [Wed, 27 Mar 2019 11:28:17 +0000 (12:28 +0100)]
Include id in Thread's Debug implementation

Since Rust 1.19.0, id is a stable method, so there is no reason to
not include it in Debug implementation.

5 years agoAdd some tests
Yuki OKUSHI [Wed, 27 Mar 2019 10:30:33 +0000 (19:30 +0900)]
Add some tests

5 years agoUse Vec instead of FxHashMap
varkor [Mon, 25 Mar 2019 22:26:37 +0000 (22:26 +0000)]
Use Vec instead of FxHashMap

5 years agoLookup region variable origin instead of choosing one
varkor [Mon, 25 Mar 2019 21:28:39 +0000 (21:28 +0000)]
Lookup region variable origin instead of choosing one

5 years agoStore type variable origins in InferenceFudger
varkor [Mon, 25 Mar 2019 21:28:15 +0000 (21:28 +0000)]
Store type variable origins in InferenceFudger

5 years agoPropitiate tidy
varkor [Mon, 25 Mar 2019 16:48:57 +0000 (16:48 +0000)]
Propitiate tidy

5 years agoUpdate ena to version 0.13.0
varkor [Mon, 25 Mar 2019 15:45:44 +0000 (15:45 +0000)]
Update ena to version 0.13.0

5 years agoUse `eq_relations`
varkor [Thu, 21 Mar 2019 17:11:42 +0000 (17:11 +0000)]
Use `eq_relations`

5 years agoAdd `next_int_var` and `next_float_var`
varkor [Thu, 21 Mar 2019 13:47:57 +0000 (13:47 +0000)]
Add `next_int_var` and `next_float_var`

5 years agoSimplify `fudge_inference_if_ok`
varkor [Thu, 21 Mar 2019 13:43:37 +0000 (13:43 +0000)]
Simplify `fudge_inference_if_ok`

5 years agoAdd int variables and float variables to `InferenceFudger`
varkor [Thu, 21 Mar 2019 13:39:57 +0000 (13:39 +0000)]
Add int variables and float variables to `InferenceFudger`

5 years agoRename `RegionFudger` to `InferenceFudger`
varkor [Thu, 21 Mar 2019 12:39:05 +0000 (12:39 +0000)]
Rename `RegionFudger` to `InferenceFudger`

5 years agoRemove `TypeVariableMap`
varkor [Thu, 21 Mar 2019 12:38:05 +0000 (12:38 +0000)]
Remove `TypeVariableMap`