Skip to content

Rollup of 5 pull requests - #164192

Closed
jhpratt wants to merge 16 commits into
rust-lang:mainfrom
jhpratt:rollup-WxjKEnA
Closed

jhpratt wants to merge 16 commits into
rust-lang:mainfrom
jhpratt:rollup-WxjKEnA

Conversation

@jhpratt

@jhpratt jhpratt commented Oct 12, 2026

Copy link
Copy Markdown
Member

Successful merges:

Warning

This rollup conflicts with pending auto build #164187 and may need to be recreated if the pending build succeeds.

r? @ghost

Create a similar rollup

malezjaa and others added 16 commits September 20, 2026 18:24
The rust-analyzer impls of these methods will need to be removed on the
next sync.
It's faster than `extend` to initialize these structures.
A lot of work can be skipped if the two values being related are equal.
(There are various early-return equality checks like this further down
the call chain, this just adds one earlier.)
The former has an early return check and a single call site, so the
check can be moved before the call site. Also, in the `Err(NoSolution)`
case we can skip the `CandidateHeadUsages::default()` stuff because
that's just an empty list and `merge_usages` is a no-op.
Instead of getting it within `fast_reject_assumption`.

`fast_reject_assumption` has three call sites. For two of them this
change doesn't help perf, but the third call occurs in a loop, and this
lets us get the goal lang item once per loop instead of once per loop
element.
- Increase the number of preinterned type vars and anon bound types.
- Preintern some root-universe placeholder types with anon bounds.
- Adjust some comments.
- Also rename a lot of the preinterning names for more consistency.
In unused macro lint, mention when its enclosing `mod` isn't annotated with `#[macro_use]`:

```
error: unused macro definition: `unused`
  --> $DIR/unused-macros-decl.rs:17:11
   |
LL |     macro unused {
   |           ^^^^^^
   |
note: the lint level is defined here
  --> $DIR/unused-macros-decl.rs:16:12
   |
LL |     #[deny(unused_macros)]
   |            ^^^^^^^^^^^^^
help: consider annotating the enclosing module with `#[macro_use]`
   |
LL + #[macro_use]
LL | mod bar {
   |
```

On resolution error for unexported macro, point at macro of the same name and mention its enclosing scope could be marked with `#[macro_use]`:

```
error: cannot find macro `a_macro` in this scope
  --> $DIR/unresolved-macro-missing-macro-use.rs:11:5
   |
LL |     a_macro!();
   |     ^^^^^^^
   |
help: you might be missing a `#[macro_use]` attribute on a `mod` module or `use` import
  --> $DIR/unresolved-macro-missing-macro-use.rs:5:5
   |
LL | / mod has_a_macro {
LL | |
LL | |     macro_rules! a_macro { () => {} }
   | |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a macro with the same name is defined here
...  |
LL | | }
   | |_- consider annotating this `mod` with `#[macro_use]`
```

On ambiguous macro use, suggest removing invalid import:

```
error[E0659]: `a_macro` is ambiguous
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:15:5
   |
LL |     a_macro!();
   |     ^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
note: `a_macro` could refer to the macro defined here
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:5:5
   |
LL |     macro_rules! a_macro { () => {} }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `a_macro` could also refer to the unresolved item imported here
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:9:5
   |
LL | use crate::has_a_macro::a_macro;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: consider removing this
```
… r=nia-e

stabilize ptr_cast_slice

### Stabilization report

Closes rust-lang#149103

This feature adds method calls on raw pointers that call into the respective `ptr::slice_from_raw_parts{_mut}` method for the types `*const T`, `*mut T` and `NonNull<T>` to make using raw pointers more ergonomic in Rust by supporting postfix method chain syntax while creating slices.

#### Implementation
1. Implementation PR: rust-lang#149110
2. Migrated `std` to use `ptr.cast_slice`: rust-lang#156109

#### Public API

```rs
// core::ptr::const_ptr
impl<T> *const T {
    pub const fn cast_slice(self, len: usize) -> *const [T];
}

// core::ptr::mut_ptr
impl<T> *mut T {
    pub const fn cast_slice(self, len: usize) -> *mut [T];
}

// core::ptr::non_null
impl<T> NonNull<T> {
    pub const fn cast_slice(self, len: usize) -> NonNull<[T]>;
}
```

r? @nia-e

@rustbot modify labels: +T-libs
…zelmann

New solver opts for `diesel`

A collection of small optimizations. Details in individual commits.

Local measurements:
```
solver         icounts (B)
------         -----------
old            37.9
new (orig)     56.4 (1.49x)
new (this PR)  49.5 (1.31x)
```
Also some small improvements on a range of other benchmarks.

r? @jdonszelmann
… r=mu001999

Remove unnecessary indirection around `hir::ConstArg`

Probably doesn't have measurable perf effect because `ConstArg` is not that common of a type (yet), but it's nicer this way regardless imo :)
Tweak output on unused/unaccessible local macro

In unused macro lint, mention when its enclosing `mod` isn't annotated with `#[macro_use]`:

```
error: unused macro definition: `unused`
  --> $DIR/unused-macros-decl.rs:17:11
   |
LL |     macro unused {
   |           ^^^^^^
   |
note: the lint level is defined here
  --> $DIR/unused-macros-decl.rs:16:12
   |
LL |     #[deny(unused_macros)]
   |            ^^^^^^^^^^^^^
help: consider annotating the enclosing module with `#[macro_use]`
   |
LL + #[macro_use]
LL | mod bar {
   |
```

On resolution error for unexported macro, point at macro of the same name and mention its enclosing scope could be marked with `#[macro_use]`:

```
error: cannot find macro `a_macro` in this scope
  --> $DIR/unresolved-macro-missing-macro-use.rs:11:5
   |
LL |     a_macro!();
   |     ^^^^^^^
   |
help: you might be missing a `#[macro_use]` attribute on a `mod` module or `use` import
  --> $DIR/unresolved-macro-missing-macro-use.rs:5:5
   |
LL | / mod has_a_macro {
LL | |
LL | |     macro_rules! a_macro { () => {} }
   | |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ a macro with the same name is defined here
...  |
LL | | }
   | |_- consider annotating this `mod` with `#[macro_use]`
```

On ambiguous macro use, suggest removing invalid import:

```
error[E0659]: `a_macro` is ambiguous
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:15:5
   |
LL |     a_macro!();
   |     ^^^^^^^ ambiguous name
   |
   = note: ambiguous because of a conflict between a `macro_rules` name and a non-`macro_rules` name from another module
note: `a_macro` could refer to the macro defined here
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:5:5
   |
LL |     macro_rules! a_macro { () => {} }
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: `a_macro` could also refer to the unresolved item imported here
  --> $DIR/unresolved-macro-missing-macro-use-3.rs:9:5
   |
LL | use crate::has_a_macro::a_macro;
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^^
   = help: consider removing this
```

Fix rust-lang#57966.
…ns, r=jieyouxu

Update actions/upload-artifact action to v7.0.2

This PR contains the following updates:

| Package | Type | Update | Change |
|---|---|---|---|
| [actions/upload-artifact](https://redirect.github.com/actions/upload-artifact) | action | patch | `v7.0.1` → `v7.0.2` |

---

### Release Notes

<details>
<summary>actions/upload-artifact (actions/upload-artifact)</summary>

### [`v7.0.2`](https://redirect.github.com/actions/upload-artifact/releases/tag/v7.0.2)

[Compare Source](https://redirect.github.com/actions/upload-artifact/compare/v7.0.1...v7.0.2)

#### What's Changed

- Improves artifact download retries when the service returns HTTP 429 (rate limiting), including honoring valid Retry-After headers.
- Updates [@&rust-lang#8203;actions/artifact](https://redirect.github.com/actions/artifact) to v6.3.1.

#### New Contributors

- [@&rust-lang#8203;tunc-d](https://redirect.github.com/tunc-d) made their first contribution in [#&rust-lang#8203;821](https://redirect.github.com/actions/upload-artifact/pull/821)

**Full Changelog**: <actions/upload-artifact@v7.0.1...v7.0.2>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - Between 12:00 AM and 03:59 AM, only on Monday (`* 0-3 * * 1`)
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR was generated by [Mend Renovate](https://mend.io/renovate/). View the [repository job log](https://developer.mend.io/github/rust-lang/rust).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xMzQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjEzNC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->
@rust-bors rust-bors Bot added the rollup A PR which is a rollup label Oct 12, 2026
@rustbot rustbot added A-CI Area: Our Github Actions CI 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-infra Relevant to the infrastructure 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 Oct 12, 2026
@jhpratt jhpratt closed this Oct 12, 2026
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Oct 12, 2026
@jhpratt
jhpratt deleted the rollup-WxjKEnA branch October 12, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-CI Area: Our Github Actions CI rollup A PR which is a rollup T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. T-infra Relevant to the infrastructure 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.

7 participants