Commit Graph

279248 Commits

Author SHA1 Message Date
Mads Marquart
9318fbb33a Always set the deployment target when building std 2025-01-31 04:07:06 +01:00
Mads Marquart
e790b92d72 Bootstrap: Don't duplicate cc-rs flags
Commands that end up invoking cc-rs, i.e. Cargo (through build scripts)
and cmake-rs don't need the CFLAGS from cc-rs itself, as they will just
end up as duplicates.

We do still choose to pass them in certain places, but now it's at least
clear which flags are default, and which flags are extra flags added on.
2025-01-31 04:07:04 +01:00
bors
f85c6de552 Auto merge of - compiler-errors:cache-in-closure-binder, r=lcnr
Add cache to `FoldEscapingRegions`

Fixes 

ty `@lqd` for the tests
2025-01-26 19:58:17 +00:00
Michael Goulet
d7a6fdc71f Add cache to FoldEscapingRegions 2025-01-26 18:27:58 +00:00
bors
01a26c026d Auto merge of - nikic:llvm-20-test-fixes, r=wesleywiser
Fix tests on LLVM 20

For sparcv8plus.rs, duplicate the test for LLVM 19 and LLVM 20. LLVM 20 resolves one of the FIXME in the test.

For x86_64-bigint-add.rs split the check lines for LLVM 19 and LLVM 20. The difference in codegen here is due to a difference in unroll factor, which I believe is not what the test is interested in.

Fixes https://github.com/rust-lang/rust/issues/132957.
Fixes https://github.com/rust-lang/rust/issues/133754.
2025-01-26 14:54:01 +00:00
bors
15c6f7e1a3 Auto merge of - jhpratt:rollup-tam1mzn, r=jhpratt
Rollup of 7 pull requests

Successful merges:

 -  (Support QNX 7.1 with `io-sock`+libstd and QNX 8.0 (`no_std` only))
 -  (compiler: Set `target_abi = "ilp32e"` on all riscv32e targets)
 -  (Fix GDB `OsString` provider on Windows )
 -  (TRPL: more backward-compatible Edition changes)
 -  (Remove extra whitespace from rustdoc breadcrumbs for copypasting)
 -  (ci.py: check the return code in `run-local`)
 -  (Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-26 12:10:05 +00:00
bors
d9b4598d7e Auto merge of - compiler-errors:from-ty-const, r=oli-obk
Get rid of `mir::Const::from_ty_const`

This function is strange, because it turns valtrees into `mir::Const::Value`, but the rest of the const variants stay as type system consts.

All of the callsites except for one in `instsimplify` (array length simplification of `ptr_metadata` call) just go through the valtree arm of the function, so it's easier to just create a `mir::Const` directly for those.

For the instsimplify case, if we have a type system const we should *keep* having a type system const, rather than turning it into a `mir::Const::Value`; it doesn't really matter in practice, though, bc `usize` has no padding, but it feels more principled.
2025-01-26 09:26:34 +00:00
Jacob Pratt
359c5047ab
Rollup merge of - scottmcm:alias-unchecked-div, r=Mark-Simulacrum
Add an `unchecked_div` alias to the `Div<NonZero<_>>` impls

Inspired by https://github.com/rust-lang/libs-team/issues/526, if people are looking for `unchecked_div`, point them to `u32: Div<NonZero<u32>>` and friends which do no runtime checks -- and are safe! -- rather than today's behaviour of [the intrinsic being the top result](https://doc.rust-lang.org/std/?search=unchecked_div).

![image](https://github.com/user-attachments/assets/cf2a3c06-4876-49c1-8e33-64cd431c772a)
2025-01-26 01:51:18 -05:00
Jacob Pratt
c40936fc2f
Rollup merge of - cuviper:ci-run-local-fail, r=Kobzol
ci.py: check the return code in `run-local`

If the run fails, it should report that and return a non-zero exit
status. The simplest way to do that is with `run(..., check=True)`,
which raises a `CalledProcessError`.
2025-01-26 01:51:17 -05:00
Jacob Pratt
a70b0d5bdd
Rollup merge of - kornelski:rustdoc-path-space, r=notriddle
Remove extra whitespace from rustdoc breadcrumbs for copypasting

The docs header used to display [item names with their full path](https://doc.rust-lang.org/1.82.0/std/os/unix/ffi/trait.OsStrExt.html), but a [recent design change](https://doc.rust-lang.org/1.83.0/std/os/unix/ffi/trait.OsStrExt.html) has split the path and added extra styling to it.

The problem is the new styling affects how this text is copied to clipboard. I used to copy and paste the paths into `use` statements in the code, but the new styling has extra formatting and whitespace that makes copied text unusable in Rust source code.

Instead of:

>  std::os::unix::ffi::OsStrExt

I now get:

> std
> ::
> os
> ::
> unix
> ::
> ffi
> Trait OsStrExt

This change removes extra whitespace from the markup, and removes `display: flex`. Paths (now in small text) are unlikely to be that long to wrap, and even then regular text wrapping should be sufficient.
2025-01-26 01:51:17 -05:00
Jacob Pratt
666aaf9128
Rollup merge of - chriskrycho:trpl-2024-edition-more, r=ehuss
TRPL: more backward-compatible Edition changes

- Improve the discussion of `unsafe` blocks within `unsafe` functions.
- Fix formatting in Appendix A
- Incorporate line edits to Chapter 17 from NoStarch.
2025-01-26 01:51:16 -05:00
Jacob Pratt
e730dfc097
Rollup merge of - Walnut356:gdb_osstring, r=Mark-Simulacrum
Fix GDB `OsString` provider on Windows

It would throw an exception due to trying to look up `Wtf8Buf.__0`. The field it actually wants is called [`bytes`](b605c65b6e/library/std/src/sys_common/wtf8.rs (L134)).
2025-01-26 01:51:15 -05:00
Jacob Pratt
cecdb32d0f
Rollup merge of - workingjubilee:configure-my-riscv-abi, r=fmease
compiler: Set `target_abi = "ilp32e"` on all riscv32e targets

This allows compile-time configuration based on this. In the near future we should do this across all RISCV targets, probably, but this cfg is essential for building software usable on these targets, and they are tier 3 so it seems less of a concern to tweak their definition thusly.
2025-01-26 01:51:15 -05:00
Jacob Pratt
0d0e841594
Rollup merge of - flba-eb:add_nto_qnx71_iosock_support, r=workingjubilee
Support QNX 7.1 with `io-sock`+libstd and QNX 8.0 (`no_std` only)

Changes of this pull request:

1. Refactor code for qnx nto targets to share more code in file `nto_qnx.rs`
1. Add support for an additional network stack on nto qnx 7.1.

   QNX 7.1 supports two network stacks:

   1. `io-pkt`, which is default
   2. `io-sock`, which is optional on 7.1 but default in QNX 8.0

   As one can see in the [io-sock migration notes](https://www.qnx.com/developers/docs/7.1/index.html#com.qnx.doc.neutrino.io_sock/topic/migrate_app.html), this changes the libc API in a way similar to e.g. linux-gnu vs. linux-musl.

   This change adds a new target which has a different value for `target_env`, so that e.g. libc can distinguish between both APIs.

2. Add initial support for QNX 8.0, thanks to AkhilTThomas. As it turned out, the problem with forking many processes still exists in QNX 8.0. Because if this, we are now using it for any QNX version (i.e. not check for `target_env` anymore).
2025-01-26 01:51:14 -05:00
bors
c2270becb6 Auto merge of - jhpratt:rollup-dxmb2h2, r=jhpratt
Rollup of 7 pull requests

Successful merges:

 -  (Make the wasm_c_abi future compat warning a hard error)
 -  (fix(libtest): Deprecate '--logfile')
 -  (use `PassMode::Direct` for vector types on `s390x`)
 -  (Update emscripten std tests)
 -  (Use `fmt::from_fn` in more places in the compiler)
 -  (Expand polonius MIR dump)
 -  (Account for mutable borrow in argument suggestion)

Failed merges:

 -  (Move `std::io::pipe` code into its own file)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-26 06:42:03 +00:00
Jacob Pratt
64550d1ed8
Rollup merge of - estebank:issue-136028, r=SparrowLii
Account for mutable borrow in argument suggestion

```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```
instead of
```
error: value assigned to `object` is never read
  --> $DIR/mut-arg-of-borrowed-type-meant-to-be-arg-of-mut-borrow.rs:21:5
   |
LL |     object = &mut object2;
   |     ^^^^^^
   |
help: you might have meant to mutate the pointed at value being passed in, instead of changing the reference in the local binding
   |
LL ~ fn change_object3(object: &mut mut Object) {
LL |
LL |     let object2 = Object;
LL ~     *object = object2;
   |
```

Fix .
2025-01-25 23:27:01 -05:00
Jacob Pratt
182ccfa11f
Rollup merge of - lqd:polonius-debugger-episode-1, r=compiler-errors
Expand polonius MIR dump

This PR starts expanding the polonius MIR:
- switches to an HTML file, to show graphs in the same document as the MIR dump, share them more easily since it's a single file that can be hosted as a gist, and also to allow for interactivity in the near future.
- adds the regular NLL MIR + polonius constraints
- embeds a mermaid version of the CFG, similar to the graphviz one, but that needs a smaller js than `dot`'s emscripten js from graphvizonline

[Here's an example](https://gistpreview.github.io/?0c18f2a59b5e24ac0f96447aa34ffe00) of how it looks.

---
In future PRs: mermaid graphs of the NLL region graph, of the NLL SCCs, of the polonius localized outlives constraints, and the interactive polonius MIR dump.

r? ```@matthewjasper```
2025-01-25 23:27:01 -05:00
Jacob Pratt
6cf4204790
Rollup merge of - yotamofek:use-debug-helpers, r=SparrowLii
Use `fmt::from_fn` in more places in the compiler

Use the unstable functions from  in more places in the compiler, follow up to 
2025-01-25 23:27:00 -05:00
Jacob Pratt
b58221ec9d
Rollup merge of - bjorn3:update_emscripten_std_tests, r=Mark-Simulacrum
Update emscripten std tests

This disables a bunch of emscripten tests that test things emscripten doesn't support and re-enables a whole bunch of tests which now work just fine on emscripten.

Tested with `EMCC_CFLAGS="-s MAXIMUM_MEMORY=2GB" ./x.py test library/ --target wasm32-unknown-emscripten`.
2025-01-25 23:27:00 -05:00
Jacob Pratt
61e572b3f6
Rollup merge of - folkertdev:s390x-vector-passmode-direct, r=bjorn3
use `PassMode::Direct` for vector types on `s390x`

closes https://github.com/rust-lang/rust/issues/135744
tracking issue: https://github.com/rust-lang/rust/issues/130869

Previously, all vector types were type erased to `Ni8`, now we pass non-wrapped vector types directly. That skips emitting a bunch of casting logic in rustc, that LLVM then has to clean up. The initial LLVM IR is also a bit more readable.

This calling convention is tested extensively in `tests/assembly/s390x-vector-abi.rs`, showing that this change has no impact on the ABI in practice.

r? ````@taiki-e````
2025-01-25 23:26:59 -05:00
Jacob Pratt
9ff7ab90ad
Rollup merge of - epage:logfile, r=Amanieu
fix(libtest): Deprecate '--logfile'

 proposed changing the behavior of `--logfile`. The given reasons were:

(1) Bazel can't programmatically process stdout.  This seems like a limitation in Bazel and we recommend focusing on that.  If we look at the wider Rust ecosystem, Rustc and Cargo don't support any such mechanism and the Cargo team rejected having one.  Expecting this in libtest when its not supported elsewhere seems too specialized.

(2) Tests that leak out non-programmatic output that intermixes with programmatic output.  We acknowledge this is a problem to be evaluated but we need to make sure we are stepping back and gathering requirements, rather than assuming `--logfile` will fit the needs.

Independent of the motive, regarding using or changing  `--logfile`

(1) Most ways to do it would be a breaking change, like if we respect any stable `--format`.  As suggested above, we could specialize this to new `--format` values but that would be confusing for some values to apply but not others.

(2) Other ways of solving this add new features to lib`test` when we are instead wanting to limit the feature set it has to minimize the compatibility surface that has to be maintained and the burden it would put on third party harnesses which are a focus area.  Examples include `--format compact` or a `--log-format` flag

(3) The existence of `--logfile` dates back quite a ways (5cc050b265, ) and the history gives the
impression this more of slipped through rather than being an intended feature (see also
https://github.com/rust-lang/rust/pull/82350#discussion_r579732071). Deprecation would better match to how it has been treated. By deprecating this, we do not expect custom test harnesses (rust-lang/testing-devex-team#2) to implement this.

T-testing-devex held an FCP for deprecating in rust-lang/testing-devex-team#9 though according to
[RFC ](https://rust-lang.github.io/rfcs/3455-t-test.html), this is still subject to final approval from T-libs-api.

Closes 
2025-01-25 23:26:58 -05:00
Jacob Pratt
dc202df0ed
Rollup merge of - bjorn3:wasm_c_abi_lint_hard_error, r=workingjubilee
Make the wasm_c_abi future compat warning a hard error

This is the next step in getting rid of the broken C abi for wasm32-unknown-unknown.

The lint was made deny-by-default in https://github.com/rust-lang/rust/pull/129534 3 months ago. This still keeps the `-Zwasm-c-abi` flag set to `legacy` by default. It will be flipped in a future PR.

cc https://github.com/rust-lang/rust/issues/122532
2025-01-25 23:26:58 -05:00
bors
2f0ad2a71e Auto merge of - matthiaskrgr:rollup-b5enbuz, r=matthiaskrgr
Rollup of 7 pull requests

Successful merges:

 -  (remove long-deprecated no-op attributes no_start and crate_id)
 -  (Improve and expand documentation of pipes)
 -  (Include missing item in the 1.81 release notes)
 -  (ports last few library files to new intrinsic style)
 -  (Improve check-cfg expected names diagnostic)
 -  (docs: fix typo in std::pin overview)
 -  (Fix typo in const stability error message)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-26 00:47:18 +00:00
Matthias Krüger
08c4d6369b
Rollup merge of - fee1-dead-contrib:push-tswyxkywqrtt, r=jieyouxu
Fix typo in const stability error message
2025-01-25 23:15:26 +01:00
Matthias Krüger
65fb6286e0
Rollup merge of - nvanbenschoten:pin-typo, r=Amanieu
docs: fix typo in std::pin overview

Unimportant fix in `std::pin` documentation.
2025-01-25 23:15:25 +01:00
Matthias Krüger
dbe911a64d
Rollup merge of - Urgau:check-cfg-allow-test-improv, r=jieyouxu
Improve check-cfg expected names diagnostic

This PR improves the check-cfg `allow-same-level` test by ~~normalizing it's output and by~~ adding more context to the test.

It also filters the well known cfgs from the `expected names are` note, as to reduce the size of the diagnostic. Users can still find the full list on the [rustc book](https://doc.rust-lang.org/nightly/rustc/check-cfg.html#well-known-names-and-values), which is reinforced for Cargo users by adding a note in the Cargo check-cfg specific section.

Fixes https://github.com/rust-lang/rust/issues/135995
r? `@jieyouxu`
2025-01-25 23:15:25 +01:00
Matthias Krüger
f14993b454
Rollup merge of - BLANKatGITHUB:library, r=RalfJung
ports last few library files to new intrinsic style

This pr ports the last 2 library files to new intrinsic style this pr is part of issue 
2025-01-25 23:15:24 +01:00
Matthias Krüger
f42163621f
Rollup merge of - ferrocene:pa-1.81-relnotes, r=Mark-Simulacrum
Include missing item in the 1.81 release notes

It was pointed out to me that when I prepared the CVE-2024-43402 fix in the stable branch, I added the release notes in the stable PR (https://github.com/rust-lang/rust/pull/129960), but I forgot to do so in the beta or nightly PR. Because of that, the relnotes line only appeared in 1.81, and disappeared afterwards.
2025-01-25 23:15:24 +01:00
Matthias Krüger
20d0f0187d
Rollup merge of - joshtriplett:pipe-docs, r=joboet
Improve and expand documentation of pipes

- Reference UNIX, not just Linux
- Simplify some of the language
- Don't imply that pipes *only* work across multiple processes; instead,
  *suggest* that they're typically used across two or more separate
  processes.
- Specify that portable applications cannot use multiple readers or
  multiple writers for messages larger than a byte, due to potential
  interleaving.

Tracking issue for anonymous pipes:
https://github.com/rust-lang/rust/issues/127154
2025-01-25 23:15:23 +01:00
Matthias Krüger
f01d418139
Rollup merge of - RalfJung:remove-dead-attrs, r=chenyukang
remove long-deprecated no-op attributes no_start and crate_id

These have emitted a deprecation warning since forever (https://github.com/rust-lang/rust/pull/64471) and they already don't do anything. In fact they [apparently](https://github.com/rust-lang/rust/pull/64471#issuecomment-531517332) have done nothing since pre-1.0, so... do we even need a crater run? Doesn't seem worth it.
2025-01-25 23:15:22 +01:00
bors
6fb03584cf Auto merge of - jyn514:linker-messages-2, r=bjorn3
Shorten linker output even more when `--verbose` is not present

- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long.
- For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell.
- Move `.rlib` to outside the glob.
- Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments.

This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests.

r? `@bjorn3`

try-job: aarch64-apple
2025-01-25 22:05:02 +00:00
jyn
c1b4ab0e73 Shorten linker output even more when --verbose is not present
- Don't show environment variables. Seeing PATH is almost never useful, and it can be extremely long.
- For .rlibs in the sysroot, replace crate hashes with a `"-*"` string. This will expand to the full crate name when pasted into the shell.
- Move `.rlib` to outside the glob.
- Abbreviate the sysroot path to `<sysroot>` wherever it appears in the arguments.

This also adds an example of the linker output as a run-make test. Currently it only runs on x86_64-unknown-linux-gnu, because each platform has its own linker arguments. So that it's stable across machines, pass BUILD_ROOT as an argument through compiletest through to run-make tests.

- Only use linker-flavor=gnu-cc if we're actually going to compare the output. It doesn't exist on MacOS.
2025-01-25 16:04:52 -05:00
Josh Triplett
687607c31e Improve and expand documentation of pipes
- Simplify some of the language
- Minor grammar fixes
- Don't imply that pipes *only* work across multiple processes; instead,
  *suggest* that they're typically used across two or more separate
  processes.
- Specify that portable applications cannot use multiple readers or
  multiple writers for messages larger than a byte, due to potential
  interleaving.
- Remove no-longer-referenced footnote URLs.
2025-01-25 22:15:54 +02:00
bors
f7cc13af82 Auto merge of - jyn514:linker-output, r=bjorn3
show linker output even if the linker succeeds

Show stderr and stderr by default, controlled by a new `linker_messages` lint.

fixes https://github.com/rust-lang/rust/issues/83436. fixes https://github.com/rust-lang/rust/issues/38206. cc https://rust-lang.zulipchat.com/#narrow/stream/233931-t-compiler.2Fmajor-changes/topic/uplift.20some.20-Zverbose.20calls.20and.20rename.20to.E2.80.A6.20compiler-team.23706/near/408986134

<!-- try-job: dist-x86_64-msvc -->
try-job: aarch64-apple

r? `@bjorn3`
2025-01-25 17:16:33 +00:00
Deadbeef
626d3ba514 Fix typo in const stability error message 2025-01-25 21:43:22 +08:00
bors
203e6c127c Auto merge of - estebank:issue-133137, r=wesleywiser
Reword resolve errors caused by likely missing crate in dep tree

Reword label and add `help`:

```
error[E0432]: unresolved import `some_novel_crate`
 --> f704.rs:1:5
  |
1 | use some_novel_crate::Type;
  |     ^^^^^^^^^^^^^^^^ use of unresolved module or unlinked crate `some_novel_crate`
  |
  = help: if you wanted to use a crate named `some_novel_crate`, use `cargo add some_novel_crate` to add it to your `Cargo.toml`
```

Fix .
2025-01-25 11:41:21 +00:00
Urgau
74223e4667 Refer to the well known names from Cargo check-cfg specifics doc 2025-01-25 12:37:29 +01:00
Urgau
c5ea75a5df Filter well known names from check-cfg diagnostics 2025-01-25 12:27:33 +01:00
bors
f94018810c Auto merge of - matthiaskrgr:rollup-5r1k45x, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 -  (Properly report error when object type param default references self)
 -  (Fix `FormattingOptions` instantiation with `Default`)
 -  (Rename test to `unresolvable-upvar-issue-87987.rs` and add some notes)
 -  (Fix set_name in thread mod for NuttX)
 -  (bootstrap: Handle bootstrap lockfile race condition better)
 -  (Use short ty string for move errors)
 -  (Skip suggestions in `derive`d code)
 -  (Bootstrap: Don't move ownership of job object)
 -  (fix(bootstrap): deserialize null as `f64::NAN`)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-01-25 08:56:41 +00:00
Rémy Rakic
09fb70afb9 add CFG to polonius MIR dump 2025-01-25 07:32:20 +00:00
Rémy Rakic
82c016846e fix terminator edges comments 2025-01-25 07:32:20 +00:00
Rémy Rakic
6baa65e366 switch polonius MIR dump to HTML
escape the regular raw MIR into its own section
2025-01-25 07:32:20 +00:00
Rémy Rakic
3631c15b17 use more explicit MIR dumping process 2025-01-25 07:32:20 +00:00
Rémy Rakic
492d98564e extract principal MIR dump function
for cases where we want to dump the MIR to a given writer instead of a
new file as the default does.

this will be used when dumping the MIR to a buffer to process
differently, e.g. post-process to escape for an HTML dump.
2025-01-25 07:32:20 +00:00
Matthias Krüger
a330c7ee85
Rollup merge of - weihanglo:null-as-f64-nan, r=compiler-errors
fix(bootstrap): deserialize null as `f64::NAN`

When doing optimized build through opt-dist,
I've often run into errors like `invalid type: null, expected f64`.
This is likely because some f64 fields might actually bet set null.
Unfortunately, serde_json doesn't handle null <-> NaN well.

This commit addresses it by having a custom deserialize method, so null is always be deserialized to `f64:NAN`.

See:

* https://rust-lang.zulipchat.com/#narrow/channel/242791-t-infra/topic/opt-dist.3A.20.60invalid.20type.3A.20null.2C.20expect.20f64.60.20failure
* https://github.com/serde-rs/json/issues/202

r? `@Kobzol`
2025-01-25 08:03:38 +01:00
Matthias Krüger
7b16b4e4cb
Rollup merge of - ChrisDenton:py-job, r=jieyouxu
Bootstrap: Don't move ownership of job object

I've been thinking about this since the last time I looked at bootstrap's use of job objects. We currently pass ownership of the job object to Python. I feel this is unneeded complexity.

The rationale given (in a comment) is that it helps with `ctrl-c` on `x.py`. But using `ctrl-c` when running `x.py` will also cause `bootstrap.exe` to immediately exit so I don't find that convincing.
2025-01-25 08:03:38 +01:00
Matthias Krüger
06349ec2dd
Rollup merge of - estebank:issue-135989, r=compiler-errors
Skip suggestions in `derive`d code

Do not suggest

```
help: use parentheses to call these
  |
5 |     (callback: Rc<dyn Fn()>)(),
  |     +                      +++
```

Skip all "call function for this binop" suggestions when in a derive context.

Fix .
2025-01-25 08:03:37 +01:00
Matthias Krüger
2080d66a15
Rollup merge of - estebank:long-moved-type, r=jieyouxu
Use short ty string for move errors

```
error[E0382]: use of moved value: `x`
  --> bay.rs:14:14
   |
12 | fn foo(x: D) {
   |        - move occurs because `x` has type `(((..., ..., ..., ...), ..., ..., ...), ..., ..., ...)`, which does not implement the `Copy` trait
13 |     let _a = x;
   |              - value moved here
14 |     let _b = x; //~ ERROR use of moved value
   |              ^ value used here after move
   |
   = note: the full type name has been written to 'bay.long-type-14349227078439097973.txt'
   = note: consider using `--verbose` to print the full type name to the console
help: consider cloning the value if the performance cost is acceptable
   |
13 |     let _a = x.clone();
   |               ++++++++
```

Address 4th case in .
2025-01-25 08:03:37 +01:00
Matthias Krüger
6cb2820b7e
Rollup merge of - clubby789:pidfile-race, r=jieyouxu
bootstrap: Handle bootstrap lockfile race condition better

Fixes 

Tested by:
- Starting one build
- In another terminal, `echo -n '' > build/lock`
- Attempt to invoke bootstrap a second time
2025-01-25 08:03:36 +01:00
Matthias Krüger
7a79024ef4
Rollup merge of - no1wudi:master, r=thomcc
Fix set_name in thread mod for NuttX

Replace `pthread_set_name_np` with `pthread_setname_np` for NuttX in the `set_name` function, this change aligns the implementation with the correct API available on NuttX

This patch ensures thread naming works correctly on NuttX platforms.

See also:
0f9f8c91ad/src/unix/nuttx/mod.rs (L562)
8f3a2a6f76/include/pthread.h (L511-L514)
2025-01-25 08:03:35 +01:00