]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoUse empty Cache for methods requiring it when filling Cache itself
Guillaume Gomez [Wed, 13 Jan 2021 21:06:41 +0000 (22:06 +0100)]
Use empty Cache for methods requiring it when filling Cache itself

3 years agoRemove CACHE_KEY global
Guillaume Gomez [Tue, 12 Jan 2021 22:36:04 +0000 (23:36 +0100)]
Remove CACHE_KEY global

3 years agoAuto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic...
bors [Wed, 27 Jan 2021 00:19:45 +0000 (00:19 +0000)]
Auto merge of #81393 - pnkfelix:issue-81296-make-weak-item-traversal-deterministic, r=estebank

Make weak item traversal deterministic

Fix #81296.

(No test added. The relevant test *is* ui/panic-handler/weak-lang-item.rs, and this change should make it less flaky.)

3 years agoAuto merge of #81417 - JohnTitor:rollup-yi3q05s, r=JohnTitor
bors [Tue, 26 Jan 2021 19:44:26 +0000 (19:44 +0000)]
Auto merge of #81417 - JohnTitor:rollup-yi3q05s, r=JohnTitor

Rollup of 14 pull requests

Successful merges:

 - #80812 (Update RELEASES.md for 1.50.0)
 - #80876 (Add `unwrap_unchecked()` methods for `Option` and `Result`)
 - #80900 (Fix ICE with `ReadPointerAsBytes` validation error)
 - #81191 (BTreeMap: test all borrowing interfaces and test more chaotic order behavior)
 - #81195 (Account for generics when suggesting bound)
 - #81299 (Fix some bugs reported by eslint)
 - #81325 (typeck: Don't suggest converting LHS exprs)
 - #81353 (Fix spelling in documentation for error E0207)
 - #81369 (rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry)
 - #81389 (rustdoc: Document CommonMark extensions.)
 - #81399 (Update books)
 - #81401 (tidy: Some code cleanup.)
 - #81407 (Refine "remove semicolon" suggestion in trait selection)
 - #81412 (Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #81412 - hyd-dev:array-assume-init-wrong-assertion, r=m-ou-se
Yuki Okushi [Tue, 26 Jan 2021 19:43:37 +0000 (04:43 +0900)]
Rollup merge of #81412 - hyd-dev:array-assume-init-wrong-assertion, r=m-ou-se

Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays

That assertion has a false positive ([playground](https://play.rust-lang.org/?version=nightly&mode=debug&edition=2018&gist=63922b8c897b04112adcdf346deb1d0e)):
```rust
#![feature(maybe_uninit_array_assume_init)]

use std::mem::MaybeUninit;

enum Uninhabited {}

fn main() {
    unsafe {
        // thread 'main' panicked at 'attempted to instantiate uninhabited type `Uninhabited`'
        MaybeUninit::<Uninhabited>::array_assume_init([]);
    }
}
```
*Previously reported in https://github.com/rust-lang/rust/pull/80600#discussion_r564496692.*

This PR makes it ignore zero-length arrays.

cc #80908

3 years agoRollup merge of #81407 - osa1:issue81098, r=estebank
Yuki Okushi [Tue, 26 Jan 2021 19:43:35 +0000 (04:43 +0900)]
Rollup merge of #81407 - osa1:issue81098, r=estebank

Refine "remove semicolon" suggestion in trait selection

Don't suggest it if the last statement doesn't have a semicolon

Fixes #81098

See also #54771 for why this suggestion was added

3 years agoRollup merge of #81401 - ehuss:tidy-cleanup, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:33 +0000 (04:43 +0900)]
Rollup merge of #81401 - ehuss:tidy-cleanup, r=Mark-Simulacrum

tidy: Some code cleanup.

This is just some cleanup that shouldn't have any change in behavior.  (See commit messages for more details.)

* Remove cargo check. This test wasn't working, and is no longer valid.
* Remove edition filter exceptions. They are no longer necessary.
* Remove unnecessary trailing semicolon.  Otherwise the warning will prevent tidy from building after the beta branch.

3 years agoRollup merge of #81399 - ehuss:update-books, r=ehuss
Yuki Okushi [Tue, 26 Jan 2021 19:43:32 +0000 (04:43 +0900)]
Rollup merge of #81399 - ehuss:update-books, r=ehuss

Update books

## nomicon

7 commits in a8584998eacdea7106a1dfafcbf6c1c06fcdf925..bbf06ad39d1f45654047e9596b750cc6e6d1b693
2021-01-06 12:49:49 -0500 to 2021-01-22 07:07:31 -0800
- Fix alloc link in exotic-sizes for local docs (rust-lang-nursery/nomicon#255)
- Remove TODO
- Fix small punctuation error
- Arc revisions (Clone atomic explanation) (pt2/3(+?))
- Fix Arc Clone
- Arc revisions (pt1/2(+?))
- Simple Arc implementation (without Weak refs)

## reference

5 commits in 50af691f838937c300b47812d0507c6d88c14f97..f02b09eb6e8af340ad1256a54adb7aae2ff3163e
2021-01-12 21:19:20 -0800 to 2021-01-22 01:53:02 -0800
- Fix missing space (rust-lang-nursery/reference#941)
- Start documenting name resolution. (rust-lang-nursery/reference#937)
- Fix plural and delete spurious words in comparison ops (rust-lang-nursery/reference#932)
- Document execution order (rust-lang-nursery/reference#888)
- Compound operator expressions (rust-lang-nursery/reference#915)

## book

3 commits in ac57a0ddd23d173b26731ccf939f3ba729753275..e724bd826580ff95df48a8533af7dec1080693d4
2021-01-09 14:18:45 -0500 to 2021-01-20 08:19:49 -0600
- Fixes rust-lang/book#2417. Get the index from user input instead of a const. (rust-lang/book#2566)
- Turn off the playground in a bunch more lib.rs inclusions (rust-lang/book#2569)
- Merge pull request rust-lang/book#2567 from rust-lang/rust-1.49

## rust-by-example

1 commits in 03e23af01f0b4f83a3a513da280e1ca92587f2ec..f633769acef68574427a6fae6c06f13bc2199573
2021-01-09 10:20:28 -0300 to 2021-01-13 20:58:25 -0300
- Fixed styling on closure example (rust-lang/rust-by-example#1405)

3 years agoRollup merge of #81389 - ehuss:rustdoc-cmark-extensions, r=GuillaumeGomez
Yuki Okushi [Tue, 26 Jan 2021 19:43:30 +0000 (04:43 +0900)]
Rollup merge of #81389 - ehuss:rustdoc-cmark-extensions, r=GuillaumeGomez

rustdoc: Document CommonMark extensions.

This updates the rustdoc book to include some documentation on the CommonMark extensions that rustdoc supports.

3 years agoRollup merge of #81369 - tgnottingham:codegen-to-llvm-ir-wall-time, r=lcnr
Yuki Okushi [Tue, 26 Jan 2021 19:43:28 +0000 (04:43 +0900)]
Rollup merge of #81369 - tgnottingham:codegen-to-llvm-ir-wall-time, r=lcnr

rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry

Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a
whole, rather than the sum for each CGU (the distinction matters for
parallel builds, where some CGUs are processed in parallel).

3 years agoRollup merge of #81353 - jockbert:spelling_in_e0207, r=petrochenkov
Yuki Okushi [Tue, 26 Jan 2021 19:43:25 +0000 (04:43 +0900)]
Rollup merge of #81353 - jockbert:spelling_in_e0207, r=petrochenkov

Fix spelling in documentation for error E0207

I have trouble parsing the the wording "type parameter parameter".

3 years agoRollup merge of #81325 - osa1:issue81293, r=estebank
Yuki Okushi [Tue, 26 Jan 2021 19:43:24 +0000 (04:43 +0900)]
Rollup merge of #81325 - osa1:issue81293, r=estebank

typeck: Don't suggest converting LHS exprs

Converting LHS of an assignment does not work, so avoid suggesting that.

Fixes #81293

3 years agoRollup merge of #81299 - GuillaumeGomez:fix-eslint-detected-bugs, r=Nemo157
Yuki Okushi [Tue, 26 Jan 2021 19:43:22 +0000 (04:43 +0900)]
Rollup merge of #81299 - GuillaumeGomez:fix-eslint-detected-bugs, r=Nemo157

Fix some bugs reported by eslint

Simply went into `src/librustdoc/html/static/` and ran `eslint *.js` in case you want to reproduce. :)

r? ``````@Nemo157``````

3 years agoRollup merge of #81195 - estebank:suggest-bound-on-trait-with-params, r=oli-obk
Yuki Okushi [Tue, 26 Jan 2021 19:43:20 +0000 (04:43 +0900)]
Rollup merge of #81195 - estebank:suggest-bound-on-trait-with-params, r=oli-obk

Account for generics when suggesting bound

Fix #81175.

3 years agoRollup merge of #81191 - ssomers:btree_more_order_chaos, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:18 +0000 (04:43 +0900)]
Rollup merge of #81191 - ssomers:btree_more_order_chaos, r=Mark-Simulacrum

BTreeMap: test all borrowing interfaces and test more chaotic order behavior

Inspired by #81169, test what happens if you mess up order of the type with which you search (as opposed to the key type).

r? `@Mark-Simulacrum`

3 years agoRollup merge of #80900 - camelid:readpointerasbytes-ice, r=oli-obk
Yuki Okushi [Tue, 26 Jan 2021 19:43:16 +0000 (04:43 +0900)]
Rollup merge of #80900 - camelid:readpointerasbytes-ice, r=oli-obk

Fix ICE with `ReadPointerAsBytes` validation error

Fixes #79690.

r? ``````@oli-obk``````

3 years agoRollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se
Yuki Okushi [Tue, 26 Jan 2021 19:43:14 +0000 (04:43 +0900)]
Rollup merge of #80876 - ojeda:option-result-unwrap_unchecked, r=m-ou-se

Add `unwrap_unchecked()` methods for `Option` and `Result`

In particular:
  - `unwrap_unchecked()` for `Option`.
  - `unwrap_unchecked()` and `unwrap_err_unchecked()` for `Result`.

These complement other `*_unchecked()` methods in `core` etc.

Currently there are a couple of places it may be used inside rustc (`LinkedList`, `BTree`). It is also easy to find other repositories with similar functionality.

Fixes #48278.

3 years agoRollup merge of #80812 - rust-lang:relnotes-1.50.0, r=Mark-Simulacrum
Yuki Okushi [Tue, 26 Jan 2021 19:43:12 +0000 (04:43 +0900)]
Rollup merge of #80812 - rust-lang:relnotes-1.50.0, r=Mark-Simulacrum

Update RELEASES.md for 1.50.0

### [Rendered](https://github.com/rust-lang/rust/blob/relnotes-1.50.0/RELEASES.md)

r? `@Mark-Simulacrum`
cc `@rust-lang/release`

3 years agoFix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays
hyd-dev [Tue, 26 Jan 2021 15:21:00 +0000 (23:21 +0800)]
Fix assertion in `MaybeUninit::array_assume_init()` for zero-length arrays

3 years agoUpdate RELEASES.md for 1.50.0
Erin Power [Fri, 8 Jan 2021 12:05:48 +0000 (12:05 +0000)]
Update RELEASES.md for 1.50.0

3 years agoAuto merge of #81217 - ssomers:btree_bring_back_the_slice, r=Mark-Simulacrum
bors [Tue, 26 Jan 2021 14:47:51 +0000 (14:47 +0000)]
Auto merge of #81217 - ssomers:btree_bring_back_the_slice, r=Mark-Simulacrum

BTreeMap: bring back the key slice for immutable lookup

Pave the way for binary search, by reverting a bit of #73971, which banned `keys` for misbehaving while it was defined for every `BorrowType`. Adding some `debug_assert`s along the way.

r? `@Mark-Simulacrum`

3 years agoAuto merge of #81367 - andersk:join-test-threads, r=dtolnay
bors [Tue, 26 Jan 2021 11:15:44 +0000 (11:15 +0000)]
Auto merge of #81367 - andersk:join-test-threads, r=dtolnay

libtest: Wait for test threads to exit after they report completion

Otherwise we can miss bugs where a test reports that it succeeded but then panics within a TLS destructor.

Example:

```rust
use std::thread::sleep;
use std::time::Duration;

struct Foo;

impl Drop for Foo {
    fn drop(&mut self) {
        sleep(Duration::from_secs(1));
        panic!()
    }
}

thread_local!(static FOO: Foo = Foo);

#[test]
pub fn test() {
    FOO.with(|_| {});
}
```

Before this fix, `cargo test` incorrectly reports success.

```console
$ cargo test
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running target/debug/deps/panicking_test-85130fa46b54f758

running 1 test
test test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.00s

$ echo $?
0
```

After this fix, the failure is visible. (The entire process is aborted due to #24479.)

```console
$ cargo test
    Finished test [unoptimized + debuginfo] target(s) in 0.01s
     Running target/debug/deps/panicking_test-76180625bc2ee3c9

running 1 test
thread 'test' panicked at 'explicit panic', src/main.rs:9:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 5
error: test failed, to rerun pass '--bin panicking-test'

Caused by:
  process didn't exit successfully: `/tmp/panicking-test/target/debug/deps/panicking_test-76180625bc2ee3c9 --nocapture` (signal: 6, SIGABRT: process abort signal)

$ echo $?
101
```

3 years agoRefine "remove semicolon" suggestion in trait selection
Ömer Sinan Ağacan [Tue, 26 Jan 2021 10:10:54 +0000 (13:10 +0300)]
Refine "remove semicolon" suggestion in trait selection

Don't suggest it if the last statement doesn't have a semicolon

Fixes #81098

See also #54771 for why this suggestion was added

3 years agotypeck: Don't suggest converting LHS exprs
Ömer Sinan Ağacan [Sun, 24 Jan 2021 07:32:24 +0000 (10:32 +0300)]
typeck: Don't suggest converting LHS exprs

Converting LHS of an assignment does not work, so avoid suggesting that.

Fixes #81293

3 years agoAuto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank
bors [Tue, 26 Jan 2021 05:47:23 +0000 (05:47 +0000)]
Auto merge of #80692 - Aaron1011:feature/query-result-debug, r=estebank

Enforce that query results implement Debug

Currently, we require that query keys implement `Debug`, but we do not do the same for query values. This can make incremental compilation bugs difficult to debug - there isn't a good place to print out the result loaded from disk.

This PR adds `Debug` bounds to several query-related functions, allowing us to debug-print the query value when an 'unstable fingerprint' error occurs. This required adding `#[derive(Debug)]` to a fairly large number of types - hopefully, this doesn't have much of an impact on compiler bootstrapping times.

3 years agoAuto merge of #79113 - andjo403:raw_vec_ptr, r=m-ou-se
bors [Tue, 26 Jan 2021 02:56:37 +0000 (02:56 +0000)]
Auto merge of #79113 - andjo403:raw_vec_ptr, r=m-ou-se

mark raw_vec::ptr with inline

when a lot of vectors is used in a enum as in the example in #66617 if this function is not inlined and multiple cgus is used this results in huge compile times. with this fix the compile time is 6s from minutes for the example in #66617. I did not have the patience to wait for it to compile for more then 3 min.

3 years agoUpdate books
Eric Huss [Mon, 25 Jan 2021 23:10:10 +0000 (15:10 -0800)]
Update books

3 years agotidy: Remove unnecessary trailing semicolon.
Eric Huss [Mon, 25 Jan 2021 20:43:17 +0000 (12:43 -0800)]
tidy: Remove unnecessary trailing semicolon.

This will cause a failure due to the warning after the next beta branch
as https://github.com/rust-lang/rust/pull/79812 will hit beta.

3 years agotidy: Remove edition filter exceptions.
Eric Huss [Mon, 25 Jan 2021 20:40:22 +0000 (12:40 -0800)]
tidy: Remove edition filter exceptions.

These exceptions are no longer necessary.

3 years agotidy: Remove cargo check.
Eric Huss [Mon, 25 Jan 2021 20:28:29 +0000 (12:28 -0800)]
tidy: Remove cargo check.

The cargo check was checking that every dependency had an `extern crate`.
The compiler has not used `extern crate` in a long time (edition 2018).
The test was broken (the call to `!super::filter_dirs(path)` was backwards).
This just removes it since it is no longer valid.

3 years agolibtest: Store pending timeouts in a deque
Anders Kaseorg [Mon, 25 Jan 2021 20:19:25 +0000 (12:19 -0800)]
libtest: Store pending timeouts in a deque

This reduces the total complexity of checking timeouts from quadratic
to linear, and should also fix an unwrap of None on completion of an
already timed-out test.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
3 years agoThis should address issue 81294.
Felix S. Klock II [Mon, 25 Jan 2021 19:37:27 +0000 (14:37 -0500)]
This should address issue 81294.

(No test added. The relevant test *is* ui/panic-handler/weak-lang-item.rs, and this change should make it less flaky.)

3 years agoAuto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser
bors [Mon, 25 Jan 2021 19:03:37 +0000 (19:03 +0000)]
Auto merge of #68828 - oli-obk:inline_cycle, r=wesleywiser

Prevent query cycles in the MIR inliner

r? `@eddyb` `@wesleywiser`

cc `@rust-lang/wg-mir-opt`

The general design is that we have a new query that is run on the `validated_mir` instead of on the `optimized_mir`. That query is forced before going into the optimization pipeline, so as to not try to read from a stolen MIR.

The query should not be cached cross crate, as you should never call it for items from other crates. By its very design calls into other crates can never cause query cycles.

This is a pessimistic approach to inlining, since we strictly have more calls in the `validated_mir` than we have in `optimized_mir`, but that's not a problem imo.

3 years agorustdoc: Document CommonMark extensions.
Eric Huss [Mon, 25 Jan 2021 19:00:02 +0000 (11:00 -0800)]
rustdoc: Document CommonMark extensions.

3 years agoAuto merge of #81375 - RalfJung:miri, r=RalfJung
bors [Mon, 25 Jan 2021 15:33:17 +0000 (15:33 +0000)]
Auto merge of #81375 - RalfJung:miri, r=RalfJung

update Miri

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

3 years agoAdd tracking issue
Miguel Ojeda [Mon, 25 Jan 2021 13:58:09 +0000 (14:58 +0100)]
Add tracking issue

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
3 years agoLink the reference about undefined behavior
Miguel Ojeda [Mon, 25 Jan 2021 13:53:19 +0000 (14:53 +0100)]
Link the reference about undefined behavior

Suggested-by: Mara Bos <m-ou.se@m-ou.se>
Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
3 years agoAuto merge of #81380 - pietroalbini:cargo-pgo-lockfile, r=Mark-Simulacrum
bors [Mon, 25 Jan 2021 12:38:03 +0000 (12:38 +0000)]
Auto merge of #81380 - pietroalbini:cargo-pgo-lockfile, r=Mark-Simulacrum

Use the monorepo's lockfile when building cargo for PGO profiling

Fixes https://github.com/rust-lang/rust/issues/81378. The description of the problem and the reasoning for the fix is in the source code comments.

r? `@Mark-Simulacrum`

3 years agoci: use the monorepo's lockfile when building cargo for pgo profiling
Pietro Albini [Mon, 25 Jan 2021 12:33:24 +0000 (13:33 +0100)]
ci: use the monorepo's lockfile when building cargo for pgo profiling

3 years agoupdate Miri
Ralf Jung [Mon, 25 Jan 2021 10:42:38 +0000 (11:42 +0100)]
update Miri

3 years agoIgnore a test on wasm, because that changes landing pads
oli [Mon, 25 Jan 2021 09:34:33 +0000 (09:34 +0000)]
Ignore a test on wasm, because that changes landing pads

3 years agoFix some bugs reported by eslint
Guillaume Gomez [Sat, 23 Jan 2021 13:55:24 +0000 (14:55 +0100)]
Fix some bugs reported by eslint

3 years agoAccount for generics when suggesting bound
Esteban Küber [Tue, 19 Jan 2021 20:44:49 +0000 (12:44 -0800)]
Account for generics when suggesting bound

Fix #81175.

3 years agorustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry
Tyson Nottingham [Mon, 25 Jan 2021 05:23:38 +0000 (21:23 -0800)]
rustc_codegen_ssa: use wall time for codegen_to_LLVM_IR time-passes entry

Use elapsed wall time spent on codegen_to_LLVM_IR for all CGUs as a
whole, rather than the sum for each CGU (the distinction matters for
parallel builds, where some CGUs are processed in parallel).

3 years agoIgnore test on 32-bit architectures
Camelid [Mon, 25 Jan 2021 03:38:10 +0000 (19:38 -0800)]
Ignore test on 32-bit architectures

3 years agolibtest: Wait for test threads to exit after they report completion
Anders Kaseorg [Mon, 25 Jan 2021 02:16:31 +0000 (18:16 -0800)]
libtest: Wait for test threads to exit after they report completion

Otherwise we can miss bugs where a test reports that it succeeded but
then panics within a TLS destructor.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
3 years agoAuto merge of #81355 - jonas-schievink:rollup-vpaadij, r=jonas-schievink
bors [Sun, 24 Jan 2021 23:04:15 +0000 (23:04 +0000)]
Auto merge of #81355 - jonas-schievink:rollup-vpaadij, r=jonas-schievink

Rollup of 14 pull requests

Successful merges:

 - #75180 (Implement Error for &(impl Error))
 - #78578 (Permit mutable references in all const contexts)
 - #79174 (Make std::future a re-export of core::future)
 - #79884 (Replace magic numbers with existing constants)
 - #80855 (Expand assert!(expr, args..) to include $crate for hygiene on 2021.)
 - #80933 (Fix sysroot option not being honored across rustc)
 - #81259 (Replace version_check dependency with own version parsing code)
 - #81264 (Add unstable option to control doctest run directory)
 - #81279 (Small refactor in typeck)
 - #81297 (Don't provide backend_optimization_level query for extern crates)
 - #81302 (Fix rendering of stabilization version for trait implementors)
 - #81310 (Do not mark unit variants as used when in path pattern)
 - #81320 (Make bad shlex parsing a pretty error)
 - #81338 (Clean up `dominators_given_rpo`)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoRollup merge of #81338 - bugadani:dominator-cleanup, r=davidtwco
Jonas Schievink [Sun, 24 Jan 2021 21:10:10 +0000 (22:10 +0100)]
Rollup merge of #81338 - bugadani:dominator-cleanup, r=davidtwco

Clean up `dominators_given_rpo`

3 years agoRollup merge of #81320 - CraftSpider:jsondoc-errors, r=jyn514
Jonas Schievink [Sun, 24 Jan 2021 21:10:08 +0000 (22:10 +0100)]
Rollup merge of #81320 - CraftSpider:jsondoc-errors, r=jyn514

Make bad shlex parsing a pretty error

Closes #81319

Old Output:
<details><summary>Backtrace</summary>
<p>

```
thread 'main' panicked at 'called `Option::unwrap()` on a `None` value', src\too
ls\jsondocck\src\main.rs:152:81
stack backtrace:
   0:     0x7ff79a011405 - std::backtrace_rs::backtrace::dbghelp::trace
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\..\..\backtrace\src\backtrace\dbghelp.rs:98
   1:     0x7ff79a011405 - std::backtrace_rs::backtrace::trace_unsynchronized
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\..\..\backtrace\src\backtrace\mod.rs:66
   2:     0x7ff79a011405 - std::sys_common::backtrace::_print_fmt
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\sys_common\backtrace.rs:67
   3:     0x7ff79a011405 - std::sys_common::backtrace::_print::{{impl}}::fmt
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\sys_common\backtrace.rs:46
   4:     0x7ff79a026c7b - core::fmt::write
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\core\src\fmt\mod.rs:1078
   5:     0x7ff79a00e74d - std::io::Write::write_fmt<std::sys::windows::stdio::S
tderr>
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\io\mod.rs:1519
   6:     0x7ff79a01413d - std::sys_common::backtrace::_print
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\sys_common\backtrace.rs:49
   7:     0x7ff79a01413d - std::sys_common::backtrace::print
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\sys_common\backtrace.rs:36
   8:     0x7ff79a01413d - std::panicking::default_hook::{{closure}}
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:208
   9:     0x7ff79a013c4a - std::panicking::default_hook
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:225
  10:     0x7ff79a014a7e - std::panicking::rust_panic_with_hook
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:591
  11:     0x7ff79a014573 - std::panicking::begin_panic_handler::{{closure}}
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:495
  12:     0x7ff79a011ddf - std::sys_common::backtrace::__rust_end_short_backtrac
e<closure-0,!>
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\sys_common\backtrace.rs:141
  13:     0x7ff79a0144f9 - std::panicking::begin_panic_handler
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:493
  14:     0x7ff79a025230 - core::panicking::panic_fmt
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\core\src\panicking.rs:92
  15:     0x7ff79a02517c - core::panicking::panic
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\core\src\panicking.rs:50
  16:     0x7ff799f5245f - indexmap::map::core::raw::<impl indexmap::map::core::
IndexMapCore<K,V>>::get_index_of::had34e726f99bd999
  17:     0x7ff799f48fea - std::sys_common::backtrace::__rust_begin_short_backtr
ace::h1ac92efa44350e74
  18:     0x7ff799f41015 - std::rt::lang_start::{{closure}}::hdfe733a6a1ad9a18
  19:     0x7ff79a014c34 - core::ops::function::impls::{{impl}}::call_once
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\library\core\src\ops\function.rs:280
  20:     0x7ff79a014c34 - std::panicking::try::do_call
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:379
  21:     0x7ff79a014c34 - std::panicking::try
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panicking.rs:343
  22:     0x7ff79a014c34 - std::panic::catch_unwind
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\panic.rs:396
  23:     0x7ff79a014c34 - std::rt::lang_start_internal
                               at /rustc/05b6023675d77979637b04a350c85903fbf5925
7\/library\std\src\rt.rs:51
  24:     0x7ff799f536a7 - main
  25:     0x7ff79a02d788 - invoke_main
                               at d:\A01\_work\6\s\src\vctools\crt\vcstartup\src
\startup\exe_common.inl:78
  26:     0x7ff79a02d788 - __scrt_common_main_seh
                               at d:\A01\_work\6\s\src\vctools\crt\vcstartup\src
\startup\exe_common.inl:288
  27:     0x7ffe6bf47034 - BaseThreadInitThunk
  28:     0x7ffe6c89d241 - RtlUserThreadStart
```

</p>
</details>

New Output:
```
Invalid command: Invalid arguments to shlex::split: ` - "$foo` on line 26
```

I've hit this a couple times, makes debugging a little nicer.

3 years agoRollup merge of #81310 - tmiasko:in-pattern, r=petrochenkov
Jonas Schievink [Sun, 24 Jan 2021 21:10:06 +0000 (22:10 +0100)]
Rollup merge of #81310 - tmiasko:in-pattern, r=petrochenkov

Do not mark unit variants as used when in path pattern

Record that we are processing a pattern so that code responsible for
handling path resolution can correctly decide whether to mark it as
used or not.

Closes #76788.

3 years agoRollup merge of #81302 - LeSeulArtichaut:80777-trait-render, r=jyn514
Jonas Schievink [Sun, 24 Jan 2021 21:10:04 +0000 (22:10 +0100)]
Rollup merge of #81302 - LeSeulArtichaut:80777-trait-render, r=jyn514

Fix rendering of stabilization version for trait implementors

Rustdoc compares an item's stabilization version with its parent's to not render it if they are the same. Here, the implementor was compared with itself, resulting in the stabilization version never getting shown.

This probably needs a test.

Fixes #80777.
r? `@jyn514`

3 years agoRollup merge of #81297 - bjorn3:no_extern_backend_optimization_level_query_provider...
Jonas Schievink [Sun, 24 Jan 2021 21:10:02 +0000 (22:10 +0100)]
Rollup merge of #81297 - bjorn3:no_extern_backend_optimization_level_query_provider, r=cjgillot

Don't provide backend_optimization_level query for extern crates

Fixes #71291

3 years agoRollup merge of #81279 - bugadani:iter, r=davidtwco
Jonas Schievink [Sun, 24 Jan 2021 21:10:01 +0000 (22:10 +0100)]
Rollup merge of #81279 - bugadani:iter, r=davidtwco

Small refactor in typeck

 - `check_impl_items_against_trait` only queries and walks through associated items once
 - extracted function that reports errors
 - don't check specialization validity when trait item does not match
 - small additional cleanups

3 years agoRollup merge of #81264 - Swatinem:doctest-run-directory, r=jyn514
Jonas Schievink [Sun, 24 Jan 2021 21:09:59 +0000 (22:09 +0100)]
Rollup merge of #81264 - Swatinem:doctest-run-directory, r=jyn514

Add unstable option to control doctest run directory

This option will allow splitting the compile-time from the run-time
directory of doctest invocations and is one step to solve
https://github.com/rust-lang/cargo/issues/8993#issuecomment-760088944

r? `@jyn514`

3 years agoRollup merge of #81259 - est31:cfg_version, r=petrochenkov
Jonas Schievink [Sun, 24 Jan 2021 21:09:57 +0000 (22:09 +0100)]
Rollup merge of #81259 - est31:cfg_version, r=petrochenkov

Replace version_check dependency with own version parsing code

This gives compiler maintainers a better degree of control
over how the version gets parsed and is a good way to ensure
that there are no changes of behaviour in the future.

Also, issue a warning if the version is invalid instead of erroring
so that we stay forwards compatible with possible future changes
of the versioning scheme.

Last, this improves the present test a little.

Fixes #79436

r? `@petrochenkov`

3 years agoRollup merge of #80933 - rcvalle:fix-sysroot-option, r=nagisa
Jonas Schievink [Sun, 24 Jan 2021 21:09:55 +0000 (22:09 +0100)]
Rollup merge of #80933 - rcvalle:fix-sysroot-option, r=nagisa

Fix sysroot option not being honored across rustc

Change link_sanitizer_runtime() to check if the sanitizer library exists in the specified/session sysroot, and if it doesn't exist, use the default sysroot. (See #79253.)

3 years agoRollup merge of #80855 - m-ou-se:assert-2021, r=petrochenkov
Jonas Schievink [Sun, 24 Jan 2021 21:09:53 +0000 (22:09 +0100)]
Rollup merge of #80855 - m-ou-se:assert-2021, r=petrochenkov

Expand assert!(expr, args..) to include $crate for hygiene on 2021.

This makes `assert!(expr, args..)` properly hygienic in Rust 2021.

This is part of rust-lang/rfcs#3007, see #80162.

Before edition 2021, this was a breaking change, as `std::panic` and `core::panic` are different. In edition 2021 they will be identical, making it possible to apply proper hygiene here.

3 years agoRollup merge of #79884 - Digital-Chaos:replace-magic, r=m-ou-se
Jonas Schievink [Sun, 24 Jan 2021 21:09:51 +0000 (22:09 +0100)]
Rollup merge of #79884 - Digital-Chaos:replace-magic, r=m-ou-se

Replace magic numbers with existing constants

Replaced magic numbers in `library/core/src/time.rs` with predefined constants.

3 years agoRollup merge of #79174 - taiki-e:std-future, r=Mark-Simulacrum
Jonas Schievink [Sun, 24 Jan 2021 21:09:49 +0000 (22:09 +0100)]
Rollup merge of #79174 - taiki-e:std-future, r=Mark-Simulacrum

Make std::future a re-export of core::future

After 1a764a7ef59b9cb2eb31658625a6a7dacc3d819b, there are no `std::future`-specific items (except for `cfg(bootstrap)` items removed in 93eed402adbe9e7a532995500d50716d52eefee9). So, instead of defining `std` own module, we can re-export the `core::future` directly.

3 years agoRollup merge of #78578 - oli-obk:const_mut_refs, r=RalfJung
Jonas Schievink [Sun, 24 Jan 2021 21:09:48 +0000 (22:09 +0100)]
Rollup merge of #78578 - oli-obk:const_mut_refs, r=RalfJung

Permit mutable references in all const contexts

fixes #71212

cc `@rust-lang/wg-const-eval` `@christianpoveda`

3 years agoRollup merge of #75180 - KodrAus:feat/error-by-ref, r=m-ou-se
Jonas Schievink [Sun, 24 Jan 2021 21:09:45 +0000 (22:09 +0100)]
Rollup merge of #75180 - KodrAus:feat/error-by-ref, r=m-ou-se

Implement Error for &(impl Error)

Opening this up just to see what it breaks. It's unfortunate that `&(impl Error)` doesn't actually implement `Error`. If this direct approach doesn't work out then I'll try something different, like an `Error::by_ref` method.

**EDIT:** This is a super low-priority experiment so feel free to cancel it for more important crater runs! 🙂

-----

# Stabilization Report

## Why?

We've been working for the last few years to try "fix" the `Error` trait, which is probably one of the most fundamental in the whole standard library. One of its issues is that we commonly expect you to work with abstract errors through `dyn Trait`, but references and smart pointers over `dyn Trait` don't actually implement the `Error` trait. If you have a `&dyn Error` or a `Box<dyn Error>` you simply can't pass it to a method that wants a `impl Error`.

## What does this do?

This stabilizes the following trait impl:

```rust
impl<'a, T: Error + ?Sized + 'static> Error for &'a T;
```

This means that `&dyn Error` will now satisfy a `impl Error` bound.

It doesn't do anything with `Box<dyn Error>` directly. We discussed how we could do `Box<dyn Error>` in the thread here (and elsewhere in the past), but it seems like we need something like lattice-based specialization or a sprinkling of snowflake compiler magic to make that work. Having said that, with this new impl you _can_ now get a `impl Error` from a `Box<dyn Error>`  by dereferencing it.

## What breaks?

A crater run revealed a few crates broke with something like the following:

```rust
// where e: &'short &'long dyn Error
err.source()
```

previously we'd auto-deref that `&'short &'long dyn Error` to return a `Option<&'long dyn Error>` from `source`, but now will call directly on `&'short impl Error`, so will return a `Option<&'short dyn Error>`. The fix is to manually deref:

```rust
// where e: &'short &'long dyn Error
(*err).source()
```

In the recent Libs meeting we considered this acceptable breakage.

3 years agoAuto merge of #81337 - petrochenkov:kvcollect, r=Aaron1011
bors [Sun, 24 Jan 2021 20:09:18 +0000 (20:09 +0000)]
Auto merge of #81337 - petrochenkov:kvcollect, r=Aaron1011

parser: Collect tokens for values in key-value attributes

Fixes #81208 which happens when we parse the attribute value for the second time with an overridden span to synthesize tokens.

It also may be faster to collect tokens instead of re-synthesizing them.

3 years agoFix spelling in documentation for error E0207
Joakim Åkerblom [Sun, 24 Jan 2021 19:31:42 +0000 (20:31 +0100)]
Fix spelling in documentation for error E0207

I have trouble parsing the the wording "type parameter parameter".

3 years agoparser: Collect tokens for values in key-value attributes
Vadim Petrochenkov [Sun, 24 Jan 2021 13:41:12 +0000 (16:41 +0300)]
parser: Collect tokens for values in key-value attributes

3 years agoOnly call span.rust_2021() when necessary.
Mara Bos [Sun, 24 Jan 2021 13:15:15 +0000 (14:15 +0100)]
Only call span.rust_2021() when necessary.

3 years agoAuto merge of #81250 - sivadeilra:remove_xp_compat, r=joshtriplett,m-ou-se
bors [Sun, 24 Jan 2021 12:34:08 +0000 (12:34 +0000)]
Auto merge of #81250 - sivadeilra:remove_xp_compat, r=joshtriplett,m-ou-se

Remove delay-binding for Win XP and Vista

The minimum supported Windows version is now Windows 7. Windows XP
and Windows Vista are no longer supported; both are already broken, and
require extra steps to use.

This commit removes the delayed-binding support for Windows API
functions that are present on all supported Windows targets. This has
several benefits: Removes needless complexity. Removes a load and
dynamic call on hot paths in mutex acquire / release. This may have
performance benefits.

* "Drop official support for Windows XP"
  https://github.com/rust-lang/compiler-team/issues/378

* "Firefox has ended support for Windows XP and Vista"
  https://support.mozilla.org/en-US/kb/end-support-windows-xp-and-vista

3 years agoClean up dominators_given_rpo
Dániel Buga [Sun, 24 Jan 2021 12:32:18 +0000 (13:32 +0100)]
Clean up dominators_given_rpo

3 years agoAuto merge of #80838 - nagisa:nagisa/stack-probe-type, r=cuviper
bors [Sun, 24 Jan 2021 09:44:42 +0000 (09:44 +0000)]
Auto merge of #80838 - nagisa:nagisa/stack-probe-type, r=cuviper

Target stack-probe support configurable finely

This adds capability to configure the target's stack probe support in a
more precise manner than just on/off. In particular now we allow
choosing between always inline-asm, always call or either one of those
depending on the LLVM version.

Note that this removes the ability to turn off the generation of the
stack-probe attribute. This is valid to replace it with inline-asm for all targets because
`probe-stack="inline-asm"` will not generate any machine code on targets
that do not currently support stack probes. This makes support for stack
probes on targets that don't have any right now automatic with LLVM
upgrades in the future.

(This is valid to do based on the fact that clang unconditionally sets
this attribute when `-fstack-clash-protection` is used, AFAICT)

cc #77885
r? `@cuviper`

3 years agoAuto merge of #80919 - cjgillot:defkey-span, r=oli-obk
bors [Sun, 24 Jan 2021 06:51:17 +0000 (06:51 +0000)]
Auto merge of #80919 - cjgillot:defkey-span, r=oli-obk

Generate metadata by iterating on DefId instead of traversing the HIR tree 1/N

Sample from #80347.

3 years agofmt
Rune Tynan [Sun, 24 Jan 2021 04:17:31 +0000 (23:17 -0500)]
fmt

3 years agoMake bad shlex parsing a pretty error
Rune Tynan [Sun, 24 Jan 2021 04:03:01 +0000 (23:03 -0500)]
Make bad shlex parsing a pretty error

3 years agoAuto merge of #80594 - bjorn3:abi_refactor3, r=petrochenkov
bors [Sun, 24 Jan 2021 02:59:14 +0000 (02:59 +0000)]
Auto merge of #80594 - bjorn3:abi_refactor3, r=petrochenkov

Various ABI refactorings

This includes changes to the rust abi and various refactorings that will hopefully make it easier to use the abi handling infrastructure of rustc in cg_clif. There are several refactorings that I haven't done. I am opening this draft PR to check that I haven't broken any non x86_64 architectures.

r? `@ghost`

3 years agoReplace version_check dependency with own version parsing code
est31 [Fri, 22 Jan 2021 05:57:33 +0000 (06:57 +0100)]
Replace version_check dependency with own version parsing code

This gives compiler maintainers a better degree of control
over how the version gets parsed and is a good way to ensure
that there are no changes of behaviour in the future.

Also, issue a warning if the version is invalid instead of erroring
so that we stay forwards compatible with possible future changes
of the versioning scheme.

Last, this improves the present test a little.

3 years agoAuto merge of #79811 - Aaron1011:expn-data-disambig, r=petrochenkov
bors [Sun, 24 Jan 2021 00:10:20 +0000 (00:10 +0000)]
Auto merge of #79811 - Aaron1011:expn-data-disambig, r=petrochenkov

Add disambiugator to ExpnData

I still need to write a bunch of comments. Opening to see how bad the perf impact is.

cc https://github.com/rust-lang/rust/issues/79560

3 years agoAuto merge of #81304 - jonas-schievink:rollup-d9kuugm, r=jonas-schievink
bors [Sat, 23 Jan 2021 21:13:14 +0000 (21:13 +0000)]
Auto merge of #81304 - jonas-schievink:rollup-d9kuugm, r=jonas-schievink

Rollup of 15 pull requests

Successful merges:

 - #79841 (More clear documentation for NonNull<T>)
 - #81072 (PlaceRef::ty: use method call syntax)
 - #81130 (Edit rustc_middle::dep_graph module documentation)
 - #81170 (Avoid hash_slice in VecDeque's Hash implementation)
 - #81243 (mir: Improve size_of handling when arg is unsized)
 - #81245 (Update cargo)
 - #81249 (Lower closure prototype after its body.)
 - #81252 (Add more self-profile info to rustc_resolve)
 - #81275 (Fix <unknown> queries and add more timing info to render_html)
 - #81281 (Inline methods of Path and OsString)
 - #81283 (Note library tracking issue template in tracking issue template.)
 - #81285 (Remove special casing of rustdoc in rustc_lint)
 - #81288 (rustdoc: Fix visibility of trait and impl items)
 - #81298 (replace RefCell with Cell in FnCtxt)
 - #81301 (Fix small typo)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup

3 years agoFix rendering of stabilization version for trait implementors
LeSeulArtichaut [Sat, 23 Jan 2021 17:41:04 +0000 (18:41 +0100)]
Fix rendering of stabilization version for trait implementors

3 years agoAdd disambiugator to ExpnData
Aaron Hill [Mon, 7 Dec 2020 22:44:40 +0000 (17:44 -0500)]
Add disambiugator to ExpnData

Due to macro expansion, its possible to end up with two distinct
`ExpnId`s that have the same `ExpnData` contents. This violates the
contract of `HashStable`, since two unequal `ExpnId`s will end up with
equal `Fingerprint`s.

This commit adds a `disambiguator` field to `ExpnData`, which is used to
force two otherwise-equivalent `ExpnData`s to be distinct.

3 years agoRollup merge of #81301 - davidgu:patch-1, r=jonas-schievink
Jonas Schievink [Sat, 23 Jan 2021 19:16:19 +0000 (20:16 +0100)]
Rollup merge of #81301 - davidgu:patch-1, r=jonas-schievink

Fix small typo

Fractional part of `12.34e56` seems to be incorrectly stated as '45' and not '34'

3 years agoRollup merge of #81298 - lcnr:big-money-big-prices, r=oli-obk
Jonas Schievink [Sat, 23 Jan 2021 19:16:17 +0000 (20:16 +0100)]
Rollup merge of #81298 - lcnr:big-money-big-prices, r=oli-obk

replace RefCell with Cell in FnCtxt

small cleanup

3 years agoRollup merge of #81288 - camelid:fix-trait-item-vis, r=jyn514
Jonas Schievink [Sat, 23 Jan 2021 19:16:16 +0000 (20:16 +0100)]
Rollup merge of #81288 - camelid:fix-trait-item-vis, r=jyn514

rustdoc: Fix visibility of trait and impl items

Fixes #81274.

r? `@jyn514`

3 years agoRollup merge of #81283 - m-ou-se:tracking-issue-note, r=Mark-Simulacrum
Jonas Schievink [Sat, 23 Jan 2021 19:16:14 +0000 (20:16 +0100)]
Rollup merge of #81283 - m-ou-se:tracking-issue-note, r=Mark-Simulacrum

Note library tracking issue template in tracking issue template.

3 years agoRollup merge of #81281 - a1phyr:inline_path, r=dtolnay
Jonas Schievink [Sat, 23 Jan 2021 19:16:12 +0000 (20:16 +0100)]
Rollup merge of #81281 - a1phyr:inline_path, r=dtolnay

Inline methods of Path and OsString

These methods are not generic, and therefore aren't candidates for cross-crate inlining without an `#[inline]` attribute.

3 years agoRollup merge of #81275 - jyn514:time-render, r=wesleywiser
Jonas Schievink [Sat, 23 Jan 2021 19:16:10 +0000 (20:16 +0100)]
Rollup merge of #81275 - jyn514:time-render, r=wesleywiser

Fix <unknown> queries and add more timing info to render_html

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

##  Fix `<unknown>` queries

This happened because `alloc_query_strings` was never called.

##  Add more timing info to render_html

This still has some issues I'm not sure how to work out:

- `create_renderer` and `renderer_after_krate` aren't shown by default.
  I want something like `verbose_generic_activity_with_arg`, but it doesn't exist.

I'm also not sure how to show activities that aren't on by default - I
tried `-Z self-profile -Z self-profile-args=all`, but it didn't show up.

r? `@wesleywiser`

3 years agoRollup merge of #81252 - jyn514:resolve-timing, r=petrochenkov
Jonas Schievink [Sat, 23 Jan 2021 19:16:09 +0000 (20:16 +0100)]
Rollup merge of #81252 - jyn514:resolve-timing, r=petrochenkov

Add more self-profile info to rustc_resolve

The idea is to help me find out where the time is being spent in compiling the docs for `windows-rs`: https://github.com/microsoft/windows-rs/issues/420#issuecomment-764991646

3 years agoRollup merge of #81249 - cjgillot:issue-79537, r=oli-obk
Jonas Schievink [Sat, 23 Jan 2021 19:16:07 +0000 (20:16 +0100)]
Rollup merge of #81249 - cjgillot:issue-79537, r=oli-obk

Lower closure prototype after its body.

Fixes #79537.

r? `@Mark-Simulacrum`

3 years agoRollup merge of #81245 - ehuss:update-cargo, r=ehuss
Jonas Schievink [Sat, 23 Jan 2021 19:16:05 +0000 (20:16 +0100)]
Rollup merge of #81245 - ehuss:update-cargo, r=ehuss

Update cargo

5 commits in a73e5b7d567c3036b296fc6b33ed52c5edcd882e..783bc43c660bf39c1e562c8c429b32078ad3099b
2021-01-12 23:45:39 +0000 to 2021-01-20 19:02:26 +0000
- Fix some issues with `cargo doc` and the new feature resolver. (rust-lang/cargo#9077)
- Implement support for rust-version field in project metadata (rust-lang/cargo#8037)
- Fix a bug in Cargo's cyclic dep graph detection (rust-lang/cargo#9075)
- Typo correction: artifcats -&gt; artifacts (rust-lang/cargo#9081)
- Remove stray backtick from doc (rust-lang/cargo#9079)

3 years agoRollup merge of #81243 - osa1:fix_80742_2, r=RalfJung
Jonas Schievink [Sat, 23 Jan 2021 19:16:04 +0000 (20:16 +0100)]
Rollup merge of #81243 - osa1:fix_80742_2, r=RalfJung

mir: Improve size_of handling when arg is unsized

As discussed on Zulip with `@RalfJung.`

3 years agoRollup merge of #81170 - xfix:vecdeque-bug-fix, r=sfackler
Jonas Schievink [Sat, 23 Jan 2021 19:16:02 +0000 (20:16 +0100)]
Rollup merge of #81170 - xfix:vecdeque-bug-fix, r=sfackler

Avoid hash_slice in VecDeque's Hash implementation

Fixes #80303.

3 years agoRollup merge of #81130 - pierwill:edit-depnode, r=jyn514
Jonas Schievink [Sat, 23 Jan 2021 19:16:00 +0000 (20:16 +0100)]
Rollup merge of #81130 - pierwill:edit-depnode, r=jyn514

Edit rustc_middle::dep_graph module documentation

This is similar to work approved and then closed in https://github.com/rust-lang/rust/pull/80325 due to a bad rebase.

3 years agoRollup merge of #81072 - RalfJung:place-ref-ty, r=oli-obk
Jonas Schievink [Sat, 23 Jan 2021 19:15:59 +0000 (20:15 +0100)]
Rollup merge of #81072 - RalfJung:place-ref-ty, r=oli-obk

PlaceRef::ty: use method call syntax

3 years agoRollup merge of #79841 - fintelia:patch-6, r=kennytm
Jonas Schievink [Sat, 23 Jan 2021 19:15:54 +0000 (20:15 +0100)]
Rollup merge of #79841 - fintelia:patch-6, r=kennytm

More clear documentation for NonNull<T>

Rephrase and hopefully clarify the discussion of covariance in `NonNull<T>` documentation.

I'm very much not an expert so someone should definitely double check the correctness of what I'm saying. At the same time, the new language makes more sense to me, so hopefully it also is more logical to others whose knowledge of covariance basically begins and ends with the [Rustonomicon chapter](https://doc.rust-lang.org/nomicon/subtyping.html).

Related to #48929.

3 years agoAdd option to control doctest run directory
Arpad Borsos [Fri, 22 Jan 2021 09:54:53 +0000 (10:54 +0100)]
Add option to control doctest run directory

This option will allow splitting the compile-time from the run-time
directory of doctest invocations and is one step to solve
https://github.com/rust-lang/cargo/issues/8993#issuecomment-760088944

3 years agoFix small typo
David [Sat, 23 Jan 2021 17:31:40 +0000 (12:31 -0500)]
Fix small typo

3 years agoCleanup `render_stability_since_raw` to remove code duplication
LeSeulArtichaut [Sat, 23 Jan 2021 17:05:59 +0000 (18:05 +0100)]
Cleanup `render_stability_since_raw` to remove code duplication

3 years agoFix review comments
bjorn3 [Sat, 23 Jan 2021 16:55:39 +0000 (17:55 +0100)]
Fix review comments

3 years agoMove test to mir-opt so we actually see that no inlining is happening
oli [Sat, 23 Jan 2021 13:49:20 +0000 (13:49 +0000)]
Move test to mir-opt so we actually see that no inlining is happening

3 years agoLeave some notes for future changes to the MIR opt level of mir inlining
oli [Mon, 11 Jan 2021 11:21:24 +0000 (11:21 +0000)]
Leave some notes for future changes to the MIR opt level of mir inlining

3 years agoAllow libcore to be built with MIR inlining
oli [Wed, 30 Dec 2020 02:09:29 +0000 (02:09 +0000)]
Allow libcore to be built with MIR inlining

Inlining caused new lints to get emitted, so we silence those lints now that we actually can.

3 years agoMake sure that const prop does not produce unsilenceable lints after inlining
oli [Wed, 30 Dec 2020 02:04:52 +0000 (02:04 +0000)]
Make sure that const prop does not produce unsilenceable lints after inlining

3 years agoPrevent query cycles during inlining
oli [Tue, 29 Dec 2020 16:21:52 +0000 (16:21 +0000)]
Prevent query cycles during inlining