]> git.lizzy.rs Git - rust.git/log
rust.git
3 years agoRollup merge of #82233 - ijackson:try-block-type-test, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:48 +0000 (15:26 +0900)]
Rollup merge of #82233 - ijackson:try-block-type-test, r=Mark-Simulacrum

try-back-block-type test: Use TryFromSliceError for From test

Using `i32` is rather fragile because it has many implementations.  Recently in an early draft of another MR (#82228) I did something that introduced a new `i32 as From<something>` impl and this test broke.

TryFromSliceError is nice because it doesn't seem likely to grow new conversions.  We still have one conversion, from Infallible.

My other MR is going to be reworked and won't need this any more but having done it I thought I would submit it rather than just throw it away.  Sorry for the tiny MR.

3 years agoRollup merge of #82229 - estebank:issue-templace, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:47 +0000 (15:26 +0900)]
Rollup merge of #82229 - estebank:issue-templace, r=Mark-Simulacrum

Add [A-diagnostics] bug report template

3 years agoRollup merge of #82181 - GuillaumeGomez:es5-checks-ci, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:46 +0000 (15:26 +0900)]
Rollup merge of #82181 - GuillaumeGomez:es5-checks-ci, r=Mark-Simulacrum

Add check for ES5 in CI

Follow-up of #82145.

r? ```@Mark-Simulacrum```

3 years agoRollup merge of #82177 - rylev:no-delete-bootstrap-windows, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:45 +0000 (15:26 +0900)]
Rollup merge of #82177 - rylev:no-delete-bootstrap-windows, r=Mark-Simulacrum

Do not delete bootstrap.exe on Windows during clean

Windows does not allow deleting currently running executables.

This an addition to ```@jyn514's``` change in https://github.com/rust-lang/rust/pull/80574.

3 years agoRollup merge of #82154 - CDirkx:ip-changelog, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:44 +0000 (15:26 +0900)]
Rollup merge of #82154 - CDirkx:ip-changelog, r=Mark-Simulacrum

Update RELEASES.md 1.50 to include methods stabilized in #79342

I noticed that #79342 was missing from the release notes for 1.50.

3 years agoRollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r=shepmaster
Yuki Okushi [Sun, 21 Feb 2021 06:26:42 +0000 (15:26 +0900)]
Rollup merge of #81966 - deg4uss3r:degausser/aarch64_apple_ios_sim, r=shepmaster

Add new `rustc` target for Arm64 machines that can target the iphonesimulator

This PR lands a new target (`aarch64-apple-ios-sim`) that targets arm64 iphone simulator, previously unreachable from Apple Silicon machines.

resolves #81632

r? `@shepmaster`

3 years agoRollup merge of #81833 - the8472:parallel-bootstrap-rustfmt, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:41 +0000 (15:26 +0900)]
Rollup merge of #81833 - the8472:parallel-bootstrap-rustfmt, r=Mark-Simulacrum

parallelize x.py test tidy

Running tidy on individual commits when rewriting git history was somewhat of an annoyance, so I have parallelized it a bit.

running `time ./x.py test tidy` with warm IO caches:

old:

```
real 0m11.123s
user 0m14.495s
sys 0m5.227s
```

new:

```
real 0m1.834s
user 0m13.545s
sys 0m3.094s
```

There's further room for improvement (<0.9s should be feasible) but that would require bigger changes.

3 years agoRollup merge of #81706 - SkiFire13:document-binaryheap-unsafe, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:40 +0000 (15:26 +0900)]
Rollup merge of #81706 - SkiFire13:document-binaryheap-unsafe, r=Mark-Simulacrum

Document BinaryHeap unsafe functions

`BinaryHeap` contains some private safe functions but that are actually unsafe to call. This PR marks them `unsafe` and documents all the `unsafe` function calls inside them.

While doing this I might also have found a bug: some "SAFETY" comments in `sift_down_range` and `sift_down_to_bottom` are valid only if you assume that `child` doesn't overflow. However it may overflow if `end > isize::MAX` which can be true for ZSTs (but I think only for them). I guess the easiest fix would be to skip any sifting if `mem::size_of::<T> == 0`.

Probably conflicts with #81127 but solving the eventual merge conflict should be pretty easy.

3 years agoRollup merge of #81300 - ssomers:btree_cleanup_leak_tests, r=Mark-Simulacrum
Yuki Okushi [Sun, 21 Feb 2021 06:26:36 +0000 (15:26 +0900)]
Rollup merge of #81300 - ssomers:btree_cleanup_leak_tests, r=Mark-Simulacrum

BTree: share panicky test code & test panic during clear, clone

Bases almost all tests of panic on the same, richer definition, and extends it to cloning to test panic during clone.

r? ```@Mark-Simulacrum```

3 years agoAuto merge of #79100 - a1phyr:better_assert_eq, r=m-ou-se
bors [Sun, 21 Feb 2021 05:41:09 +0000 (05:41 +0000)]
Auto merge of #79100 - a1phyr:better_assert_eq, r=m-ou-se

Improve assert_eq! and assert_ne!

This PR improves `assert_eq!` and `assert_ne!` by moving the panicking code in an external function.

It does not change the fast path, but the move of the formatting in the cold path (the panic) may have a positive effect on in instruction cache use and with inlining.

Moreover, the use of trait objects instead of generic may improve compile times for `assert_eq!`-heavy code.

Godbolt link: ~~https://rust.godbolt.org/z/TYa9MT~~ \
Updated: https://rust.godbolt.org/z/bzE84x

3 years agorustdoc: Remove unnecessary `Cell` around `param_env`
Camelid [Sun, 21 Feb 2021 01:12:22 +0000 (17:12 -0800)]
rustdoc: Remove unnecessary `Cell` around `param_env`

3 years agoUse has for non-regexes
Michael Howell [Sun, 21 Feb 2021 00:51:41 +0000 (17:51 -0700)]
Use has for non-regexes

3 years agoFix formatting for description rustdoc UI tests
Michael Howell [Sun, 21 Feb 2021 00:50:01 +0000 (17:50 -0700)]
Fix formatting for description rustdoc UI tests

3 years agoAdd rustdoc UI tests for new description behaviour
Michael Howell [Sun, 21 Feb 2021 00:38:41 +0000 (17:38 -0700)]
Add rustdoc UI tests for new description behaviour

3 years agoRevert changes to all.html
Michael Howell [Sun, 21 Feb 2021 00:26:05 +0000 (17:26 -0700)]
Revert changes to all.html

This code wasn't actually working, and trying to SEO optimize that page is pointless anyway.

3 years agoAuto merge of #82253 - RalfJung:miri, r=RalfJung
bors [Sun, 21 Feb 2021 00:19:45 +0000 (00:19 +0000)]
Auto merge of #82253 - RalfJung:miri, r=RalfJung

update Miri

Fixes Miri breakage (no issue was created as the toolstate tracking is currently broken: https://github.com/rust-lang/rust/issues/82254)

3 years agotest: Print test name only once on timeout
Tomasz Miąsko [Sun, 21 Feb 2021 00:00:00 +0000 (00:00 +0000)]
test: Print test name only once on timeout

Pretty formatter when using multiple test threads displays test name twice on
timeout event. This implicitly suggest that those are two different events,
while in fact they are always printed together.

Print test name only once.

Before:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) ... test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```

After:

```
running 3 tests
test src/lib.rs - c (line 16) ... ok
test src/lib.rs - a (line 3) ... ok
test src/lib.rs - b (line 9) has been running for over 60 seconds
test src/lib.rs - b (line 9) ... ok
```

3 years agoCut off plain text descriptions after headers
Michael Howell [Sat, 20 Feb 2021 23:45:56 +0000 (16:45 -0700)]
Cut off plain text descriptions after headers

Before:

    The Rust Standard LibraryThe Rust Standard Library is the foundation of portable Rust software, a set of minimal and battle-tested shared abstractions for the broader Rust ecosystem. It offers core types, like `Vec<T>` and `Option<T>`, library-defined operations on language primitives, standard macros, I/O and multithreading, among many other things.

After:

    The Rust Standard Library

3 years agoUse the first paragraph, instead of cookie-cutter text, for rustdoc descriptions
Michael Howell [Sat, 20 Feb 2021 21:43:25 +0000 (14:43 -0700)]
Use the first paragraph, instead of cookie-cutter text, for rustdoc descriptions

Fixes #82283

3 years agoFix some Python2->3 error in publish_toolstate.py by type-checking it
kennytm [Sat, 20 Feb 2021 18:23:46 +0000 (02:23 +0800)]
Fix some Python2->3 error in publish_toolstate.py by type-checking it

3 years agoAdd A-diagnostics bug report template
Esteban Küber [Wed, 17 Feb 2021 17:47:31 +0000 (09:47 -0800)]
Add A-diagnostics bug report template

3 years agoMove print_query_stack to rustc_query_system.
Camille GILLOT [Sat, 28 Nov 2020 23:39:34 +0000 (00:39 +0100)]
Move print_query_stack to rustc_query_system.

3 years agoMove report_cycle to rustc_query_system.
Camille GILLOT [Sat, 28 Nov 2020 23:21:56 +0000 (00:21 +0100)]
Move report_cycle to rustc_query_system.

The call to `ty::print::with_forced_impl_filename_line`
is done when constructing the description,
at the construction of the QueryStackFrame.

3 years agoUse the new name for `split-debuginfo`
Joshua Nelson [Wed, 17 Feb 2021 02:34:28 +0000 (21:34 -0500)]
Use the new name for `split-debuginfo`

3 years agoDon't apply semicolon in expressions from macros yet
Mark Rousskov [Sun, 14 Feb 2021 13:56:35 +0000 (08:56 -0500)]
Don't apply semicolon in expressions from macros yet

std_detect is still using this and as it's in a submodule updating it will be a
pain. We can catch this either after a stdarch submodule bump or just on the
next cycle.

3 years agoUpdate the bootstrap compiler
Joshua Nelson [Sat, 13 Feb 2021 23:05:07 +0000 (18:05 -0500)]
Update the bootstrap compiler

Note this does not change `core::derive` since it was merged after the
beta bump.

3 years agoremove redundant box wrapper
The8472 [Fri, 12 Feb 2021 20:27:16 +0000 (21:27 +0100)]
remove redundant box wrapper

3 years agolimit rustfmt parallelism by taking -j into account
The8472 [Sat, 20 Feb 2021 21:52:44 +0000 (22:52 +0100)]
limit rustfmt parallelism by taking -j into account

3 years agoparallelize x.py test tidy
The8472 [Sat, 6 Feb 2021 16:29:56 +0000 (17:29 +0100)]
parallelize x.py test tidy

old:

```
real 0m11.123s
user 0m14.495s
sys 0m5.227s
```

new:

```
real 0m2.767s
user 0m13.014s
sys 0m1.691s
```

3 years agoMove Query to rustc_query_system.
Camille GILLOT [Sat, 28 Nov 2020 21:48:05 +0000 (22:48 +0100)]
Move Query to rustc_query_system.

Rename it to QueryStackFrame and document a bit.

3 years agoDo not hold query key in Query.
Camille GILLOT [Sat, 26 Dec 2020 15:36:55 +0000 (16:36 +0100)]
Do not hold query key in Query.

3 years agoAccess the session directly from DepContext.
Camille GILLOT [Thu, 12 Nov 2020 19:48:37 +0000 (20:48 +0100)]
Access the session directly from DepContext.

3 years agoiOS simulator: pick the target based on the environment variable
Jan-Erik Rediger [Sun, 14 Feb 2021 15:33:03 +0000 (16:33 +0100)]
iOS simulator: pick the target based on the environment variable

LLVM picks the right things to put into the compiled object file based
on the target deployment version.
We need to communicate it through the target triple.
Only with that LLVM will use the right commands in the file to make it
look and behave like code compiled for the arm64 iOS simulator target.

3 years agoAuto merge of #82341 - GuillaumeGomez:rollup-t7y7tyg, r=GuillaumeGomez
bors [Sat, 20 Feb 2021 21:38:53 +0000 (21:38 +0000)]
Auto merge of #82341 - GuillaumeGomez:rollup-t7y7tyg, r=GuillaumeGomez

Rollup of 7 pull requests

Successful merges:

 - #80595 (`impl PartialEq<Punct> for char`; symmetry for #78636)
 - #81991 (Fix panic in 'remove semicolon' when types are not local)
 - #82176 (fix MIR fn-ptr pretty-printing)
 - #82244 (Keep consistency in example for Stdin StdinLock)
 - #82260 (rustc: Show ``@path`` usage in stable)
 - #82316 (Fix minor mistake in LTO docs.)
 - #82332 (Don't generate src link on dummy spans)

Failed merges:

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

3 years agoAdd FIXME for safety comments that are invalid when T is a ZST
Giacomo Stevanato [Fri, 12 Feb 2021 09:50:16 +0000 (10:50 +0100)]
Add FIXME for safety comments that are invalid when T is a ZST

3 years agoDocument BinaryHeap unsafe functions
Giacomo Stevanato [Wed, 3 Feb 2021 11:45:55 +0000 (12:45 +0100)]
Document BinaryHeap unsafe functions

3 years agoFix suggestion span and move suggestions into new subwindow.
Reese Williams [Sat, 20 Feb 2021 20:33:08 +0000 (15:33 -0500)]
Fix suggestion span and move suggestions into new subwindow.

3 years agoRollup merge of #82332 - GuillaumeGomez:no-src-link-on-dummy-spans, r=jyn514
Guillaume Gomez [Sat, 20 Feb 2021 19:37:04 +0000 (20:37 +0100)]
Rollup merge of #82332 - GuillaumeGomez:no-src-link-on-dummy-spans, r=jyn514

Don't generate src link on dummy spans

Just realized that the "auto trait impls" had `[src]` links were leading to the crate root because they were dummy spans. This PR fixes this issue.

cc `@jyn514`
r? `@camelid`

3 years agoRollup merge of #82316 - ehuss:lto-doc-fix, r=GuillaumeGomez
Guillaume Gomez [Sat, 20 Feb 2021 19:37:03 +0000 (20:37 +0100)]
Rollup merge of #82316 - ehuss:lto-doc-fix, r=GuillaumeGomez

Fix minor mistake in LTO docs.

`-C lto=true` isn't a valid option.

3 years agoRollup merge of #82260 - ojeda:rustc-argfile, r=jyn514
Guillaume Gomez [Sat, 20 Feb 2021 19:37:02 +0000 (20:37 +0100)]
Rollup merge of #82260 - ojeda:rustc-argfile, r=jyn514

rustc: Show `@path` usage in stable

The feature was stabilized in #66172, but the usage string was not updated to be shown.

3 years agoRollup merge of #82244 - pickfire:patch-6, r=dtolnay
Guillaume Gomez [Sat, 20 Feb 2021 19:37:01 +0000 (20:37 +0100)]
Rollup merge of #82244 - pickfire:patch-6, r=dtolnay

Keep consistency in example for Stdin StdinLock

Stdin uses handle whereas StdinLock uses stdin_lock, changed it to handle.

3 years agoRollup merge of #82176 - RalfJung:mir-fn-ptr-pretty, r=oli-obk
Guillaume Gomez [Sat, 20 Feb 2021 19:37:00 +0000 (20:37 +0100)]
Rollup merge of #82176 - RalfJung:mir-fn-ptr-pretty, r=oli-obk

fix MIR fn-ptr pretty-printing

An uninitialized function pointer would get printed as `{{uninit  fn()}` (notice the unbalanced parentheses), and a dangling fn ptr would ICE. This fixes both of that.

However, I have no idea how to add tests for this.

Also, I don't understand this MIR pretty-printing code. Somehow the print function `pretty_print_const_scalar` actually *returns* a transformed form of the const (but there is no doc comment explaining what is being returned); some match arms do `p!` while others do `self =`, and there's a wild mixture of `p!` and `write!`... all very mysterious and confusing.^^

r? ``@oli-obk``

3 years agoRollup merge of #81991 - osa1:issue81839, r=estebank
Guillaume Gomez [Sat, 20 Feb 2021 19:36:57 +0000 (20:36 +0100)]
Rollup merge of #81991 - osa1:issue81839, r=estebank

Fix panic in 'remove semicolon' when types are not local

It's not possible to check if removing a semicolon fixes the type error
when checking match arms and one or both of the last arm's and the
current arm's return types are imported "opaque" types. In these cases
we don't generate a "consider removing semicolon" suggestions.

Fixes #81839

---

I'm not sure how to add a test for this. I think the test would need at least two crates. Do we have any existing tests that do this so that I can take a look?

3 years agoRollup merge of #80595 - pthariensflame:patch-1, r=m-ou-se
Guillaume Gomez [Sat, 20 Feb 2021 19:36:54 +0000 (20:36 +0100)]
Rollup merge of #80595 - pthariensflame:patch-1, r=m-ou-se

`impl PartialEq<Punct> for char`; symmetry for #78636

Also fixes the "since" version of the original.

Pinging ``@dtolnay`` and ``@petrochenkov.``

3 years agoAuto merge of #70951 - cjgillot:anarchy, r=oli-obk
bors [Sat, 20 Feb 2021 18:58:05 +0000 (18:58 +0000)]
Auto merge of #70951 - cjgillot:anarchy, r=oli-obk

Move the query engine out of rustc_middle

The handling of queries is moved to a trait `QueryEngine`.
It replaces `query::Queries` in the `TyCtxt`, allowing to move the query engine out of librustc_middle.

There are 2 modes to access the query engine: through `TyCtxt` and dynamic dispatch,
or through a `QueryCtxt`. The `QueryCtxt` is  required for everything touching the `OnDiskCache`.

For now, I put it in librustc_incremental, which is very small.
This may not be the best place.

A significant part of the codegen time for librustc_middle is moved to the recipient crate.

This PR may require a perf run.

cc #65031
r? `@Zoxc`

3 years agoAdd test for no src links on dummy spans
Guillaume Gomez [Sat, 20 Feb 2021 14:06:20 +0000 (15:06 +0100)]
Add test for no src links on dummy spans

3 years agoDon't render [src] link on dummy spans
Guillaume Gomez [Sat, 20 Feb 2021 14:05:50 +0000 (15:05 +0100)]
Don't render [src] link on dummy spans

3 years agoall InterpError allocate now, so adjust alloc-error-check
Ralf Jung [Sat, 20 Feb 2021 18:01:25 +0000 (19:01 +0100)]
all InterpError allocate now, so adjust alloc-error-check

3 years agoupdate Miri
Ralf Jung [Sat, 20 Feb 2021 17:55:50 +0000 (18:55 +0100)]
update Miri

3 years agoMake "missing field" error message more natural
r00ster91 [Sat, 20 Feb 2021 17:32:02 +0000 (18:32 +0100)]
Make "missing field" error message more natural

3 years agoUpdate LLVM to pull in fixes to llvm-dwp
Simonas Kazlauskas [Wed, 17 Feb 2021 14:25:23 +0000 (16:25 +0200)]
Update LLVM to pull in fixes to llvm-dwp

Includes https://github.com/rust-lang/llvm-project/pull/90 in
particular.

3 years agoTest CU directory is the work_dir
Simonas Kazlauskas [Sun, 14 Feb 2021 15:49:55 +0000 (17:49 +0200)]
Test CU directory is the work_dir

Make sure that we don't regress setting of the CU directory to the
working directory.

3 years agomake `super_projection` take a `PlaceRef`
Henry Boisdequin [Sat, 20 Feb 2021 11:16:05 +0000 (16:46 +0530)]
make `super_projection` take a `PlaceRef`

3 years agofn ptr pretty printing: fall back to raw ptr printing
Ralf Jung [Sat, 20 Feb 2021 10:34:35 +0000 (11:34 +0100)]
fn ptr pretty printing: fall back to raw ptr printing

3 years agoAuto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk
bors [Sat, 20 Feb 2021 10:20:42 +0000 (10:20 +0000)]
Auto merge of #82124 - tmiasko:op-ty-ref, r=oli-obk

Pass large interpreter types by reference, not value

r? `@ghost`

3 years agoAuto merge of #81427 - klensy:eat-digits, r=m-ou-se
bors [Sat, 20 Feb 2021 07:31:43 +0000 (07:31 +0000)]
Auto merge of #81427 - klensy:eat-digits, r=m-ou-se

simplify eat_digits

Simplify eat_digits by checking values in iterator, plus decrease function size, by returning unchecked slices.

https://godbolt.org/z/cxjav4

3 years agoAuto merge of #78181 - GuillaumeGomez:sized-trait, r=jyn514
bors [Sat, 20 Feb 2021 04:35:58 +0000 (04:35 +0000)]
Auto merge of #78181 - GuillaumeGomez:sized-trait, r=jyn514

Add Sized trait display when implemented on type

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

I'm not too happy about the hack I had to add in here, however, it seems like the `Sized` trait is **very** special.

cc `@jyn514`
r? `@ollie27`

3 years agoFix minor mistake in LTO docs.
Eric Huss [Sat, 20 Feb 2021 03:34:46 +0000 (19:34 -0800)]
Fix minor mistake in LTO docs.

`-C lto=true` isn't a valid option.

3 years agoImplement using @set values
Nixon Enraght-Moony [Sat, 20 Feb 2021 01:47:17 +0000 (01:47 +0000)]
Implement using @set values

3 years ago`impl PartialEq<Punct> for char`; symmetry for #78636
Alexander Ronald Altman [Fri, 1 Jan 2021 19:40:00 +0000 (11:40 -0800)]
`impl PartialEq<Punct> for char`; symmetry for #78636

Also fixes the "since" version of the original.

3 years agoImplement @set
Nixon Enraght-Moony [Sat, 20 Feb 2021 01:25:09 +0000 (01:25 +0000)]
Implement @set

3 years agoLower condition of `if` expression before it's "then" block
Esteban Küber [Sat, 20 Feb 2021 01:00:31 +0000 (17:00 -0800)]
Lower condition of `if` expression before it's "then" block

Fix #82290, fix #82250.

3 years agoAdd @is command to jsondocck
Nixon Enraght-Moony [Sat, 20 Feb 2021 00:43:02 +0000 (00:43 +0000)]
Add @is command to jsondocck

3 years agoAdd tests for !Sized trait display
Guillaume Gomez [Thu, 18 Feb 2021 19:46:34 +0000 (20:46 +0100)]
Add tests for !Sized trait display

3 years agoShow negative implementation of Sized trait
Guillaume Gomez [Thu, 18 Feb 2021 19:46:07 +0000 (20:46 +0100)]
Show negative implementation of Sized trait

3 years agoWorkaround rustdoc not honouring cfg(parallel_compiler).
Camille GILLOT [Fri, 19 Feb 2021 20:48:47 +0000 (21:48 +0100)]
Workaround rustdoc not honouring cfg(parallel_compiler).

3 years agoadded aarch64_apple_ios_sim as a rustc target
Ricky (deg4uss3r) [Thu, 4 Feb 2021 14:26:02 +0000 (09:26 -0500)]
added aarch64_apple_ios_sim as a rustc target

3 years agoUpdate pub_macro_rules since version
Santiago Pastorino [Fri, 19 Feb 2021 15:47:53 +0000 (12:47 -0300)]
Update pub_macro_rules since version

3 years agoSupport `pub` on `macro_rules`
Vadim Petrochenkov [Tue, 20 Oct 2020 21:46:29 +0000 (00:46 +0300)]
Support `pub` on `macro_rules`

3 years agoMove the query system to rustc_query_impl.
Camille GILLOT [Tue, 19 Jan 2021 19:40:16 +0000 (20:40 +0100)]
Move the query system to rustc_query_impl.

3 years agoIntroduce a QueryEngine trait object.
Camille GILLOT [Mon, 18 Jan 2021 21:32:20 +0000 (22:32 +0100)]
Introduce a QueryEngine trait object.

3 years agoMake encode_query_results more generic.
Camille GILLOT [Tue, 19 Jan 2021 19:04:40 +0000 (20:04 +0100)]
Make encode_query_results more generic.

3 years agoMove query names and Providers to parent module.
Camille GILLOT [Tue, 19 Jan 2021 18:44:27 +0000 (19:44 +0100)]
Move query names and Providers to parent module.

3 years agoWrap QueryDescription into a macro.
Camille GILLOT [Tue, 19 Jan 2021 18:43:59 +0000 (19:43 +0100)]
Wrap QueryDescription into a macro.

3 years agoSplit DepKindStruct in two.
Camille GILLOT [Tue, 19 Jan 2021 18:07:06 +0000 (19:07 +0100)]
Split DepKindStruct in two.

3 years agoUse QueryCtxt in DepKindStruct.
Camille GILLOT [Tue, 19 Jan 2021 17:24:08 +0000 (18:24 +0100)]
Use QueryCtxt in DepKindStruct.

3 years agoUse a QueryContext for try_mark_green.
Camille GILLOT [Mon, 18 Jan 2021 22:53:42 +0000 (23:53 +0100)]
Use a QueryContext for try_mark_green.

3 years agoSelect caching strategy per query.
Camille GILLOT [Wed, 18 Nov 2020 17:45:16 +0000 (18:45 +0100)]
Select caching strategy per query.

The per-Key choice was not used.

3 years agoMove definition of callbacks to parent module.
Camille GILLOT [Mon, 18 Jan 2021 21:21:29 +0000 (22:21 +0100)]
Move definition of callbacks to parent module.

3 years agoMove handle_deadlock where it is used.
Camille GILLOT [Wed, 18 Nov 2020 18:02:31 +0000 (19:02 +0100)]
Move handle_deadlock where it is used.

3 years agoMove try_load_from_on_disk_cache to the QueryContext.
Camille GILLOT [Tue, 5 Jan 2021 17:37:42 +0000 (18:37 +0100)]
Move try_load_from_on_disk_cache to the QueryContext.

3 years agoMove try_print_query_stack to rustc_interface.
Camille GILLOT [Wed, 8 Apr 2020 18:47:36 +0000 (20:47 +0200)]
Move try_print_query_stack to rustc_interface.

3 years agoMake alloc_self_profile_query_strings a standalone function.
Camille GILLOT [Sun, 17 Jan 2021 13:57:34 +0000 (14:57 +0100)]
Make alloc_self_profile_query_strings a standalone function.

3 years agoMake QueryEngine opaque to TyCtxt.
Camille GILLOT [Sun, 11 Oct 2020 08:34:13 +0000 (10:34 +0200)]
Make QueryEngine opaque to TyCtxt.

3 years agoOpacify query invocation.
Camille GILLOT [Sun, 17 Jan 2021 13:58:34 +0000 (14:58 +0100)]
Opacify query invocation.

3 years agoWrap TyCtxt inside a QueryCtxt for queries.
Camille GILLOT [Wed, 8 Apr 2020 15:03:34 +0000 (17:03 +0200)]
Wrap TyCtxt inside a QueryCtxt for queries.

3 years agoDecouple the on-disk cache from the query engine.
Camille GILLOT [Mon, 4 Jan 2021 22:38:20 +0000 (23:38 +0100)]
Decouple the on-disk cache from the query engine.

3 years agoDecouple QueryContext from DepContext.
Camille GILLOT [Sun, 18 Oct 2020 19:01:36 +0000 (21:01 +0200)]
Decouple QueryContext from DepContext.

3 years agoRemove QueryAccessors::to_dep_node.
Camille GILLOT [Sun, 18 Oct 2020 19:00:24 +0000 (21:00 +0200)]
Remove QueryAccessors::to_dep_node.

3 years agoDon't require a QueryContext to access the DepGraph.
Camille GILLOT [Sun, 11 Oct 2020 08:34:50 +0000 (10:34 +0200)]
Don't require a QueryContext to access the DepGraph.

3 years agoGroup logic about the Providers struct.
Camille GILLOT [Thu, 9 Apr 2020 07:06:11 +0000 (09:06 +0200)]
Group logic about the Providers struct.

3 years agoAuto merge of #82020 - jyn514:mut-passes, r=camelid,GuillaumeGomez
bors [Fri, 19 Feb 2021 16:39:03 +0000 (16:39 +0000)]
Auto merge of #82020 - jyn514:mut-passes, r=camelid,GuillaumeGomez

Make `Clean` take &mut DocContext

- Take `FnMut` in `rustc_trait_selection::find_auto_trait_generics`
- Take `&mut DocContext` in most of `clean`
- Collect the iterator in auto_trait_impls instead of iterating lazily; the lifetimes were really bad.

This combined with https://github.com/rust-lang/rust/pull/82018 should hopefully help with https://github.com/rust-lang/rust/pull/82014 by allowing `cx.cache.exported_traits` to be modified in `register_res`. Previously it had to use interior mutability, which required either adding a RefCell to `cache.exported_traits` on *top* of the existing `RefCell<Cache>` or mixing reads and writes between `cx.exported_traits` and `cx.cache.exported_traits`. I don't currently have that working but I expect it to be reasonably easy to add after this.

3 years ago[intra-doc links] Don't check feature gates of items re-exported across crates
Joshua Nelson [Fri, 19 Feb 2021 15:18:10 +0000 (10:18 -0500)]
[intra-doc links] Don't check feature gates of items re-exported across crates

It should be never break another crate to re-export a public item.

Note that this doesn't check the feature gate at
*all* for other crates:

- Feature-gates aren't currently serialized, so the only way to check
  the gate is with ad-hoc attribute checking.
- Checking the feature gate twice (once when documenting the original
  crate and one when documenting the current crate) seems not great.

This should still catch using the feature most of the time though, since
people tend to document their own crates.

3 years agosimplify eat_digits
klensy [Fri, 19 Feb 2021 15:47:22 +0000 (18:47 +0300)]
simplify eat_digits

3 years agox.py fmt
Dan Gohman [Fri, 19 Feb 2021 15:31:01 +0000 (07:31 -0800)]
x.py fmt

3 years agoAuto merge of #82281 - Dylan-DPC:rollup-raob2tu, r=Dylan-DPC
bors [Fri, 19 Feb 2021 08:24:01 +0000 (08:24 +0000)]
Auto merge of #82281 - Dylan-DPC:rollup-raob2tu, r=Dylan-DPC

Rollup of 10 pull requests

Successful merges:

 - #79747 (Add explanations and suggestions to `irrefutable_let_patterns` lint)
 - #81496 (name async generators something more human friendly in type error diagnostic)
 - #81873 (Add Mutex::unlock)
 - #82093 (Add tests for Atomic*::fetch_{min,max})
 - #82238 (ast: Keep expansion status for out-of-line module items)
 - #82245 (Do not ICE when evaluating locals' types of invalid `yield`)
 - #82259 (Fix popping singleton paths in when generating E0433)
 - #82261 (rustdoc: Support argument files)
 - #82274 (libtest: Fix unwrap panic on duplicate TestDesc)
 - #82275 (Update cargo)

Failed merges:

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

3 years agoAdd deref definition location
1000teslas [Fri, 19 Feb 2021 02:30:49 +0000 (13:30 +1100)]
Add deref definition location

Update conflict_errors.rs

Add deref definition location

3 years agoremove checkboxes from s390x-unknown-linux-musl triplet
Ariadne Conill [Fri, 19 Feb 2021 01:12:53 +0000 (01:12 +0000)]
remove checkboxes from s390x-unknown-linux-musl triplet

3 years agoadd s390x-unknown-linux-musl target to platform support
Ariadne Conill [Tue, 16 Feb 2021 01:34:25 +0000 (01:34 +0000)]
add s390x-unknown-linux-musl target to platform support

3 years agoadd s390x-unknown-linux-musl target
Ariadne Conill [Tue, 16 Feb 2021 00:46:14 +0000 (00:46 +0000)]
add s390x-unknown-linux-musl target