]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #52758 - Mark-Simulacrum:session-cleanup, r=pnkfelix
bors [Sat, 4 Aug 2018 18:22:39 +0000 (18:22 +0000)]
Auto merge of #52758 - Mark-Simulacrum:session-cleanup, r=pnkfelix

Cleanup for librustc::session

Some rather straightforward cleanup. Each commit mostly stands alone.

5 years agoAuto merge of #53056 - kennytm:rollup, r=kennytm
bors [Sat, 4 Aug 2018 16:12:39 +0000 (16:12 +0000)]
Auto merge of #53056 - kennytm:rollup, r=kennytm

Rollup of 14 pull requests

Successful merges:

 - #51919 (Provide `{to,from}_{ne,le,be}_bytes` functions on integers)
 - #52940 (Align 6-week cycle check with beta promotion instead of stable release.)
 - #52968 (App-lint-cability)
 - #52969 (rustbuild: fix local_rebuild)
 - #52995 (Remove unnecessary local in await! generator)
 - #52996 (RELEASES.md: fix the `hash_map::Entry::or_default` link)
 - #53001 (privacy: Fix an ICE in `path_is_private_type`)
 - #53003 (Stabilize --color and --error-format options in rustdoc)
 - #53022 (volatile operations docs: clarify that this does not help wrt. concurrency)
 - #53024 (Specify reentrancy gurantees of `Once::call_once`)
 - #53041 (Fix invalid code css rule)
 - #53047 (Make entire row of doc search results clickable)
 - #53050 (Make left column of rustdoc search results narrower)
 - #53062 (Remove redundant field names in structs)

5 years agoRollup merge of #53062 - ljedrz:redundant_field_names, r=Mark-Simulacrum
kennytm [Sat, 4 Aug 2018 15:09:12 +0000 (23:09 +0800)]
Rollup merge of #53062 - ljedrz:redundant_field_names, r=Mark-Simulacrum

Remove redundant field names in structs

5 years agoRemove redundant field names in structs
ljedrz [Sat, 4 Aug 2018 12:58:20 +0000 (14:58 +0200)]
Remove redundant field names in structs

5 years agoUse diagnostic API on Session
Mark Rousskov [Thu, 26 Jul 2018 22:18:06 +0000 (16:18 -0600)]
Use diagnostic API on Session

5 years agoMove share_generics getter onto options directly
Mark Rousskov [Thu, 26 Jul 2018 19:20:47 +0000 (13:20 -0600)]
Move share_generics getter onto options directly

5 years agoMove basic_options to impl of Default
Mark Rousskov [Thu, 26 Jul 2018 18:36:11 +0000 (12:36 -0600)]
Move basic_options to impl of Default

5 years agoSimplify some handling of target_pointer_width
Mark Rousskov [Thu, 26 Jul 2018 18:22:10 +0000 (12:22 -0600)]
Simplify some handling of target_pointer_width

5 years agoNormalize DebugInfoLevel to standard style
Mark Rousskov [Thu, 26 Jul 2018 17:41:10 +0000 (11:41 -0600)]
Normalize DebugInfoLevel to standard style

5 years agoNormalize EntryFnType variants to standard style
Mark Rousskov [Thu, 26 Jul 2018 17:29:45 +0000 (11:29 -0600)]
Normalize EntryFnType variants to standard style

5 years agoNormalize variants of Passes to standard style
Mark Rousskov [Thu, 26 Jul 2018 17:22:14 +0000 (11:22 -0600)]
Normalize variants of Passes to standard style

5 years agoNormalize variants of CrateType to standard style
Mark Rousskov [Thu, 26 Jul 2018 17:13:11 +0000 (11:13 -0600)]
Normalize variants of CrateType to standard style

This is a clippy-breaking change.

5 years agoPrivatize some exports from code_stats
Mark Rousskov [Thu, 26 Jul 2018 16:52:38 +0000 (10:52 -0600)]
Privatize some exports from code_stats

5 years agoRollup merge of #53050 - carols10cents:rustdoc-moar-room, r=GuillaumeGomez
kennytm [Sat, 4 Aug 2018 09:20:10 +0000 (17:20 +0800)]
Rollup merge of #53050 - carols10cents:rustdoc-moar-room, r=GuillaumeGomez

Make left column of rustdoc search results narrower

To make more room for the description of the item

The description often has useful text that helps disambiguate between search results, but very little of it is shown.

As a side effect, this breaks the alignment between the search results and the "In Return Types" tab, which tends to line up above the description-- up until I started investigating this, I thought "In Names"/"In Parameters"/"In Return Types" were column headers and I just never saw search results that had info for the "In Parameters" middle column! Now, with the two columns of search results each taking up about a half, they look more like tabs than column headers.

Types that are long still wrap and look good-- I made some artificially long types in the following screenshots.

Before screenshot:

<img width="1258" alt="screen shot 2018-08-03 at 8 32 35 pm" src="https://user-images.githubusercontent.com/193874/43670805-56e3b3b4-975e-11e8-9296-600837d03de2.png">

After screenshot:

<img width="1239" alt="screen shot 2018-08-03 at 8 31 17 pm" src="https://user-images.githubusercontent.com/193874/43670810-6591f9ac-975e-11e8-9e12-4ea9ab1e5806.png">

5 years agoRollup merge of #51919 - tbu-:pr_num_to_from_bytes2, r=SimonSapin
kennytm [Sat, 4 Aug 2018 09:19:38 +0000 (17:19 +0800)]
Rollup merge of #51919 - tbu-:pr_num_to_from_bytes2, r=SimonSapin

Provide `{to,from}_{ne,le,be}_bytes` functions on integers

If one doesn't view integers as containers of bytes, converting them to
bytes necessarily needs the specfication of encoding.

I think Rust is a language that wants to be explicit. The `to_bytes`
function is basically the opposite of that – it converts an integer into
the native byte representation, but there's no mention (in the function
name) of it being very much platform dependent. Therefore, I think it
would be better to replace that method by three methods, the explicit
`to_ne_bytes` ("native endian") which does the same thing and
`to_{le,be}_bytes` which return the little- resp. big-endian encoding.

5 years agoChange tracking issue from #49792 to #51919
Tobias Bucher [Sat, 4 Aug 2018 06:36:54 +0000 (08:36 +0200)]
Change tracking issue from #49792 to #51919

The old issue has already been in FCP, a new issue was opened for the
new API.

5 years agoRollup merge of #53047 - integer32llc:rustdoc-clicky-clicky, r=QuietMisdreavus
kennytm [Sat, 4 Aug 2018 06:36:02 +0000 (14:36 +0800)]
Rollup merge of #53047 - integer32llc:rustdoc-clicky-clicky, r=QuietMisdreavus

Make entire row of doc search results clickable

By adding empty `after` content that clears and is `display: block`.
Technique found here: https://stackoverflow.com/a/7817313/51683

Now any part of a documentation search result that is highlighted when
you hover over it should also be clickable.

NOTE: THE BELOW IMAGES ARE GIFS BUT I DIDN'T MAKE THEM LOOP, OPEN IN A NEW TAB TO SEE THEM SORRY SORRY

Here's what happens before this change: my mouse cursor is in the middle of the table cell, and the row is highlighted which makes it look like clicking should have an effect, but clicking doesn't do anything:

![rustdoc-clicky-clicky-before](https://user-images.githubusercontent.com/193874/43668604-d1e63392-974b-11e8-99f5-e7e11c9056e8.gif)

After this change, clicking in the middle of the cell works!

![rustdoc-clicky-clicky-after](https://user-images.githubusercontent.com/193874/43668616-e522fa08-974b-11e8-8409-3826d586d1f7.gif)

It even works nicely when the type is really long and wraps! (I created the type artificially because I couldn't find a long enough one in the wild)

![rustdoc-clicky-clicky-after-long](https://user-images.githubusercontent.com/193874/43668639-f962a75c-974b-11e8-9218-70bf068387a3.gif)

5 years agoRollup merge of #53041 - GuillaumeGomez:fix-code-css-rule, r=QuietMisdreavus
kennytm [Sat, 4 Aug 2018 06:36:00 +0000 (14:36 +0800)]
Rollup merge of #53041 - GuillaumeGomez:fix-code-css-rule, r=QuietMisdreavus

Fix invalid code css rule

Fixes #53017.

r? @QuietMisdreavus

5 years agoRollup merge of #53024 - matklad:patch-1, r=alexcrichton
kennytm [Sat, 4 Aug 2018 06:35:59 +0000 (14:35 +0800)]
Rollup merge of #53024 - matklad:patch-1, r=alexcrichton

Specify reentrancy gurantees of `Once::call_once`

I don't think the docs are clear about what happens in the following code

```rust
static INIT: Once = ONCE_INIT;

INIT.call_once(|| INIT.call_once(|| println!("huh?")));
```

[Playground](https://play.rust-lang.org/?gist=15dde1f68a6ede263c7250c36977eade&version=stable&mode=debug&edition=2015)

Let's "specify" the behavior to make it clear that the current behavior (deadlock I think?) is not a strict guarantee.

5 years agoRollup merge of #53022 - RalfJung:volatile, r=alexcrichton
kennytm [Sat, 4 Aug 2018 06:35:58 +0000 (14:35 +0800)]
Rollup merge of #53022 - RalfJung:volatile, r=alexcrichton

volatile operations docs: clarify that this does not help wrt. concurrency

Triggered by https://github.com/rust-lang/rust/pull/52391. Cc @stjepang @Amanieu

Should the intrinsics themselves also get more documentation? They generally do not seem to have much of that.

5 years agoRollup merge of #53003 - GuillaumeGomez:stabilize-rustdoc-options, r=QuietMisdreavus
kennytm [Sat, 4 Aug 2018 06:35:56 +0000 (14:35 +0800)]
Rollup merge of #53003 - GuillaumeGomez:stabilize-rustdoc-options, r=QuietMisdreavus

Stabilize --color and --error-format options in rustdoc

Fixes #52980

cc @kennytm

r? @QuietMisdreavus

5 years agoRollup merge of #53001 - petrochenkov:master, r=estebank
kennytm [Sat, 4 Aug 2018 06:35:55 +0000 (14:35 +0800)]
Rollup merge of #53001 - petrochenkov:master, r=estebank

privacy: Fix an ICE in `path_is_private_type`

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

(Untested.)

5 years agoRollup merge of #52996 - cuviper:1.28-or_default, r=Mark-Simulacrum
kennytm [Sat, 4 Aug 2018 06:35:54 +0000 (14:35 +0800)]
Rollup merge of #52996 - cuviper:1.28-or_default, r=Mark-Simulacrum

RELEASES.md: fix the `hash_map::Entry::or_default` link

None

5 years agoRollup merge of #52995 - cramertj:smaller-await, r=withoutboats
kennytm [Sat, 4 Aug 2018 06:35:53 +0000 (14:35 +0800)]
Rollup merge of #52995 - cramertj:smaller-await, r=withoutboats

Remove unnecessary local in await! generator

This makes `async { await!(future::ready(())) }` 4 bytes instead of 16. [Playground example](http://play.rust-lang.org/?gist=54c075599b9ff390fe505c75d6b98feb&version=nightly&mode=debug&edition=2018)

5 years agoRollup merge of #52969 - Keruspe:local_rebuild, r=alexcrichton
kennytm [Sat, 4 Aug 2018 06:35:51 +0000 (14:35 +0800)]
Rollup merge of #52969 - Keruspe:local_rebuild, r=alexcrichton

rustbuild: fix local_rebuild

If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1.
When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1.
Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild

This fixes building current master using current beta (as master hasn't yet been bumped to 1.30).
This should be backported to beta too, as currently we cannot build beta using itself because of that.

r? @alexcrichton

5 years agoRollup merge of #52968 - zackmdavis:app-lint-cability, r=estebank
kennytm [Sat, 4 Aug 2018 06:35:50 +0000 (14:35 +0800)]
Rollup merge of #52968 - zackmdavis:app-lint-cability, r=estebank

App-lint-cability

@eminence recently pointed out (rust-lang/cargo#5846) that it's
surprising that `cargo fix` (now shipping with Cargo itself!) doesn't
fix very common lint warnings, which is as good of a reminder as any
that we should finish #50723.

(Previously, we did this on the librustc and libsyntax crates in #50724. I filed cmr/this-week-in-rust#685 in hopes of recruiting new contributors to do the rest.)

r? @estebank

5 years agoRollup merge of #52940 - kennytm:move-checktool-protection-week, r=alexcrichton
kennytm [Sat, 4 Aug 2018 06:35:49 +0000 (14:35 +0800)]
Rollup merge of #52940 - kennytm:move-checktool-protection-week, r=alexcrichton

Align 6-week cycle check with beta promotion instead of stable release.

The regression check is to make beta promotion easier, so it makes more
sense to use the Tuesday of the release week (T-2) as the end point of the
regression prevention, instead of Thursday (T-0). But since the beta
promotion PR is sent at Tuesday evening at UTC, the protection should
include the whole Tuesday as well, meaning the 6-week cycle will start from
Wednesdays.

This will also move the start of the regression protection week one day
earlier.

5 years agoAuto merge of #53035 - alexcrichton:debug-travis, r=kennytm
bors [Sat, 4 Aug 2018 03:45:55 +0000 (03:45 +0000)]
Auto merge of #53035 - alexcrichton:debug-travis, r=kennytm

travis: Attempt to debug shutdowns

These snippets recommend by Travis support

5 years agoAuto merge of #52927 - Mark-Simulacrum:cratestore-cleanup, r=alexcrichton
bors [Sat, 4 Aug 2018 01:44:25 +0000 (01:44 +0000)]
Auto merge of #52927 - Mark-Simulacrum:cratestore-cleanup, r=alexcrichton

Crate store cleanup

Each commit mostly stands on its own.

Most of the diff is lifetime-related and uninteresting.

5 years agoMake left column of rustdoc search results narrower
Carol (Nichols || Goulding) [Sat, 4 Aug 2018 00:39:58 +0000 (20:39 -0400)]
Make left column of rustdoc search results narrower

To make more room for the description of the item

5 years agoMake entire row of doc search results clickable
Carol (Nichols || Goulding) [Fri, 3 Aug 2018 22:29:49 +0000 (18:29 -0400)]
Make entire row of doc search results clickable

By adding empty `after` content that clears and is `display: block`.
Technique found here: https://stackoverflow.com/a/7817313/51683

Now any part of a documentation search result that is highlighted when
you hover over it should also be clickable.

5 years agoFix invalid code css rule
Guillaume Gomez [Fri, 3 Aug 2018 21:30:16 +0000 (23:30 +0200)]
Fix invalid code css rule

5 years agoAuto merge of #53034 - Manishearth:clippyup, r=oli-obk
bors [Fri, 3 Aug 2018 21:11:00 +0000 (21:11 +0000)]
Auto merge of #53034 - Manishearth:clippyup, r=oli-obk

Update clippy

r? @kennytm @alexcrichton

5 years agotravis: Attempt to debug shutdowns
Alex Crichton [Fri, 3 Aug 2018 19:20:45 +0000 (12:20 -0700)]
travis: Attempt to debug shutdowns

These snippets recommend by Travis support

5 years agoAuto merge of #52973 - davidtwco:issue-52663-lifetimes-not-included-in-span, r=pnkfelix
bors [Fri, 3 Aug 2018 17:46:13 +0000 (17:46 +0000)]
Auto merge of #52973 - davidtwco:issue-52663-lifetimes-not-included-in-span, r=pnkfelix

NLL mentions lifetimes that are not included in printed span(s).

Part of #52663.

r? @pnkfelix

5 years agoMove unused trait functions to inherent functions
Mark Rousskov [Tue, 31 Jul 2018 23:23:29 +0000 (17:23 -0600)]
Move unused trait functions to inherent functions

5 years agoUpdate clippy
Manish Goregaokar [Fri, 3 Aug 2018 17:16:07 +0000 (10:16 -0700)]
Update clippy

5 years agoStore concrete crate stores where possible
Mark Rousskov [Tue, 31 Jul 2018 21:23:31 +0000 (15:23 -0600)]
Store concrete crate stores where possible

5 years agoVisibility is now a query
Mark Rousskov [Tue, 31 Jul 2018 21:35:35 +0000 (15:35 -0600)]
Visibility is now a query

5 years agoDelete dummy crate store
Mark Rousskov [Tue, 31 Jul 2018 20:24:31 +0000 (14:24 -0600)]
Delete dummy crate store

5 years agoMove validate_crate_name to rustc_metadata
Mark Rousskov [Tue, 31 Jul 2018 18:07:37 +0000 (12:07 -0600)]
Move validate_crate_name to rustc_metadata

5 years agoAuto merge of #52712 - oli-obk:const_eval_cleanups, r=RalfJung
bors [Fri, 3 Aug 2018 14:28:12 +0000 (14:28 +0000)]
Auto merge of #52712 - oli-obk:const_eval_cleanups, r=RalfJung

Reintroduce `Undef` and properly check constant value sizes

r? @RalfJung

cc @eddyb

basically all kinds of silent failures that never occurred are assertions now

5 years agoFix trailnig WS
Aleksey Kladov [Fri, 3 Aug 2018 13:50:30 +0000 (16:50 +0300)]
Fix trailnig WS

5 years agoAuto merge of #52887 - yurydelendik:disable-lld-symbols, r=alexcrichton
bors [Fri, 3 Aug 2018 12:22:17 +0000 (12:22 +0000)]
Auto merge of #52887 - yurydelendik:disable-lld-symbols, r=alexcrichton

Disable debug sections when optimization flags is set for LLD.

Currently LLD does not error when optimization is set and debugging information sections are present. (See discussion at https://reviews.llvm.org/D47901)

Using `--strip-debug` along with the `-O` option.

5 years agoSpecify reentrancy gurantees of `Once::call_once`
Aleksey Kladov [Fri, 3 Aug 2018 11:18:06 +0000 (14:18 +0300)]
Specify reentrancy gurantees of `Once::call_once`

5 years agoUnify API of `Scalar` and `ScalarMaybeUndef`
Oliver Schneider [Fri, 3 Aug 2018 10:40:03 +0000 (12:40 +0200)]
Unify API of `Scalar` and `ScalarMaybeUndef`

5 years agovolatile operations docs: clarify that this does not help wrt. concurrency
Ralf Jung [Fri, 3 Aug 2018 10:15:00 +0000 (12:15 +0200)]
volatile operations docs: clarify that this does not help wrt. concurrency

5 years agoReintroduce alignment check
Oliver Schneider [Fri, 3 Aug 2018 09:28:06 +0000 (11:28 +0200)]
Reintroduce alignment check

5 years agoRemove spurious whitespace
Oliver Schneider [Fri, 3 Aug 2018 09:24:36 +0000 (11:24 +0200)]
Remove spurious whitespace

5 years agoAuto merge of #52948 - davidtwco:issue-52633-later-loop-iteration, r=pnkfelix
bors [Fri, 3 Aug 2018 09:22:11 +0000 (09:22 +0000)]
Auto merge of #52948 - davidtwco:issue-52633-later-loop-iteration, r=pnkfelix

NLL: Better Diagnostic When "Later" means "A Future Loop Iteration"

Part of #52663.

r? @pnkfelix

5 years agoRemove some more unnecessary `mut`
Oliver Schneider [Fri, 3 Aug 2018 09:21:44 +0000 (11:21 +0200)]
Remove some more unnecessary `mut`

5 years agoAuto merge of #52925 - RalfJung:sanity_check, r=oli-obk
bors [Fri, 3 Aug 2018 06:34:16 +0000 (06:34 +0000)]
Auto merge of #52925 - RalfJung:sanity_check, r=oli-obk

check_const: use the same ParamEnv as codegen for statics

Fixes at least part of https://github.com/rust-lang/rust/issues/52849 (my CTFE-stress benchmark). Note that I do not know what I am doing here, this is just based on hints from @oli-obk.

r? @oli-obk

5 years agoProvide `{to,from}_{ne,le,be}_bytes` functions on integers
Tobias Bucher [Fri, 29 Jun 2018 20:46:20 +0000 (22:46 +0200)]
Provide `{to,from}_{ne,le,be}_bytes` functions on integers

If one doesn't view integers as containers of bytes, converting them to
bytes necessarily needs the specfication of encoding.

I think Rust is a language that wants to be explicit. The `to_bytes`
function is basically the opposite of that – it converts an integer into
the native byte representation, but there's no mention (in the function
name) of it being very much platform dependent. Therefore, I think it
would be better to replace that method by three methods, the explicit
`to_ne_bytes` ("native endian") which does the same thing and
`to_{le,be}_bytes` which return the little- resp. big-endian encoding.

5 years agoAuto merge of #52919 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Fri, 3 Aug 2018 02:53:17 +0000 (02:53 +0000)]
Auto merge of #52919 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update tool submodules, update feature unification strategy

* Bring in some fixes for `cargo fix`
* Update RLS/rustfmt to keep them compiling
* Update all tools to [depend on `rustc-workspace-hack`](https://github.com/rust-lang/rust/pull/52919#issuecomment-409802418)
* Change how we deal with feature unification amongst these builds.

5 years agoUpdate Cargo submodule
Alex Crichton [Tue, 31 Jul 2018 21:16:55 +0000 (14:16 -0700)]
Update Cargo submodule

Bring in some fixes for `cargo fix` notably

5 years agoAuto merge of #51657 - wesleywiser:wip_profiling, r=eddyb
bors [Fri, 3 Aug 2018 00:50:09 +0000 (00:50 +0000)]
Auto merge of #51657 - wesleywiser:wip_profiling, r=eddyb

Implement a self profiler

This is a work in progress implementation of #50780. I'd love feedback on the overall structure and code as well as some specific things:

- [The query categorization mechanism](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-19e0a69c10eff31eb2d16805e79f3437R101). This works but looks kind of ugly to me. Perhaps there's a better way?

- [The profiler assumes only one activity can run at a time](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-f8a403b2d88d873e4b27c097c614a236R177). This is obviously incompatible with the ongoing parallel queries.

- [The output code is just a bunch of `format!()`s](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-f8a403b2d88d873e4b27c097c614a236R91). Is there a better way to generate markdown or json in the compiler?

- [The query categorizations are likely wrong](https://github.com/rust-lang/rust/compare/master...wesleywiser:wip_profiling?expand=1#diff-19e0a69c10eff31eb2d16805e79f3437R101). I've marked what seemed obvious to me but I'm sure I got a lot of them wrong.

The overhead currently seems very low. Running `perf` on a sample compilation with profiling enabled reveals:
![image](https://user-images.githubusercontent.com/831192/41657821-9775efec-7462-11e8-9e5e-47ec94105d9d.png)

5 years agoGenerate self-profiler types with macros
Wesley Wiser [Tue, 24 Jul 2018 01:52:39 +0000 (21:52 -0400)]
Generate self-profiler types with macros

5 years agoFix tidy
Wesley Wiser [Sat, 21 Jul 2018 01:28:37 +0000 (21:28 -0400)]
Fix tidy

5 years agoRemove some dead code
Wesley Wiser [Wed, 20 Jun 2018 11:57:22 +0000 (07:57 -0400)]
Remove some dead code

5 years agoInclude additional data in the json output
Wesley Wiser [Thu, 14 Jun 2018 02:08:41 +0000 (22:08 -0400)]
Include additional data in the json output

5 years agoInclude query hits/totals
Wesley Wiser [Thu, 14 Jun 2018 00:49:22 +0000 (20:49 -0400)]
Include query hits/totals

5 years agoRefactor json printing
Wesley Wiser [Tue, 12 Jun 2018 03:41:11 +0000 (23:41 -0400)]
Refactor json printing

5 years agoFirst pass at json output
Wesley Wiser [Wed, 6 Jun 2018 03:05:30 +0000 (23:05 -0400)]
First pass at json output

5 years agoFix more missed query data
Wesley Wiser [Wed, 6 Jun 2018 01:37:31 +0000 (21:37 -0400)]
Fix more missed query data

5 years agoRemove redundant s in output
Wesley Wiser [Tue, 5 Jun 2018 03:10:23 +0000 (23:10 -0400)]
Remove redundant s in output

5 years agoFix some missed query data
Wesley Wiser [Tue, 5 Jun 2018 02:43:27 +0000 (22:43 -0400)]
Fix some missed query data

5 years agoSwitch to markdown output
Wesley Wiser [Thu, 31 May 2018 03:41:20 +0000 (23:41 -0400)]
Switch to markdown output

5 years agoAdd units to times
Wesley Wiser [Wed, 30 May 2018 22:56:36 +0000 (18:56 -0400)]
Add units to times

5 years agoBasic incremental stats
Wesley Wiser [Wed, 30 May 2018 03:12:49 +0000 (23:12 -0400)]
Basic incremental stats

5 years agoBasic profiling
Wesley Wiser [Sat, 19 May 2018 17:50:58 +0000 (13:50 -0400)]
Basic profiling

5 years agoprivacy: Fix an ICE in `path_is_private_type`
Vadim Petrochenkov [Thu, 2 Aug 2018 21:43:49 +0000 (00:43 +0300)]
privacy: Fix an ICE in `path_is_private_type`

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

(Untested.)

5 years agoAuto merge of #52841 - petrochenkov:premacro, r=alexcrichton
bors [Thu, 2 Aug 2018 21:39:14 +0000 (21:39 +0000)]
Auto merge of #52841 - petrochenkov:premacro, r=alexcrichton

resolve: Implement prelude search for macro paths, implement tool attributes

When identifier is macro path is resolved in scopes (i.e. the first path segment - `foo` in `foo::mac!()` or `foo!()`), scopes are searched in the same order as for non-macro paths - items in modules, extern prelude, tool prelude (see later), standard library prelude, language prelude, but with some extra shadowing restrictions (names from globs and macro expansions cannot shadow names from outer scopes). See the comment in `fn resolve_lexical_macro_path_segment` for more details.

"Tool prelude" currently contains two "tool modules" `rustfmt` and `clippy`, and is searched immediately after extern prelude.
This makes the [possible long-term solution](https://github.com/rust-lang/rfcs/blob/master/text/2103-tool-attributes.md#long-term-solution) for tool attributes exactly equivalent to the existing extern prelude scheme, except that `--extern=my_crate` making crate names available in scope is replaced with something like `--tool=my_tool` making tool names available in scope.

The `tool_attributes` feature is still unstable and `#![feature(tool_attributes)]` now implicitly enables `#![feature(use_extern_macros)]`. `use_extern_macros` is a prerequisite for `tool_attributes`, so their stabilization will happen in the same order.
If `use_extern_macros` is not enabled, then tool attributes are treated as custom attributes (this is temporary, anyway).

Fixes https://github.com/rust-lang/rust/issues/52576
Fixes https://github.com/rust-lang/rust/issues/52512
Fixes https://github.com/rust-lang/rust/issues/51277
cc https://github.com/rust-lang/rust/issues/52269

5 years agoRELEASES.md: fix the `hash_map::Entry::or_default` link
Josh Stone [Thu, 2 Aug 2018 20:54:21 +0000 (13:54 -0700)]
RELEASES.md: fix the `hash_map::Entry::or_default` link

5 years agoStabilize --color and --error-format options in rustdoc
Guillaume Gomez [Thu, 2 Aug 2018 20:54:09 +0000 (22:54 +0200)]
Stabilize --color and --error-format options in rustdoc

5 years agoRemove unnecessary local in await! macro
Taylor Cramer [Thu, 2 Aug 2018 20:07:55 +0000 (13:07 -0700)]
Remove unnecessary local in await! macro

5 years agoAuto merge of #52782 - pnkfelix:issue-45696-dangly-paths-for-box, r=eddyb
bors [Thu, 2 Aug 2018 19:42:19 +0000 (19:42 +0000)]
Auto merge of #52782 - pnkfelix:issue-45696-dangly-paths-for-box, r=eddyb

[NLL] Dangly paths for box

Special-case `Box` in `rustc_mir::borrow_check`.

Since we know dropping a box will not access any `&mut` or `&` references, it is safe to model its destructor as only touching the contents *owned* by the box.

----

There are three main things going on here:

1. The first main thing, this PR is fixing a bug in NLL where `rustc` previously would issue a diagnostic error in a case like this:
```rust
fn foo(x: Box<&mut i32>) -> &mut i32 { &mut **x }
```

such code was accepted by the AST-borrowck in the past, but NLL was rejecting it with the following message ([playground](https://play.rust-lang.org/?gist=13c5560f73bfb16d6dab3ceaad44c0f8&version=nightly&mode=release&edition=2015))
```
error[E0597]: `**x` does not live long enough
 --> src/main.rs:3:40
  |
3 | fn foo(x: Box<&mut i32>) -> &mut i32 { &mut **x }
  |                                        ^^^^^^^^ - `**x` dropped here while still borrowed
  |                                        |
  |                                        borrowed value does not live long enough
  |
note: borrowed value must be valid for the anonymous lifetime #1 defined on the function body at 3:1...
 --> src/main.rs:3:1
  |
3 | fn foo(x: Box<&mut i32>) -> &mut i32 { &mut **x }
  | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

error: aborting due to previous error
```

2. The second main thing: The reason such code was previously rejected was because NLL (MIR-borrowck) incorporates a fix for issue #31567, where it models a destructor's execution as potentially accessing any borrows held by the thing being destructed. The tests with `Scribble` model this, showing that the compiler now catches such unsoundness.

However, that fix for issue #31567 is too strong, in that NLL (MIR-borrowck) includes `Box` as one of the types with a destructor that potentially accesses any borrows held by the box. This thus was the cause of the main remaining discrepancy between AST-borrowck and MIR-borrowck, as documented in issue #45696, specifically in [the last example of this comment](https://github.com/rust-lang/rust/issues/45696#issuecomment-345367873), which I have adapted into the `fn foo` shown above.

We did close issue #45696 back in December of 2017, but AFAICT that example was not fixed by PR #46268. (And we did not include a test, etc etc.)

This PR fixes that case, by trying to model the so-called `DerefPure` semantics of `Box<T>` when we traverse the type of the input to `visit_terminator_drop`.

3. The third main thing is that during a review of the first draft of this PR, @matthewjasper pointed out that the new traversal of `Box<T>` could cause the compiler to infinite loop. I have adjusted the PR to avoid this (by tracking what types we have previously seen), and added a much needed test of this somewhat odd scenario. (Its an odd scenario because the particular case only arises for things like `struct A(Box<A>);`, something which cannot be constructed in practice.)

Fix #45696.

5 years agoAuto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton
bors [Thu, 2 Aug 2018 15:34:21 +0000 (15:34 +0000)]
Auto merge of #52949 - Mark-Simulacrum:snap, r=alexcrichton

Switch to bootstrapping from 1.29 beta

r? @alexcrichton

5 years agoAuto merge of #52975 - pnkfelix:issue-52967-edition-2018-implies-2-phase-borrows...
bors [Thu, 2 Aug 2018 12:40:35 +0000 (12:40 +0000)]
Auto merge of #52975 - pnkfelix:issue-52967-edition-2018-implies-2-phase-borrows, r=Mark-Simulacrum

NLL migration in the 2018 edition needs two-phase borrows too!

NLL migration in the 2018 edition needs two-phase borrows too!

Fix #52967.

5 years agoWhen we turn on NLL migration in the 2018 edition, we need two-phase borrows too!
Felix S. Klock II [Thu, 2 Aug 2018 11:51:13 +0000 (13:51 +0200)]
When we turn on NLL migration in the 2018 edition, we need two-phase borrows too!

Fix #52967.

5 years agoSecond field of ScalarPair can be undef in some cases
Oliver Schneider [Thu, 2 Aug 2018 11:16:53 +0000 (13:16 +0200)]
Second field of ScalarPair can be undef in some cases

5 years agoAuto merge of #52906 - RalfJung:jemalloc, r=alexcrichton
bors [Thu, 2 Aug 2018 10:28:42 +0000 (10:28 +0000)]
Auto merge of #52906 - RalfJung:jemalloc, r=alexcrichton

enable jemalloc assertions when configured to do so

This is essentially a re-submission of the functional part of https://github.com/rust-lang/rust/pull/43648. I was unable to reproduce the issue I had back then, maybe something changed somewhere to no longer trigger the assertion.

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

5 years agoExplicitly label any named lifetimes mentioned in error messages.
David Wood [Thu, 2 Aug 2018 10:00:15 +0000 (12:00 +0200)]
Explicitly label any named lifetimes mentioned in error messages.

5 years agoAuto merge of #52890 - djrenren:test-visibility, r=petrochenkov
bors [Thu, 2 Aug 2018 08:24:14 +0000 (08:24 +0000)]
Auto merge of #52890 - djrenren:test-visibility, r=petrochenkov

Reexport tests without polluting namespaces

This should fix issue #52557.

Basically now we gensym a new name for the test function and reexport that.
That way the test function's reexport name can't conflict because it was impossible for the test author to write it down.
We then use a `use` statement to expose the original name using the original visibility.

5 years agoReading values should not be looking at the variant
Oliver Schneider [Thu, 2 Aug 2018 08:19:37 +0000 (10:19 +0200)]
Reading values should not be looking at the variant

5 years agorustbuild: fix local_rebuild
Marc-Antoine Perennou [Thu, 2 Aug 2018 06:49:36 +0000 (08:49 +0200)]
rustbuild: fix local_rebuild

If we detect a local rebuild (e.g. bootstrap compiler is the same version as target compiler), we set stage to 1.
When trying to build e.g. UnstableBook, we use Mode::ToolBootstrap and stage is 1.
Just allow Mode::ToolBootstrap and stagge != 0 if we are in a local_rebuild

Signed-off-by: Marc-Antoine Perennou <Marc-Antoine@Perennou.com>
5 years ago`Applicability`-ify librustc_lint
Zack M. Davis [Thu, 2 Aug 2018 03:30:04 +0000 (20:30 -0700)]
`Applicability`-ify librustc_lint

Andrew Chin recently pointed out (rust-lang/cargo#5846) that it's
surprising that `cargo fix` (now shipping with Cargo itself!) doesn't
fix very common lint warnings, which is as good of a reminder as any
that we should finish #50723.

5 years agoAuto merge of #52847 - upsuper:thread-stack-reserve, r=alexcrichton
bors [Thu, 2 Aug 2018 04:22:23 +0000 (04:22 +0000)]
Auto merge of #52847 - upsuper:thread-stack-reserve, r=alexcrichton

Don't commit thread stack on Windows

On Windows, there is a system level resource limitation called commit limit, which is roughly the sum of physical memory + paging files[1]. `CreateThread` by default commits the stack size[2], which unnecessarily takes such resource from the shared limit.

This PR changes it to only reserve the stack size rather than commit it. Reserved memory would only take the address space of the current process until it's actually accessed.

This should make the behavior on Windows match other platforms, and is also a pretty standard practice on Windows nowadays.

[1] https://blogs.technet.microsoft.com/markrussinovich/2008/11/17/pushing-the-limits-of-windows-virtual-memory/
[2] https://docs.microsoft.com/zh-cn/windows/desktop/api/processthreadsapi/nf-processthreadsapi-createthread

5 years agoAuto merge of #52787 - riscv-rust:riscv-rust-pr, r=alexcrichton
bors [Thu, 2 Aug 2018 02:24:15 +0000 (02:24 +0000)]
Auto merge of #52787 - riscv-rust:riscv-rust-pr, r=alexcrichton

Enable RISCV

- Enable LLVM backend.
- Implement call abi.
- Add built-in target riscv32imac-unknown-none.
- Enable CI.

5 years agoAuto merge of #52206 - RalfJung:zst-slices, r=alexcrichton
bors [Thu, 2 Aug 2018 00:14:21 +0000 (00:14 +0000)]
Auto merge of #52206 - RalfJung:zst-slices, r=alexcrichton

slices: fix ZST slice iterators making up pointers; debug_assert alignment in from_raw_parts

This fixes the problem that we are fabricating pointers out of thin air. I also managed to share more code between the mutable and shared iterators, while reducing the amount of macros.

I am not sure how useful it really is to add a `debug_assert!` in libcore. Everybody gets a release version of that anyway, right? Is there at least a CI job that runs the test suite with a debug version?

Fixes #42789

5 years agouse the same length computation everywhere
Ralf Jung [Mon, 30 Jul 2018 07:04:03 +0000 (09:04 +0200)]
use the same length computation everywhere

5 years agoIntroduce another way to compute the length, to fix position codegen regression
Ralf Jung [Sun, 29 Jul 2018 21:52:36 +0000 (23:52 +0200)]
Introduce another way to compute the length, to fix position codegen regression

5 years agosimplify len macro: No longer require the type
Ralf Jung [Sat, 28 Jul 2018 11:55:17 +0000 (13:55 +0200)]
simplify len macro: No longer require the type

Also use ident, not expr, to avoid accidental side-effects

5 years agomacro-inline len() and is_empty() to fix performance regressions
Ralf Jung [Sat, 28 Jul 2018 11:20:07 +0000 (13:20 +0200)]
macro-inline len() and is_empty() to fix performance regressions

This also changes the IR for nth(), but the new IR actually looks nicer that the old
(and it is one instruction shorter).

5 years agomake the code for nth closer to what it used to be
Ralf Jung [Thu, 19 Jul 2018 10:41:10 +0000 (12:41 +0200)]
make the code for nth closer to what it used to be

5 years agotest nth better
Ralf Jung [Thu, 19 Jul 2018 10:28:43 +0000 (12:28 +0200)]
test nth better

5 years agouse wrapping_offset; fix logic error in nth
Ralf Jung [Wed, 18 Jul 2018 16:29:44 +0000 (18:29 +0200)]
use wrapping_offset; fix logic error in nth

5 years agocomments
Ralf Jung [Wed, 11 Jul 2018 19:36:50 +0000 (21:36 +0200)]
comments

5 years agoslice iterators: ZST iterators no longer just "make up" addresses
Ralf Jung [Tue, 10 Jul 2018 07:01:10 +0000 (09:01 +0200)]
slice iterators: ZST iterators no longer just "make up" addresses

5 years agoAuto merge of #52958 - pietroalbini:rollup, r=pietroalbini
bors [Wed, 1 Aug 2018 19:54:06 +0000 (19:54 +0000)]
Auto merge of #52958 - pietroalbini:rollup, r=pietroalbini

Rollup of 15 pull requests

Successful merges:

 - #52793 (Add test for NLL: unexpected "free region `` does not outlive" error )
 - #52799 (Use BitVector for global sets of AttrId)
 - #52809 (Add test for unexpected region for local data ReStatic)
 - #52834 ([NLL] Allow conflicting borrows of promoted length zero arrays)
 - #52835 (Fix Alias intra doc ICE)
 - #52854 (fix memrchr in miri)
 - #52899 (tests/ui: Add missing mips{64} ignores)
 - #52908 (Use SetLenOnDrop in Vec::truncate())
 - #52915 (Don't count MIR locals as borrowed after StorageDead when finding locals live across a yield terminator)
 - #52926 (rustc: Trim down the `rust_2018_idioms` lint group)
 - #52930 (rustc_resolve: record single-segment extern crate import resolutions.)
 - #52939 (Make io::Read::read_to_end consider io::Take::limit)
 - #52942 (Another SmallVec.extend optimization)
 - #52947 (1.27 actually added the `armv5te-unknown-linux-musleabi` target)
 - #52954 (async can begin expressions)

Failed merges:

r? @ghost

5 years agoRollup merge of #52954 - cramertj:async-parse, r=petrochenkov
Pietro Albini [Wed, 1 Aug 2018 19:46:40 +0000 (21:46 +0200)]
Rollup merge of #52954 - cramertj:async-parse, r=petrochenkov

async can begin expressions

Fix https://github.com/rust-lang/rust/issues/52951

r? @petrochenkov