Commit Graph

251199 Commits

Author SHA1 Message Date
Jubilee
2a08f02048
Rollup merge of #123267 - devnexen:thread_get_name_haiku, r=joboet
std:🧵 adding get_name haiku implementation.

follow-up #123233
2024-03-31 13:18:17 -07:00
Jubilee
17737bfece
Rollup merge of #123180 - Oneirical:master, r=Mark-Simulacrum
Rewrite `core-no-fp-fmt-parse` test in Rust

Claiming the simple "core-no-fp-fmt-parse" test from #121876. `run_make_support` was altered with `arg_path` written in #121918 by `@abhay-51,` with additional doc comment.

Preliminary GSoC contribution for the project proposal mentored by `@jieyouxu.`
2024-03-31 13:18:16 -07:00
David Carlier
e5c5ed00a5 std:🧵 adding get_name haiku implementation.
follow-up #123233
2024-03-31 17:47:44 +01:00
bors
bf71daedc2 Auto merge of #121851 - michaelwoerister:mcp-533-effective-vis, r=cjgillot
Use FxIndexMap instead FxHashMap to stabilize iteration order in EffectiveVisibilities

Part of [MCP 533](https://github.com/rust-lang/compiler-team/issues/533).
2024-03-31 16:22:38 +00:00
bors
a8cfc83801 Auto merge of #123246 - Kobzol:tarball-reproducible, r=Mark-Simulacrum
Make source tarball generation more reproducible

This PR performs several changes to source tarball generation (`x dist rustc-src`) in order to make it more reproducible (in light of the recent "xz backdoor"...). I want to follow up on it with making a separate CI workflow for generating the tarball.

After this PR, running this locally produces identical checksums:
```bash
$ ./x dist rustc-src
$ sha256sum build/dist/rustc-1.79.0-src.tar.gz

$ ./x dist rustc-src
$ sha256sum build/dist/rustc-1.79.0-src.tar.gz
```

r? `@Mark-Simulacrum`
2024-03-31 12:36:23 +00:00
Jakub Beránek
877e8d456d
Sort directories when generating tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
18d9d44bd6
Make tarball generation more deterministic 2024-03-31 12:56:05 +02:00
Jakub Beránek
8caef4e6c3
Remove potential __pycache__ directories from src tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
63d6ce03b3
Checkout all submodules when building source tarballs 2024-03-31 12:56:05 +02:00
Jakub Beránek
6f4f39a8d5
Move submodule lookup to Builder 2024-03-31 12:56:05 +02:00
bors
395f780cd8 Auto merge of #123264 - matthiaskrgr:rollup-smyy7j9, r=matthiaskrgr
Rollup of 4 pull requests

Successful merges:

 - #123189 (Log BOLT args in bootstrap `rustc` shim)
 - #123211 (Stop calling visitors `V`)
 - #123242 (pattern analysis: Require enum indices to be contiguous)
 - #123260 (Miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-31 10:26:55 +00:00
Matthias Krüger
9abf4bcadb
Rollup merge of #123260 - RalfJung:miri, r=RalfJung
Miri subtree update

r? `@ghost`
2024-03-31 11:50:41 +02:00
Matthias Krüger
f04d068adc
Rollup merge of #123242 - Nadrieril:require-contiguous-enum-indices, r=compiler-errors
pattern analysis: Require enum indices to be contiguous

We had a cfg-hack to allow rust-analyzer to use non-contiguous indices for its enum variants. Unfortunately this no longer works if r-a uses the in-tree version of the crate.

This PR removes the hack, and on the r-a side we'll have to use contiguous indices but that's not too hard.

r? `@compiler-errors`
2024-03-31 11:50:41 +02:00
Matthias Krüger
d77608b4b9
Rollup merge of #123211 - compiler-errors:V, r=estebank
Stop calling visitors `V`

Renames some visitors which currently have the unhelpful name of `V`. It's not self-documenting, and there is no situation where saving a few bytes in source code helps anyone.

Stacked on top of #123202 due to conflict.
2024-03-31 11:50:40 +02:00
Matthias Krüger
0928a54a1b
Rollup merge of #123189 - Kobzol:rustc-shim-log, r=onur-ozkan
Log BOLT args in bootstrap `rustc` shim

Before, the BOLT argument would not be logged, because it was only added after the logging has happened.

Found by `@RalfJung` [here](https://github.com/rust-lang/rust/pull/116352#discussion_r1544235771).
2024-03-31 11:50:40 +02:00
bors
688c30dc9f Auto merge of #123258 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`
2024-03-31 08:25:24 +00:00
Laurențiu Nicola
a4e02d7037 Merge commit 'f5a9250147f6569d8d89334dc9cca79c0322729f' into sync-from-ra 2024-03-31 09:57:00 +03:00
bors
c93b17d6d2 Auto merge of #123236 - klensy:tracing-tree-bump, r=Mark-Simulacrum
bump tracing-tree to 0.3

Only change in `tracing-tree` is https://github.com/davidbarsky/tracing-tree/pull/76
* dedupes `tracing-log`
* dupes `nu-ansi-term`
2024-03-31 06:21:53 +00:00
bors
d5de305fef Auto merge of #3435 - rust-lang:rustup-2024-03-31, r=saethlin
Automatic Rustup
2024-03-31 05:44:17 +00:00
The Miri Cronjob Bot
eb8e8c06b6 Merge from rustc 2024-03-31 05:40:36 +00:00
The Miri Cronjob Bot
2dd824789c Preparing for merge from rustc 2024-03-31 05:33:07 +00:00
bors
5f358a848c Auto merge of #123233 - devnexen:thread_get_name_bsd, r=joboet
std:🧵 adding freebsd/netbsd to the linux's get_name implementa…

…tion.
2024-03-31 04:18:47 +00:00
bors
5baf1e13f5 Auto merge of #122459 - Nadrieril:sort-eq, r=oli-obk
match lowering: sort `Eq` candidates in the failure case too

This is a slight tweak to MIR gen of matches. Take a match like:
```rust
match (s, flag) {
    ("a", _) if foo() => 1,
    ("b", true) => 2,
    ("a", false) => 3,
    (_, true) => 4,
    _ => 5,
}
```
If we switch on `s == "a"`, the first candidate matches, and we learn almost nothing about the second candidate. So there's a choice:
1. (what we do today) stop sorting candidates, keep the "b" case grouped with everything below. This could allow us to be clever here and test on `flag == true` next.
2. (what this PR does) sort "b" into the failure case. The "b" will be alone (fewer opportunities for picking a good test), but that means the two "a" cases require a single test.

Today, we aren't clever in which tests we pick, so this is an unambiguous win. In a future where we pick tests better, idk. Grouping tests as much as possible feels like a generally good strategy.

This was proposed in https://github.com/rust-lang/rust/issues/29623 (9 years ago :D)
2024-03-31 02:12:50 +00:00
bors
1aedc9640c Auto merge of #123181 - stepancheg:pointee-metadata-debug, r=the8472,Amanieu
Require Debug for Pointee::Metadata

Useful for debugging.
2024-03-31 00:09:41 +00:00
Oneirical
e477488267 Rewrite core-no-fp-fmt-parse in Rust
Rewrite core-no-fp-fmt-parse in Rust

fix: missing import

fix: tidiness check

more tidy checks

remove tidy line length ignore

new helper functions + arg_path generic

fix: remove unused import

delete arg_path, change arg_path to input
2024-03-30 19:40:18 -04:00
bors
723acede10 Auto merge of #3434 - RalfJung:stacked-borrows-cache-consistency, r=RalfJung
cotrol stacked borrows consistency check with its own feature flag

Fixes https://github.com/rust-lang/miri/issues/3431
2024-03-30 22:57:13 +00:00
bors
a8fd61bf13 Auto merge of #3432 - RalfJung:gc-stress, r=RalfJung
run GC stress test only for host tests

I suspect these are a significant contributor to our Linux CI job being by far the slowest currently. Let's see.

We have Linux, Windows, and macOS hosts so all major OSes are still covered.
2024-03-30 22:14:41 +00:00
Ralf Jung
10217fdec6 cotrol stacked borrows consistency check with its own feature flag 2024-03-30 23:10:43 +01:00
bors
5da1a1b59a Auto merge of #123085 - tgross35:f16-f128-step4.0-libs-basic-impls, r=Amanieu
Add basic trait impls for `f16` and `f128`

Split off part of <https://github.com/rust-lang/rust/pull/122470> so the compiler doesn't ICE because it expects primitives to have some minimal traits.

Fixes <https://github.com/rust-lang/rust/issues/123074>
2024-03-30 21:58:49 +00:00
bors
8df7e723ea Auto merge of #99322 - GKFX:const-int-parse, r=Mark-Simulacrum
Make {integer}::from_str_radix constant

This commit makes FromStr on integers constant so that `const x: u32 = "23".parse();` works. More practical use-case is with environment variables at build time as discussed in https://github.com/rust-lang/rfcs/issues/1907.

Tracking issue #59133.

ACP: https://github.com/rust-lang/libs-team/issues/74
2024-03-30 19:56:58 +00:00
bors
70714e38f2 Auto merge of #123106 - maurer:cfi-closures, r=compiler-errors
CFI: Abstract Closures and Coroutines

This will abstract coroutines in a moment, it's just abstracting closures for now to show `@rcvalle`

This uses the same principal as the methods on traits - figure out the `dyn` type representing the fn trait, instantiate it, and attach that alias set. We're essentially just computing how we would be called in a dynamic context, and attaching that.
2024-03-30 17:56:26 +00:00
Ralf Jung
7f6d89dae9 move tests away from the slow Windows builder 2024-03-30 18:45:38 +01:00
Nadrieril
65efa5b3b9 Add FileCheck directives to the new tests. 2024-03-30 18:11:41 +01:00
Ralf Jung
9f6c675238 run GC stress test only for host tests 2024-03-30 17:58:34 +01:00
Matthew Maurer
8cc9a912d7 CFI: Rewrite closure and coroutine instances to their trait method
Similar to methods on a trait object, the most common way to indirectly
call a closure or coroutine is through the vtable on the appropriate
trait. This uses the same approach as we use for trait methods, after
backing out the trait arguments from the type.
2024-03-30 16:40:38 +00:00
Matthew Maurer
e974570c42 CFI: Only encode Coroutine Parent Args
Fixes #122705
2024-03-30 16:39:51 +00:00
Nadrieril
75d2e67ed2 Sort Eq candidates in the failure case too 2024-03-30 17:37:15 +01:00
Nadrieril
5ef9ad37ab Add test 2024-03-30 17:37:15 +01:00
Nadrieril
e67f5294df Regroup mir-opt tests of match building 2024-03-30 17:37:15 +01:00
David Carlier
c749483e26 std:🧵 adding freebsd/netbsd to the linux's get_name implementation. 2024-03-30 16:01:47 +00:00
bors
ef49365102 Auto merge of #123207 - Urgau:improve_ambi_non_null, r=Nadrieril
Add support for `NonNull`s in the `ambiguous_wide_ptr_comparisions` lint

This PR add support for `NonNull` pointers in the `ambiguous_wide_ptr_comparisions` lint.

Fixes https://github.com/rust-lang/rust/issues/121264
r? `@Nadrieril` (since you just reviewed #121268, feel free to reassign)
2024-03-30 15:53:28 +00:00
bors
f04352a7dd Auto merge of #3430 - RalfJung:doc, r=RalfJung
make some doc comments not doc tests

`./miri test --doc` will run doctests even if we have them disabled (that's a cargo quirk: https://github.com/rust-lang/cargo/issues/13668). This fixes that command to not fail.
2024-03-30 15:45:01 +00:00
Ralf Jung
a8b0f6f239 make some doc comments not doc tests 2024-03-30 16:42:33 +01:00
Nadrieril
e1b8441899 Require enum indices to be contiguous 2024-03-30 16:22:43 +01:00
Michael Goulet
bda301ead8 Stop calling visitors V 2024-03-30 11:13:33 -04: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
1852728224 Auto merge of #123230 - matthiaskrgr:rollup-4twuzj4, r=matthiaskrgr
Rollup of 5 pull requests

Successful merges:

 - #121573 (unix_sigpipe: Add test for SIGPIPE disposition in child processes)
 - #123170 (Replace regions in const canonical vars' types with `'static` in next-solver canonicalizer)
 - #123200 (KCFI: Require -C panic=abort)
 - #123201 (Improve wording in std::any explanation)
 - #123224 (compiletest: print reason for failing to read tests)

r? `@ghost`
`@rustbot` modify labels: rollup
2024-03-30 13:51:24 +00:00
Matthias Krüger
9b067df618
Rollup merge of #123224 - pacak:better-error-message, r=compiler-errors
compiletest: print reason for failing to read tests

Turns this
```
Could not read tests from /path/to/rust/tests/run-make
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:05
```
into this:
```
Could not read tests from /path/to/rust/tests/run-make: run-make tests cannot have both `Makefile` and `rmake.rs`
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
Build completed unsuccessfully in 0:00:05
```

While first one is technically correct - it's not helpful at all, adding backtrace is not making it any better.
2024-03-30 14:30:51 +01:00
Matthias Krüger
558880ab88
Rollup merge of #123201 - Wilfred:patch-2, r=Nilstrieb
Improve wording in std::any explanation

Prefer 'log' over 'log out' to avoid confusion, and use backticks consistently.
2024-03-30 14:30:50 +01:00
Matthias Krüger
3afd111489
Rollup merge of #123200 - maurer:kcfi-abort, r=compiler-errors
KCFI: Require -C panic=abort

While the KCFI scheme is not incompatible with unwinding, LLVM's `invoke` instruction does not currently support KCFI bundles. While it likely will in the near future, we won't be able to assume that in Rust for a while.

We encountered this problem while [turning on closure support](https://github.com/rust-lang/rust/pull/123106#issuecomment-2027436640).

r? ``@workingjubilee``
2024-03-30 14:30:50 +01:00