Commit Graph

257761 Commits

Author SHA1 Message Date
Jerry Wang
eb0bad4635
Add drop bombs to llvm.rs 2024-06-15 23:10:42 -04:00
Jerry Wang
89df41636b
Remove run-make-support/src/llvm_readobj.rs 2024-06-15 22:58:58 -04:00
Zalathar
88ade9c740 coverage: Eagerly convert coverage spans to a simpler form 2024-06-16 12:21:41 +10:00
Zalathar
bf74fb1d2f coverage: Move most span processing back into coverage::spans 2024-06-16 12:21:41 +10:00
Zalathar
e102d2dbd6 coverage: More consistent variable names for span processing 2024-06-16 12:21:41 +10:00
bors
bc3618f31e Auto merge of #126479 - Kobzol:disable-llvm-linker-by-default, r=onur-ozkan
Disable `llvm-bitcode-linker` in the default bootstrap profiles

I don't think that we really need to enable `llvm-bitcode-linker` in the default bootstrap profiles, since it seems that it is only useful for running `nvptx` tests. It should be enabled on CI, which it is, and that should be enough. People can enable it easily locally, if they want.

The linker causes occasionally some rebuild issues (https://github.com/rust-lang/rust/issues/122491, https://github.com/rust-lang/rust/issues/126464), but more importantly it is just needless work to build it locally.

I kept it enabled for `dist`, because it is distributed as a `rustup` component (for some reason it's not included in `extended`? not sure).

Fixes: https://github.com/rust-lang/rust/issues/126464
2024-06-16 01:07:45 +00:00
Scott McMurray
33c4817d98 Redo SliceIndex implementations 2024-06-15 17:39:25 -07:00
github-actions
729ed8194f cargo update
Locking 18 packages to latest compatible versions
    Updating annotate-snippets v0.11.3 -> v0.11.4
    Updating clap v4.5.6 -> v4.5.7
    Updating clap_builder v4.5.6 -> v4.5.7
    Updating derive_more v0.99.17 -> v0.99.18
      Adding icu_collections v1.5.0
      Adding icu_normalizer v1.5.0
      Adding icu_normalizer_data v1.5.0
      Adding icu_properties v1.5.0
      Adding icu_properties_data v1.5.0
    Updating idna v0.5.0 -> v1.0.0
    Updating mdbook-i18n-helpers v0.3.3 -> v0.3.4
    Updating redox_syscall v0.5.1 -> v0.5.2
    Updating regex-lite v0.1.5 -> v0.1.6
    Updating regex-syntax v0.8.3 -> v0.8.4
    Removing unicode-bidi v0.3.15
    Updating url v2.5.0 -> v2.5.1
      Adding utf16_iter v1.0.5
      Adding utf8_iter v1.0.4
      Adding write16 v1.0.0
note: pass `--verbose` to see 88 unchanged dependencies behind latest
2024-06-16 00:18:06 +00:00
Slanterns
240478383b
add codegen test for Error::provide 2024-06-16 07:43:08 +08:00
bors
d5b34a28cf Auto merge of #126352 - cuviper:centos7-vault, r=Kobzol
ci: Update centos:7 to use vault repos

CentOS 7 is going EOL on June 30, after which its package repos will no
longer exist on the regular mirrors. We'll still be able to access
packages from the vault server though, and can start doing so now. This
affects `dist-i686-linux` and `dist-x86_64-linux`.

I also removed `epel-release` because we were only using that for its
`cmake3`, but we've been building our own version for a while.

try-job: dist-i686-linux
try-job: dist-x86_64-linux
2024-06-15 22:54:07 +00:00
Slanterns
6cce48838b
update comment 2024-06-16 06:31:37 +08:00
bors
3cf924b934 Auto merge of #126528 - GuillaumeGomez:rollup-6zjs70e, r=GuillaumeGomez
Rollup of 9 pull requests

Successful merges:

 - #126229 (Bump windows-bindgen to 0.57)
 - #126404 (Check that alias-relate terms are WF if reporting an error in alias-relate)
 - #126410 (smir: merge identical Constant and ConstOperand types)
 - #126478 (Migrate `run-make/codegen-options-parsing` to `rmake.rs`)
 - #126496 (Make proof tree probing and `Candidate`/`CandidateSource` generic over interner)
 - #126508 (Make uninitialized_error_reported a set of locals)
 - #126517 (Migrate `run-make/dep-graph` to `rmake.rs`)
 - #126525 (trait_selection: remove extra words)
 - #126526 (tests/ui/lint: Move 19 tests to new `non-snake-case` subdir)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-15 18:52:57 +00:00
Guillaume Gomez
f788ea47f9
Rollup merge of #126526 - Enselic:non-snake-case, r=jieyouxu
tests/ui/lint: Move 19 tests to new `non-snake-case` subdir

Mainly so that it is easier to only run all `non_snake_case`-lint-specific tests with:

    ./x test tests/ui/lint/non-snake-case

But also to reduce the size of the large `tests/ui/lint` directory. And rename some tests to pass tidy, and remove them from `src/tools/tidy/src/issues.txt`.
2024-06-15 19:51:38 +02:00
Guillaume Gomez
b6311b3a33
Rollup merge of #126525 - jieyouxu:traitsel-docs, r=compiler-errors
trait_selection: remove extra words

Tiny doc cleanup.

Fixes https://github.com/rust-lang/rust/issues/88231.
2024-06-15 19:51:38 +02:00
Guillaume Gomez
38b3c9acd4
Rollup merge of #126517 - GuillaumeGomez:migrate-run-make-dep-graph, r=Kobzol
Migrate `run-make/dep-graph` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@jieyouxu`
2024-06-15 19:51:37 +02:00
Guillaume Gomez
53364c3e07
Rollup merge of #126508 - beepster4096:minor_borrowck_cherrypick, r=compiler-errors
Make uninitialized_error_reported a set of locals

Another artifact of how places used to be able to be based on statics and not just locals. This set is exclusively filled with PlaceRefs that are just locals, so it should just contain locals directly.
2024-06-15 19:51:37 +02:00
Guillaume Gomez
aa6fb1cfcb
Rollup merge of #126496 - compiler-errors:more-generics, r=lcnr
Make proof tree probing and `Candidate`/`CandidateSource` generic over interner

`<TyCtxt<'tcx>>` is ugly, but will become `<I>` when things actually become generic.

r? lcnr
2024-06-15 19:51:36 +02:00
Guillaume Gomez
1f076c273b
Rollup merge of #126478 - GuillaumeGomez:migrate-run-make-codegen-options-parsing, r=jieyouxu
Migrate `run-make/codegen-options-parsing` to `rmake.rs`

Part of https://github.com/rust-lang/rust/issues/121876.

r? `@jieyouxu`
2024-06-15 19:51:36 +02:00
Guillaume Gomez
be1d42776d
Rollup merge of #126410 - RalfJung:smir-const-operand, r=oli-obk
smir: merge identical Constant and ConstOperand types

The first commit renames the const operand visitor functions on regular MIR to match the type name, that was forgotten in the original rename.

The second commit changes stable MIR, fixing https://github.com/rust-lang/project-stable-mir/issues/71. Previously there were two different smir types for the MIR type `ConstOperand`, one used in `Operand` and one in `VarDebugInfoContents`.

Maybe we should have done this with https://github.com/rust-lang/rust/pull/125967, so there's only a single breaking change... but I saw that PR too late.

Fixes https://github.com/rust-lang/project-stable-mir/issues/71
2024-06-15 19:51:35 +02:00
Guillaume Gomez
709d862308
Rollup merge of #126404 - compiler-errors:alias-relate-terms, r=lcnr
Check that alias-relate terms are WF if reporting an error in alias-relate

Check that each of the left/right term is WF when deriving a best error obligation for an alias-relate goal. This will make sure that given `<i32 as NotImplemented>::Assoc = ()` will drill down into `i32: NotImplemented` since we currently treat the projection as rigid.

r? lcnr
2024-06-15 19:51:35 +02:00
Guillaume Gomez
4f83c1d967
Rollup merge of #126229 - ChrisDenton:bindgen, r=Mark-Simulacrum
Bump windows-bindgen to 0.57

This PR updates our generated Windows API bindings using the latest version of `windows-bindgen`.

The only change to the generated code is that `derive` is used for `Copy` and `Clone` instead of `impl`.
2024-06-15 19:51:34 +02:00
klensy
d69f088538 fix build with html5ever bump 2024-06-15 20:36:54 +03:00
Martin Nordholts
b717aa1b95 tests/ui/lint: Move 19 tests to new non-snake-case subdir
Mainly so that it is easier to only run all `non-snake-case`-specific
tests but no other tests with:

    ./x test tests/ui/lint/non-snake-case

But also to reduce the size of the large `tests/ui/lint` directory. And
rename some tests to pass tidy, and remove them from
`src/tools/tidy/src/issues.txt`.
2024-06-15 18:18:43 +02:00
klensy
52242f2c72 bump few deps 2024-06-15 18:53:45 +03:00
许杰友 Jieyou Xu (Joe)
ea2ac347f0 trait_selection: remove extra words 2024-06-15 15:50:00 +00:00
Guillaume Gomez
a4eaf87982 Migrate run-make/dep-graph to rmake.rs 2024-06-15 17:34:43 +02:00
bors
92af831290 Auto merge of #126518 - matthiaskrgr:rollup-wb70rzq, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #125829 (rustc_span: Add conveniences for working with span formats)
 - #126361 (Unify intrinsics body handling in StableMIR)
 - #126417 (Add `f16` and `f128` inline ASM support for `x86` and `x86-64`)
 - #126424 ( Also sort `crt-static` in `--print target-features` output)
 - #126428 (Polish `std::path::absolute` documentation.)
 - #126429 (Add `f16` and `f128` const eval for binary and unary operationations)
 - #126448 (End support for Python 3.8 in tidy)
 - #126488 (Use `std::path::absolute` in bootstrap)
 - #126511 (.mailmap: Associate both my work and my private email with me)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-15 14:51:12 +00:00
Matthias Krüger
128e2b479c
Rollup merge of #126511 - Enselic:mailmap, r=lqd
.mailmap: Associate both my work and my private email with me

Mainly so that 73 + 60 is summed to 133 on the [thanks](https://thanks.rust-lang.org/rust/all-time/) page.
2024-06-15 14:40:52 +02:00
Matthias Krüger
d00e71ebb9
Rollup merge of #126488 - ChrisDenton:absolute, r=albertlarsan68
Use `std::path::absolute` in bootstrap

`std::path::absolute` is now stable in 1.79 so we can get rid of the copy-pasted version.
2024-06-15 14:40:51 +02:00
Matthias Krüger
4f9bf4c357
Rollup merge of #126448 - DianQK:tidy-python, r=onur-ozkan
End support for Python 3.8 in tidy

Python 3.8 will reach its end of support in October 2024. You can find more details [here](https://devguide.python.org/versions/).

### NixOS

NixOS has already discontinued provide Python 3.8. For more information, visit their [package search page](https://search.nixos.org/packages?channel=24.05&from=0&size=50&sort=relevance&type=packages&query=python38).

### Debian

- **Debian 11 (Bullseye)**: The default Python version is 3.9. More information is available [here](https://packages.debian.org/bullseye/python3).
- **Debian 10 (Buster) (EOL 2024-10)**: The default Python version is 3.7. Details can be found [here](https://packages.debian.org/buster/python3).

### Ubuntu

- **Ubuntu 20.04 'Focal Fossa' (LTS)**: The default Python version is 3.8.2. However, Python 3.9 is also available. You can find more information on these packages [here](https://packages.ubuntu.com/focal/python3) and [here](https://packages.ubuntu.com/focal/python3.9).
- **Ubuntu 22.04 'Jammy Jellyfish' (LTS)**: The default Python version is 3.10.6. More details can be found [here](https://packages.ubuntu.com/jammy/python3).
2024-06-15 14:40:51 +02:00
Matthias Krüger
3775f2f5d0
Rollup merge of #126429 - tgross35:f16-f128-const-eval, r=RalfJung
Add `f16` and `f128` const eval for binary and unary operationations

Add const evaluation and Miri support for f16 and f128, including unary and binary operations. Casts are not yet included.

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

r? ``@RalfJung``
2024-06-15 14:40:50 +02:00
Matthias Krüger
a2249027cd
Rollup merge of #126428 - kpreid:absolute, r=jhpratt
Polish `std::path::absolute` documentation.

These changes bring it closer to other standard library documentation and, in particular, `std::fs::canonicalize`, which it will often be compared with.

* Add `# Platform-specific behavior` section, with content moved from Examples section.
* Create `# Errors` section.
* Phrase error description to allow future platforms to have new syntactic errors, rather than only emptiness.
* Add missing commas.
* Indent example code 4 spaces.
2024-06-15 14:40:49 +02:00
Matthias Krüger
21de99258f
Rollup merge of #126424 - Enselic:sort-target-features, r=lqd
Also sort `crt-static` in `--print target-features` output

I didn't find `crt-static` at first (for `x86_64-unknown-linux-gnu`), because it was put at the bottom of the large and otherwise sorted list.

Fully sort the list before we print it.

Note that `llvm_target_features` starts out and remains sorted and does not need to be sorted an extra time.

On my machine the diff is just:

```diff
$ diff -u /tmp/before2.txt /tmp/after2.txt
--- /tmp/before2.txt    2024-06-13 20:40:27.091636592 +0200
+++ /tmp/after2.txt     2024-06-13 20:39:54.584894891 +0200
``@@`` -20,6 +20,7 ``@@``
     bmi1                            - Support BMI instructions.
     bmi2                            - Support BMI2 instructions.
     cmpxchg16b                      - 64-bit with cmpxchg16b (this is true for most x86-64 chips, but not the first AMD chips).
+    crt-static                      - Enables C Run-time Libraries to be statically linked.
     ermsb                           - REP MOVS/STOS are fast.
     f16c                            - Support 16-bit floating point conversion instructions.
     fma                             - Enable three-operand fused multiple-add.
``@@`` -49,7 +50,6 ``@@``
     xsavec                          - Support xsavec instructions.
     xsaveopt                        - Support xsaveopt instructions.
     xsaves                          - Support xsaves instructions.
-    crt-static                      - Enables C Run-time Libraries to be statically linked.

 Code-generation features supported by LLVM for this target:
     16bit-mode                      - 16-bit mode (i8086).
```

I couldn't find a ui test that tested this output. Let's see if CI finds a regression tests.
2024-06-15 14:40:49 +02:00
Matthias Krüger
0f2cc21547
Rollup merge of #126417 - beetrees:f16-f128-inline-asm-x86, r=Amanieu
Add `f16` and `f128` inline ASM support for `x86` and `x86-64`

This PR adds `f16` and `f128` input and output support to inline ASM on `x86` and `x86-64`. `f16` vector sizes are taken from [here](https://www.intel.com/content/www/us/en/docs/intrinsics-guide/index.html).

Relevant issue: #125398
Tracking issue: #116909

``@rustbot`` label +F-f16_and_f128
2024-06-15 14:40:48 +02:00
Matthias Krüger
dad74aa67c
Rollup merge of #126361 - celinval:issue-0079-intrinsic, r=oli-obk
Unify intrinsics body handling in StableMIR

rust-lang/rust#120675 introduced a new mechanism to declare intrinsics which will potentially replace the rust-intrinsic ABI.

The new mechanism introduces a placeholder body and mark the intrinsic with `#[rustc_intrinsic_must_be_overridden]`.
In practice, this means that a backend should not generate code for the placeholder, and shim the intrinsic.
The new annotation is an internal compiler implementation, and it doesn't need to be exposed to StableMIR users.

In this PR, we unify the interface for intrinsics marked with `rustc_intrinsic_must_be_overridden` and intrinsics that do not have a body.

Fixes https://github.com/rust-lang/project-stable-mir/issues/79

r? ``@oli-obk``

cc: ``@momvart``
2024-06-15 14:40:48 +02:00
Matthias Krüger
5fac57284e
Rollup merge of #125829 - petrochenkov:upctxt2, r=michaelwoerister
rustc_span: Add conveniences for working with span formats

This is the refactoring part of https://github.com/rust-lang/rust/pull/125017.
2024-06-15 14:40:47 +02:00
bors
687a68d679 Auto merge of #126514 - matthiaskrgr:rollup-pnwi8ns, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - #126354 (Use `Variance` glob imported variants everywhere)
 - #126367 (Point out failing never obligation for `DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK`)
 - #126469 (MIR Shl/Shr: the offset can be computed with rem_euclid)
 - #126471 (Use a consistent way to filter out bounds instead of splitting it into three places)
 - #126472 (build `libcxx-version` only when it doesn't exist)
 - #126497 (delegation: Fix hygiene for `self`)
 - #126501 (make bors ignore comments in PR template)
 - #126509 (std: suggest OnceLock over Once)
 - #126512 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-06-15 12:38:17 +00:00
Matthias Krüger
92ad0b1cd2
Rollup merge of #126512 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2024-06-15 10:56:45 +02:00
Matthias Krüger
83cbceac0f
Rollup merge of #126509 - workingjubilee:gently-discourage-doing-things-once, r=jhpratt
std: suggest OnceLock over Once

It was noted in https://github.com/rust-lang/rust/issues/125615#issuecomment-2149590818 that Once is not necessary in most cases and should be discouraged. Once is really just an implementation detail of OnceLock that others can use if they want. Suggest they use OnceLock instead.
2024-06-15 10:56:44 +02:00
Matthias Krüger
e287a00018
Rollup merge of #126501 - lqd:fix-pr-template, r=Mark-Simulacrum
make bors ignore comments in PR template

As discussed [here](https://rust-lang.zulipchat.com/#narrow/stream/122651-general/topic/default.20PR.20description.20feedback/near/444794577), the existing PR template is not yet ignored by bors and the html comments show up in git history.

This PR uses markers so the html comments are deleted by the bot.

r? lcnr
2024-06-15 10:56:44 +02:00
Matthias Krüger
4265043aae
Rollup merge of #126497 - petrochenkov:delehyg, r=compiler-errors
delegation: Fix hygiene for `self`

And fix diagnostics for `self` from a macro.

The missing rib caused `self` to be treated as a generic parameter and ignore `macro_rules` hygiene.

Addresses this comment https://github.com/rust-lang/rust/pull/124135#discussion_r1637492234.
2024-06-15 10:56:43 +02:00
Matthias Krüger
b5dd3d4ada
Rollup merge of #126472 - onur-ozkan:improve-libcxx-build, r=Kobzol
build `libcxx-version` only when it doesn't exist

In https://github.com/rust-lang/rust/issues/126423, it seems like c++ parsing takes quite amount of time on bootstrap startups. This PR makes libcxx-version to be compiled only when it doesn't exist.

A simple demonstration on the overhead of buiding `libcxx-version`:

```sh
$ rm -rf build/host/libcxx-version

$ x build
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.07s

 ----- LIBCXX VERSION CHECK TOOK: 509ms
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.25s
Build completed successfully in 0:00:02

$ x build
Building bootstrap
    Finished `dev` profile [unoptimized] target(s) in 0.07s

 ----- LIBCXX VERSION CHECK TOOK: 2ms
Creating a sysroot for stage2 compiler (use `rustup toolchain link 'name' build/host/stage2`)
Building tool rustdoc (stage1 -> stage2, x86_64-unknown-linux-gnu)
    Finished `release` profile [optimized] target(s) in 0.14s
Build completed successfully in 0:00:01
```
2024-06-15 10:56:43 +02:00
Matthias Krüger
6f21da3bb4
Rollup merge of #126471 - oli-obk:filter_loop, r=compiler-errors
Use a consistent way to filter out bounds instead of splitting it into three places

just a small cleanup, no logic change.

Initially the code had me looking for why anything was special here, only to realize there's nothing interesting going on
2024-06-15 10:56:42 +02:00
Matthias Krüger
f24509aa23
Rollup merge of #126469 - RalfJung:mir-shifts, r=scottmcm
MIR Shl/Shr: the offset can be computed with rem_euclid

r? ````@scottmcm````
2024-06-15 10:56:41 +02:00
Matthias Krüger
b473ec2744
Rollup merge of #126367 - compiler-errors:point-out-failing-never-obligation, r=WaffleLapkin
Point out failing never obligation for `DEPENDENCY_ON_UNIT_NEVER_TYPE_FALLBACK`

Based on top of #125289, so just need to look at the last commit.

r? `@WaffleLapkin`
2024-06-15 10:56:41 +02:00
Matthias Krüger
335e320baa
Rollup merge of #126354 - compiler-errors:variance, r=lcnr
Use `Variance` glob imported variants everywhere

Fully commit to using the globbed variance. Could be convinced the other way, and change this PR to not use the globbed variants anywhere, but I'd rather we do one or the other.

r? lcnr
2024-06-15 10:56:40 +02:00
bors
1d1356d0f6 Auto merge of #125722 - Urgau:non_local_defs-macro-to-change, r=estebank
Indicate in `non_local_defs` lint that the macro needs to change

This PR adds a note to indicate that the macro needs to change in the `non_local_definitions` lint output.

Address https://github.com/rust-lang/rust/pull/125089#discussion_r1616311862
Fixes #125681
r? `@estebank`
2024-06-15 08:50:44 +00:00
Martin Nordholts
297c97dbe0 .mailmap: Associate both my work and my private email with me 2024-06-15 09:27:39 +02:00
bors
3f2c50c541 Auto merge of #3672 - RalfJung:cargo-many-seeds, r=RalfJung
cargo miri: add support for '--many-seeds'

to run the program / tests many times with different seeds: `cargo miri run --many-seeds` / `cargo miri test --many-seeds`.

`@rust-lang/miri` any opinion on the flag name here? Should it be `-Zmiri-many-seeds` or is `--many-seeds` fine?

Fixes https://github.com/rust-lang/miri/issues/3546
2024-06-15 07:20:34 +00:00
Jubilee Young
b8eb6ad032 std: suggest OnceLock over Once 2024-06-15 00:09:03 -07:00