Commit graph

2428 commits

Author SHA1 Message Date
bors 43a0686f8d Auto merge of #115253 - donno2048:patch-1, r=albertlarsan68
Implement `PROBLEMATIC_CONSTS` generalization

You forgot that `A≈4`, `B≈8`, and `E≈3` and some more constants.

The new `PROBLEMATIC_CONSTS` was generated using this code:

```py
from functools import reduce
def generate_problems(consts: list, letter_digit: dict):
    for const in consts:
        problem = reduce(lambda string, rep: string.replace(*reversed(rep)), ['%X' % const, *letter_digit.items()])
        indexes = [index for index, c in enumerate(problem) if c in letter_digit.keys()]
        for i in range(1 << len(indexes)):
            yield int(''.join(letter_digit[c] if index in indexes and (i >> indexes.index(index)) & 1 else c for index, c in enumerate(problem)), 0x10)

problems = generate_problems(
    [
        # Old PROBLEMATIC_CONSTS:
        184594741, 2880289470, 2881141438, 2965027518, 2976579765, 3203381950, 3405691582, 3405697037,
        3735927486, 3735932941, 4027431614, 4276992702,
        # More of my own:
        195934910, 252707358, 762133, 179681982, 173390526
    ],
    {
    'A': '4',
    'B': '8',
    'E': '3',
    }
)

# print(list(problems)) # won't use that to print formatted

from itertools import islice
while len(cur_problems := list(islice(problems, 8))):
    print('    ', end='')
    print(*cur_problems, sep=', ', end='')
    print(',')
```
2024-04-19 09:52:17 +00:00
bors c5de414865 Auto merge of #123144 - dpaoliello:arm64eclib, r=GuillaumeGomez,ChrisDenton,wesleywiser
Add support for Arm64EC to the Standard Library

Adds the final pieces so that the standard library can be built for arm64ec-pc-windows-msvc (initially added in #119199)

* Bumps `windows-sys` to 0.56.0, which adds support for Arm64EC.
* Correctly set the `isEC` parameter for LLVM's `writeArchive` function.
* Add `#![feature(asm_experimental_arch)]` to library crates where Arm64EC inline assembly is used, as it is currently unstable.
2024-04-18 12:22:52 +00:00
donno2048 e2ab540e37 add rustc-hash 2024-04-18 06:57:43 +00:00
donno2048 ca67fd6d19 fix lockfile 2024-04-18 06:51:55 +00:00
Elisha Hollander fa6444b050
reset lockfile to head 2024-04-18 08:00:35 +03:00
Elisha Hollander f71d2a2af6 update cargo manifest 2024-04-16 22:22:49 +00:00
Elisha Hollander 2196d65cf2 update lockfile 2024-04-16 22:20:16 +00:00
Guillaume Gomez ec1618cf17
Rollup merge of #123975 - lqd:rust-lld-tests, r=jieyouxu
Port the 2 `rust-lld` run-make tests to `rmake`

In preparation for finalizing most of the `rust-lld` work, this PR ports the following tests to `rmake`:
- `tests/run-make/rust-lld`
- `tests/run-make/rust-lld-custom-target`

As they use `$(CGREP) -e` I added `regex` as an exported dependency to the `run_make_support` library.

Unfortunately, the most recent versions depend on `memchr` 2.6.0 but it's currently pinned at 2.5.0 in the workspace, and therefore had to settle for the older `regex-1.8.0`.

r? `@jieyouxu`
2024-04-17 00:00:23 +02:00
Matthias Krüger cf7900476e
Rollup merge of #124007 - RalfJung:miri, r=RalfJung
Miri subtree update

r? ``@ghost``
2024-04-16 17:54:44 +02:00
Guillaume Gomez 9a7adb8d81
Rollup merge of #123687 - bjorn3:ar_archive_writer_0_2_0, r=oli-obk
Update ar_archive_writer to 0.2.0

This adds a whole bunch of tests checking for any difference with llvm's archive writer. It also fixes two mistakes in the porting from C++ to Rust. The first one causes a divergence for Mach-O archives which may or may not be harmless. The second will definitively cause issues, but only applies to thin archives, which rustc currently doesn't create.
2024-04-16 15:19:13 +02:00
Ralf Jung 2f08c2c965 update lockfile 2024-04-16 07:52:25 +02:00
Daniel Paoliello 32f5ca4be7 Add support for Arm64EC to the Standard Library 2024-04-15 16:05:16 -07:00
Michael Goulet 619e044178 Fix pretty hir for anon consts in diagnostics 2024-04-15 18:48:12 -04:00
Rémy Rakic 682535e777 add regex to run_make_support
note: version more recent than 1.8 depend on memchr 2.6, which creates
conflicts as memchr 2.5.0 is pinned elsewhere in the workspace
2024-04-15 17:23:16 +00:00
bors 29b120740b Auto merge of #123719 - RalfJung:compiler_builtins, r=Mark-Simulacrum
update compiler_builtins to 0.1.109

This pulls in https://github.com/rust-lang/compiler-builtins/pull/583 so we should make sure that does not come with any perf surprises.

Cc `@Amanieu`
2024-04-14 18:42:50 +00:00
bors 78bc0a5656 Auto merge of #123913 - matthiaskrgr:rollup-w8stnwl, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - #123651 (Thread local updates for idiomatic examples)
 - #123699 (run-make-support: tidy up support library)
 - #123779 (OpenBSD fix long socket addresses)
 - #123875 (Doc: replace x with y for hexa-decimal fmt)
 - #123879 (Add missing `unsafe` to some internal `std` functions)
 - #123889 (reduce tidy overheads in run-make checks)
 - #123898 (Generic associated consts: Check regions earlier when comparing impl with trait item def)
 - #123902 (compiletest: Update rustfix to 0.8.1)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-04-14 09:02:22 +00:00
Matthias Krüger ab65c68585
Rollup merge of #123902 - ehuss:update-rustfix2, r=Mark-Simulacrum
compiletest: Update rustfix to 0.8.1

This updates the version of rustfix used in compiletest to be closer to what cargo is using. This is to help ensure `cargo fix` and compiletest are aligned. There are some unpublished changes to `rustfix`, which will update in a future PR when those are published.

Will plan to update ui_test in the near future to avoid the duplicate.
2024-04-14 09:02:00 +02:00
bors a3269e920c Auto merge of #123580 - rust-lang:cargo_update, r=Mark-Simulacrum
Weekly `cargo update`

Automation to keep dependencies in `Cargo.lock` current.

The following is the output from `cargo update`:

```txt
    Updating expect-test v1.4.1 -> v1.5.0
    Updating getrandom v0.2.12 -> v0.2.13
    Updating h2 v0.3.25 -> v0.3.26 (latest: v0.4.4)
    Updating pest v2.7.8 -> v2.7.9
    Updating pest_derive v2.7.8 -> v2.7.9
    Updating pest_generator v2.7.8 -> v2.7.9
    Updating pest_meta v2.7.8 -> v2.7.9
    Updating pulldown-cmark v0.10.0 -> v0.10.2
    Updating rustversion v1.0.14 -> v1.0.15
    Updating strsim v0.11.0 -> v0.11.1
    Updating syn v2.0.57 -> v2.0.58
    Updating ui_test v0.22.2 -> v0.22.3
note: pass `--verbose` to see 86 unchanged dependencies behind latest
```
2024-04-14 07:01:45 +00:00
bors 0bf471f339 Auto merge of #123644 - dtolnay:cc, r=Mark-Simulacrum
Update non-bootstrap `cc` dependency to fix compile family detection warning

`x.py check compiler/rustc_llvm` **Before:**

(https://github.com/rust-lang/cc-rs/issues/958)

<pre>
Checking stage0 compiler artifacts {rustc_llvm} (x86_64-unknown-linux-gnu)
   Compiling cc v1.0.90
   Compiling libc v0.2.153
   Compiling rustc_llvm v0.0.0
<b>warning: rustc_llvm@0.0.0: Compiler version doesn't include clang or GCC: "c++" "--version"</b>
    Finished `release` profile [optimized] target(s) in 28.09s
</pre>

**After:**

<pre>
Checking stage0 compiler artifacts {rustc_llvm} (x86_64-unknown-linux-gnu)
   Compiling libc v0.2.153
   Compiling cc v1.0.92
   Compiling rustc_llvm v0.0.0
    Finished `release` profile [optimized] target(s) in 29.06s
</pre>
2024-04-13 21:24:56 +00:00
Eric Huss 123b303fd9 Update rustfix to 0.8.1 2024-04-13 10:54:13 -07:00
Matthias Krüger b467eddf64
Rollup merge of #123796 - bjorn3:remove_cargo_platform, r=clubby789
Remove unused cargo-platform dependency from tidy

Noticed in https://github.com/rust-lang/rust/pull/123788#issuecomment-2049806519
2024-04-12 13:35:30 +02:00
bjorn3 55100e907e Remove unused cargo-platform dependency 2024-04-11 16:44:42 +00:00
klensy 124837d463 move QueryKeyStringCache from rustc_middle to rustc_query_impl, where it actually used
also allows to drop measureme dep on rustc_middle
2024-04-11 14:33:48 +03:00
Ralf Jung 385c363bdf update compiler_builtins to 0.1.109 2024-04-10 14:34:52 +02:00
bjorn3 dacfbfccc5 Update ar_archive_writer to 0.2.0
This adds a whole bunch of tests checking for any difference with llvm's
archive writer. It also fixes two mistakes in the porting from C++ to
Rust. The first one causes a divergence for Mach-O archives which may or
may not be harmless. The second will definitively cause issues, but only
applies to thin archives, which rustc currently doesn't create.
2024-04-09 17:45:02 +00:00
David Tolnay 224edac7a1
Update cc dependency to fix compile family detection warning 2024-04-08 13:00:16 -07:00
Ramon de C Valle 1f0f2c4007 sanitizers: Create the rustc_sanitizers crate
Create the rustc_sanitizers crate and move the source code for the CFI
and KCFI sanitizers to it.

Co-authored-by: David Wood <agile.lion3441@fuligin.ink>
2024-04-08 12:05:41 -07:00
github-actions 4035c24175 cargo update
Updating expect-test v1.4.1 -> v1.5.0
    Updating getrandom v0.2.12 -> v0.2.13
    Updating h2 v0.3.25 -> v0.3.26 (latest: v0.4.4)
    Updating pest v2.7.8 -> v2.7.9
    Updating pest_derive v2.7.8 -> v2.7.9
    Updating pest_generator v2.7.8 -> v2.7.9
    Updating pest_meta v2.7.8 -> v2.7.9
    Updating pulldown-cmark v0.10.0 -> v0.10.2
    Updating rustversion v1.0.14 -> v1.0.15
    Updating strsim v0.11.0 -> v0.11.1
    Updating syn v2.0.57 -> v2.0.58
    Updating ui_test v0.22.2 -> v0.22.3
note: pass `--verbose` to see 86 unchanged dependencies behind latest
2024-04-07 00:16:57 +00:00
bors 01f7f3a1ff Auto merge of #123321 - clubby789:cargo-uupdate, r=Mark-Simulacrum
Bump dependencies

Follow up for #123252
Unfortunately this file needs to be manually bumped when any dependencies are bumped in the main lockfile

```
    Updating autocfg v1.1.0 -> v1.2.0
    Updating chrono v0.4.35 -> v0.4.37
    Updating clap v4.5.3 -> v4.5.4
    Updating clap_derive v4.5.3 -> v4.5.4
    Updating handlebars v5.1.0 -> v5.1.2
    Updating itoa v1.0.10 -> v1.0.11
    Updating memoffset v0.9.0 -> v0.9.1
    Updating openssl-sys v0.9.101 -> v0.9.102
    Updating pin-project-lite v0.2.13 -> v0.2.14
    Updating r-efi v4.3.0 -> v4.4.0
    Updating regex-syntax v0.8.2 -> v0.8.3
    Updating security-framework v2.9.2 -> v2.10.0
    Updating security-framework-sys v2.9.1 -> v2.10.0
    Updating serde_json v1.0.114 -> v1.0.115
    Updating syn v2.0.55 -> v2.0.57
    Updating tokio v1.36.0 -> v1.37.0
```
2024-04-06 10:57:13 +00:00
Philipp Krones a809a72667
Update Cargo.lock 2024-04-04 19:53:00 +02:00
Matthias Krüger 31900b4c13
Rollup merge of #123378 - ferrocene:hoverbear/bump-sysinfo-to-0.30.8, r=Nilstrieb
Update sysinfo to 0.30.8

Fixes a Mac specific issue when using `metrics = true` in `config.toml`.

```config.toml
# Collect information and statistics about the current build and writes it to
# disk. Enabling this or not has no impact on the resulting build output. The
# schema of the file generated by the build metrics feature is unstable, and
# this is not intended to be used during local development.
metrics = true
```

During repeated builds, as the generated `metrics.json` grew, eventually `refresh_cpu()` would be called in quick enough succession (specifically: under 200ms) that a divide by zero would occur, leading to a `NaN` which would not be serialized, then when the `metrics.json` was re-read it would fail to parse.

That error looks like this (collected from Ferrocene's CI):

```
   Compiling rustdoc-tool v0.0.0 (/Users/distiller/project/src/tools/rustdoc)
    Finished release [optimized] target(s) in 38.37s
thread 'main' panicked at src/utils/metrics.rs:180:21:
serde_json::from_slice::<JsonRoot>(&contents) failed with invalid type: null, expected f64 at line 1 column 9598
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:40

Exited with code exit status 1
```

Related: https://github.com/GuillaumeGomez/sysinfo/pull/1236
2024-04-02 21:22:04 +02:00
Ana Hobden b626f01310
Update sysinfo to 0.30.8
Fixes a Mac specific issue when using `build-metrics = true` in `config.toml`
2024-04-02 10:59:05 -07:00
Guillaume Gomez 3aab05eecb
Rollup merge of #122614 - notriddle:notriddle/search-desc, r=GuillaumeGomez
rustdoc-search: shard the search result descriptions

## Preview

This makes no visual changes to rustdoc search. It's a pure perf improvement.

<details><summary>old</summary>

Preview: <http://notriddle.com/rustdoc-html-demo-10/doc/std/index.html?search=vec>

WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240317_AiDc61_2EM,240317_AiDcM0_2EN>

Waterfall diagram:
![image](https://github.com/rust-lang/rust/assets/1593513/39548f0c-7ad6-411b-abf8-f6668ff4da18)

</details>

Preview: <http://notriddle.com/rustdoc-html-demo-10/doc2/std/index.html?search=vec>

WebPageTest Comparison with before branch on a sort of worst case (searching `vec`, winds up downloading most of the shards anyway): <https://www.webpagetest.org/video/compare.php?tests=240322_BiDcCH_13R,240322_AiDcJY_104>

![image](https://github.com/rust-lang/rust/assets/1593513/4be1f9ff-c3ff-4b96-8f5b-b264df2e662d)

## Description

r? `@GuillaumeGomez`

The descriptions are, on almost all crates[^1], the majority of the size of the search index, even though they aren't really used for searching. This makes it relatively easy to separate them into their own files.

Additionally, this PR pulls out information about whether there's a description into a bitmap. This allows us to sort, truncate, *then* download.

This PR also bumps us to ES8. Out of the browsers we support, all of them support async functions according to caniuse.

https://caniuse.com/async-functions

[^1]:
    <https://microsoft.github.io/windows-docs-rs/>, a crate with
    44MiB of pure names and no descriptions for them, is an outlier
    and should not be counted. But this PR should improve it, by replacing a long line of empty strings with a compressed bitmap with a single Run section. Just not very much.

## Detailed sizes

```console
$ cat test.sh
set -ex
cp ../search-index*.js search-index.js
awk 'FNR==NR {a++;next} FNR<a-3' search-index.js{,} | awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}' | sed -E "s:\\\\':':g" > search-index.json
jq -c '.t' search-index.json > t.json
jq -c '.n' search-index.json > n.json
jq -c '.q' search-index.json > q.json
jq -c '.D' search-index.json > D.json
jq -c '.e' search-index.json > e.json
jq -c '.i' search-index.json > i.json
jq -c '.f' search-index.json > f.json
jq -c '.c' search-index.json > c.json
jq -c '.p' search-index.json > p.json
jq -c '.a' search-index.json > a.json
du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json
$ bash test.sh
+ cp ../search-index1.78.0.js search-index.js
+ awk 'FNR==NR {a++;next} FNR<a-3' search-index.js search-index.js
+ awk 'NR>1 {gsub(/\],\\$/,""); gsub(/^\["[^"]+",/,""); print} {next}'
+ sed -E 's:\\'\'':'\'':g'
+ jq -c .t search-index.json
+ jq -c .n search-index.json
+ jq -c .q search-index.json
+ jq -c .D search-index.json
+ jq -c .e search-index.json
+ jq -c .i search-index.json
+ jq -c .f search-index.json
+ jq -c .c search-index.json
+ jq -c .p search-index.json
+ jq -c .a search-index.json
+ du -hs t.json n.json q.json D.json e.json i.json f.json c.json p.json a.json
64K     t.json
800K    n.json
8.0K    q.json
4.0K    D.json
16K     e.json
192K    i.json
544K    f.json
4.0K    c.json
36K     p.json
20K     a.json
```

These are, roughly, the size of each section in the standard library (this tool actually excludes libtest, for parsing-json-with-awk reasons, but libtest is tiny so it's probably not important).

t = item type, like "struct", "free fn", or "type alias". Since one byte is used for every item, this implies that there are approximately 64 thousand items in the standard library.

n = name, and that's now the largest section of the search index with the descriptions removed from it

q = parent *module* path, stored parallel to the items within

D = the size of each description shard, stored as vlq hex numbers

e = empty description bit flags, stored as a roaring bitmap

i = parent *type* index as a link into `p`, stored as decimal json numbers; used only for associated types; might want to switch to vlq hex, since that's shorter, but that would be a separate pr

f = function signature, stored as lists of lists that index into `p`

c = deprecation flag, stored as a roaring bitmap

p = parent *type*, stored separately and linked into from `i` and `f`

a = alias, as [[key, value]] pairs

## Search performance

http://notriddle.com/rustdoc-html-demo-11/perf-shard/index.html

For example, in stm32f4:

<table><thead><tr><th>before<th>after</tr></thead>
<tbody><tr><td>

```
Testing T -> U ... in_args = 0, returned = 0, others = 200
wall time = 617

Testing T, U ... in_args = 0, returned = 0, others = 200
wall time = 198

Testing T -> T ... in_args = 0, returned = 0, others = 200
wall time = 282

Testing crc32 ... in_args = 0, returned = 0, others = 0
wall time = 426

Testing spi::pac ... in_args = 0, returned = 0, others = 0
wall time = 673
```

</td><td>

```
Testing T -> U ... in_args = 0, returned = 0, others = 200
wall time = 716

Testing T, U ... in_args = 0, returned = 0, others = 200
wall time = 207

Testing T -> T ... in_args = 0, returned = 0, others = 200
wall time = 289

Testing crc32 ... in_args = 0, returned = 0, others = 0
wall time = 418

Testing spi::pac ... in_args = 0, returned = 0, others = 0
wall time = 687
```

</td></tr><tr><td>

```
user: 005.345 s
sys:  002.955 s
wall: 006.899 s
child_RSS_high:     583664 KiB
group_mem_high:     557876 KiB
```

</td><td>

```
user: 004.652 s
sys:  000.565 s
wall: 003.865 s
child_RSS_high:     538696 KiB
group_mem_high:     511724 KiB
```

</td></tr>

</table>

This perf tester is janky and unscientific enough that the apparent differences might just be noise. If it's not an order of magnitude, it's probably not real.

## Future possibilities

* Currently, results are not shown until the descriptions are downloaded. Theoretically, the description-less results could be shown. But actually doing that, and making sure it works properly, would require extra work (we have to be careful to avoid layout jumps).
* More than just descriptions can be sharded this way. But we have to be careful to make sure the size wins are worth the round trips. Ideally, data that’s needed only for display should be sharded while data needed for search isn’t.
* [Full text search](https://internals.rust-lang.org/t/full-text-search-for-rustdoc-and-doc-rs/20427) also needs this kind of infrastructure. A good implementation might store a compressed bloom filter in the search index, then download the full keyword in shards. But, we have to be careful not just of the amount readers have to download, but also of the amount that [publishers](https://gist.github.com/notriddle/c289e77f3ed469d1c0238d1d135d49e1) have to store.
2024-04-02 18:18:50 +02:00
clubby789 629d69412a Bump dependencies 2024-04-01 13:06:32 +00:00
bors defef8658e Auto merge of #122972 - beetrees:use-align-type, r=fee1-dead
Use the `Align` type when parsing alignment attributes

Use the `Align` type in `rustc_attr::parse_alignment`, removing the need to call `Align::from_bytes(...).unwrap()` later in the compilation process.
2024-04-01 03:16:45 +00:00
beetrees 6e5f1dacf3
Use the Align type when parsing alignment attributes 2024-04-01 03:05:55 +01:00
klensy 71ea506d3d bump tracing-tree to 0.3
Only change is https://github.com/davidbarsky/tracing-tree/pull/76
dedupes tracing-log
dupes nu-ansi-term
2024-03-30 17:39:43 +03:00
bors c98ea0d808 Auto merge of #111769 - saethlin:ctfe-backtrace-ctrlc, r=RalfJung
Print a backtrace in const eval if interrupted

Demo:
```rust
#![feature(const_eval_limit)]
#![const_eval_limit = "0"]

const OW: u64 = {
    let mut res: u64 = 0;
    let mut i = 0;
    while i < u64::MAX {
        res = res.wrapping_add(i);
        i += 1;
    }
    res
};

fn main() {
    println!("{}", OW);
}
```
```
╭ ➜ ben@archlinux:~/rust
╰ ➤ rustc +stage1 spin.rs
^Cerror[E0080]: evaluation of constant value failed
 --> spin.rs:8:33
  |
8 |         res = res.wrapping_add(i);
  |                                 ^ Compilation was interrupted

note: erroneous constant used
  --> spin.rs:15:20
   |
15 |     println!("{}", OW);
   |                    ^^

note: erroneous constant used
  --> spin.rs:15:20
   |
15 |     println!("{}", OW);
   |                    ^^
   |
   = note: this note originates in the macro `$crate::format_args_nl` which comes from the expansion of the macro `println` (in Nightly builds, run with -Z macro-backtrace for more info)

error: aborting due to previous error

For more information about this error, try `rustc --explain E0080`.
```
2024-03-26 00:04:03 +00:00
Matthias Krüger fe0222be07
Rollup merge of #123005 - maurer:cfi-arbitrary-receivers, r=compiler-errors
CFI: Support complex receivers

Right now, we only support rewriting `&self` and `&mut self` into `&dyn MyTrait` and `&mut dyn MyTrait`. This expands it to handle the full gamut of receivers by calculating the receiver based on *substitution* rather than based on a rewrite. This means that, for example, `Arc<Self>` will become `Arc<dyn MyTrait>` appropriately with this change.

This approach also allows us to support associated type constraints as well, so we will correctly rewrite `&self` into `&dyn MyTrait<T=i32>`, for example.

r? ```@workingjubilee```
2024-03-25 11:00:14 +01:00
Matthew Maurer 40f41e7e89 CFI: Support arbitrary receivers
Previously, we only rewrote `&self` and `&mut self` receivers. By
instantiating the method from the trait definition, we can make this
work work with arbitrary legal receivers instead.
2024-03-24 22:46:48 +00:00
github-actions 1848b46c0b cargo update
Updating aho-corasick v1.1.2 -> v1.1.3
    Updating backtrace v0.3.69 -> v0.3.71
    Updating bitflags v2.4.2 -> v2.5.0
    Updating bytes v1.5.0 -> v1.6.0
    Updating cargo-platform v0.1.7 -> v0.1.8
    Updating fastrand v2.0.1 -> v2.0.2
    Updating indexmap v2.2.5 -> v2.2.6
    Updating libz-sys v1.1.15 -> v1.1.16
    Updating rayon v1.9.0 -> v1.10.0
    Updating reqwest v0.11.26 -> v0.11.27 (latest: v0.12.1)
    Updating rustix v0.38.31 -> v0.38.32
    Updating smallvec v1.13.1 -> v1.13.2
    Updating syn v2.0.53 -> v2.0.55
    Updating uuid v1.7.0 -> v1.8.0
note: pass `--verbose` to see 87 unchanged dependencies behind latest
2024-03-24 12:09:28 +00:00
bors b3df0d7e5e Auto merge of #122580 - saethlin:compiler-builtins-can-panic, r=pnkfelix
"Handle" calls to upstream monomorphizations in compiler_builtins

This is pretty cooked, but I think it works.

compiler-builtins has a long-standing problem that at link time, its rlib cannot contain any calls to `core`. And yet, in codegen we _love_ inserting calls to symbols in `core`, generally from various panic entrypoints.

I intend this PR to attack that problem as completely as possible. When we generate a function call, we now check if we are generating a function call from `compiler_builtins` and whether the callee is a function which was not lowered in the current crate, meaning we will have to link to it.

If those conditions are met, actually generating the call is asking for a linker error. So we don't. If the callee diverges, we lower to an abort with the same behavior as `core::intrinsics::abort`. If the callee does not diverge, we produce an error. This means that compiler-builtins can contain panics, but they'll SIGILL instead of panicking. I made non-diverging calls a compile error because I'm guessing that they'd mostly get into compiler-builtins by someone making a mistake while working on the crate, and compile errors are better than linker errors. We could turn such calls into aborts as well if that's preferred.
2024-03-22 16:55:11 +00:00
Matthias Krüger 7481c0eab5
Rollup merge of #122820 - oli-obk:no_ord_def_id, r=estebank
Stop using `<DefId as Ord>` in various diagnostic situations

work towards https://github.com/rust-lang/rust/issues/90317

Reverts part of https://github.com/rust-lang/rust/pull/106281, as it sorts constants and that's problematic since it can contain `ParamConst`, which contains `DefId`s
2024-03-22 11:37:01 +01:00
Michael Howell 28db4ccda7 rustdoc-search: compressed bitmap to sort, then load desc
This adds a bit more data than "pure sharding" by
including information about which items have no description
at all. This way, it can sort the results, then truncate,
then finally download the description.

With the "e" bitmap: 2380KiB

Without the "e" bitmap: 2364KiB
2024-03-21 17:57:01 -07:00
Philipp Krones 8e53d53356
Update Cargo.lock 2024-03-21 22:20:59 +01:00
Oli Scherer cda209bf43 Stop ConstraintCategory Ord impl from relying on Ty's Ord impl. 2024-03-21 10:45:30 +00:00
Ben Kimock 2f6fb234de Add a test 2024-03-20 23:36:05 -04:00
Nadrieril d697dd44d1 Add a crate-custom test harness 2024-03-19 02:22:43 +01:00
Ben Kimock 9e0d1a3284 Print a backtrace in const eval if interrupted 2024-03-17 11:55:20 -04:00
github-actions c486d2d920 cargo update
Updating ahash v0.8.10 -> v0.8.11
    Updating anyhow v1.0.80 -> v1.0.81
    Updating basic-toml v0.1.8 -> v0.1.9
    Updating bumpalo v3.15.3 -> v3.15.4
      Adding cfg_aliases v0.1.1
    Updating chrono v0.4.34 -> v0.4.35
    Updating clap v4.5.1 -> v4.5.3
    Updating clap_builder v4.5.1 -> v4.5.2
    Updating clap_derive v4.5.0 -> v4.5.3
    Updating color-eyre v0.6.2 -> v0.6.3
    Updating ctrlc v3.4.2 -> v3.4.4
    Updating env_logger v0.11.2 -> v0.11.3
    Updating h2 v0.3.24 -> v0.3.25
      Adding heck v0.5.0
    Updating http v0.2.11 -> v0.2.12
    Updating js-sys v0.3.68 -> v0.3.69
    Updating libloading v0.8.2 -> v0.8.3
    Updating new_debug_unreachable v1.0.4 -> v1.0.6
    Updating nix v0.27.1 -> v0.28.0
    Updating proc-macro2 v1.0.78 -> v1.0.79
    Updating reqwest v0.11.24 -> v0.11.26
    Updating syn v2.0.52 -> v2.0.53
    Updating sysinfo v0.30.6 -> v0.30.7
    Updating thiserror v1.0.57 -> v1.0.58
    Updating thiserror-impl v1.0.57 -> v1.0.58
    Updating wasm-bindgen v0.2.91 -> v0.2.92
    Updating wasm-bindgen-backend v0.2.91 -> v0.2.92
    Updating wasm-bindgen-futures v0.4.41 -> v0.4.42
    Updating wasm-bindgen-macro v0.2.91 -> v0.2.92
    Updating wasm-bindgen-macro-support v0.2.91 -> v0.2.92
    Updating wasm-bindgen-shared v0.2.91 -> v0.2.92
    Updating web-sys v0.3.68 -> v0.3.69
2024-03-17 00:26:01 +00:00