]> git.lizzy.rs Git - rust.git/log
rust.git
2 years agoRollup merge of #98709 - GuillaumeGomez:rm-decl-for-old-browsers, r=Dylan-DPC
Matthias Krüger [Thu, 30 Jun 2022 17:55:56 +0000 (19:55 +0200)]
Rollup merge of #98709 - GuillaumeGomez:rm-decl-for-old-browsers, r=Dylan-DPC

Remove unneeded methods declaration for old web browsers

All these methods were not defined for IE mostly. But since we don't support it anymore, no need to keep them around.

cc ```@jsha```
r? ```@notriddle```

2 years agoRollup merge of #98695 - tshepang:or-pattern, r=compiler-errors
Matthias Krüger [Thu, 30 Jun 2022 17:55:55 +0000 (19:55 +0200)]
Rollup merge of #98695 - tshepang:or-pattern, r=compiler-errors

use "or pattern"

2 years agoRollup merge of #98688 - RalfJung:from-mplace, r=oli-obk
Matthias Krüger [Thu, 30 Jun 2022 17:55:54 +0000 (19:55 +0200)]
Rollup merge of #98688 - RalfJung:from-mplace, r=oli-obk

interpret: add From<&MplaceTy> for PlaceTy

We have a similar instance for `&MPlaceTy` to `OpTy`. Also add the same for `&mut`.

This avoids having to write `&(*place).into()`, which we have a few times here and at least twice in Miri (and it comes up again in my current patch).

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

2 years agoRollup merge of #98684 - matthiaskrgr:ice-test-72793, r=oli-obk
Matthias Krüger [Thu, 30 Jun 2022 17:55:54 +0000 (19:55 +0200)]
Rollup merge of #98684 - matthiaskrgr:ice-test-72793, r=oli-obk

add test for 72793

Fixes #72793

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

2 years agoRollup merge of #98677 - lyming2007:issue-98492-fix, r=lcnr
Matthias Krüger [Thu, 30 Jun 2022 17:55:53 +0000 (19:55 +0200)]
Rollup merge of #98677 - lyming2007:issue-98492-fix, r=lcnr

For diagnostic information of Boolean, remind it as use the type: 'bool'

Fixes #98492.

It helps programmers coming from other languages
modified:   compiler/rustc_resolve/src/late/diagnostics.rs

2 years agoRollup merge of #98671 - GuillaumeGomez:source-sidebar-fixes, r=notriddle
Matthias Krüger [Thu, 30 Jun 2022 17:55:52 +0000 (19:55 +0200)]
Rollup merge of #98671 - GuillaumeGomez:source-sidebar-fixes, r=notriddle

Fix source sidebar bugs

This PR fixes the following two bugs:

![Screenshot from 2022-06-29 14-39-58](https://user-images.githubusercontent.com/3050060/176449070-3e3762da-2bfe-4acf-8eb0-34f6eb4c94ed.png)
![Screenshot from 2022-06-29 15-05-09](https://user-images.githubusercontent.com/3050060/176449073-b164820b-bd71-4b1a-990c-bba4e5fce196.png)

I added regression tests to prevent them to happen again.

I think we should backport it to beta as well.

You can test it [here](https://rustdoc.crud.net/imperio/source-sidebar-fixes/src/std/lib.rs.html).

cc ```@jsha```
r? ```@notriddle```

2 years agoRollup merge of #98670 - krasimirgg:llvm-15-LLVMConstExtractValue, r=nikic
Matthias Krüger [Thu, 30 Jun 2022 17:55:52 +0000 (19:55 +0200)]
Rollup merge of #98670 - krasimirgg:llvm-15-LLVMConstExtractValue, r=nikic

llvm-wrapper: adapt for LLVMConstExtractValue removal

`LLVMConstExtractValue` was removed recently from LLVM: https://github.com/llvm/llvm-project/commit/5548e807b5777fdda167b6795e0e05432a6163f1.

This adapts llvm-wrapper to use the new alternative where available, following https://rust-lang.zulipchat.com/#narrow/stream/187780-t-compiler.2Fwg-llvm/topic/LLVMConstExtractValue.20removal.

2 years agoRollup merge of #98503 - RalfJung:scope-race, r=m-ou-se
Matthias Krüger [Thu, 30 Jun 2022 17:55:51 +0000 (19:55 +0200)]
Rollup merge of #98503 - RalfJung:scope-race, r=m-ou-se

fix data race in thread::scope

Puts the `ScopeData` into an `Arc` so it sticks around as long as we need it.
This means one extra `Arc::clone` per spawned scoped thread, which I hope is fine.

Fixes https://github.com/rust-lang/rust/issues/98498
r? `````@m-ou-se`````

2 years agoRollup merge of #97629 - guswynn:exclusive_struct, r=m-ou-se
Matthias Krüger [Thu, 30 Jun 2022 17:55:50 +0000 (19:55 +0200)]
Rollup merge of #97629 - guswynn:exclusive_struct, r=m-ou-se

[core] add `Exclusive` to sync

(discussed here: https://rust-lang.zulipchat.com/#narrow/stream/219381-t-libs/topic/Adding.20.60SyncWrapper.60.20to.20std)

`Exclusive` is a wrapper that exclusively allows mutable access to the inner value if you have exclusive access to the wrapper. It acts like a compile time mutex, and hold an unconditional `Sync` implementation.

## Justification for inclusion into std
- This wrapper unblocks actual problems:
  - The example that I hit was a vector of `futures::future::BoxFuture`'s causing a central struct in a script to be non-`Sync`. To work around it, you either write really difficult code, or wrap the futures in a needless mutex.
- Easy to maintain: this struct is as simple as a wrapper can get, and its `Sync` implementation has very clear reasoning
- Fills a gap: `&/&mut` are to `RwLock` as `Exclusive` is to `Mutex`

## Public Api
```rust
// core::sync
#[derive(Default)]
struct Exclusive<T: ?Sized> { ... }

impl<T: ?Sized> Sync for Exclusive {}

impl<T> Exclusive<T> {
    pub const fn new(t: T) -> Self;
    pub const fn into_inner(self) -> T;
}

impl<T: ?Sized> Exclusive<T> {
    pub const fn get_mut(&mut self) -> &mut T;
    pub const fn get_pin_mut(Pin<&mut self>) -> Pin<&mut T>;
    pub const fn from_mut(&mut T) -> &mut Exclusive<T>;
    pub const fn from_pin_mut(Pin<&mut T>) -> Pin<&mut Exclusive<T>>;
}

impl<T: Future> Future for Exclusive { ... }

impl<T> From<T> for Exclusive<T> { ... }
impl<T: ?Sized> Debug for Exclusive { ... }
```

## Naming
This is a big bikeshed, but I felt that `Exclusive` captured its general purpose quite well.

## Stability and location
As this is so simple, it can be in `core`. I feel that it can be stabilized quite soon after it is merged, if the libs teams feels its reasonable to add. Also, I don't really know how unstable feature work in std/core's codebases, so I might need help fixing them

## Tips for review
The docs probably are the thing that needs to be reviewed! I tried my best, but I'm sure people have more experience than me writing docs for `Core`

### Implementation:
The API is mostly pulled from https://docs.rs/sync_wrapper/latest/sync_wrapper/struct.SyncWrapper.html (which is apache 2.0 licenesed), and the implementation is trivial:
- its an unsafe justification for pinning
- its an unsafe justification for the `Sync` impl (mostly reasoned about by ````@danielhenrymantilla```` here: https://github.com/Actyx/sync_wrapper/pull/2)
- and forwarding impls, starting with derivable ones and `Future`

2 years agoFor diagnostic information of Boolean, remind it as use the type: 'bool'
Yiming Lei [Wed, 29 Jun 2022 16:09:34 +0000 (09:09 -0700)]
For diagnostic information of Boolean, remind it as use the type: 'bool'
It helps programmers coming from other languages
modified:   compiler/rustc_resolve/src/late/diagnostics.rs

modified:   src/test/ui/lint/recommend-literal.rs
modified:   src/test/ui/lint/recommend-literal.stderr

modified:   compiler/rustc_resolve/src/late/diagnostics.rs
modified:   src/test/ui/lint/recommend-literal.rs
modified:   src/test/ui/lint/recommend-literal.stderr

modified:   compiler/rustc_resolve/src/late/diagnostics.rs
modified:   src/test/ui/lint/recommend-literal.rs
modified:   src/test/ui/lint/recommend-literal.stderr

2 years agoAdd test to ensure that scroll position is kept when opening/closing source sidebar
Guillaume Gomez [Wed, 29 Jun 2022 21:21:46 +0000 (23:21 +0200)]
Add test to ensure that scroll position is kept when opening/closing source sidebar

2 years agoFix scroll when source sidebar is open on mobile
Guillaume Gomez [Wed, 29 Jun 2022 21:21:26 +0000 (23:21 +0200)]
Fix scroll when source sidebar is open on mobile

2 years agollvm-wrapper: adapt for LLVMConstExtractValue removal
Krasimir Georgiev [Wed, 29 Jun 2022 14:00:40 +0000 (14:00 +0000)]
llvm-wrapper: adapt for LLVMConstExtractValue removal

2 years agoRemove unneeded methods declaration for old web browsers
Guillaume Gomez [Thu, 30 Jun 2022 11:23:13 +0000 (13:23 +0200)]
Remove unneeded methods declaration for old web browsers

2 years agoAuto merge of #98377 - davidv1992:add-lifetimes-to-argument-temporaries, r=oli-obk
bors [Thu, 30 Jun 2022 09:20:52 +0000 (09:20 +0000)]
Auto merge of #98377 - davidv1992:add-lifetimes-to-argument-temporaries, r=oli-obk

Added llvm lifetime annotations to function call argument temporaries.

The goal of this change is to ensure that llvm will do stack slot
optimization on these temporaries. This ensures that in code like:
```rust
const A: [u8; 1024] = [0; 1024];

fn copy_const() {
    f(A);
    f(A);
}
```
we only use 1024 bytes of stack space, instead of 2048 bytes.

I am new to developing for the rust compiler, and as such not entirely sure, but I believe this should be sufficient to close #98156.

Also, this does not contain a test case to ensure this keeps working, primarily because I am not sure how to go about testing this. I would love some suggestions as to how that could be approached.

2 years agoAuto merge of #98698 - RalfJung:miri, r=RalfJung
bors [Thu, 30 Jun 2022 06:37:48 +0000 (06:37 +0000)]
Auto merge of #98698 - RalfJung:miri, r=RalfJung

update Miri

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

2 years agoAuto merge of #98649 - RalfJung:guardians-of-mir, r=oli-obk
bors [Thu, 30 Jun 2022 03:50:35 +0000 (03:50 +0000)]
Auto merge of #98649 - RalfJung:guardians-of-mir, r=oli-obk

move MIR syntax into a dedicated file and ping some people whenever it changes

Adding or changing MIR operations/statements/whatever should be under significant scrutiny wrt their wider impact, specified semantics, and so on. So let's start by putting all that into a dedicated file and pinging some people whenever that file changes.

This PR only moves definitions around, and then fiddles with imports until it all works again.

2 years agoupdate Miri
Ralf Jung [Thu, 30 Jun 2022 02:14:03 +0000 (22:14 -0400)]
update Miri

2 years agouse "or pattern"
Tshepang Mbambo [Thu, 30 Jun 2022 01:05:51 +0000 (03:05 +0200)]
use "or pattern"

2 years agoAuto merge of #98691 - matthiaskrgr:rollup-ymsa64p, r=matthiaskrgr
bors [Thu, 30 Jun 2022 01:02:24 +0000 (01:02 +0000)]
Auto merge of #98691 - matthiaskrgr:rollup-ymsa64p, r=matthiaskrgr

Rollup of 6 pull requests

Successful merges:

 - #96727 (Make TAIT behave exactly like RPIT)
 - #98681 (rustdoc-json: Make default value of blanket impl assoc types work)
 - #98682 (add tests for ICE 94432)
 - #98683 (add test for ice 68875)
 - #98685 (Replace `sort_modules_alphabetically` boolean with enum)
 - #98687 (add test for 47814)

Failed merges:

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

2 years agofix doc issues
Ralf Jung [Wed, 29 Jun 2022 23:18:30 +0000 (19:18 -0400)]
fix doc issues

2 years agoRollup merge of #98687 - matthiaskrgr:test_47814, r=compiler-errors
Matthias Krüger [Wed, 29 Jun 2022 22:23:55 +0000 (00:23 +0200)]
Rollup merge of #98687 - matthiaskrgr:test_47814, r=compiler-errors

add test for 47814

not sure if the issue should actually get closed though, hm

r? ``@compiler-errors``

2 years agoRollup merge of #98685 - camelid:sorting-flag, r=GuillaumeGomez
Matthias Krüger [Wed, 29 Jun 2022 22:23:54 +0000 (00:23 +0200)]
Rollup merge of #98685 - camelid:sorting-flag, r=GuillaumeGomez

Replace `sort_modules_alphabetically` boolean with enum

This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.

r? ``@GuillaumeGomez``

2 years agoRollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errors
Matthias Krüger [Wed, 29 Jun 2022 22:23:53 +0000 (00:23 +0200)]
Rollup merge of #98683 - matthiaskrgr:ice-test-68875, r=compiler-errors

add test for ice 68875

Fixes #68875

2 years agoRollup merge of #98682 - matthiaskrgr:test-94432, r=compiler-errors
Matthias Krüger [Wed, 29 Jun 2022 22:23:52 +0000 (00:23 +0200)]
Rollup merge of #98682 - matthiaskrgr:test-94432, r=compiler-errors

add tests for ICE 94432

Fixes #94432

2 years agoRollup merge of #98681 - Enselic:rustdoc-json-default-assoc-type-blanket-impl, r...
Matthias Krüger [Wed, 29 Jun 2022 22:23:51 +0000 (00:23 +0200)]
Rollup merge of #98681 - Enselic:rustdoc-json-default-assoc-type-blanket-impl, r=GuillaumeGomez

rustdoc-json: Make default value of blanket impl assoc types work

Closes #98658

r? ``@GuillaumeGomez``

``@rustbot`` labels +A-rustdoc-json

2 years agoRollup merge of #96727 - oli-obk:no_expect, r=lcnr
Matthias Krüger [Wed, 29 Jun 2022 22:23:50 +0000 (00:23 +0200)]
Rollup merge of #96727 - oli-obk:no_expect, r=lcnr

Make TAIT behave exactly like RPIT

fixes https://github.com/rust-lang/rust/issues/96552

This makes type-alias-impl-trait behave like return-position-impl-trait. Unfortunately it also causes some cases to stop compiling due to "needing type annotations" and makes panicking cause fallback for the hidden type to `()`.

All of these are addressable, but we should probably address them for RPIT and TAIT together

r? ``@lcnr``

2 years agoAuto merge of #98520 - RalfJung:invalid, r=compiler-errors
bors [Wed, 29 Jun 2022 22:21:43 +0000 (22:21 +0000)]
Auto merge of #98520 - RalfJung:invalid, r=compiler-errors

interpret: adjust error from constructing an invalid value

2 years agoUpdate browser-ui-test version to 0.9.7
Guillaume Gomez [Wed, 29 Jun 2022 21:20:21 +0000 (23:20 +0200)]
Update browser-ui-test version to 0.9.7

2 years agointerpret: add From<&MplaceTy> for PlaceTy
Ralf Jung [Wed, 29 Jun 2022 21:07:24 +0000 (17:07 -0400)]
interpret: add From<&MplaceTy> for PlaceTy

2 years agoadd test for 47814
Matthias Krüger [Wed, 29 Jun 2022 20:27:18 +0000 (22:27 +0200)]
add test for 47814

not sure if the issue should actually get closed though, hm

r? @compiler-errors

2 years agoReplace `sort_modules_alphabetically` boolean with enum
Noah Lev [Wed, 29 Jun 2022 20:04:43 +0000 (13:04 -0700)]
Replace `sort_modules_alphabetically` boolean with enum

This fixes the long-standing FIXME there and makes the code easier to
understand. The reference to modules in both the old and new names seems
potentially wrong since I believe it applies to all items.

2 years agoping more people
Ralf Jung [Wed, 29 Jun 2022 12:58:26 +0000 (08:58 -0400)]
ping more people

Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2 years agomove MIR syntax into a dedicated file and ping some people whenever it changes
Ralf Jung [Wed, 29 Jun 2022 00:05:23 +0000 (20:05 -0400)]
move MIR syntax into a dedicated file and ping some people whenever it changes

2 years agoadd test for 72793
Matthias Krüger [Wed, 29 Jun 2022 19:55:10 +0000 (21:55 +0200)]
add test for 72793

Fixes #72793

r? @oli-obk

2 years agoadd test for ice 68875
Matthias Krüger [Wed, 29 Jun 2022 19:38:42 +0000 (21:38 +0200)]
add test for ice 68875

Fixes #68875

2 years agoadd tests for ICE 94432
Matthias Krüger [Wed, 29 Jun 2022 19:30:19 +0000 (21:30 +0200)]
add tests for ICE 94432

Fixes #94432

2 years agorustdoc-json: Make default value of blanket impl assoc types work
Martin Nordholts [Wed, 29 Jun 2022 18:34:56 +0000 (20:34 +0200)]
rustdoc-json: Make default value of blanket impl assoc types work

2 years agoAuto merge of #98680 - matthiaskrgr:rollup-1bkrrn9, r=matthiaskrgr
bors [Wed, 29 Jun 2022 18:42:19 +0000 (18:42 +0000)]
Auto merge of #98680 - matthiaskrgr:rollup-1bkrrn9, r=matthiaskrgr

Rollup of 10 pull requests

Successful merges:

 - #98434 (Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.)
 - #98636 (Triagebot: Fix mentions word wrapping.)
 - #98642 (Fix #98260)
 - #98643 (Improve pretty printing of valtrees for references)
 - #98646 (rustdoc: fix bugs in main.js popover help and settings)
 - #98647 (Update cargo)
 - #98652 (`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free)
 - #98660 (Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.)
 - #98665 (Use verbose help for deprecation suggestion)
 - #98668 (Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`)

Failed merges:

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

2 years agoRollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC
Matthias Krüger [Wed, 29 Jun 2022 18:35:07 +0000 (20:35 +0200)]
Rollup merge of #98668 - TaKO8Ki:avoid-many-&str-to-string-conversions, r=Dylan-DPC

Avoid some `&str` to `String` conversions with `MultiSpan::push_span_label`

This patch removes some`&str` to `String` conversions with `MultiSpan::push_span_label`.

2 years agoRollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errors
Matthias Krüger [Wed, 29 Jun 2022 18:35:06 +0000 (20:35 +0200)]
Rollup merge of #98665 - ChrisDenton:deprecated-suggestion, r=compiler-errors

Use verbose help for deprecation suggestion

Fixes #98631

r? `@compiler-errors`

2 years agoRollup merge of #98660 - eddyb:invalid-punct-stage1, r=lqd
Matthias Krüger [Wed, 29 Jun 2022 18:35:05 +0000 (20:35 +0200)]
Rollup merge of #98660 - eddyb:invalid-punct-stage1, r=lqd

Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.

#98188 broke `./x.py test --stage 1` (which I thought we ran in PR CI, cc `@rust-lang/infra)` i.e. the default `./x.py test` in dev checkouts, as the panic in `src/test/ui/proc-macro/invalid-punct-ident-1.rs` moved from the server (`rustc`) to the client (proc macro), and that means it's now affected by #59998.

I made the test look like `src/test/ui-fulldeps/issue-76270-panic-in-libproc-macro.rs` tho I'm a bit confused why that one is in `src/test/ui-fulldeps`, it should still work in `src/test/ui`, no? (cc `@Aaron1011)`

2 years agoRollup merge of #98652 - ojeda:warning-free-no_global_oom_handling, r=joshtriplett
Matthias Krüger [Wed, 29 Jun 2022 18:35:04 +0000 (20:35 +0200)]
Rollup merge of #98652 - ojeda:warning-free-no_global_oom_handling, r=joshtriplett

`alloc`: clean and ensure `no_global_oom_handling`  builds are warning-free

Rust 1.62.0 introduced a couple new `unused_imports` warnings
in `no_global_oom_handling` builds, making a total of 5 warnings.

<details>

```txt
warning: unused import: `Unsize`
 --> library/alloc/src/boxed/thin.rs:6:33
  |
6 | use core::marker::{PhantomData, Unsize};
  |                                 ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `from_fn`
  --> library/alloc/src/string.rs:51:18
   |
51 | use core::iter::{from_fn, FusedIterator};
   |                  ^^^^^^^

warning: unused import: `core::ops::Deref`
  --> library/alloc/src/vec/into_iter.rs:12:5
   |
12 | use core::ops::Deref;
   |     ^^^^^^^^^^^^^^^^

warning: associated function `shrink` is never used
   --> library/alloc/src/raw_vec.rs:424:8
    |
424 |     fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> {
    |        ^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: associated function `forget_remaining_elements` is never used
   --> library/alloc/src/vec/into_iter.rs:126:19
    |
126 |     pub(crate) fn forget_remaining_elements(&mut self) {
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
```

</details>

This PR cleans them and ensures no new ones are introduced
so that projects compiling `alloc` without infallible allocations
do not see them (and may want to enable `-Dwarnings`).

The couple `dead_code` ones may be reverted when some fallible
allocation support starts using them.

2 years agoRollup merge of #98647 - ehuss:update-cargo, r=ehuss
Matthias Krüger [Wed, 29 Jun 2022 18:35:03 +0000 (20:35 +0200)]
Rollup merge of #98647 - ehuss:update-cargo, r=ehuss

Update cargo

2 commits in a5e08c4703f202e30cdaf80ca3e7c00baa59c496..dbff32b27893b899ae2397f3d56d1be111041d56
2022-06-23 20:12:03 +0000 to 2022-06-24 19:25:13 +0000
- Fetch GitHub commits by long hash more efficiently (rust-lang/cargo#10079)
- refactor(test): Clarify asserts are for UI (rust-lang/cargo#10778)

2 years agoRollup merge of #98646 - notriddle:notriddle/main.js, r=GuillaumeGomez
Matthias Krüger [Wed, 29 Jun 2022 18:35:02 +0000 (20:35 +0200)]
Rollup merge of #98646 - notriddle:notriddle/main.js, r=GuillaumeGomez

rustdoc: fix bugs in main.js popover help and settings

2 years agoRollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnr
Matthias Krüger [Wed, 29 Jun 2022 18:35:01 +0000 (20:35 +0200)]
Rollup merge of #98643 - voidc:valtree-ref-pretty, r=lcnr

Improve pretty printing of valtrees for references

This implements the changes outlined in https://github.com/rust-lang/rust/issues/66451#issuecomment-1168859638.

r? `@lcnr`
Fixes #66451

2 years agoRollup merge of #98642 - yanchen4791:issue-98260-fix, r=spastorino
Matthias Krüger [Wed, 29 Jun 2022 18:35:00 +0000 (20:35 +0200)]
Rollup merge of #98642 - yanchen4791:issue-98260-fix, r=spastorino

Fix #98260

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

2 years agoRollup merge of #98636 - ehuss:mentions-wrapping, r=Mark-Simulacrum
Matthias Krüger [Wed, 29 Jun 2022 18:34:59 +0000 (20:34 +0200)]
Rollup merge of #98636 - ehuss:mentions-wrapping, r=Mark-Simulacrum

Triagebot: Fix mentions word wrapping.

I forgot that GitHub's markdown treats newlines as hard breaks. This was causing some ugly-looking word wrapping in the triagebot mention messages. This fixes it so that the lines are not hard-wrapped.

2 years agoRollup merge of #98434 - dpaoliello:staticcrt, r=jyn514
Matthias Krüger [Wed, 29 Jun 2022 18:34:58 +0000 (20:34 +0200)]
Rollup merge of #98434 - dpaoliello:staticcrt, r=jyn514

Ensure that `static_crt` is set in the bootstrapper whenever using `cc-rs` to get a compiler command line.

When attempting to build rustc with LLVM on Windows, I noticed that the CRT flag provided to the C and C++ Compilers was inconsistent:

```
"-DCMAKE_C_FLAGS=-nologo -MT -Brepro" "-DCMAKE_CXX_FLAGS=-nologo -MD -Brepro"
```

Since the bootstrapper also sets the various `LLVM_USE_CRT` variables, this resulted in cl.exe reporting a bunch of warnings:

```
cl : Command line warning D9025 : overriding '/MD' with '/MT'
```

The root cause for this is that `cc_detect::find` was creating a `cc::Build` twice, but didn't set `static_crt` the second time.

It's possible that this what is also causing #81381

2 years agofix stderr by hand since that test is not run on my system
Ralf Jung [Mon, 27 Jun 2022 03:21:38 +0000 (23:21 -0400)]
fix stderr by hand since that test is not run on my system

2 years agointerpret: adjust error from constructing an invalid value
Ralf Jung [Sun, 26 Jun 2022 03:46:51 +0000 (23:46 -0400)]
interpret: adjust error from constructing an invalid value

2 years agoAuto merge of #98669 - Dylan-DPC:rollup-8uzhcip, r=Dylan-DPC
bors [Wed, 29 Jun 2022 15:05:29 +0000 (15:05 +0000)]
Auto merge of #98669 - Dylan-DPC:rollup-8uzhcip, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #98415 (Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic`)
 - #98479 (Add `fetch_not` method on `AtomicBool`)
 - #98499 (Erase regions in New Abstract Consts)
 - #98516 (library: fix uefi va_list type definition)
 - #98554 (Fix box with custom allocator in miri)
 - #98607 (Clean up arg mismatch diagnostic, generalize tuple wrap suggestion)
 - #98625 (emit Retag for compound types with reference fields)

Failed merges:

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

2 years agoAdd test for source sidebar toggle
Guillaume Gomez [Wed, 29 Jun 2022 13:30:01 +0000 (15:30 +0200)]
Add test for source sidebar toggle

2 years agoFix display of toggle on expanded source sidebar
Guillaume Gomez [Wed, 29 Jun 2022 13:28:16 +0000 (15:28 +0200)]
Fix display of toggle on expanded source sidebar

2 years agoUpdate/add tests for source sidebar in mobile mode
Guillaume Gomez [Wed, 29 Jun 2022 13:15:53 +0000 (15:15 +0200)]
Update/add tests for source sidebar in mobile mode

2 years agoFix height for the source sidebar in mobile mode
Guillaume Gomez [Wed, 29 Jun 2022 13:15:40 +0000 (15:15 +0200)]
Fix height for the source sidebar in mobile mode

2 years agoRollup merge of #98625 - RalfJung:retag, r=oli-obk
Dylan DPC [Wed, 29 Jun 2022 12:29:37 +0000 (17:59 +0530)]
Rollup merge of #98625 - RalfJung:retag, r=oli-obk

emit Retag for compound types with reference fields

I want to add an option to Miri to do retagging inside reference fields. But that means we first have to even emit `Retag` for types that *contain* references (rather than being of reference types). :)

Stacked Borrows originally did that, but we stopped doing it when hitting bunch of issues in the standard library. However I have since realized that we actually do emit `noalias` for newtypes references, which means for soundness we should recurse into fields. Also it'd probably be bad news if newtypes lose out on optimizations (and they don't, for anything else). I want to add an option for that to Miri so that we can start experimenting with those semantics.

r? ``@oli-obk``

2 years agoRollup merge of #98607 - compiler-errors:tuple-wrap-suggestion, r=oli-obk
Dylan DPC [Wed, 29 Jun 2022 12:29:36 +0000 (17:59 +0530)]
Rollup merge of #98607 - compiler-errors:tuple-wrap-suggestion, r=oli-obk

Clean up arg mismatch diagnostic, generalize tuple wrap suggestion

This is based on top of #97542, so just look at the last commit which contains the relevant changes.

1. Remove `final_arg_types` which was one of the last places we were using raw (`usize`) indices instead of typed indices in the arg mismatch suggestion code.
2. Improve the tuple wrap suggestion, now we suggest things like `call(a, b, c, d)` -> `call(a, (b, c), d)` :smiley_cat:
3. Folded in fix #98645

2 years agoRollup merge of #98554 - DrMeepster:box_unsizing_is_not_special, r=RalfJung
Dylan DPC [Wed, 29 Jun 2022 12:29:35 +0000 (17:59 +0530)]
Rollup merge of #98554 - DrMeepster:box_unsizing_is_not_special, r=RalfJung

Fix box with custom allocator in miri

This should fix the failures in https://github.com/rust-lang/miri/pull/2072 and https://github.com/rust-lang/rust/pull/98510.

cc ```@RalfJung```

2 years agoRollup merge of #98516 - dlrobertson:uefi_va_list, r=joshtriplett
Dylan DPC [Wed, 29 Jun 2022 12:29:34 +0000 (17:59 +0530)]
Rollup merge of #98516 - dlrobertson:uefi_va_list, r=joshtriplett

library: fix uefi va_list type definition

For uefi the `va_list` should always be the void pointer variant.

Related to: https://github.com/rust-lang/rust/issues/44930

2 years agoRollup merge of #98499 - JulianKnodt:erase_lifetime, r=lcnr
Dylan DPC [Wed, 29 Jun 2022 12:29:33 +0000 (17:59 +0530)]
Rollup merge of #98499 - JulianKnodt:erase_lifetime, r=lcnr

Erase regions in New Abstract Consts

When an abstract const is constructed, we previously included lifetimes in the set of substitutes, so it was not able to unify two abstract consts if their lifetimes did not match but the values did, despite the values not depending on the lifetimes. This caused code that should have compiled to not compile.

Fixes #98452

r? ```@lcnr```

2 years agoRollup merge of #98479 - leocth:atomic-bool-fetch-not, r=joshtriplett
Dylan DPC [Wed, 29 Jun 2022 12:29:32 +0000 (17:59 +0530)]
Rollup merge of #98479 - leocth:atomic-bool-fetch-not, r=joshtriplett

Add `fetch_not` method on `AtomicBool`

This PR adds a `fetch_not` method on `AtomicBool` performs the NOT operation on the inner value.
Internally, this just calls the `fetch_xor` method with the value `true`.

[See this IRLO discussion](https://internals.rust-lang.org/t/could-we-have-fetch-not-for-atomicbool-s/16881)

2 years agoRollup merge of #98415 - compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco
Dylan DPC [Wed, 29 Jun 2022 12:29:31 +0000 (17:59 +0530)]
Rollup merge of #98415 - compiler-errors:rustc-borrowck-session-diagnostic-1, r=davidtwco

Migrate some `rustc_borrowck` diagnostics to `SessionDiagnostic`

Self-explanatory

r? ```@davidtwco```

2 years agoavoid many `&str` to `String` conversions with `MultiSpan::push_span_label`
Takayuki Maeda [Wed, 29 Jun 2022 12:16:43 +0000 (21:16 +0900)]
avoid many `&str` to `String` conversions with `MultiSpan::push_span_label`

2 years agoAuto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd
bors [Wed, 29 Jun 2022 09:11:29 +0000 (09:11 +0000)]
Auto merge of #98558 - nnethercote:smallvec-1.8.1, r=lqd

Update `smallvec` to 1.8.1.

This pulls in https://github.com/servo/rust-smallvec/pull/282, which
gives some small wins for rustc.

r? `@lqd`

2 years agoThe only reason we had to replace opaque types in closures was due to async fn desuga...
Oli Scherer [Wed, 29 Jun 2022 08:52:19 +0000 (08:52 +0000)]
The only reason we had to replace opaque types in closures was due to async fn desugaring, make that explicit

2 years agoAdd more tests
Oli Scherer [Wed, 29 Jun 2022 08:27:14 +0000 (08:27 +0000)]
Add more tests

2 years agoMake RPIT and TAIT work exactly the same
Oli Scherer [Fri, 27 May 2022 19:31:10 +0000 (19:31 +0000)]
Make RPIT and TAIT work exactly the same

2 years agoUse verbose help for deprecation suggestion
Chris Denton [Wed, 29 Jun 2022 08:36:12 +0000 (09:36 +0100)]
Use verbose help for deprecation suggestion

2 years agoImprove doc comment of destructure_const
Dominik Stolz [Wed, 29 Jun 2022 08:30:47 +0000 (10:30 +0200)]
Improve doc comment of destructure_const

2 years agoUnbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.
Eduard-Mihai Burtescu [Wed, 29 Jun 2022 07:22:21 +0000 (07:22 +0000)]
Unbreak stage1 tests via ignore-stage1 in `proc-macro/invalid-punct-ident-1.rs`.

2 years agoAuto merge of #98656 - Dylan-DPC:rollup-hhytn0c, r=Dylan-DPC
bors [Wed, 29 Jun 2022 05:47:42 +0000 (05:47 +0000)]
Auto merge of #98656 - Dylan-DPC:rollup-hhytn0c, r=Dylan-DPC

Rollup of 7 pull requests

Successful merges:

 - #97423 (Simplify memory ordering intrinsics)
 - #97542 (Use typed indices in argument mismatch algorithm)
 - #97786 (Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths)
 - #98277 (Fix trait object reborrow suggestion)
 - #98525 (Add regression test for #79224)
 - #98549 (interpret: do not prune requires_caller_location stack frames quite so early)
 - #98603 (Some borrowck diagnostic fixes)

Failed merges:

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

2 years agoRollup merge of #98603 - compiler-errors:minor-borrowck-diagnostic-fixes, r=davidtwco
Dylan DPC [Wed, 29 Jun 2022 04:58:24 +0000 (10:28 +0530)]
Rollup merge of #98603 - compiler-errors:minor-borrowck-diagnostic-fixes, r=davidtwco

Some borrowck diagnostic fixes

1. Remove some redundant `.as_ref` suggestion logic from borrowck, this has the consequence of also not suggesting `.as_ref` after `Option` methods, but (correctly) before.
2. Fix a bug where we were replacing a binding's name with a type. Instead, make it a note.

This is somewhat incomplete. See `src/test/ui/borrowck/suggest-as-ref-on-mut-closure.rs` for more improvements.

2 years agoRollup merge of #98549 - RalfJung:interpret-stacktraces, r=oli-obk
Dylan DPC [Wed, 29 Jun 2022 04:58:23 +0000 (10:28 +0530)]
Rollup merge of #98549 - RalfJung:interpret-stacktraces, r=oli-obk

interpret: do not prune requires_caller_location stack frames quite so early

https://github.com/rust-lang/rust/pull/87000 made the interpreter skip `caller_location` frames for its stacktraces and `cur_span`. However, those functions are used for much more than just panic reporting, and e.g. when Miri reports UB somewhere, it probably wants to point inside `caller_location` frames. (And if it did not, it would want to have its own logic to decide that, not be forced into it by the core interpreter engine.) This fixes some rare ICEs in Miri that say "we should never pop more than one frame at once".

So let's remove all `caller_location` logic from the core interpreter, and instead move it to CTFE error reporting. This does not change user-visible behavior. That's the first commit.

We might additionally want to change CTFE error reporting to treat panics differently from other errors: only prune `caller_location` frames for panics. The second commit does that. But honestly I am not sure if this is an improvement.

r? ``@oli-obk``

2 years agoRollup merge of #98525 - JohnTitor:issue-79224, r=compiler-errors
Dylan DPC [Wed, 29 Jun 2022 04:58:22 +0000 (10:28 +0530)]
Rollup merge of #98525 - JohnTitor:issue-79224, r=compiler-errors

Add regression test for #79224

Closes #79224
r? `@compiler-errors`

Signed-off-by: Yuki Okushi <jtitor@2k36.org>
2 years agoRollup merge of #98277 - compiler-errors:issue-93596, r=estebank
Dylan DPC [Wed, 29 Jun 2022 04:58:21 +0000 (10:28 +0530)]
Rollup merge of #98277 - compiler-errors:issue-93596, r=estebank

Fix trait object reborrow suggestion

Fixes #93596

Slightly generalizes the logic we use to suggest fix first implemented in #95609, specifically when we have a `Sized` obligation that comes from a struct's unsized tail.

2 years agoRollup merge of #97786 - ferrocene:pa-fix-simulate-remap-prefix, r=Mark-Simulacrum
Dylan DPC [Wed, 29 Jun 2022 04:58:20 +0000 (10:28 +0530)]
Rollup merge of #97786 - ferrocene:pa-fix-simulate-remap-prefix, r=Mark-Simulacrum

Account for `-Z simulate-remapped-rust-src-base` when resolving remapped paths

Discovered in #97682, `-Z simulate-remapped-rust-src-base` only partially simulated the behavior of `remap-debuginfo = true`. While the flag successfully simulates the remapping when stdlib's `rmeta` file is loaded, the simulated prefix was not accounted for when the remapped path's local path was being discovered. This caused the flag to not fully simulate the behavior of `remap-debuginfo = true`, leading to inconsistent behaviors.

This PR fixes https://github.com/rust-lang/rust/issues/97682 by also accounting for the simulated path.

2 years agoRollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726
Dylan DPC [Wed, 29 Jun 2022 04:58:19 +0000 (10:28 +0530)]
Rollup merge of #97542 - compiler-errors:arg-mismatch, r=jackh726

Use typed indices in argument mismatch algorithm

I kinda went overboard with the renames, but in general, "arg" is renamed to "expected", and "input" is renamed to "provided", and we use new typed indices to make sure we're indexing into the right sized array.

Other drive-by changes:
1. Factor this logic into a new function, so we don't need to `break 'label` to escape it.
1. Factored out dependence on `final_arg_types`, which is never populated for arguments greater than the number of expected args. Instead, we just grab the final coerced expression type from `in_progress_typeck_results`.
1. Adjust the criteria we use to print (provided) type names, before we didn't suggest anything that had infer vars, but now we suggest thing that have infer vars but aren't `_`.

~Also, sorry in advance, I kinda want to backport this but I know I have folded in a lot of unnecessary drive-by changes that might discourage that. I would be open to brainstorming how to get some of these changes on beta at least.~ edit: Minimized the ICE-fixing changes to #97557

cc `@jackh726` as author of #92364, and `@estebank` as reviewer of the PR.
fixes #97484

2 years agoRollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko
Dylan DPC [Wed, 29 Jun 2022 04:58:18 +0000 (10:28 +0530)]
Rollup merge of #97423 - m-ou-se:memory-ordering-intrinsics, r=tmiasko

Simplify memory ordering intrinsics

This changes the names of the atomic intrinsics to always fully include their memory ordering arguments.

```diff
- atomic_cxchg
+ atomic_cxchg_seqcst_seqcst

- atomic_cxchg_acqrel
+ atomic_cxchg_acqrel_release

- atomic_cxchg_acqrel_failrelaxed
+ atomic_cxchg_acqrel_relaxed

// And so on.
```

- `seqcst` is no longer implied
- The failure ordering on chxchg is no longer implied in some cases, but now always explicitly part of the name.
- `release` is no longer shortened to just `rel`. That was especially confusing, since `relaxed` also starts with `rel`.
- `acquire` is no longer shortened to just `acq`, such that the names now all match the `std::sync::atomic::Ordering` variants exactly.
- This now allows for more combinations on the compare exchange operations, such as `atomic_cxchg_acquire_release`, which is necessary for #68464.
- This PR only exposes the new possibilities through unstable intrinsics, but not yet through the stable API. That's for [a separate PR](https://github.com/rust-lang/rust/pull/98383) that requires an FCP.

Suffixes for operations with a single memory order:

| Order   | Before       | After      |
|---------|--------------|------------|
| Relaxed | `_relaxed`   | `_relaxed` |
| Acquire | `_acq`       | `_acquire` |
| Release | `_rel`       | `_release` |
| AcqRel  | `_acqrel`    | `_acqrel`  |
| SeqCst  | (none)       | `_seqcst`  |

Suffixes for compare-and-exchange operations with two memory orderings:

| Success | Failure | Before                   | After              |
|---------|---------|--------------------------|--------------------|
| Relaxed | Relaxed | `_relaxed`               | `_relaxed_relaxed` |
| Relaxed | Acquire | :x:                      | `_relaxed_acquire` |
| Relaxed | SeqCst  | :x:                      | `_relaxed_seqcst`  |
| Acquire | Relaxed | `_acq_failrelaxed`       | `_acquire_relaxed` |
| Acquire | Acquire | `_acq`                   | `_acquire_acquire` |
| Acquire | SeqCst  | :x:                      | `_acquire_seqcst`  |
| Release | Relaxed | `_rel`                   | `_release_relaxed` |
| Release | Acquire | :x:                      | `_release_acquire` |
| Release | SeqCst  | :x:                      | `_release_seqcst`  |
| AcqRel  | Relaxed | `_acqrel_failrelaxed`    | `_acqrel_relaxed`  |
| AcqRel  | Acquire | `_acqrel`                | `_acqrel_acquire`  |
| AcqRel  | SeqCst  | :x:                      | `_acqrel_seqcst`   |
| SeqCst  | Relaxed | `_failrelaxed`           | `_seqcst_relaxed`  |
| SeqCst  | Acquire | `_failacq`               | `_seqcst_acquire`  |
| SeqCst  | SeqCst  | (none)                   | `_seqcst_seqcst`   |

2 years agoErase regions in new abstract consts
kadmin [Sat, 25 Jun 2022 09:59:48 +0000 (09:59 +0000)]
Erase regions in new abstract consts

2 years agoAuto merge of #98542 - jackh726:coinductive-wf, r=oli-obk
bors [Wed, 29 Jun 2022 03:22:47 +0000 (03:22 +0000)]
Auto merge of #98542 - jackh726:coinductive-wf, r=oli-obk

Make empty bounds lower to `WellFormed` and make `WellFormed` coinductive

r? rust-lang/types

2 years agoalloc: ensure `no_global_oom_handling` builds are warning-free
Miguel Ojeda [Wed, 29 Jun 2022 02:02:21 +0000 (04:02 +0200)]
alloc: ensure `no_global_oom_handling` builds are warning-free

Rust 1.62.0 introduced a couple new `unused_imports` warnings
in `no_global_oom_handling` builds, making a total of 5 warnings.

To avoid accumulating more over time, let's keep the builds
warning-free. This ensures projects compiling `alloc` without
infallible allocations do not see the warnings in the future
and that they can keep enabling `-Dwarnings`.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2 years agoalloc: fix `no_global_oom_handling` warnings
Miguel Ojeda [Tue, 28 Jun 2022 23:09:02 +0000 (01:09 +0200)]
alloc: fix `no_global_oom_handling` warnings

Rust 1.62.0 introduced a couple new `unused_imports` warnings
in `no_global_oom_handling` builds, making a total of 5 warnings:

```txt
warning: unused import: `Unsize`
 --> library/alloc/src/boxed/thin.rs:6:33
  |
6 | use core::marker::{PhantomData, Unsize};
  |                                 ^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `from_fn`
  --> library/alloc/src/string.rs:51:18
   |
51 | use core::iter::{from_fn, FusedIterator};
   |                  ^^^^^^^

warning: unused import: `core::ops::Deref`
  --> library/alloc/src/vec/into_iter.rs:12:5
   |
12 | use core::ops::Deref;
   |     ^^^^^^^^^^^^^^^^

warning: associated function `shrink` is never used
   --> library/alloc/src/raw_vec.rs:424:8
    |
424 |     fn shrink(&mut self, cap: usize) -> Result<(), TryReserveError> {
    |        ^^^^^^
    |
    = note: `#[warn(dead_code)]` on by default

warning: associated function `forget_remaining_elements` is never used
   --> library/alloc/src/vec/into_iter.rs:126:19
    |
126 |     pub(crate) fn forget_remaining_elements(&mut self) {
    |                   ^^^^^^^^^^^^^^^^^^^^^^^^^
```

This patch cleans them so that projects compiling `alloc` without
infallible allocations do not see the warnings. It also enables
the use of `-Dwarnings`.

The couple `dead_code` ones may be reverted when some fallible
allocation support starts using them.

Signed-off-by: Miguel Ojeda <ojeda@kernel.org>
2 years agoDon't point at another arg if we're already pointing at one
Michael Goulet [Wed, 29 Jun 2022 02:32:12 +0000 (19:32 -0700)]
Don't point at another arg if we're already pointing at one

2 years agorustdoc: add assertion for missing popover div
Michael Howell [Wed, 29 Jun 2022 00:30:58 +0000 (17:30 -0700)]
rustdoc: add assertion for missing popover div

2 years agorustdoc: make keyboard commands work when checkboxes are selected
Michael Howell [Tue, 28 Jun 2022 22:06:48 +0000 (15:06 -0700)]
rustdoc: make keyboard commands work when checkboxes are selected

2 years agorustdoc: fix keyboard shortcuts bug in settings menu
Michael Howell [Tue, 28 Jun 2022 21:56:24 +0000 (14:56 -0700)]
rustdoc: fix keyboard shortcuts bug in settings menu

This commit fixes the keyboard shorts code to call localStorage every time a
key is pressed. This matters because you're supposed to be able to change a
setting and have it immediately take effect.

2 years agoAuto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkov
bors [Wed, 29 Jun 2022 00:20:57 +0000 (00:20 +0000)]
Auto merge of #98376 - nnethercote:improve-derive-PartialEq, r=petrochenkov

Improve some deriving code and add a test

The `.stdout` test is particularly useful.

r? `@petrochenkov`

2 years agorustdoc: fix help menu popover toggling
Michael Howell [Tue, 28 Jun 2022 21:16:05 +0000 (14:16 -0700)]
rustdoc: fix help menu popover toggling

2 years agoMigrate some rustc_borrowck diagnostics to SessionDiagnostic
Michael Goulet [Thu, 23 Jun 2022 04:43:01 +0000 (21:43 -0700)]
Migrate some rustc_borrowck diagnostics to SessionDiagnostic

2 years agoDo not use a suggestion to change a binding's name to a type
Michael Goulet [Tue, 28 Jun 2022 03:23:24 +0000 (20:23 -0700)]
Do not use a suggestion to change a binding's name to a type

2 years agoRemove redundant logic to suggest `as_ref`
Michael Goulet [Mon, 27 Jun 2022 22:43:23 +0000 (15:43 -0700)]
Remove redundant logic to suggest `as_ref`

2 years agoUpdate cargo
Eric Huss [Tue, 28 Jun 2022 22:31:42 +0000 (15:31 -0700)]
Update cargo

2 years agoFix #98260, added the test case
Yan Chen [Tue, 28 Jun 2022 19:46:42 +0000 (12:46 -0700)]
Fix #98260, added the test case

2 years agoNote concrete type being coerced into object
Michael Goulet [Mon, 20 Jun 2022 04:04:06 +0000 (21:04 -0700)]
Note concrete type being coerced into object

2 years agoFix trait object reborrow suggestion
Michael Goulet [Mon, 20 Jun 2022 03:49:07 +0000 (20:49 -0700)]
Fix trait object reborrow suggestion

2 years agoAuto merge of #98475 - notriddle:notriddle/index-fn-signatures, r=GuillaumeGomez
bors [Tue, 28 Jun 2022 21:40:10 +0000 (21:40 +0000)]
Auto merge of #98475 - notriddle:notriddle/index-fn-signatures, r=GuillaumeGomez

rustdoc: reference function signature types from the `p` array

This reduces the size of the function signature index, because it's common to have many functions that operate on the same types.

    $ wc -c search-index-old.js search-index-new.js
    5224374 search-index-old.js
    3932314 search-index-new.js

By my math, this reduces the uncompressed size of the search index by 32%.
On compressed signatures, the wins are less drastic, a mere 8%:

    $ wc -c search-index-old.js.gz search-index-new.js.gz
    404532 search-index-old.js.gz
    371635 search-index-new.js.gz

2 years agoAddress code review comments
Dominik Stolz [Tue, 28 Jun 2022 21:26:54 +0000 (23:26 +0200)]
Address code review comments

2 years agofix silly mistake
DrMeepster [Tue, 28 Jun 2022 20:48:13 +0000 (13:48 -0700)]
fix silly mistake

you should always run x.py check before pushing

2 years agoMake consts mod private
Dominik Stolz [Tue, 28 Jun 2022 20:45:05 +0000 (22:45 +0200)]
Make consts mod private