Commit Graph

91502 Commits

Author SHA1 Message Date
Guillaume Gomez
796e6e37d6 Don't generate empty json variables 2019-04-12 19:17:46 +02:00
bors
2002b4b39a Auto merge of #59303 - euclio:remove-rebuild-trigger, r=cuviper
replace llvm-rebuild-trigger with submodule commit hash

As mentioned in #59285.

This PR removes the need to update the `llvm-rebuild-trigger` file. Instead, the latest commit hash of the appropriate LLVM submodule will be stored in the stamp file and used to detect if a build is required.

Fixes #42405.
Fixes #54959.
Fixes #55537.
2019-03-29 11:20:55 +00:00
bors
003382e415 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
2019-03-29 08:14:41 +00:00
bors
4fec737f9a 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
2019-03-29 05:00:58 +00:00
Mazdak Farrokhzad
456fa39031
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
2019-03-29 02:41:00 +01:00
Mazdak Farrokhzad
18680ae94f
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?
2019-03-29 02:40:58 +01:00
Mazdak Farrokhzad
0494cffd3c
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.)
2019-03-29 02:40:57 +01:00
Mazdak Farrokhzad
bf3e6c63d6
Rollup merge of #59496 - Zoxc:fix-globals, r=oli-obk
Remove unnecessary with_globals calls
2019-03-29 02:40:56 +01:00
Mazdak Farrokhzad
73f9832ee4
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
2019-03-29 02:40:54 +01:00
Mazdak Farrokhzad
c2d6c08ebb
Rollup merge of #59468 - mati865:musl_toolchain, r=pnkfelix
musl: build toolchain libs with -fPIC

Fixes https://github.com/rust-lang/rust/issues/59411
2019-03-29 02:40:52 +01:00
Mazdak Farrokhzad
0f4c87cffc
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.
2019-03-29 02:40:51 +01:00
Mazdak Farrokhzad
3df97f9da8
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
2019-03-29 02:40:49 +01:00
Mazdak Farrokhzad
f9262afa4d
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](c25d6b8344/src/test/ui/macros/macro-multiple-matcher-bindings.rs)
- [ ] ~Crater run~ see https://github.com/rust-lang/rust/pull/59394#issuecomment-477817351
2019-03-29 02:40:48 +01:00
Mazdak Farrokhzad
97927da048
Rollup merge of #59358 - JohnTitor:use-track-errors, r=oli-obk
Use `track_errors` instead of hand rolling

Fixes #59215

r? @oli-obk
2019-03-29 02:40:46 +01:00
Mazdak Farrokhzad
8794e21ff3
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
2019-03-29 02:40:45 +01:00
Jethro Beekman
93fb4d8317 Fix missed fn rename in #59284 2019-03-28 17:50:01 -07:00
Nicholas Nethercote
17a8aff20a 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.
2019-03-29 09:32:58 +11:00
bors
70a497a437 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
2019-03-28 21:46:30 +00:00
Yuki OKUSHI
0778847833 Use ErrorReported 2019-03-29 04:42:03 +09:00
Yuki OKUSHI
6c8e3a5378 Remove unused variable 2019-03-29 04:32:36 +09:00
Yuki OKUSHI
f0de8e82b8 Return correct values 2019-03-29 04:32:36 +09:00
Yuki OKUSHI
0e76b34aa7 WIP: remove report_as_error 2019-03-29 04:32:36 +09:00
Yuki OKUSHI
ee0e1b7615 Set ok value 2019-03-29 04:32:36 +09:00
Yuki OKUSHI
526b355858 Remove err_count 2019-03-29 04:32:36 +09:00
Yuki OKUSHI
3ba7454152 Use track_errors 2019-03-29 04:32:36 +09:00
mark
9f14e146ed deny duplicate matcher bindings by default 2019-03-28 14:27:16 -05:00
CrLF0710
d9bdd01ac0 Stablize {f32,f64}::copysign(). 2019-03-29 03:20:50 +08:00
Matt Brubeck
8dbae794b0 Use write_all instead of write in example code 2019-03-28 11:28:50 -07:00
John Kåre Alsaker
e9a8befd2d Remove unnecessary with_globals calls 2019-03-28 18:58:43 +01:00
John Kåre Alsaker
dee389f749 Run module lint passes in parallel 2019-03-28 16:29:09 +01:00
John Kåre Alsaker
cd32f9bcca Remove LintSession and run incremental and whole crate lints in parallel 2019-03-28 16:29:08 +01:00
John Kåre Alsaker
41316f0449 Combine all builtin late lints 2019-03-28 16:29:07 +01:00
Mazdak Farrokhzad
0f26958cea
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.
2019-03-28 13:35:44 +01:00
Mazdak Farrokhzad
06a9196055
Rollup merge of #59408 - euclio:compiletest-normalization, r=oli-obk
compiletest: make path normalization smarter

Fixes #59109.
2019-03-28 13:35:43 +01:00
Mazdak Farrokhzad
b75b165589
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.
2019-03-28 13:35:41 +01:00
Mazdak Farrokhzad
a92d689b12
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
2019-03-28 13:35:40 +01:00
Mazdak Farrokhzad
f591d25f43
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.
2019-03-28 13:35:38 +01:00
Mazdak Farrokhzad
9ca8f6aa79
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.
2019-03-28 13:35:36 +01:00
Mazdak Farrokhzad
f6d2a3feb7
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.
2019-03-28 13:35:35 +01:00
Mazdak Farrokhzad
4720fcac4c
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 :).
2019-03-28 13:35:33 +01:00
Mazdak Farrokhzad
edad34b3d7
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
2019-03-28 13:35:31 +01:00
Mazdak Farrokhzad
f90ac4f04a
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
2019-03-28 13:35:29 +01:00
Marcel Hellwig
8f3e862797 fixed shift overflow
Fix according to oli-obk
(https://github.com/rust-lang/rust/pull/58717#issuecomment-477494457)
2019-03-28 10:12:17 +01:00
bors
237bf3244f 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
2019-03-28 08:56:34 +00:00
Mazdak Farrokhzad
d403cd787c
Rollup merge of #59474 - czipperz:bufwriter-fix-link-capitalization, r=Centril
Fix link capitalization in documentation of std::io::BufWriter.
2019-03-28 08:43:43 +01:00
Mazdak Farrokhzad
2d171d8350
Rollup merge of #59472 - czipperz:bufreader-document-drop-discards, r=Centril
Document that `std::io::BufReader` discards contents on drop

Resolves #55546
2019-03-28 08:43:42 +01:00
Mazdak Farrokhzad
d5b8048245
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
2019-03-28 08:43:40 +01:00
Mazdak Farrokhzad
2ee038af8c
Rollup merge of #59448 - benesch:macro-doc, r=Centril
Use consistent phrasing for all macro summaries

None
2019-03-28 08:43:39 +01:00
Mazdak Farrokhzad
02c1e3dfc1
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.
2019-03-28 08:43:37 +01:00
Mazdak Farrokhzad
95ef5eb3af
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
2019-03-28 08:43:36 +01:00