]> git.lizzy.rs Git - rust.git/log
rust.git
5 years agoAuto merge of #52332 - zackmdavis:dead_code_lint_should_say_2_electric_boogaloo,...
bors [Mon, 6 Aug 2018 07:02:11 +0000 (07:02 +0000)]
Auto merge of #52332 - zackmdavis:dead_code_lint_should_say_2_electric_boogaloo, r=pnkfelix

dead-code lint: say "constructed" for structs

Respectively.

This is a sequel to November 2017's #46103 / 1a9dc2e9. It had been
reported (more than once—at least #19140, #44083, and #44565) that the
"never used" language was confusing for enum variants that were "used"
as match patterns, so the wording was changed to say never "constructed"
specifically for enum variants. More recently, the same issue was raised
for structs (#52325). It seems consistent to say "constructed" here,
too, for the same reasons.

~~While we're here, we can also use more specific word "called" for unused
functions and methods. (We declined to do this in #46103, but the
rationale given in the commit message doesn't actually make sense.)~~

This resolves #52325.

5 years agoAuto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelix
bors [Mon, 6 Aug 2018 01:53:58 +0000 (01:53 +0000)]
Auto merge of #53002 - QuietMisdreavus:brother-may-i-have-some-loops, r=pnkfelix

make `everybody_loops` preserve item declarations

First half of https://github.com/rust-lang/rust/issues/52545.

`everybody_loops` is used by rustdoc to ensure we don't contain erroneous references to platform APIs if one of its uses is pulled in by `#[doc(cfg)]`. However, you can also implement traits for public types inside of functions. This is used by Diesel (probably others, but they were the example that was reported) to get around a recent macro hygiene fix, which has caused their crate to fail to document. While this won't make the traits show up in documentation (that step comes later), it will at least allow files to be generated.

5 years agoAuto merge of #52997 - llogiq:tiny-list-opt, r=varkor
bors [Sun, 5 Aug 2018 22:41:07 +0000 (22:41 +0000)]
Auto merge of #52997 - llogiq:tiny-list-opt, r=varkor

data_structures: make TinyList more readable and optimize remove(_)

also add benchmarks

Before:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           2 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           6 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           4 ns/iter (+/- 0)
```

After:

```
test tiny_list::test::bench_insert_empty             ... bench:           1 ns/iter (+/- 0)
test tiny_list::test::bench_insert_one               ... bench:          16 ns/iter (+/- 0)
test tiny_list::test::bench_remove_empty             ... bench:           0 ns/iter (+/- 0)
test tiny_list::test::bench_remove_one               ... bench:           3 ns/iter (+/- 0)
test tiny_list::test::bench_remove_unknown           ... bench:           2 ns/iter (+/- 0)
```

5 years agoAuto merge of #52800 - QuietMisdreavus:do-not-pass-go, r=GuillaumeGomez
bors [Sun, 5 Aug 2018 18:45:01 +0000 (18:45 +0000)]
Auto merge of #52800 - QuietMisdreavus:do-not-pass-go, r=GuillaumeGomez

rustdoc: refactor how passes are structured, and turn intra-doc-link collection into a pass

This builds on https://github.com/rust-lang/rust/pull/52751 and should not be merged until that finally finishes the bors queue

Part 2 of my passes refactor. This introduces the concept of an "early pass", which is run right before exiting the compiler context. This is important for passes that may want to ask the compiler about things. For example, i took out the intra-doc-link collection and turned it into a early pass. I also made the `strip-hidden`, `strip-private` and `strip-priv-imports` passes occur as early passes, so that intra-doc-link collection wouldn't run on docs that weren't getting printed.

Fixes https://github.com/rust-lang/rust/issues/51684, technically https://github.com/rust-lang/rust/issues/51468 too but that version of `h2` hits a legit intra-link error after that `>_>`

r? @rust-lang/rustdoc

5 years agoAuto merge of #52983 - alexcrichton:update-llvm, r=kennytm
bors [Sun, 5 Aug 2018 14:51:16 +0000 (14:51 +0000)]
Auto merge of #52983 - alexcrichton:update-llvm, r=kennytm

Update LLVM submodule to 7.0

This commit updates the following submodules to LLVM's [recently branched][1]
7.0 release branch:

* src/llvm
* src/tools/lld
* src/libcompiler_builtins/compiler-rt

[1]: https://lists.llvm.org/pipermail/llvm-dev/2018-August/125004.html

Closes #52970

5 years agoAuto merge of #52959 - matthewjasper:closure-spans, r=pnkfelix
bors [Sun, 5 Aug 2018 09:17:24 +0000 (09:17 +0000)]
Auto merge of #52959 - matthewjasper:closure-spans, r=pnkfelix

[NLL] Use smaller spans for errors involving closure captures

Closes #51170
Closes #46599

Error messages involving closures now point to the captured variable/closure args.

r? @pnkfelix

5 years agoAuto merge of #52991 - nikomatsakis:nll-escaping-into-return, r=pnkfelix
bors [Sun, 5 Aug 2018 07:06:11 +0000 (07:06 +0000)]
Auto merge of #52991 - nikomatsakis:nll-escaping-into-return, r=pnkfelix

avoid computing liveness for locals that escape into statics

Fixes #52713

I poked at this on the plane and I think it's working -- but I want to do a bit more investigation and double check. The idea is to identify those local variables where the entire value will "escape" into the return -- for them, we don't need to compute liveness, since we know that the outlives relations from the return type will force those regions to be equal to free regions. This should help with html5ever in particular.

- [x] test performance
- [x] verify correctness
- [x] add comments

r? @pnkfelix
cc @lqd

5 years agoremove unused tcx argument
Niko Matsakis [Sun, 5 Aug 2018 05:42:18 +0000 (07:42 +0200)]
remove unused tcx argument

5 years agofix exit-code test so the lint fires again
QuietMisdreavus [Fri, 3 Aug 2018 23:17:45 +0000 (18:17 -0500)]
fix exit-code test so the lint fires again

5 years agoonly abort after all early passes have run
QuietMisdreavus [Sat, 28 Jul 2018 05:06:51 +0000 (00:06 -0500)]
only abort after all early passes have run

5 years agodon't process intra-links on extern-crate items
QuietMisdreavus [Sat, 28 Jul 2018 04:46:27 +0000 (23:46 -0500)]
don't process intra-links on extern-crate items

5 years agoadd tests for new intra-doc-link behavior
QuietMisdreavus [Sat, 28 Jul 2018 04:18:17 +0000 (23:18 -0500)]
add tests for new intra-doc-link behavior

5 years agoturn intra-doc-link collection into an early pass
QuietMisdreavus [Sat, 28 Jul 2018 02:19:36 +0000 (21:19 -0500)]
turn intra-doc-link collection into an early pass

5 years agoAuto merge of #53078 - alexcrichton:update-cargo, r=Mark-Simulacrum
bors [Sun, 5 Aug 2018 03:20:13 +0000 (03:20 +0000)]
Auto merge of #53078 - alexcrichton:update-cargo, r=Mark-Simulacrum

Update cargo to fix Rust 2018 build scripts

5 years agoUpdate cargo to fix Rust 2018 build scripts
Alex Crichton [Sun, 5 Aug 2018 00:40:46 +0000 (17:40 -0700)]
Update cargo to fix Rust 2018 build scripts

5 years agoUpdate LLVM submodule to 7.0
Alex Crichton [Thu, 2 Aug 2018 14:09:13 +0000 (07:09 -0700)]
Update LLVM submodule to 7.0

This commit updates the following submodules to LLVM's [recently branched][1]
7.0 release branch:

* src/llvm
* src/tools/lld
* src/libcompiler_builtins/compiler-rt

[1]: https://lists.llvm.org/pipermail/llvm-dev/2018-August/125004.html

Closes #52970

5 years agointroduce "early passes" an convert a few over
QuietMisdreavus [Fri, 27 Jul 2018 15:22:16 +0000 (10:22 -0500)]
introduce "early passes" an convert a few over

5 years agostrongly-typed passes
QuietMisdreavus [Fri, 27 Jul 2018 14:11:19 +0000 (09:11 -0500)]
strongly-typed passes

5 years agoAuto merge of #53057 - nrc:update, r=kennytm
bors [Sat, 4 Aug 2018 23:21:01 +0000 (23:21 +0000)]
Auto merge of #53057 - nrc:update, r=kennytm

Update rustfmt, RLS, Clippy

r? @kennytm

Fixes RLS build and updates RLS and Rustfmt to their 1.0 RCs

5 years agoUpdate rustfmt and RLS
Nick Cameron [Sat, 4 Aug 2018 07:29:15 +0000 (19:29 +1200)]
Update rustfmt and RLS

5 years agoAuto merge of #52827 - GuillaumeGomez:generic-impls, r=QuietMisdreavus
bors [Sat, 4 Aug 2018 21:20:26 +0000 (21:20 +0000)]
Auto merge of #52827 - GuillaumeGomez:generic-impls, r=QuietMisdreavus

rustdoc: clean up generic impls

r? @QuietMisdreavus

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 agoUpdate to master
Guillaume Gomez [Sat, 4 Aug 2018 09:40:56 +0000 (11:40 +0200)]
Update to master

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 agoRemove FinderTrait and move its functions into DocContext
Guillaume Gomez [Fri, 3 Aug 2018 20:13:05 +0000 (22:13 +0200)]
Remove FinderTrait and move its functions into DocContext

5 years agoImprove functions naming
Guillaume Gomez [Tue, 31 Jul 2018 20:40:55 +0000 (22:40 +0200)]
Improve functions naming

5 years agoFix dyn objects
Guillaume Gomez [Sun, 29 Jul 2018 17:32:07 +0000 (19:32 +0200)]
Fix dyn objects

5 years agoStrengthen tests
Guillaume Gomez [Sun, 29 Jul 2018 14:47:31 +0000 (16:47 +0200)]
Strengthen tests

5 years agoFix primitive blanket impls not showing up
Guillaume Gomez [Sun, 29 Jul 2018 14:30:39 +0000 (16:30 +0200)]
Fix primitive blanket impls not showing up

5 years agoClean generic impls code
Guillaume Gomez [Sun, 29 Jul 2018 13:39:51 +0000 (15:39 +0200)]
Clean generic impls code

5 years agomore comments and justify correctness
Niko Matsakis [Sat, 4 Aug 2018 07:30:24 +0000 (09:30 +0200)]
more comments and justify correctness

5 years agogeneralize the Deref case and simplify the code
Niko Matsakis [Sat, 4 Aug 2018 07:26:30 +0000 (09:26 +0200)]
generalize the Deref case and simplify the code

5 years agoadd a comment explaining the idea
Niko Matsakis [Sat, 4 Aug 2018 07:26:20 +0000 (09:26 +0200)]
add a comment explaining the idea

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 agoUpdate tests for new spans for nll errors involving closures
Matthew Jasper [Wed, 1 Aug 2018 20:02:10 +0000 (21:02 +0100)]
Update tests for new spans for nll errors involving closures

5 years agoTests for closure spans
Matthew Jasper [Wed, 1 Aug 2018 19:40:06 +0000 (20:40 +0100)]
Tests for closure spans

5 years agoHighlight closure spans for borrow and initialization errors
Matthew Jasper [Wed, 1 Aug 2018 19:38:02 +0000 (20:38 +0100)]
Highlight closure spans for borrow and initialization errors

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 agoupdate error messages -- in some cases maybe we should investigate
Niko Matsakis [Fri, 3 Aug 2018 06:31:17 +0000 (08:31 +0200)]
update error messages -- in some cases maybe we should investigate

5 years agosupport `X = &*Y` reborrows
Niko Matsakis [Fri, 3 Aug 2018 06:15:55 +0000 (08:15 +0200)]
support `X = &*Y` reborrows

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