Commit Graph

3858 Commits

Author SHA1 Message Date
Tshepang Mbambo 5e2a659b1d "cargo fmt" 2025-05-10 13:47:31 +02:00
Tshepang Mbambo 9f710fd775 bump edition 2025-05-10 13:47:31 +02:00
Tshepang Mbambo f99df9199f no point versioning these
They are internal tools.
2025-05-10 13:47:31 +02:00
Tshepang Mbambo 7fa4f19ab4 add missing word 2025-05-10 13:14:38 +02:00
Tshepang Mbambo eadf6dc2e2
Merge pull request #2369 from rust-lang/tshepang-patch-1
add rdg push git config entry for git protocol pushers
2025-05-10 10:28:33 +02:00
Tshepang Mbambo a2cc4ae295
Merge pull request #2376 from smanilov/patch-5
Fix minor typo in rustdoc-internals.md
2025-05-09 15:53:15 +02:00
Stan Manilov 374f53e02b Fix minor typo in rustdoc-internals.md 2025-05-09 15:50:49 +03:00
Tshepang Mbambo 380a77e5a7
Merge pull request #2377 from smanilov/patch-6
Fix minor typo in installation.md
2025-05-08 16:31:26 +02:00
Stan Manilov e1c08547a1
Fix minor typo in installation.md 2025-05-08 16:36:53 +03:00
Boxy ed551e4c13
Merge pull request #2323 from smanilov/patch-2
Align advice to discourage issue-number-only names
2025-05-08 12:26:35 +01:00
Stan Manilov 7434026e13 Remark test naming exception 2025-05-08 14:05:31 +03:00
Tshepang Mbambo 5e53d1f457
Merge pull request #2375 from smanilov/patch-4
Fix minor typo in serialization.md
2025-05-08 10:39:05 +02:00
Stan Manilov 0e630fb60d
Fix minor typo in serialization.md 2025-05-08 11:13:50 +03:00
Tshepang Mbambo 634c6e9b90
Merge pull request #2374 from rust-lang/rustc-pull
Rustc pull update
2025-05-08 09:18:01 +02:00
The rustc-dev-guide Cronjob Bot 304af27489 Merge from rustc 2025-05-08 07:16:31 +00:00
The rustc-dev-guide Cronjob Bot acd63b2a52 Preparing for merge from rustc 2025-05-08 07:16:18 +00:00
bors c6fe7c5ef3 Auto merge of #140106 - dianne:deref-pat-usefulness, r=Nadrieril
allow deref patterns to participate in exhaustiveness analysis

Per [this proposal](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Exhaustiveness), this PR allows deref patterns to participate in exhaustiveness analysis. Currently all deref patterns enforce `DerefPure` bounds on their scrutinees, so this assumes all patterns it's analyzing are well-behaved. This also doesn't support [mixed exhaustiveness](https://hackmd.io/4qDDMcvyQ-GDB089IPcHGg#Mixed-exhaustiveness), and instead emits an error if deref patterns are used together with normal constructors. I think mixed exhaustiveness would be nice to have (especially if we eventually want to support arbitrary `Deref` impls[^1]), but it'd require more work to get reasonable diagnostics[^2].

Tracking issue for deref patterns: #87121

r? `@Nadrieril`

[^1]: Regardless of whether we support limited exhaustiveness checking for untrusted `Deref` or always require other arms to be exhaustive, I think it'd be useful to allow mixed matching for user-defined smart pointers. And it'd be strange if it worked there but not for `Cow`.

[^2]: I think listing out witnesses of non-exhaustiveness can be confusing when they're not necessarily disjoint, and when you only need to cover some of them, so we'd probably want special formatting and/or explanatory subdiagnostics. And if it's implemented similarly to unions, we'd probably also want some way of merging witnesses; the way witnesses for unions can appear duplicated is pretty unfortunate. I'm not sure yet how the diagnostics should look, especially for deeply nested patterns.
2025-05-08 02:16:45 +00:00
bors 108c0a38a9 Auto merge of #140751 - GuillaumeGomez:rollup-eahw4ta, r=GuillaumeGomez
Rollup of 8 pull requests

Successful merges:

 - #140234 (Separate dataflow analysis and results)
 - #140614 (Correct warning message in restricted visibility)
 - #140671 (Parser: Recover error from named params while parse_path)
 - #140700 (Don't crash on error codes passed to `--explain` which exceed our internal limit of 9999 )
 - #140706 ([rustdoc] Ensure that temporary doctest folder is correctly removed even if doctests failed)
 - #140734 (Fix regression from #140393 for espidf / horizon / nuttx / vita)
 - #140741 (add armv5te-unknown-linux-gnueabi target maintainer)
 - #140745 (run-make-support: set rustc dylib path for cargo wrapper)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-07 23:03:25 +00:00
bors 578c542c12 Auto merge of #140590 - lcnr:closure-in-dead-code, r=compiler-errors
borrowck nested items in dead code

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

r? `@compiler-errors`
2025-05-07 19:49:36 +00:00
Guillaume Gomez 46c1c1ff0b
Rollup merge of #140745 - jchecahi:run-make-support-cargo-rustc-dylib, r=jieyouxu
run-make-support: set rustc dylib path for cargo wrapper

Some run-make tests invoke Cargo via run_make_support::cargo(), but fail to execute correctly when rustc is built without rpath. In these setups, runtime loading of rustc’s shared libraries fails unless the appropriate dynamic library path is set manually.

This commit updates the cargo() wrapper to call set_host_compiler_dylib_path(), aligning its behavior with the existing rustc() wrapper: f76c7367c6/src/tools/run-make-support/src/external_deps/rustc.rs (L39-L43)

This ensures that Cargo invocations during tests inherit the necessary dylib paths, avoiding errors related to missing shared libraries in rpath-less builds.

Fixes part of #140738
2025-05-07 18:19:09 +02:00
Guillaume Gomez 196221b5c2
Rollup merge of #140741 - husqvarnagroup:af/armv5te-target-maintainer, r=jieyouxu
add armv5te-unknown-linux-gnueabi target maintainer

My employer is interested in having this target maintained and we already have some tests in our CI running for it.

armv5te-unknown-linux-gnueabi can be ticket off in #113739.
2025-05-07 18:19:08 +02:00
Guillaume Gomez 4a5588032d
Rollup merge of #140734 - ivmarkov:master, r=joboet
Fix regression from #140393 for espidf / horizon / nuttx / vita

#140393 introduced changes to the layout of the `std::sys::process` code.
As a result, the Tier 3 ESP-IDF (and I suspect Horizon, Nuttx and Vita targets as well) no longer build.

A `pub use unsupported::output` is all that was missing - for the above OSes specifically. This explicit `pub use` is now necessary, because #140393 moved the `output` function to module-level, where it was previously part of `Command` and was thus re-exported automatically, as part of the `imp::Command` re-export further down the file containing the one-liner fix.

Note that - with the change introduced by #140393 - we **can't** anymore just do an unconditional `pub use imp::output` as this function simply does not exist anymore anywhere else but in the `unsupported` module.

r? `@joboet`
2025-05-07 18:19:08 +02:00
Guillaume Gomez 990cefad31
Rollup merge of #140706 - GuillaumeGomez:fix-missing-temp-dir-cleanup, r=notriddle
[rustdoc] Ensure that temporary doctest folder is correctly removed even if doctests failed

Fixes #139899.

The bug was due to the fact that if any doctest fails for any reason, we call `exit` (or it's called inside `libtest` if not edition 2024), meaning that `TempDir`'s destructor isn't called, and therefore the temporary folder isn't cleaned up.

Took me a while to figure out how to reproduce but finally I was able to reproduce the bug with:

`````rust
#![doc(test(attr(deny(warnings))))]

//! ```
//! let a = 12;
//! ```
`````

And then I ensured that panicking doctests were cleaned up as well:

`````rust
//! ```
//! panic!();
//! ```
`````

And finally I checked if it was fixed for merged doctests too (`--edition 2024`).

To make this work, I needed to add a new public function in `libtest` too which would call a function once all tests have been run.

So only issue is: I have absolutely no idea how we can add a regression test for this fix. If anyone has an idea...

r? `@notriddle`
2025-05-07 18:19:07 +02:00
Guillaume Gomez 27978bcf77
Rollup merge of #140700 - Kivooeo:new-fix-six, r=davidtwco,fmease
Don't crash on error codes passed to `--explain` which exceed our internal limit of 9999

removed panic in case where we do `--explain > 9999` and added check for it

now error looks like this instead of ICE
```
$ rustc.exe --explain E10000
error: E10000 is not a valid error code
```
fixes #140647
r? `@fmease`
2025-05-07 18:19:06 +02:00
Guillaume Gomez 160b799242
Rollup merge of #140671 - xizheyin:issue-140169, r=petrochenkov
Parser: Recover error from named params while parse_path

Fixes #140169

I added test to the first commit and the second added the code and changes to test.

r? `@petrochenkov`
2025-05-07 18:19:06 +02:00
Guillaume Gomez 10bdb2966d
Rollup merge of #140614 - yuk1ty:fix-invalid-module-name-visibility, r=davidtwco
Correct warning message in restricted visibility

Fixes #131220
2025-05-07 18:19:05 +02:00
Guillaume Gomez 5514fe9ef6
Rollup merge of #140234 - nnethercote:separate-Analysis-and-Results, r=davidtwco
Separate dataflow analysis and results

`Analysis` gets put into `Results` with `EntryStates`, by `iterate_to_fixpoint`. This has two problems:
- `Results` is passed various places where only `Analysis` is needed.
- `EntryStates` is passed around mutably everywhere even though it is immutable.

This commit mostly separates `Analysis` from `Results` and fixes these two problems.

r? `@davidtwco`
2025-05-07 18:19:04 +02:00
bors 619bf55550 Auto merge of #139758 - Zoxc:thread-local-graph, r=oli-obk
Use thread local dep graph encoding

This adds thread local encoding of dep graph nodes. Each thread has a `MemEncoder` that gets flushed to the global `FileEncoder` when it exceeds 64 kB. Each thread also has a local cache of dep indices. This means there can now be empty gaps in `SerializedDepGraph`.

Indices are marked green and also allocated by the new atomic operation `DepNodeColorMap::try_mark_green` as the encoder lock is removed.
2025-05-07 12:39:54 +00:00
bors 8681c01814 Auto merge of #140514 - m-ou-se:proc-macro-span-file, r=Amanieu
Stabilize proc_macro::Span::{file, local_file}.

Stabilizes this part of https://github.com/rust-lang/rust/issues/54725:

```rust
impl Span {
    pub fn file(&self) -> String; // Mapped/artificial file name, for display purposes.

    pub fn local_file(&self) -> Option<PathBuf>; // Real file name as it exists on the local file system.
}
```

See also the naming discussion in https://github.com/rust-lang/rust/issues/139903
2025-05-06 22:03:11 +00:00
bors 7bb420f530 Auto merge of #131160 - ismailarilik:handle-potential-query-instability-lint-for-rustc-middle, r=oli-obk
Handle `rustc_middle` cases of `rustc::potential_query_instability` lint

This PR removes `#![allow(rustc::potential_query_instability)]` line from [`compiler/rustc_middle/src/lib.rs`](https://github.com/rust-lang/rust/blob/master/compiler/rustc_middle/src/lib.rs#L29) and converts `FxHash{Map,Set}` types into `FxIndex{Map,Set}` to suppress lint errors.

A somewhat tracking issue: https://github.com/rust-lang/rust/issues/84447

r? `@compiler-errors`
2025-05-06 01:36:23 +00:00
bors 90a88ccc8d Auto merge of #140664 - RalfJung:miri-sync, r=RalfJung
Miri subtree update

r? `@ghost`
2025-05-05 19:14:42 +00:00
bors 517be646cc Auto merge of #140651 - lnicola:sync-from-ra, r=lnicola
Subtree update of `rust-analyzer`

r? `@ghost`
2025-05-05 15:00:09 +00:00
Ralf Jung d0279cf63e
Merge pull request #4306 from yoctocell/fix-unsafecell-inside-box
Tree Borrows: Correctly handle interior mutable data in `Box`
2025-05-05 11:58:34 +00:00
bors 3ddfe6f6a3 Auto merge of #140453 - Zoxc:next-disambiguator, r=oli-obk
Remove global `next_disambiguator` state and handle it with a `DisambiguatorState` type

This removes `Definitions.next_disambiguator` as it doesn't guarantee deterministic def paths when `create_def` is called in parallel. Instead a new `DisambiguatorState` type is passed as a mutable reference to `create_def` to help create unique def paths. `create_def` calls with distinct  `DisambiguatorState` instances must ensure that that the def paths are unique without its help.

Anon associated types did rely on this global state for uniqueness and are changed to use (method they're defined in + their position in the method return type) as the `DefPathData` to ensure uniqueness. This also means that the method they're defined in appears in error messages, which is nicer.

`DefPathData::NestedStatic` is added to use for nested data inside statics instead of reusing `DefPathData::AnonConst` to avoid conflicts with those.

cc `@oli-obk`
2025-05-05 11:50:43 +00:00
bors de1eb200fd Auto merge of #134767 - Bryanskiy:dylibs-3, r=petrochenkov
Initial support for dynamically linked crates

This PR is an initial implementation of [rust-lang/rfcs#3435](https://github.com/rust-lang/rfcs/pull/3435) proposal.
### component 1: interface generator

Interface generator - a tool for generating a stripped version of crate source code. The interface is like a C header, where all function bodies are omitted. For example, initial crate:

```rust
#[export]
#[repr(C)]
pub struct S {
   pub x: i32
}
#[export]
pub extern "C" fn foo(x: S) {
   m1::bar(x);
}

pub fn bar(x: crate::S) {
    // some computations
}
```

generated interface:

```rust
#[export]
#[repr(C)]
pub struct S {
    pub x: i32,
}

#[export]
pub extern "C" fn foo(x: S);

pub fn bar(x: crate::S);
```

The interface generator was implemented as part of the pretty-printer. Ideally interface should only contain exportable items, but here is the first problem:
-  pass for determining exportable items relies on privacy information, which is totally available only in HIR
- HIR pretty-printer uses pseudo-code(at least for attributes)

So, the interface generator was implemented in AST. This has led to the fact that non-exportable items cannot be filtered out, but I don't think this is a major issue at the moment.

To emit an interface use a new `sdylib` crate type which is basically the same as `dylib`, but it doesn't contain metadata, and also produces the interface as a second artifact. The current interface name is `lib{crate_name}.rs`.
#### Why was it decided to use a design with an auto-generated interface?

One of the main objectives of this proposal is to allow building the library and the application with different compiler versions. This requires either a metadata format compatible across rustc versions or some form of a source code. The option with a stable metadata format has not been investigated in detail, but it is not part of RFC either. Here is the the related discussion: https://github.com/rust-lang/rfcs/pull/3435#discussion_r1202872373

Original proposal suggests using the source code for the dynamic library and all its dependencies. Metadata is obtained from `cargo check`. I decided to use interface files since it is more or less compatible with the original proposal, but also allows users to hide the source code.
##### Regarding the design with interfaces

in Rust, files generally do not have a special meaning, unlike C++. A translation unit i.e. a crate is not a single file, it consists of modules. Modules, in turn, can be declared either in one file or divided into several. That's why the "interface file" isn't a very coherent concept in Rust. I would like to avoid adding an additional level of complexity for users until it is proven necessary. Therefore, the initial plan was to make the interfaces completely invisible to users i. e. make them auto-generated. I also planned to put them in the dylib, but this has not been done yet. (since the PR is already big enough, I decided to postpone it)

There is one concern, though, which has not yet been investigated(https://github.com/rust-lang/rust/pull/134767#issuecomment-2736471828):

> Compiling the interface as pretty-printed source code doesn't use correct macro hygiene (mostly relevant to macros 2.0, stable macros do not affect item hygiene).  I don't have much hope for encoding hygiene data in any stable way, we should rather support a way for the interface file to be provided manually, instead of being auto-generated, if there are any non-trivial requirements.
### component 2: crate loader

When building dynamic dependencies, the crate loader searches for the interface in the file system, builds the interface without codegen and loads it's metadata. Routing rules for interface files are almost the same as for `rlibs` and `dylibs`. Firstly, the compiler checks `extern` options and then tries to deduce the path himself.

Here are the code and commands that corresponds to the compilation process:

```rust
// simple-lib.rs
#![crate_type = "sdylib"]

#[extern]
pub extern "C" fn foo() -> i32 {
    42
}
```

```rust
// app.rs
extern crate simple_lib;

fn main() {
    assert!(simple_lib::foo(), 42);
}
```

```
// Generate interface, build library.
rustc +toolchain1 lib.rs

// Build app. Perhaps with a different compiler version.
rustc +toolchain2 app.rs -L.
```

P.S. The interface name/format and rules for file system routing can be changed further.
### component 3: exportable items collector

Query for collecting exportable items. Which items are exportable is defined [here](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#the-export-attribute) .
### component 4: "stable" mangling scheme

The mangling scheme proposed in the RFC consists of two parts: a mangled item path and a hash of the signature.
#### mangled item path

For the first part of the symbol it has been decided to reuse the `v0` mangling scheme as it much less dependent on compiler internals compared to the `legacy` scheme.

The exception is disambiguators (https://doc.rust-lang.org/rustc/symbol-mangling/v0.html#disambiguator):

For example, during symbol mangling rustc uses a special index to distinguish between two impls of the same type in the same module(See `DisambiguatedDefPathData`). The calculation of this index may depend on private items, but private items should not affect the ABI. Example:

```rust
#[export]
#[repr(C)]
pub struct S<T>(pub T);

struct S1;
pub struct S2;

impl S<S1> {
    extern "C" fn foo() -> i32 {
        1
    }
}

#[export]
impl S<S2> {
    // Different symbol names can be generated for this item
    // when compiling the interface and source code.
    pub extern "C" fn foo() -> i32 {
        2
    }
}
```

In order to make disambiguation independent of the compiler version we can assign an id to each impl according to their relative order in the source code.

The second example is `StableCrateId` which is used to disambiguate different crates. `StableCrateId` consists of crate name, `-Cmetadata` arguments and compiler version. At the moment, I have decided to keep only the crate name, but a more consistent approach to crate disambiguation could be added in the future.

Actually, there are more cases where such disambiguation can be used. For instance, when mangling internal rustc symbols, but it also hasn't been investigated in detail yet.
#### hash of the signature

Exportable functions from stable dylibs can be called from safe code. In order to provide type safety, 128 bit hash with relevant type information is appended to the symbol ([description from RFC](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#name-mangling-and-safety)). For now, it includes:

- hash of the type name for primitive types
- for ADT types with public fields the implementation follows [this](https://github.com/m-ou-se/rfcs/blob/export/text/0000-export.md#types-with-public-fields) rules

`#[export(unsafe_stable_abi = "hash")]` syntax for ADT types with private fields is not yet implemented.

Type safety is a subtle thing here. I used the approach from RFC, but there is the ongoing research project about it. [https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html)

### Unresolved questions

Interfaces:
1. Move the interface generator to HIR and add an exportable items filter.
2. Compatibility of auto-generated interfaces and macro hygiene.
3. There is an open issue with interface files compilation: https://github.com/rust-lang/rust/pull/134767#issuecomment-2736471828
4. Put an interface into a dylib.

Mangling scheme:
1. Which information is required to ensure type safety and how should it be encoded? ([https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html](https://rust-lang.github.io/rust-project-goals/2025h1/safe-linking.html))
2. Determine all other possible cases, where path disambiguation is used. Make it compiler independent.

We also need a semi-stable API to represent types. For example, the order of fields in the `VariantDef` must be stable. Or a semi-stable representation for AST, which ensures that the order of the items in the code is preserved.

There are some others, mentioned in the proposal.
2025-05-05 08:36:17 +00:00
Ralf Jung 558957d3a8
Merge pull request #4307 from JoJoDeveloping/remove-unique-is-unique
Remove -Zunique-is-unique
2025-05-05 06:47:59 +00:00
bors 3a7cb44edc Auto merge of #140353 - 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

compiler & tools dependencies:
     Locking 36 packages to latest compatible versions
    Updating addr2line v0.21.0 -> v0.24.2
    Updating anyhow v1.0.97 -> v1.0.98
    Updating askama v0.13.0 -> v0.13.1 (available: v0.14.0)
    Updating askama_derive v0.13.0 -> v0.13.1
    Updating backtrace v0.3.71 -> v0.3.74
    Updating blake3 v1.8.1 -> v1.8.2
    Updating chrono v0.4.40 -> v0.4.41
    Updating clap v4.5.36 -> v4.5.37
    Updating clap_builder v4.5.36 -> v4.5.37
    Updating color-eyre v0.6.3 -> v0.6.4
    Updating color-spantrace v0.2.1 -> v0.2.2
    Updating derive-where v1.2.7 -> v1.4.0
    Updating getrandom v0.2.15 -> v0.2.16
    Removing gimli v0.28.1
    Updating hashbrown v0.15.2 -> v0.15.3
    Updating jiff v0.2.6 -> v0.2.12
    Updating jiff-static v0.2.6 -> v0.2.12
    Updating libm v0.2.11 -> v0.2.13
    Removing object v0.32.2
    Updating openssl-sys v0.9.107 -> v0.9.108
      Adding owo-colors v4.2.0
    Updating proc-macro2 v1.0.94 -> v1.0.95
    Updating psm v0.1.25 -> v0.1.26
    Updating rand v0.9.0 -> v0.9.1
    Updating redox_syscall v0.5.11 -> v0.5.12
    Updating rustix v1.0.5 -> v1.0.7
    Updating sha2 v0.10.8 -> v0.10.9
    Updating stacker v0.1.20 -> v0.1.21
    Updating syn v2.0.100 -> v2.0.101
    Updating synstructure v0.13.1 -> v0.13.2
    Updating toml_datetime v0.6.8 -> v0.6.9
      Adding windows v0.61.1
      Adding windows-collections v0.2.0
      Adding windows-future v0.2.0
      Adding windows-numerics v0.2.0
    Updating winnow v0.7.6 -> v0.7.9
    Updating zerocopy v0.8.24 -> v0.8.25
    Updating zerocopy-derive v0.8.24 -> v0.8.25
note: pass `--verbose` to see 33 unchanged dependencies behind latest

library dependencies:
     Locking 2 packages to latest compatible versions
    Removing allocator-api2 v0.2.21
    Updating hashbrown v0.15.2 -> v0.15.3
    Removing proc-macro2 v1.0.94
    Removing quote v1.0.40
    Updating rand v0.9.0 -> v0.9.1
    Removing syn v2.0.100
    Removing unicode-ident v1.0.18
    Removing zerocopy v0.8.24
    Removing zerocopy-derive v0.8.24
note: pass `--verbose` to see 3 unchanged dependencies behind latest

rustbook dependencies:
     Locking 31 packages to latest compatible versions
    Updating ammonia v4.0.0 -> v4.1.0
    Updating anyhow v1.0.97 -> v1.0.98
    Updating cc v1.2.19 -> v1.2.21
    Updating chrono v0.4.40 -> v0.4.41
    Updating clap v4.5.36 -> v4.5.37
    Updating clap_builder v4.5.36 -> v4.5.37
    Updating clap_complete v4.5.47 -> v4.5.48
      Adding cssparser v0.35.0
      Adding cssparser-macros v0.6.1
      Adding dtoa v1.0.10
      Adding dtoa-short v0.3.5
    Updating hashbrown v0.15.2 -> v0.15.3
    Updating html5ever v0.27.0 -> v0.31.0
    Updating jiff v0.2.6 -> v0.2.12
    Updating jiff-static v0.2.6 -> v0.2.12
    Updating libc v0.2.171 -> v0.2.172
    Updating markup5ever v0.12.1 -> v0.16.1
      Adding match_token v0.1.0
      Adding phf_macros v0.11.3
    Updating proc-macro2 v1.0.94 -> v1.0.95
    Updating redox_syscall v0.5.11 -> v0.5.12
    Updating rustix v1.0.5 -> v1.0.7
    Updating sha2 v0.10.8 -> v0.10.9
    Updating syn v2.0.100 -> v2.0.101
    Updating synstructure v0.13.1 -> v0.13.2
    Updating toml v0.8.20 -> v0.8.22
    Updating toml_datetime v0.6.8 -> v0.6.9
    Updating toml_edit v0.22.24 -> v0.22.26
      Adding toml_write v0.1.1
      Adding web_atoms v0.1.1
    Updating winnow v0.7.6 -> v0.7.9
```
2025-05-05 02:11:37 +00:00
bors 57ef1e7273 Auto merge of #140646 - tgross35:rollup-z3hjbm6, r=tgross35
Rollup of 6 pull requests

Successful merges:

 - #137280 (stabilize ptr::swap_nonoverlapping in const)
 - #140457 (Use target-cpu=z13 on s390x codegen const vector test)
 - #140619 (Small adjustments to `check_attribute_safety` to make the logic more obvious)
 - #140625 (Suggest `retain_mut` over `retain` as `Vec::extract_if` alternative)
 - #140627 (Allow linking rustc and rustdoc against the same single tracing crate)
 - #140630 (Async drop source info fix for proxy-drop-coroutine)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-05-04 23:07:18 +00:00
Trevor Gross 4320eec36a
Rollup merge of #140457 - fneddy:fix_s390x_codegen_const_vector, r=Mark-Simulacrum
Use target-cpu=z13 on s390x codegen const vector test

The default s390x cpu(z10) does not have vector support. Setting target-cpu at least to z13 enables vectorisation for s390x architecture and makes the test pass.
2025-05-04 18:11:48 -04:00
Trevor Gross a4e03e44e0
Rollup merge of #137280 - RalfJung:const_swap_nonoverlapping, r=lcnr
stabilize ptr::swap_nonoverlapping in const

Closes https://github.com/rust-lang/rust/issues/133668

The blocking issue mentioned there is resolved by documentation. We may in the future actually support such code, but that is blocked on https://github.com/rust-lang/const-eval/issues/72 which is non-trivial to implement. Meanwhile, this completes stabilization of all `const fn` in `ptr`. :)

Here's a version of the problematic example to play around with:
https://play.rust-lang.org/?version=nightly&mode=debug&edition=2021&gist=6c390452379fb593e109b8f8ee854d2a

Should be FCP'd with both `@rust-lang/libs-api`  and `@rust-lang/lang`  since  `swap_nonoverlapping` is documented to work as an "untyped" operation but due to the limitation mentioned above, that's not entirely true during const evaluation. I expect this limitation will only be hit in niche corner cases, so the benefits of having this function work most of the time outweigh the downsides of users running into this problem. (Note that unsafe code could already hit this limitation before this PR by doing cursed pointer casts, but having it hidden inside `swap_nonoverlapping` feels a bit different.)
2025-05-04 18:11:47 -04:00
bors eb278f8b38 Auto merge of #140599 - petrochenkov:rawerann, r=jieyouxu
compiletest: Support matching on non-json lines in compiler output

and migrate most of remaining `error-pattern`s to it.
Such diagnostics use a new diagnostic kind `RAW`.

Also emit an error for `error-pattern`s that can be replaced with line annotations.
Also remove a number of conditions to check both line annotations and `error-pattern`s in more cases.
Also respect `//@ check-stdout` when collecting "actual errors" for comparing against line annotations.
(A couple of tiny refactorings is also included.)

Continuation of https://github.com/rust-lang/rust/pull/139760.

r? `@jieyouxu`
2025-05-04 19:54:31 +00:00
Vadim Petrochenkov 0d29d41413 compiletest: Support matching on non-json lines in compiler output
and migrate most of remaining `error-pattern`s to it.
2025-05-04 18:27:45 +03:00
bors 4782ecd9fb Auto merge of #140549 - BoxyUwU:proper_const_norm, r=lcnr
Set groundwork for proper const normalization

r? lcnr

Updates a lot of our normalization/alias infrastructure to be setup to handle mgca aliases and normalization once const items are represented more like aliases than bodies. Inherent associated consts are still super busted, I didn't update the assertions that IACs the right arg setup because that winds up being somewhat involved to do *before* proper support for normalizing const aliases is implemented.

I dont *intend* for this to have any effect on stable. We continue normalizing via ctfe on stable and the codepaths in `project` for consts should only be reachable with mgca or ace.
2025-05-04 03:12:41 +00:00
bors 3f0bbc631a Auto merge of #140535 - dtolnay:hashbrown, r=tgross35
Update hashbrown dependency to unblock ExtractIf improvements

Release notes: https://github.com/rust-lang/hashbrown/releases/tag/v0.15.3

Relevant to me, this release includes https://github.com/rust-lang/hashbrown/pull/616 which unblocks https://github.com/rust-lang/rust/pull/139764.
2025-05-03 23:49:11 +00:00
bors b5eaa84d5e Auto merge of #140502 - nikic:llvm-20.1.4, r=dianqk
Update to LLVM 20.1.4

Fixes https://rust-lang.zulipchat.com/#narrow/channel/122651-general/topic/Why.20is.20the.20compiler.20failing.20on.20below.20code.3F.
2025-05-03 17:03:37 +00:00
bors 6671a44beb Auto merge of #140464 - oli-obk:successors-mut-perf, r=petrochenkov
Use a closure instead of three chained iterators

Fixes the perf regression from #123948

That PR had chained a third option to the iterator which apparently didn't optimize well
2025-05-03 10:43:38 +00:00
Oli Scherer b71f8392b8
Merge pull request #4308 from rust-lang/rustup-2025-05-03
Automatic Rustup
2025-05-03 07:57:33 +00:00
The Miri Cronjob Bot f01471137e Merge from rustc 2025-05-03 05:00:21 +00:00
bors 76d7e01dd1 Auto merge of #140442 - osiewicz:collector-walk-less-fine-grained-locking, r=wesleywiser
mono collector: Reduce # of locking while walking the graph

While profiling Zed's dev build I've noticed that while most of the time `upstream_monomorphizations` takes a lot of time in monomorpization_collector, in some cases (e.g. build of `editor` itself) the rest of monomorphization_collector_graph_walk dominates it. Most of the time is spent in collect_items_rec.

This PR aims to reduce the number of locks taking place; instead of locking output MonoItems once per children of current node, we do so once per *current node*. We also get to reuse locks for mentioned and used items. While this commit does not reduce Wall time of Zed's build, it does shave off CPU time (measured with `cargo build -j1`) from 48s to 47s. I've also tested it with parallel frontend against Zed and ripgrep and found no regressions.
2025-05-03 00:24:14 +00:00
bors fcb0673693 Auto merge of #140406 - Urgau:autorefs-perf, r=nnethercote
perf: delay checking of `#[rustc_no_implicit_autorefs]` in autoref lint

Try to address the regression seen in https://github.com/rust-lang/rust/pull/123239#issuecomment-2835418470 by delaying the checking of `#[rustc_no_implicit_autorefs]` on method call.
2025-05-02 17:35:50 +00:00