Skip to content

Rollup of 9 pull requests#154268

Closed
JonathanBrouwer wants to merge 34 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-vJuWfZM
Closed

Rollup of 9 pull requests#154268
JonathanBrouwer wants to merge 34 commits intorust-lang:mainfrom
JonathanBrouwer:rollup-vJuWfZM

Conversation

@JonathanBrouwer
Copy link
Contributor

Successful merges:

r? @ghost

Create a similar rollup

Jules-Bertholet and others added 30 commits March 14, 2026 19:20
The test began passing in `nightly-2025-10-16`. Probably by c50aebb
because it fixed two "does not live long enough" errors. The test fails
to compile with `nightly-2025-10-15` with such an error:

    $ rustc +nightly-2025-10-15 --edition 2018 tests/ui/async-await/gat-is-send-across-await.rs
    error: `impl G` does not live long enough
      --> tests/ui/async-await/gat-is-send-across-await.rs:16:24
       |
    16 |       let _: &dyn Send = &async move {
       |  ________________________^
    17 | |         let _gat = g.as_gat();
    18 | |         async{}.await
    19 | |     };
       | |_____^
- `char::is_cased`
- `char::is_titlecase`
- `char::case`
- `char::to_titlecase`
The existing names have bugged me for a while. Changes:

- `CycleError` -> `Cycle`. Because we normally use "error" for a `Diag`
  with `Level::Error`, and this type is just a precursor to that. Also,
  many existing locals of this type are already named `cycle`.

- `CycleError::cycle` -> `Cycle::frames`. Because it is a sequence of
  frames, and we want to avoid `Cycle::cycle` (and `cycle.cycle`).

- `cycle_error` -> `find_and_handle_cycle`. Because that's what it does.
  The existing name is just a non-descript noun phrase.

- `mk_cycle` -> `handle_cycle`. Because it doesn't make the cycle; the
  cycle is already made. It handles the cycle, which involves (a)
  creating the error, and (b) handling the error.

- `report_cycle` -> `create_cycle_error`. Because that's what it does:
  creates the cycle error (i.e. the `Diag`).

- `value_from_cycle_error` -> `handle_cycle_error_fn`. Because most
  cases don't produce a value, they just emit an error and quit.
  And the `_fn` suffix is for consistency with other vtable fns.

- `from_cycle_error` -> `handle_cycle_error`. A similar story for this
  module.
It will use enzyme to generate a default derivative implementation,
which can be overwritten by the user.
This reverts commit d665c0b.
This reverts commit 9aa065b.
This reverts commit 6edf58f.
…Simulacrum

Add APIs for dealing with titlecase

ACP: rust-lang/libs-team#354
Tracking issue: rust-lang#153892

r? libs-api

@rustbot label T-libs -T-libs-api A-unicode

~~The last commit has some insta-stable `PartialEq` impls, therefore: @rustbot label -needs-fcp
Alternatively, I could split those out into a follow-up PR.~~ (Edit: will do in follow-up)
…=jdonszelmann

Remove `ATTRIBUTE_ORDER`

r? @jdonszelmann

There's only a few attributes that use `KeepInnermost` and I think I like the consistency of just making them all `KeepOutermost`
…rochenkov

Avoid prematurely choosing a glob import

Fixes rust-lang#153842

Use the following without introducing trait to explain:
```rust
mod a {
    pub use crate::x::y as x; // single import rust-lang#1
}

mod b {
    pub mod x {
        pub mod y {}
    }
}

use a::x; // single import rust-lang#2
use b::*; // glob import rust-lang#3

fn main() {}
```

In current implementation, when `rust-lang#1` is first resolved, `crate::x` is temporarily taken from glob import `rust-lang#3` as `crate::b::x`. This happens because `single_import_can_define_name` will see that `rust-lang#2` cannot define `x` (because it depends on `rust-lang#1` and `rust-lang#1` is ignored) and then return `false`. Later, during finalization, `crate::x` in `rust-lang#1` resolves through single import `rust-lang#2` instead, which no longer matches the initially cached module `crate::b::x` and triggers the ICE.

I think the resolver should keep this unresolved because `rust-lang#2` may still define `x` to avoid prematurely choosing a glob import.

r? petrochenkov
…=petrochenkov

Rename various query cycle things.

The existing names have bugged me for a while. Changes:

- `CycleError` -> `Cycle`. Because we normally use "error" for a `Diag` with `Level::Error`, and this type is just a precursor to that. Also, many existing locals of this type are already named `cycle`.

- `CycleError::cycle` -> `Cycle::frames`. Because it is a sequence of frames, and we want to avoid `Cycle::cycle` (and `cycle.cycle`).

- `cycle_error` -> `find_and_handle_cycle`. Because that's what it does. The existing name is just a non-descript noun phrase.

- `mk_cycle` -> `handle_cycle`. Because it doesn't make the cycle; the cycle is already made. It handles the cycle, which involves (a) creating the error, and (b) handling the error.

- `report_cycle` -> `create_cycle_error`. Because that's what it does: creates the cycle error (i.e. the `Diag`).

- `value_from_cycle_error` -> `handle_cycle_error_fn`. Because most cases don't produce a value, they just emit an error and quit. And the `_fn` suffix is for consistency with other vtable fns.

- `from_cycle_error` -> `handle_cycle_error`. A similar story for this module.

r? @petrochenkov
…=WaffleLapkin

const validity checking: do not recurse to references inside MaybeDangling

This arguably should be allowed, but we currently reject it:
```rust
#![feature(maybe_dangling)]
use std::mem::MaybeDangling;

const X: MaybeDangling<&bool> = unsafe { std::mem::transmute(&5u8) };
```

r? @WaffleLapkin
…ize-in-generalize, r=lcnr

Revert eagerly normalize in generalize

r? @lcnr

Reverts rust-lang#151746

We'll likely pull eager normalization out of generalization

Fixes rust-lang#154173
Fixes rust-lang#154244
…r=petrochenkov

tests/ui/async-await/gat-is-send-across-await.rs: New regression test

The test began passing in `nightly-2025-10-16`. Probably by c50aebb (rust-lang#144064) because it fixed two "does not live long enough" errors. The test fails to compile with `nightly-2025-10-15` with such an error:

    $ rustc +nightly-2025-10-15 --edition 2018 tests/ui/async-await/gat-is-send-across-await.rs
    error: `impl G` does not live long enough
      --> tests/ui/async-await/gat-is-send-across-await.rs:16:24
       |
    16 |       let _: &dyn Send = &async move {
       |  ________________________^
    17 | |         let _gat = g.as_gat();
    18 | |         async{}.await
    19 | |     };
       | |_____^

Closes rust-lang#111852 since that's where the test comes from.
…athanBrouwer

Remove more `BuiltinLintDiag` variants

Part of rust-lang#153099.

r? @JonathanBrouwer
…onathanBrouwer,jdonszelmann

Allow applying autodiff macros to trait functions.

It will use enzyme to generate a default derivative implementation, which can be overwritten by the user.

closes: rust-lang#153329

r? @JonathanBrouwer
@rust-bors rust-bors bot added the rollup A PR which is a rollup label Mar 23, 2026
@rustbot rustbot added A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver) labels Mar 23, 2026
@JonathanBrouwer
Copy link
Contributor Author

@bors r+ rollup=never p=5

@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

📌 Commit 7036aaf has been approved by JonathanBrouwer

It is now in the queue for this repository.

@rust-bors rust-bors bot added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Mar 23, 2026
@JonathanBrouwer
Copy link
Contributor Author

Trying commonly failed jobs
@bors try jobs=test-various,x86_64-gnu-aux,x86_64-gnu-llvm-21-3,x86_64-msvc-1,aarch64-apple,x86_64-mingw-1

@rust-bors

This comment has been minimized.

rust-bors bot pushed a commit that referenced this pull request Mar 23, 2026
Rollup of 9 pull requests


try-job: test-various
try-job: x86_64-gnu-aux
try-job: x86_64-gnu-llvm-21-3
try-job: x86_64-msvc-1
try-job: aarch64-apple
try-job: x86_64-mingw-1
@rust-bors rust-bors bot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Mar 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

☔ The latest upstream changes (presumably #154253) made this pull request unmergeable. Please resolve the merge conflicts.

This pull request was unapproved.

@rustbot rustbot removed the S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. label Mar 23, 2026
@rust-bors
Copy link
Contributor

rust-bors bot commented Mar 23, 2026

☀️ Try build successful (CI)
Build commit: a2b0004 (a2b0004d787524e4bea57344e43a298c062493a2, parent: 13e2abaac846b2680ae93e1b3bd9fe7fe1b9a7fe)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-attributes Area: Attributes (`#[…]`, `#![…]`) A-query-system Area: The rustc query system (https://rustc-dev-guide.rust-lang.org/query.html) rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-libs Relevant to the library team, which will review and decide on the PR/issue. WG-trait-system-refactor The Rustc Trait System Refactor Initiative (-Znext-solver)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants