]> git.lizzy.rs Git - rust.git/log
rust.git
4 years agoRollup merge of #72138 - wesleywiser:add_doc_comment, r=matthewjasper
Ralf Jung [Thu, 14 May 2020 08:22:57 +0000 (10:22 +0200)]
Rollup merge of #72138 - wesleywiser:add_doc_comment, r=matthewjasper

Add doc comment for `rustc_middle::mir::mono::Linkage`

4 years agoRollup merge of #72137 - GuillaumeGomez:cleanup-e0581, r=Dylan-DPC
Ralf Jung [Thu, 14 May 2020 08:22:55 +0000 (10:22 +0200)]
Rollup merge of #72137 - GuillaumeGomez:cleanup-e0581, r=Dylan-DPC

Clean up E0581 explanation

r? @Dylan-DPC

4 years agoRollup merge of #71964 - jcotton42:bootstrap_decode_none_windows, r=Mark-Simulacrum
Ralf Jung [Thu, 14 May 2020 08:22:54 +0000 (10:22 +0200)]
Rollup merge of #71964 - jcotton42:bootstrap_decode_none_windows, r=Mark-Simulacrum

Fix bootstrap failing on win32

```powershell
python x.py -h # or really any x.py command
```
would fail with
```
info: Downloading and building bootstrap before processing --help
      command. See src/bootstrap/README.md for help with common
      commands.
Updating only changed submodules
Submodules updated in 0.15 seconds
Traceback (most recent call last):
  File "x.py", line 11, in <module>
    bootstrap.main()
  File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 960, in main
    bootstrap(help_triggered)
  File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 925, in bootstrap
    build.build = args.build or build.build_triple()
  File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 731, in build_triple
    return default_build_triple()
  File "C:\Users\Joshua\Projects\forks\rust\src\bootstrap\bootstrap.py", line 184, in default_build_triple
    ostype = require(["uname", "-s"], exit=required).decode(default_encoding)
AttributeError: 'NoneType' object has no attribute 'decode'
```

This PR defers the `decode` call until after we're sure `ostype` and `cputype` are not `None`, as they would be on Windows since `uname` doesn't exist

4 years agoRollup merge of #71909 - Dolpheyn:doc-from-trait-for-option, r=steveklabnik
Ralf Jung [Thu, 14 May 2020 08:22:52 +0000 (10:22 +0200)]
Rollup merge of #71909 - Dolpheyn:doc-from-trait-for-option, r=steveklabnik

Document From trait for Option implementations

Add documentation for ```From``` trait for ```std::option::Option``` implementations

This PR solves a part of #51430 ( CC @skade )

This is my first PR ever in contributing for OSS. I'm happy to learn and make any changes if necessary :)

4 years agoRollup merge of #71870 - ltratt:more_specific_type_name_doc, r=kennytm
Ralf Jung [Thu, 14 May 2020 08:22:50 +0000 (10:22 +0200)]
Rollup merge of #71870 - ltratt:more_specific_type_name_doc, r=kennytm

Be slightly more precise about any::type_name()'s guarantees.

The first commit in this PR rephrases the current documentation for `any::type_name()` to be a little more specific about the guarantees (or lack thereof) that this function makes. The second commit explicitly documents that lifetimes are currently not included in the output (since this bit me particularly hard recently).

4 years agoRollup merge of #71741 - RalfJung:pointer-print, r=oli-obk
Ralf Jung [Thu, 14 May 2020 08:22:48 +0000 (10:22 +0200)]
Rollup merge of #71741 - RalfJung:pointer-print, r=oli-obk

Pointer printing: do not print 0 offset

r? @eddyb Cc @oli-obk

4 years agoRollup merge of #71525 - ldm0:intosug, r=Mark-Simulacrum
Ralf Jung [Thu, 14 May 2020 08:22:40 +0000 (10:22 +0200)]
Rollup merge of #71525 - ldm0:intosug, r=Mark-Simulacrum

`prefix` should not be mutable.

Change the process from for loop to find, which makes the `prefix` able to be immutable.

4 years agoAuto merge of #72058 - RalfJung:no-dist-lldb, r=Mark-Simulacrum
bors [Thu, 14 May 2020 02:50:34 +0000 (02:50 +0000)]
Auto merge of #72058 - RalfJung:no-dist-lldb, r=Mark-Simulacrum

bootstrap: remove lldb dist packaging

The lldb-preview rustup package is missing on every single target, and has never been shipped beyond x86_64-apple-darwin. It was removed in #62592 which landed around a year ago, and there's not been demand that we re-enable it since, so we're now removing support entirely to cleanup the code a bit.

The hope is that this will also kill the useless "lldb-preview" row on https://rust-lang.github.io/rustup-components-history/.

4 years agoAuto merge of #72118 - flip1995:clippyup, r=oli-obk
bors [Wed, 13 May 2020 21:15:09 +0000 (21:15 +0000)]
Auto merge of #72118 - flip1995:clippyup, r=oli-obk

Update Clippy to 43a1777

Updates Clippy to https://github.com/rust-lang/rust-clippy/commit/43a1777b89cf6791f9e20878b4e5e3ae907867a5

We should establish a process on how often and when to update Clippy. (After X feature PRs? Once per week? Only on bug fixes and in the release week? ...?)

r? @oli-obk

4 years agoAuto merge of #72013 - nnethercote:make-RawVec-grow-mostly-non-generic, r=Amanieu
bors [Wed, 13 May 2020 14:29:56 +0000 (14:29 +0000)]
Auto merge of #72013 - nnethercote:make-RawVec-grow-mostly-non-generic, r=Amanieu

Make `RawVec::grow` mostly non-generic.

`cargo-llvm-lines` shows that, in various benchmarks, `RawVec::grow` is
instantiated 10s or 100s of times and accounts for 1-8% of lines of
generated LLVM IR.

This commit moves most of `RawVec::grow` into a separate function that
isn't parameterized by `T`, which means it doesn't need to be
instantiated many times. This reduces compile time significantly.

r? @ghost

4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:13:35 +0000 (21:13 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:13:27 +0000 (21:13 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:13:17 +0000 (21:13 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:13:08 +0000 (21:13 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:12:50 +0000 (21:12 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:12:35 +0000 (21:12 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:05:53 +0000 (21:05 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoUpdate src/libcore/option.rs
Faris Sufyan [Wed, 13 May 2020 13:04:52 +0000 (21:04 +0800)]
Update src/libcore/option.rs

Co-authored-by: Steve Klabnik <steve@steveklabnik.com>
4 years agoAuto merge of #71451 - estebank:suggest-super-trait-constraint, r=nikomatsakis
bors [Wed, 13 May 2020 06:54:15 +0000 (06:54 +0000)]
Auto merge of #71451 - estebank:suggest-super-trait-constraint, r=nikomatsakis

Suggest adding super trait constraints

4 years agoAuto merge of #70416 - mzohreva:mz/sgx-test, r=nikomatsakis
bors [Wed, 13 May 2020 03:29:00 +0000 (03:29 +0000)]
Auto merge of #70416 - mzohreva:mz/sgx-test, r=nikomatsakis

Process termination test for SGX

The issue is described in https://github.com/fortanix/rust-sgx/issues/109

cc @jethrogb

4 years agoreview comments
Esteban Küber [Tue, 12 May 2020 18:56:11 +0000 (11:56 -0700)]
review comments

4 years agofix test output after rebase
Esteban Küber [Thu, 7 May 2020 19:54:05 +0000 (12:54 -0700)]
fix test output after rebase

4 years agoIncrease verbosity of bound restriction suggestions
Esteban Küber [Wed, 22 Apr 2020 23:31:58 +0000 (16:31 -0700)]
Increase verbosity of bound restriction suggestions

- Make the bound restriction suggestion `span_suggestion_verbose`.
- Fix whitespace typo.

4 years agoSuggest adding super trait constraints
Esteban Küber [Wed, 22 Apr 2020 23:03:39 +0000 (16:03 -0700)]
Suggest adding super trait constraints

4 years agoMap to -> return.
Laurence Tratt [Tue, 12 May 2020 15:54:29 +0000 (16:54 +0100)]
Map to -> return.

4 years agoFix bootstrap failing on win32
Joshua Cotton [Thu, 7 May 2020 00:24:40 +0000 (20:24 -0400)]
Fix bootstrap failing on win32

4 years agoAuto merge of #72091 - RalfJung:miri, r=RalfJung
bors [Tue, 12 May 2020 13:59:16 +0000 (13:59 +0000)]
Auto merge of #72091 - RalfJung:miri, r=RalfJung

update miri

Fixes https://github.com/rust-lang/rust/issues/72037
Cc @rust-lang/miri r? @ghost

4 years agoAdd doc comment for `rustc_middle::mir::mono::Linkage`
Wesley Wiser [Tue, 12 May 2020 12:11:58 +0000 (08:11 -0400)]
Add doc comment for `rustc_middle::mir::mono::Linkage`

4 years agoClean up E0581 explanation
Guillaume Gomez [Tue, 12 May 2020 11:36:57 +0000 (13:36 +0200)]
Clean up E0581 explanation

4 years agoPointer printing: do not print 0 offset
Ralf Jung [Fri, 1 May 2020 10:10:06 +0000 (12:10 +0200)]
Pointer printing: do not print 0 offset

4 years agoAuto merge of #72134 - Dylan-DPC:rollup-h3shfz5, r=Dylan-DPC
bors [Tue, 12 May 2020 10:28:08 +0000 (10:28 +0000)]
Auto merge of #72134 - Dylan-DPC:rollup-h3shfz5, r=Dylan-DPC

Rollup of 5 pull requests

Successful merges:

 - #71737 (Miri: run liballoc tests with threads)
 - #71928 (Add strikethrough support to rustdoc)
 - #72048 (Visit move out of `_0` when visiting `return`)
 - #72096 (Make MIR typeck use `LocalDefId` and fix docs)
 - #72128 (strings do not have to be valid UTF-8 any more)

Failed merges:

r? @ghost

4 years agoRollup merge of #72128 - RalfJung:str-validity, r=oli-obk
Dylan DPC [Tue, 12 May 2020 09:41:15 +0000 (11:41 +0200)]
Rollup merge of #72128 - RalfJung:str-validity, r=oli-obk

strings do not have to be valid UTF-8 any more

Cc https://github.com/rust-lang/reference/pull/792
r? @oli-obk

4 years agoRollup merge of #72096 - jonas-schievink:mirck-docs, r=matthewjasper
Dylan DPC [Tue, 12 May 2020 09:41:13 +0000 (11:41 +0200)]
Rollup merge of #72096 - jonas-schievink:mirck-docs, r=matthewjasper

Make MIR typeck use `LocalDefId` and fix docs

The docs on `fn type_check` were not in sync with the arguments it takes.

r? @matthewjasper

4 years agoRollup merge of #72048 - jonas-schievink:visit-return, r=oli-obk
Dylan DPC [Tue, 12 May 2020 09:41:12 +0000 (11:41 +0200)]
Rollup merge of #72048 - jonas-schievink:visit-return, r=oli-obk

Visit move out of `_0` when visiting `return`

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

4 years agoRollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomez
Dylan DPC [Tue, 12 May 2020 09:41:10 +0000 (11:41 +0200)]
Rollup merge of #71928 - mibac138:strikethrough, r=GuillaumeGomez

Add strikethrough support to rustdoc

Implements uncontroversial part of #71183.
r? @GuillaumeGomez

4 years agoRollup merge of #71737 - RalfJung:miri-test-threads, r=shepmaster
Dylan DPC [Tue, 12 May 2020 09:41:05 +0000 (11:41 +0200)]
Rollup merge of #71737 - RalfJung:miri-test-threads, r=shepmaster

Miri: run liballoc tests with threads

Miri now supports threads, so we can run these tests. :)

4 years agostrings do not have to be valid UTF-8 any more
Ralf Jung [Tue, 12 May 2020 07:46:41 +0000 (09:46 +0200)]
strings do not have to be valid UTF-8 any more

4 years agoSplit `RawVec::grow` up.
Nicholas Nethercote [Mon, 11 May 2020 03:17:28 +0000 (13:17 +1000)]
Split `RawVec::grow` up.

The amortized case is much more common than the exact case, and it is
typically instantiated many times.

Also, we can put a chunk of the code into a function that isn't generic
over T, which reduces the amount of LLVM IR generated quite a lot,
improving compile times.

4 years agoRemove `RawVec::double`.
Nicholas Nethercote [Mon, 11 May 2020 02:26:59 +0000 (12:26 +1000)]
Remove `RawVec::double`.

It's only used once, for `VecDeque`, and can easily be replaced by
something else. The commit changes `grow_if_necessary` to `grow` to
avoid some small regressions caused by changed inlining.

The commit also removes `Strategy::Double`, and streamlines the
remaining variants of `Strategy`.

It's a compile time win on some benchmarks because the many
instantations of `RawVec::grow` are a little smaller.

4 years agoAuto merge of #72120 - Dylan-DPC:rollup-ca0tur2, r=Dylan-DPC
bors [Mon, 11 May 2020 23:14:06 +0000 (23:14 +0000)]
Auto merge of #72120 - Dylan-DPC:rollup-ca0tur2, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #72014 (Deprecated emoji)
 - #72019 (Fix debug assertion in error code)
 - #72027 (Use CDN for ci-caches on download)
 - #72044 (use min_specialization for some rustc crates where it requires no changes)
 - #72052 (display `ConstKind::Param`)
 - #72067 (Emit a warning when optimization fuel runs out)
 - #72072 (doc: minus (U+2212) instead of dash (U+002D) for negative infinity)
 - #72077 (Improve E0571 wording)
 - #72107 (Clean up E0579 explanation)
 - #72109 (Fix clippy warnings)

Failed merges:

r? @ghost

4 years agoRemove `RawVec::double_in_place`.
Nicholas Nethercote [Mon, 11 May 2020 01:46:13 +0000 (11:46 +1000)]
Remove `RawVec::double_in_place`.

It's unused.

4 years agoRollup merge of #72109 - matthiaskrgr:cl8ppy, r=Dylan-DPC
Dylan DPC [Mon, 11 May 2020 20:21:08 +0000 (22:21 +0200)]
Rollup merge of #72109 - matthiaskrgr:cl8ppy, r=Dylan-DPC

Fix clippy warnings

Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}

r? @Dylan-DPC

4 years agoRollup merge of #72107 - GuillaumeGomez:cleanup-e0579, r=Dylan-DPC
Dylan DPC [Mon, 11 May 2020 20:21:07 +0000 (22:21 +0200)]
Rollup merge of #72107 - GuillaumeGomez:cleanup-e0579, r=Dylan-DPC

Clean up E0579 explanation

r? @Dylan-DPC

4 years agoRollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC
Dylan DPC [Mon, 11 May 2020 20:21:05 +0000 (22:21 +0200)]
Rollup merge of #72077 - GuillaumeGomez:cleanup-E0571, r=Dylan-DPC

Improve E0571 wording

r? @Dylan-DPC

4 years agoRollup merge of #72072 - tspiteri:minus-inf, r=Dylan-DPC
Dylan DPC [Mon, 11 May 2020 20:21:03 +0000 (22:21 +0200)]
Rollup merge of #72072 - tspiteri:minus-inf, r=Dylan-DPC

doc: minus (U+2212) instead of dash (U+002D) for negative infinity

Like #67430, for the new associated constants.

4 years agoRollup merge of #72067 - jonas-schievink:fuel-warn, r=varkor
Dylan DPC [Mon, 11 May 2020 20:21:01 +0000 (22:21 +0200)]
Rollup merge of #72067 - jonas-schievink:fuel-warn, r=varkor

Emit a warning when optimization fuel runs out

`eprintln!` gets swallowed by Cargo too easily.

4 years agoRollup merge of #72052 - lcnr:const_pprint, r=ecstatic-morse
Dylan DPC [Mon, 11 May 2020 20:20:59 +0000 (22:20 +0200)]
Rollup merge of #72052 - lcnr:const_pprint, r=ecstatic-morse

display `ConstKind::Param`

4 years agoRollup merge of #72044 - RalfJung:min-spec, r=matthewjasper
Dylan DPC [Mon, 11 May 2020 20:20:57 +0000 (22:20 +0200)]
Rollup merge of #72044 - RalfJung:min-spec, r=matthewjasper

use min_specialization for some rustc crates where it requires no changes

and add FIXME for the rest

Cc @matthewjasper

4 years agoRollup merge of #72027 - Mark-Simulacrum:ci-caches, r=pietroalbini
Dylan DPC [Mon, 11 May 2020 20:20:55 +0000 (22:20 +0200)]
Rollup merge of #72027 - Mark-Simulacrum:ci-caches, r=pietroalbini

Use CDN for ci-caches on download

This will reduce costs, as well as lays the groundwork for developers to be able
to locally pull the published docker images without needing AWS credentials.

r? @pietroalbini

4 years agoRollup merge of #72019 - matthewjasper:dont-skip-binder, r=davidtwco
Dylan DPC [Mon, 11 May 2020 20:20:54 +0000 (22:20 +0200)]
Rollup merge of #72019 - matthewjasper:dont-skip-binder, r=davidtwco

Fix debug assertion in error code

Closes #70813

4 years agoRollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27
Dylan DPC [Mon, 11 May 2020 20:20:51 +0000 (22:20 +0200)]
Rollup merge of #72014 - GuillaumeGomez:deprecated-emoji, r=kinnison,ollie27

Deprecated emoji

Fixes #67872.

r? @kinnison

cc @rust-lang/rustdoc

4 years agoUpdate Cargo.lock
flip1995 [Mon, 11 May 2020 19:18:42 +0000 (21:18 +0200)]
Update Cargo.lock

4 years agoMerge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup
flip1995 [Mon, 11 May 2020 18:23:47 +0000 (20:23 +0200)]
Merge commit '43a1777b89cf6791f9e20878b4e5e3ae907867a5' into clippyup

4 years agoAuto merge of #72089 - Mark-Simulacrum:error-is-really-an-error, r=pietroalbini
bors [Mon, 11 May 2020 16:33:26 +0000 (16:33 +0000)]
Auto merge of #72089 - Mark-Simulacrum:error-is-really-an-error, r=pietroalbini

Fail if I/O error occurs during testing

First known case of this is in https://github.com/rust-lang/rust/pull/72053#issuecomment-626364402 but may have happened before then.

r? @pietroalbini

4 years agoFix clippy warnings
Matthias Krüger [Mon, 11 May 2020 11:01:37 +0000 (13:01 +0200)]
Fix clippy warnings

Fixes clippy::{cone_on_copy, filter_next, redundant_closure, single_char_pattern, len_zero,redundant_field_names, useless_format, identity_conversion, map_clone, into_iter_on_ref, needless_return, option_as_ref_deref, unused_unit, unnecessary_mut_passed}

4 years agoConfigure cache domain for GHA
Mark Rousskov [Mon, 11 May 2020 14:50:53 +0000 (10:50 -0400)]
Configure cache domain for GHA

4 years agofix test_weak_count_locked for Miri
Ralf Jung [Sun, 3 May 2020 10:34:53 +0000 (12:34 +0200)]
fix test_weak_count_locked for Miri

4 years agoClean up E0579 explanation
Guillaume Gomez [Mon, 11 May 2020 11:22:56 +0000 (13:22 +0200)]
Clean up E0579 explanation

4 years agoupdate miri some more
Ralf Jung [Mon, 11 May 2020 10:13:53 +0000 (12:13 +0200)]
update miri some more

4 years agoAuto merge of #71953 - oli-obk:const_prop_deaggregates, r=wesleywiser
bors [Mon, 11 May 2020 07:23:31 +0000 (07:23 +0000)]
Auto merge of #71953 - oli-obk:const_prop_deaggregates, r=wesleywiser

Const prop aggregates even if partially or fully modified

r? @wesleywiser

cc @rust-lang/wg-mir-opt I'm moderately scared of this change, but I'm confident in having reviewed all the cases.

4 years agoMake MIR typeck use `LocalDefId` and fix docs
Jonas Schievink [Mon, 11 May 2020 00:10:25 +0000 (02:10 +0200)]
Make MIR typeck use `LocalDefId` and fix docs

4 years agoupdate miri
Ralf Jung [Sun, 10 May 2020 21:55:41 +0000 (23:55 +0200)]
update miri

4 years agoFail if I/O error occurs during testing
Mark Rousskov [Sun, 10 May 2020 20:53:48 +0000 (16:53 -0400)]
Fail if I/O error occurs during testing

4 years agoAuto merge of #71825 - contrun:cg-option-strip, r=petrochenkov
bors [Sun, 10 May 2020 20:48:40 +0000 (20:48 +0000)]
Auto merge of #71825 - contrun:cg-option-strip, r=petrochenkov

add codegen option strip

closes https://github.com/rust-lang/rust/issues/71757

I don't know if the flags added here works for all linkers. I only tested on my Linux pc. I also don't know what is the best for emlinker, PtxLinker, MsvcLinker. The option for WasmLd is copied from https://aransentin.github.io/cwasm/.

4 years agoremove lldb package from bootstrap, config and build-manifest
Ralf Jung [Sat, 9 May 2020 17:53:48 +0000 (19:53 +0200)]
remove lldb package from bootstrap, config and build-manifest

it's not been built since a long time ago

4 years agoEmit a warning when optimization fuel runs out
Jonas Schievink [Sat, 9 May 2020 22:33:08 +0000 (00:33 +0200)]
Emit a warning when optimization fuel runs out

`eprintln!` gets swallowed by Cargo too easily.

4 years agoAuto merge of #72074 - RalfJung:rollup-1ns58no, r=RalfJung
bors [Sun, 10 May 2020 12:07:34 +0000 (12:07 +0000)]
Auto merge of #72074 - RalfJung:rollup-1ns58no, r=RalfJung

Rollup of 4 pull requests

Successful merges:

 - #71840 (Rework MIR drop tree lowering)
 - #71882 (Update the `cc` crate)
 - #71945 (Sort "implementations on foreign types" section in the sidebar)
 - #72043 (Add missing backtick in E0569 explanation)

Failed merges:

r? @ghost

4 years agoImprove E0571 wording
Guillaume Gomez [Sun, 10 May 2020 10:40:11 +0000 (12:40 +0200)]
Improve E0571 wording

4 years agoFix link to `map` documentation in example
Faris Sufyan [Sun, 10 May 2020 10:06:30 +0000 (18:06 +0800)]
Fix link to `map` documentation in example

Co-authored-by: Timo <timorcb@gmail.com>
4 years agoRollup merge of #72043 - GuillaumeGomez:clean-up-e0569, r=Dylan-DPC
Ralf Jung [Sun, 10 May 2020 09:34:36 +0000 (11:34 +0200)]
Rollup merge of #72043 - GuillaumeGomez:clean-up-e0569, r=Dylan-DPC

Add missing backtick in E0569 explanation

r? @Dylan-DPC

4 years agoRollup merge of #71945 - GuillaumeGomez:sort-impl-on-foreign-types-section, r=kinniso...
Ralf Jung [Sun, 10 May 2020 09:34:34 +0000 (11:34 +0200)]
Rollup merge of #71945 - GuillaumeGomez:sort-impl-on-foreign-types-section, r=kinnison,ollie27

Sort "implementations on foreign types" section in the sidebar

Fixes #71926.

We were sorting by the ID instead of sorting by the name. They're not in the same order as the implementations but I think it makes more sense this way considering this is what we do for the methods as well.

r? @kinnison

cc @rust-lang/rustdoc

4 years agoRollup merge of #71882 - alexcrichton:update-cc, r=Mark-Simulacrum
Ralf Jung [Sun, 10 May 2020 09:34:32 +0000 (11:34 +0200)]
Rollup merge of #71882 - alexcrichton:update-cc, r=Mark-Simulacrum

Update the `cc` crate

Pulls in updated MSVC detection logic landed in alexcrichton/cc-rs#488

4 years agoRollup merge of #71840 - matthewjasper:drop-trees, r=oli-obk
Ralf Jung [Sun, 10 May 2020 09:34:30 +0000 (11:34 +0200)]
Rollup merge of #71840 - matthewjasper:drop-trees, r=oli-obk

Rework MIR drop tree lowering

This PR changes how drops are generated in MIR construction. This is the first half of the fix for #47949.

Rather than generating the drops for a given unwind/break/continue/return/generator drop path as soon as they are needed, the required drops are recorded and get generated later.

The motivation for this is
* It simplifies the caching scheme, because it's now possible to walk up the currently scheduled drop tree to recover state.
* The basic block order for MIR more closely resembles execution order.

This PR also:
* Highlights cleanup blocks in the graphviz MIR output.
* Removes some unnecessary drop flag assignments.

4 years agouse min_specialization for some rustc crates where it requires no changes
Ralf Jung [Sat, 9 May 2020 11:59:21 +0000 (13:59 +0200)]
use min_specialization for some rustc crates where it requires no changes

4 years agodoc: minus (U+2212) instead of dash (U+002D) for negative infinity
Trevor Spiteri [Sun, 10 May 2020 09:24:06 +0000 (11:24 +0200)]
doc: minus (U+2212) instead of dash (U+002D) for negative infinity

4 years agoadd linking option strip
YI [Sun, 3 May 2020 04:36:12 +0000 (12:36 +0800)]
add linking option strip

move strip option to "Z"

add more strip options, remove strip-debuginfo-if-disabled

merge strip and debuginfo

4 years agoAuto merge of #71775 - petrochenkov:crtcfg, r=matthewjasper
bors [Sun, 10 May 2020 08:25:32 +0000 (08:25 +0000)]
Auto merge of #71775 - petrochenkov:crtcfg, r=matthewjasper

Enable `cfg` predicate for `target_feature = "crt-static"` only if the target supports it

That's what all other `target_feature`s do.

4 years agoAuto merge of #72020 - alexcrichton:fix-incremental-linker-plugin-lto, r=oli-obk
bors [Sun, 10 May 2020 04:41:01 +0000 (04:41 +0000)]
Auto merge of #72020 - alexcrichton:fix-incremental-linker-plugin-lto, r=oli-obk

Fix disagreeement about CGU reuse and LTO

This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006

4 years agoFix disagreeement about CGU reuse and LTO
Alex Crichton [Fri, 8 May 2020 16:27:59 +0000 (09:27 -0700)]
Fix disagreeement about CGU reuse and LTO

This commit fixes an issue where the codegen backend's selection of LTO
disagreed with what the codegen later thought was being done. Discovered
in #72006 we have a longstanding issue where if `-Clinker-plugin-lto` in
optimized mode is compiled incrementally it will always panic on the
second compilation. The underlying issue turned out to be that the
production of the original artifact determined that LTO should not be
done (because it's being postponed to the linker) but the CGU reuse
selection thought that LTO was done so it was trying to load pre-LTO
artifacts which were never generated.

The fix here is to ensure that the logic when generating code which
determines what kind of LTO is being done is shared amongst the CGU
reuse decision and the backend actually doing LTO. This means that
they'll both be in agreement about whether the previous compilation did
indeed produce incremental pre-LTO artifacts.

Closes #72006

4 years agoAuto merge of #71557 - matthewjasper:mir-asymmetric-or-pattern, r=oli-obk
bors [Sun, 10 May 2020 01:12:21 +0000 (01:12 +0000)]
Auto merge of #71557 - matthewjasper:mir-asymmetric-or-pattern, r=oli-obk

Fix ICE for broken or-pattern in async fn

closes #71297

4 years agoAuto merge of #69530 - Aaron1011:perf/skip-coerce-var, r=nikomatsakis
bors [Sat, 9 May 2020 21:01:19 +0000 (21:01 +0000)]
Auto merge of #69530 - Aaron1011:perf/skip-coerce-var, r=nikomatsakis

[perf] Skip attempting to run coerce_unsized on an inference variable

See the included comment for a detailed explanation of why this is
sound.

4 years agoAuto merge of #5564 - MrAwesome:master, r=flip1995
bors [Sat, 9 May 2020 18:43:28 +0000 (18:43 +0000)]
Auto merge of #5564 - MrAwesome:master, r=flip1995

Allow `use super::*;` glob imports

changelog: Allow super::* glob imports

fixes #5554
fixes #5569

A first pass at #5554 - this allows all `use super::*` to pass, which may or may not be desirable. The original issue was around allowing test modules to import their entire parent modules - I'm happy to modify this to do that instead, may just need some guidance on how to implement that (I played around a bit with #[cfg(test)] but from what I can gather, clippy itself isn't in test mode when running, even if the code in question is being checked for the test target).

4 years agoMove is_test_module check to top of function
Glenn Hope [Sat, 9 May 2020 17:16:47 +0000 (10:16 -0700)]
Move is_test_module check to top of function

4 years agoCheck is_macro inside check_exceptions, update references to fix test
Glenn Hope [Sat, 9 May 2020 17:14:29 +0000 (10:14 -0700)]
Check is_macro inside check_exceptions, update references to fix test

4 years agoFix test from auto-formatter fix
Glenn Hope [Sat, 9 May 2020 15:33:35 +0000 (08:33 -0700)]
Fix test from auto-formatter fix

4 years agoRemove check for Fn, reflect this in test cases, make test cases more robust/explicit
Glenn Hope [Sat, 9 May 2020 15:04:07 +0000 (08:04 -0700)]
Remove check for Fn, reflect this in test cases, make test cases more robust/explicit

4 years agoRemove unnecessary field, check for Mod/Fn ItemKind
Glenn Hope [Sat, 9 May 2020 01:22:27 +0000 (18:22 -0700)]
Remove unnecessary field, check for Mod/Fn ItemKind

4 years agoAlso have flag disable macro check
Glenn Hope [Thu, 7 May 2020 21:48:27 +0000 (14:48 -0700)]
Also have flag disable macro check

4 years agoAdd check for "test" in parent name. Include flag for disabling wildcard import excep...
Glenn Hope [Thu, 7 May 2020 21:41:54 +0000 (14:41 -0700)]
Add check for "test" in parent name. Include flag for disabling wildcard import exceptions

4 years agoCheck if the parent module name contains "test"
Glenn Hope [Thu, 7 May 2020 15:06:30 +0000 (08:06 -0700)]
Check if the parent module name contains "test"

4 years agoRun `cargo dev fmt`
Glenn Hope [Sun, 3 May 2020 18:18:10 +0000 (11:18 -0700)]
Run `cargo dev fmt`

4 years agoAllow 'use super::*;' imports
Glenn Hope [Sun, 3 May 2020 17:56:25 +0000 (10:56 -0700)]
Allow 'use super::*;' imports

4 years agoAuto merge of #72041 - RalfJung:rollup-xivrvy2, r=RalfJung
bors [Sat, 9 May 2020 17:31:08 +0000 (17:31 +0000)]
Auto merge of #72041 - RalfJung:rollup-xivrvy2, r=RalfJung

Rollup of 5 pull requests

Successful merges:

 - #69406 (upgrade chalk and use chalk-solve/chalk-ir/chalk-rust-ir)
 - #71185 (Move tests from `test/run-fail` to UI)
 - #71234 (rustllvm: Use .init_array rather than .ctors)
 - #71508 (Simplify the `tcx.alloc_map` API)
 - #71555 (Remove ast::{Ident, Name} reexports.)

Failed merges:

r? @ghost

4 years agodisplay `ConstKind::Param`
Bastian Kauschke [Sat, 9 May 2020 15:10:40 +0000 (17:10 +0200)]
display `ConstKind::Param`

4 years agoVisit move out of `_0` when visiting `return`
Jonas Schievink [Sat, 9 May 2020 14:08:04 +0000 (16:08 +0200)]
Visit move out of `_0` when visiting `return`

4 years agoAuto merge of #5580 - matthiaskrgr:regex_dep, r=flip1995
bors [Sat, 9 May 2020 12:41:19 +0000 (12:41 +0000)]
Auto merge of #5580 - matthiaskrgr:regex_dep, r=flip1995

deps: remove unused regex dependency from root crate

changelog: none

4 years agoAdd missing backtick in E0569 explanation
Guillaume Gomez [Sat, 9 May 2020 11:48:11 +0000 (13:48 +0200)]
Add missing backtick in E0569 explanation

4 years agoSort "implementations on foreign types" section in the sidebar
Guillaume Gomez [Wed, 6 May 2020 09:13:00 +0000 (11:13 +0200)]
Sort "implementations on foreign types" section in the sidebar

4 years agoRollup merge of #71555 - cjgillot:nameless, r=matthewjasper
Ralf Jung [Sat, 9 May 2020 11:36:39 +0000 (13:36 +0200)]
Rollup merge of #71555 - cjgillot:nameless, r=matthewjasper

Remove ast::{Ident, Name} reexports.

The reexport of `Symbol` into `Name` confused me.

4 years agoRollup merge of #71508 - oli-obk:alloc_map_unlock, r=RalfJung
Ralf Jung [Sat, 9 May 2020 11:36:37 +0000 (13:36 +0200)]
Rollup merge of #71508 - oli-obk:alloc_map_unlock, r=RalfJung

Simplify the `tcx.alloc_map` API

This PR changes all functions that require manually locking the `alloc_map` to functions on `TyCtxt` that lock the map internally. In the same step we make the `TyCtxt::alloc_map` field private.

r? @RalfJung