Commit graph

309128 commits

Author SHA1 Message Date
Matthias Krüger
4228b53618
Rollup merge of #146699 - heiher:is-ascii-lsx, r=Mark-Simulacrum
Add `is_ascii` function optimized for LoongArch64 for [u8]

Similar to x86_64, on LoongArch64 we use the `vmskltz.b` instruction to test the high bit in a lane.

For longer input cases, the performance improvement is significant. For unaligned cases close to 32 bytes in length, there's some regression, but it seems acceptable.

| core benches (MB/s)                                    | Before | After  | %       |
|--------------------------------------------------------|--------|--------|---------|
| ascii::is_ascii::short::case00_libcore                 | 1000   | 1000   | 0.00    |
| ascii::is_ascii::medium::case00_libcore                | 8000   | 8000   | 0.00    |
| ascii::is_ascii::long::case00_libcore                  | 183947 | 436875 | +137.50 |
| ascii::is_ascii::unaligned_head_medium::case00_libcore | 7750   | 2818   | -63.64  |
| ascii::is_ascii::unaligned_head_long::case00_libcore   | 317681 | 436812 | +37.50  |
| ascii::is_ascii::unaligned_tail_medium::case00_libcore | 7750   | 3444   | -55.56  |
| ascii::is_ascii::unaligned_tail_long::case00_libcore   | 155311 | 436812 | +181.25 |
| ascii::is_ascii::unaligned_both_medium::case00_libcore | 7500   | 3333   | -55.56  |
| ascii::is_ascii::unaligned_both_long::case00_libcore   | 174700 | 436750 | +150.00 |
2025-11-02 20:21:01 +01:00
Matthias Krüger
6621bbcfd1
Rollup merge of #146573 - Randl:const-range, r=Mark-Simulacrum
Constify Range functions

Constify various `Range` traits, functions, and implementations
2025-11-02 20:21:00 +01:00
bors
6a884ad1b5 Auto merge of #148390 - matthiaskrgr:rollup-hu88mcf, r=matthiaskrgr
Rollup of 8 pull requests

Successful merges:

 - rust-lang/rust#148170 (split definition and use site hidden tys)
 - rust-lang/rust#148194 (compiletest: Remove `cleanup_debug_info_options`)
 - rust-lang/rust#148199 (compiletest: Don't modify `testpaths` when creating aux contexts)
 - rust-lang/rust#148290 (Do not emit solver errors that contain error types)
 - rust-lang/rust#148357 (temporary-lifetime-extension.rs test works in all editions)
 - rust-lang/rust#148362 (docs: makes a note about possible building  `rustc 1.91.0 + host tools` for win7)
 - rust-lang/rust#148367 (Use --print host-tuple to get the host)
 - rust-lang/rust#148374 (miri subtree update)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-02 11:44:38 +00:00
Matthias Krüger
785c4ff767
Rollup merge of #148374 - RalfJung:miri, r=RalfJung
miri subtree update

Subtree update of `miri` to 52c5daf8e1.

Created using https://github.com/rust-lang/josh-sync.

r? `@ghost`
2025-11-02 09:10:41 +01:00
Matthias Krüger
beb2dde73a
Rollup merge of #148367 - ChrisDenton:use-print-host, r=jieyouxu
Use --print host-tuple to get the host

`--print host-tuple` has been available since 1.84 so there's no longer a need to parse the output of `-vV`. Especially since this script is shipped with the toolchain.
2025-11-02 09:10:40 +01:00
Matthias Krüger
cd6e2fa49b
Rollup merge of #148362 - Fenex:docs/platform-support-win7, r=Noratrieb
docs: makes a note about possible building  `rustc 1.91.0 + host tools` for win7

I have make notes in docs that there is possible to build host tools for target `x86_64-win7-windows-msvc`.

<img width="668" height="331" alt="image" src="https://github.com/user-attachments/assets/0335bc72-963c-4bfd-9910-61963dbf7dd7" />

r? ``````@roblabla``````

``````@rustbot`````` label A-docs  O-windows-7

P.S. prebuilt binaries can be found [here](https://github.com/Fenex/rust-win7/releases).
2025-11-02 09:10:39 +01:00
Matthias Krüger
afe22267e3
Rollup merge of #148357 - tshepang:all-editions-work, r=madsmtm
temporary-lifetime-extension.rs test works in all editions
2025-11-02 09:10:38 +01:00
Matthias Krüger
844a41903e
Rollup merge of #148290 - oli-obk:push-qwxvxyopypry, r=nnethercote
Do not emit solver errors that contain error types

any follow-up errors are going to either be duplicates or often disappear if the error itself is fixed.

in this PR it mostly silences dyn-compat errors as all the other errors are already deduplicated outside of the test suite. The dyn compat errors are independent errors and I think if the dyn compatiblity depended on an error type it would not actually show, so this is PR is actually silencing independent errors, too.

I am opening this PR because I am seeing lots of `{type error}: const Trait` errors when adding more const checking. So instead of targetting just those specific errors, I wanted to try out fully avoiding such errors near the trait solver.

cc ````@rust-lang/types```` for thoughts
2025-11-02 09:10:38 +01:00
Matthias Krüger
c6b9df840d
Rollup merge of #148199 - Zalathar:paths, r=jieyouxu
compiletest: Don't modify `testpaths` when creating aux contexts

Modifying `TestCx::testpaths` makes it vastly harder to reason about how compiletest is using test paths, and can be avoided without much trouble by simply passing explicit source-file paths into a small number of auxiliary-aware methods.

---

This PR was originally based on a much larger change that split `TestPaths` into multiple structs and multiple `TestCx` fields (as seen in early revisions of https://github.com/rust-lang/rust/pull/148160), but after further cleanups it turned out that very few tweaks were actually needed to avoid changes to `testpaths`.

r? jieyouxu
2025-11-02 09:10:37 +01:00
Matthias Krüger
79206268d3
Rollup merge of #148194 - Zalathar:no-cleanup, r=jieyouxu
compiletest: Remove `cleanup_debug_info_options`

This "cleanup" function is more than a decade old, and I can't find any evidence of modern-day bootstrap being able to pass any of these flags to `--host-rustcflags` or `--target-rustcflags`.

I thought about replacing the cleanup with an assertion, but I think it's better to delete it entirely for now, and re-add checks later if they're motivated by actual problems in practice.

In addition to deleting some old and confusing code, this also lets us remove three instances of duplicating `TestCx`, which is the biggest win.

r? jieyouxu
2025-11-02 09:10:36 +01:00
Matthias Krüger
8e14ab7e59
Rollup merge of #148170 - lcnr:opaques-early-binder, r=BoxyUwU
split definition and use site hidden tys

Tracking this implicitly is kinda messy and easy to get wrong.

r? ``@BoxyUwU``
2025-11-02 09:10:36 +01:00
bors
73e6c9ebd9 Auto merge of #147784 - nxsaken:div_exact_return_option, r=dtolnay
Return `Option` from `exact_div` and inherit overflow checks

According to https://github.com/rust-lang/rust/issues/139911#issuecomment-3404056127, `exact_div` should return `Option::None` if `self % rhs != 0`, panic if `rhs == 0`, and handle overflow conditionally (panic in debug, wrap in release).

rust-lang/rust#147771 should rename `exact_div` to `div_exact`.
2025-11-02 08:05:11 +00:00
bors
bd3ac03300 Auto merge of #145640 - estebank:point-at-impl-e0277, r=nnethercote
When a trait isn't implemented, but another similar impl is found, point at it

```
error[E0277]: the trait bound `u32: Trait` is not satisfied
  --> $DIR/trait_objects_fail.rs:26:9
   |
LL |     foo(&10_u32);
   |         ^^^^^^^ the trait `Trait` is not implemented for `u32`
   |
help: the trait `Trait<12>` is not implemented for `u32`
      but trait `Trait<2>` is implemented for it
  --> $DIR/trait_objects_fail.rs:7:1
   |
LL | impl Trait<2> for u32 {}
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: required for the cast from `&u32` to `&dyn Trait`
```

Pointing at the `impl` definition that *could* apply given a different self type is *particularly* useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:

```
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> $DIR/issue-62742.rs:4:5
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
      but trait `Raw<[_]>` is implemented for it
  --> $DIR/issue-62742.rs:29:1
   |
LL | impl<T> Raw<[T]> for RawImpl<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
  --> $DIR/issue-62742.rs:33:35
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`
```
2025-11-01 20:11:26 +00:00
bors
fca2e941f8 Auto merge of #148356 - matthiaskrgr:rollup-mh4l2yi, r=matthiaskrgr
Rollup of 10 pull requests

Successful merges:

 - rust-lang/rust#135602 (Tweak output of missing lifetime on associated type)
 - rust-lang/rust#139751 (Implement pin-project in pattern matching for `&pin mut|const T`)
 - rust-lang/rust#142682 (Update bundled musl to 1.2.5)
 - rust-lang/rust#148171 (Simplify code to generate line numbers in highlight)
 - rust-lang/rust#148263 (Unpin `libc` and `rustix` in `compiler` and `rustbook`)
 - rust-lang/rust#148301 ([rustdoc search] Include extern crates when filtering on `import`)
 - rust-lang/rust#148330 (Don't require dlltool with the dummy backend on MinGW)
 - rust-lang/rust#148338 (cleanup: upstream dropped amx-transpose functionality)
 - rust-lang/rust#148340 (Clippy subtree update)
 - rust-lang/rust#148343 (`nonpoison::Condvar` should take `MutexGuard` by reference)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-01 16:44:42 +00:00
Chris Denton
82140c1779
Use --print host-tuple to get the host 2025-11-01 13:51:02 +00:00
Vitaliy Busko
4220f7c90e
confirmed success built rustc 1.91.0 + host tools for win7 2025-11-01 17:02:48 +07:00
Tshepang Mbambo
61ccd539da test works in all editions 2025-11-01 10:20:16 +02:00
Matthias Krüger
0ed8002a31
Rollup merge of #148343 - connortsui20:guard-ref-condvar, r=Amanieu
`nonpoison::Condvar` should take `MutexGuard` by reference

Feature: `#![feature(nonpoison_condvar)]`
Tracking Issue: https://github.com/rust-lang/rust/issues/134645
Specific comment: https://github.com/rust-lang/rust/issues/134645#issuecomment-3458525913

Changes the `nonpoison::Condvar` API to take `MutexGuard` by reference instead of ownership.

I'm actually not entirely sure why the current poison variant of `Condvar` takes by ownership, is it just legacy reasons?

Additionally, the `nonpoison_and_poison_unwrap_test` macro doesn't really make sense anymore now that the APIs are completely different, so this reverts that change from a few months ago.

r? ````@Amanieu````
2025-11-01 08:25:49 +01:00
Matthias Krüger
1ca21edce4
Rollup merge of #148340 - flip1995:clippy-subtree-update, r=Manishearth
Clippy subtree update

r? ``@Manishearth``

Cargo.lock update due to Clippy version bump
2025-11-01 08:25:48 +01:00
Matthias Krüger
e8989b97c8
Rollup merge of #148338 - durin42:llvm-22-amx-transpose, r=workingjubilee
cleanup: upstream dropped amx-transpose functionality

See also LLVM change 5322fb626820. Looks like this was just removed entirely.
It seems a little bad to just drop it, but I don't see an easy way to conditionalize
this and if it's really just Gone and we marked it as unstable (which it looks like
we did?) I guess we should just dump it.

````@rustbot```` label llvm-main
2025-11-01 08:25:47 +01:00
Matthias Krüger
b79fc98af9
Rollup merge of #148330 - bjorn3:dummy_backend_no_dlltool, r=mati865
Don't require dlltool with the dummy backend on MinGW

The dummy backend should be able to cross-compile to any target without requiring any external tool or library other than the rust standard library.

For https://github.com/rust-lang/miri/pull/4648.
2025-11-01 08:25:47 +01:00
Matthias Krüger
e8096450c3
Rollup merge of #148301 - GuillaumeGomez:import-filter, r=notriddle
[rustdoc search] Include extern crates when filtering on `import`

As discussed https://github.com/rust-lang/rust/pull/147909, some filters should have been "grouped". This PR allows extern crates to match the `import` filter.

This PR also allowed me to uncover a bug for the URL generated for renamed extern crates. Opened rust-lang/rust#148300 for it.

r? `````@notriddle`````
2025-11-01 08:25:46 +01:00
Matthias Krüger
8cc32c377d
Rollup merge of #148263 - clubby789:bump-libc, r=ehuss
Unpin `libc` and `rustix` in `compiler` and `rustbook`

Closes rust-lang/rust#147501
2025-11-01 08:25:46 +01:00
Matthias Krüger
efcf705bb3
Rollup merge of #148171 - GuillaumeGomez:line-number-highlight, r=yotamofek,lolbinarycat
Simplify code to generate line numbers in highlight

Follow-up of https://github.com/rust-lang/rust/pull/146992.

cc `````@yotamofek`````
r? `````@lolbinarycat`````
2025-11-01 08:25:45 +01:00
Matthias Krüger
03dc65653c
Rollup merge of #142682 - Gankra:update_musl_1.2.5, r=wesleywiser
Update bundled musl to 1.2.5

Update the bundled musl library from 1.2.3 to the 1.2.5 release from February 29, 2024.

* mcp: https://github.com/rust-lang/compiler-team/issues/887
* blog: https://github.com/rust-lang/blog.rust-lang.org/pull/1641
* Prior update: rust-lang/rust#107129
* [musl releases page](https://musl.libc.org/releases.html)

--------

This is a rebase of

* rust-lang/rust#125692

Which removes the second speculative commit which ended up not panning out.

I've added my own second commit that updates all other places I could find that referenced musl 1.2.3 in the codebase.

try-job: dist-x86_64-musl
try-job: dist-i586-gnu-i586-i686-musl
try-job: dist-x86_64-linux
2025-11-01 08:25:44 +01:00
Matthias Krüger
dc9060688a
Rollup merge of #139751 - frank-king:feature/pin-project, r=Nadrieril,traviscross
Implement pin-project in pattern matching for `&pin mut|const T`

This PR implements part of rust-lang/rust#130494. It supports pin-project in pattern matching for `&pin mut|const T`.

~Pin-projection by field access (i.e. `&pin mut|const place.field`) is not fully supported yet since pinned-borrow is not ready (rust-lang/rust#135731).~

CC ``````@traviscross``````
2025-11-01 08:25:44 +01:00
Matthias Krüger
44d6d86ccb
Rollup merge of #135602 - estebank:issue-135589, r=Nadrieril
Tweak output of missing lifetime on associated type

Each commit can be reviewed independently. Address parts of #135589.

---

When an associated type is missing a lifetime, point at its enclosing `impl`, whether it has or doesn't have lifetimes defined. If it does have a lifetime, suggest using it.

```
error: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $DIR/missing-lifetime-in-assoc-type-1.rs:8:17
   |
LL | impl<'a> IntoIterator for &S {
   |     ---- there is a named lifetime specified on the impl block you could use
...
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
   |
help: consider using the lifetime from the impl block
   |
LL |     type Item = &'a T;
   |                  ++
```

```
error: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $DIR/missing-lifetime-in-assoc-type-2.rs:5:17
   |
LL | impl IntoIterator for &S {
   |     - you could add a lifetime on the impl block, if the trait or the self type can have one
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
```

---

On unconstrained lifetime on impl block, suggest using it if there's an implicit borrow in the self type
```
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
  --> $DIR/missing-lifetime-in-assoc-type-1.rs:4:6
   |
LL | impl<'a> IntoIterator for &S {
   |      ^^ unconstrained lifetime parameter
   |
help: consider using the named lifetime here instead of an implict lifetime
   |
LL | impl<'a> IntoIterator for &'a S {
   |                            ++
```

---

Do not suggest introducing lifetime in impl assoc type

---

Previously we only showed the trait's assoc item if the trait was local, because we were looking for a small span only for the generics, which we don't have for foreign traits. We now use `def_span` for the item, so we at least provide some context, even if its span is too wide.

```
error[E0195]: lifetime parameters or bounds on type `IntoIter` do not match the trait declaration
   --> tests/ui/lifetimes/missing-lifetime-in-assoc-type-4.rs:7:18
    |
7   |     type IntoIter<'a> = std::collections::btree_map::Values<'a, i32, T>;
    |                  ^^^^ lifetimes do not match type in trait
    |
   ::: /home/gh-estebank/rust/library/core/src/iter/traits/collect.rs:292:5
    |
292 |     type IntoIter: Iterator<Item = Self::Item>;
    |     ------------------------------------------ lifetimes in impl do not match this type in trait
```
2025-11-01 08:25:43 +01:00
bors
d85276b256 Auto merge of #148337 - matthiaskrgr:rollup-vojwz0m, r=matthiaskrgr
Rollup of 9 pull requests

Successful merges:

 - rust-lang/rust#139310 (add first HelenOS compilation targets)
 - rust-lang/rust#147161 (implement VecDeque extend_from_within and prepend_from_within)
 - rust-lang/rust#147622 (`unicode_data` refactors)
 - rust-lang/rust#147780 (Implement VecDeque::extract_if)
 - rust-lang/rust#147942 (Enable regression labeling aliases)
 - rust-lang/rust#147986 (Use fstatat() in DirEntry::metadata on Apple platforms)
 - rust-lang/rust#148103 (cg_llvm: Pass `debuginfo_compression` through FFI as an enum)
 - rust-lang/rust#148319 (docs: Fix argument names for `carrying_mul_add`)
 - rust-lang/rust#148322 (Enable file locking support in illumos)

r? `@ghost`
`@rustbot` modify labels: rollup
2025-11-01 07:12:00 +00:00
Ralf Jung
63a18d4a2d
Merge pull request #4658 from RalfJung/weak-mem-na-reads
weak memory: fix non-atomic read clearing store buffer
2025-11-01 06:28:52 +00:00
bors
17e7324d44 Auto merge of #148336 - weihanglo:update-cargo, r=weihanglo
Update cargo submodule

6 commits in 6c1b6100343691341b9e76c5acc594e78220f963..6368002885a04cbeae39a82cf5118f941559a40a
2025-10-28 16:27:52 +0000 to 2025-10-31 14:31:52 +0000
- feat(build-analysis): emit timing-info log (rust-lang/cargo#16179)
- Remove libc pin message (rust-lang/cargo#16182)
- feat(config-include): add optional field support (rust-lang/cargo#16180)
- feat(config-include): support inline and array of tables  (rust-lang/cargo#16174)
- test(script): Update from rustc's test suite (rust-lang/cargo#16169)
- Fix links for options in man pages (rust-lang/cargo#16172)

r? ghost
2025-11-01 04:05:14 +00:00
Guillaume Gomez
2a1595e2fe Add regression test for including extern crates in import filtering 2025-11-01 00:13:19 +01:00
Esteban Küber
32aa59939c Ignore file length lint for now 2025-10-31 21:07:46 +00:00
Esteban Küber
8d5166710b fix typo 2025-10-31 20:46:47 +00:00
Esteban Küber
75bb675f96 Do not suggest introducing lifetime in impl assoc type
```
error[E0261]: use of undeclared lifetime name `'a`
  --> $DIR/missing-lifetime-in-assoc-type-2.rs:7:57
   |
LL | impl IntoIterator for &S {
   |     - help: consider introducing lifetime `'a` here: `<'a>`
...
LL |     type IntoIter = std::collections::btree_map::Values<'a, i32, T>;
   |                                                         ^^ undeclared lifetime
```

```
error[E0106]: missing lifetime specifier
  --> $DIR/issue-74918-missing-lifetime.rs:9:30
   |
LL |     type Item = IteratorChunk<T, S>;
   |                              ^ expected named lifetime parameter
   |
help: consider introducing a named lifetime parameter
   |
LL ~ impl<'a, T, S: Iterator<Item = T>> Iterator for ChunkingIterator<T, S> {
LL ~     type Item = IteratorChunk<'a, T, S>;
   |
```
2025-10-31 20:45:33 +00:00
Esteban Küber
1e9e1f2f9a On unconstrained lifetime on impl block, suggest using it if there's an implicit borrow in the self type
```
error[E0207]: the lifetime parameter `'a` is not constrained by the impl trait, self type, or predicates
  --> $DIR/missing-lifetime-in-assoc-type-1.rs:4:6
   |
LL | impl<'a> IntoIterator for &S {
   |      ^^ unconstrained lifetime parameter
   |
help: consider using the named lifetime here instead of an implict lifetime
   |
LL | impl<'a> IntoIterator for &'a S {
   |                            ++
```
2025-10-31 20:45:33 +00:00
Esteban Küber
8ba2950fb6 Detect case of missing lifetime in assoc type
When an associated type is missing a lifetime, point at its enclosing `impl`, whether it has or doesn't have lifetimes defined. If it does have a lifetime, suggest using it.

```
error: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $DIR/missing-lifetime-in-assoc-type-1.rs:8:17
   |
LL | impl<'a> IntoIterator for &S {
   |     ---- there is a named lifetime specified on the impl block you could use
...
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
   |
help: consider using the lifetime from the impl block
   |
LL |     type Item = &'a T;
   |                  ++
```

```
error: in the trait associated type is declared without lifetime parameters, so using a borrowed type for them requires that lifetime to come from the implemented type
  --> $DIR/missing-lifetime-in-assoc-type-2.rs:5:17
   |
LL | impl IntoIterator for &S {
   |     - you could add a lifetime on the impl block, if the trait or the self type can have one
LL |     type Item = &T;
   |                 ^ this lifetime must come from the implemented type
```
2025-10-31 20:45:33 +00:00
Esteban Küber
2e01acc59e Add tests for some cases mentioned in #135589 2025-10-31 20:45:33 +00:00
Esteban Küber
c9c7272020 Account for #[rustc_reservation_impl] when pointing at potential impls 2025-10-31 20:44:01 +00:00
Esteban Küber
ef8ed4c551 Fix dlltool-failed test 2025-10-31 20:44:01 +00:00
Esteban Küber
eeadffd926 When more than a single impl and less than 4 could apply, point at them
```
error[E0277]: the trait bound `[[u16; 3]; 2]: Bar` is not satisfied
  --> $DIR/issue-67185-2.rs:21:6
   |
LL | impl Foo for FooImpl {}
   |      ^^^ the trait `Bar` is not implemented for `[[u16; 3]; 2]`
   |
help: the following other types implement trait `Bar`
  --> $DIR/issue-67185-2.rs:9:1
   |
LL | impl Bar for [u16; 4] {}
   | ^^^^^^^^^^^^^^^^^^^^^ `[u16; 4]`
LL | impl Bar for [[u16; 3]; 3] {}
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^ `[[u16; 3]; 3]`
note: required by a bound in `Foo`
  --> $DIR/issue-67185-2.rs:14:30
   |
LL | trait Foo
   |       --- required by a bound in this trait
LL | where
LL |     [<u8 as Baz>::Quaks; 2]: Bar,
   |                              ^^^ required by this bound in `Foo`
```
2025-10-31 20:44:01 +00:00
Esteban Küber
1d860902f6 When a trait isn't implemented, but another similar impl is found, point at it:
```
error[E0277]: the trait bound `u32: Trait` is not satisfied
  --> $DIR/trait_objects_fail.rs:26:9
   |
LL |     foo(&10_u32);
   |         ^^^^^^^ the trait `Trait` is not implemented for `u32`
   |
help: the trait `Trait<12>` is not implemented for `u32`
      but trait `Trait<2>` is implemented for it
  --> $DIR/trait_objects_fail.rs:7:1
   |
LL | impl Trait<2> for u32 {}
   | ^^^^^^^^^^^^^^^^^^^^^
   = note: required for the cast from `&u32` to `&dyn Trait`
```

Pointing at the `impl` definition that *could* apply given a different self type is particularly useful when it has a blanket self type, as it might not be obvious and is not trivially greppable:

```
error[E0277]: the trait bound `RawImpl<_>: Raw<_>` is not satisfied
  --> $DIR/issue-62742.rs:4:5
   |
LL |     WrongImpl::foo(0i32);
   |     ^^^^^^^^^ unsatisfied trait bound
   |
help: the trait `Raw<_>` is not implemented for `RawImpl<_>`
      but trait `Raw<[_]>` is implemented for it
  --> $DIR/issue-62742.rs:29:1
   |
LL | impl<T> Raw<[T]> for RawImpl<T> {
   | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
note: required by a bound in `SafeImpl`
  --> $DIR/issue-62742.rs:33:35
   |
LL | pub struct SafeImpl<T: ?Sized, A: Raw<T>>(PhantomData<(A, T)>);
   |                                   ^^^^^^ required by this bound in `SafeImpl`
```
2025-10-31 20:38:31 +00:00
Connor Tsui
c1153b08ff
move condvar test from mutex to condvar test file
Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-10-31 15:53:39 -04:00
Connor Tsui
3d5a40809c
update nonpoison::Condvar to take guards by reference
Since non-poisoning `Condvar` take non-poisoing `Mutex`es when
`wait`ing, we do not need to take by ownership since a poison error
cannot occur while we wait.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-10-31 15:53:33 -04:00
Connor Tsui
7069400c47
revert combined nonpoison/poison tests for condvar
Setup for writing different tests for the `nonpoison::Condvar` since it
will have a different API.

Signed-off-by: Connor Tsui <connor.tsui20@gmail.com>
2025-10-31 15:31:53 -04:00
clubby789
c169ea03ab Unpin libc in compiler and rustbook 2025-10-31 19:13:45 +00:00
Philipp Krones
be5093efcb
Update Cargo.lock 2025-10-31 19:15:50 +01:00
Philipp Krones
534b81c43a
Merge commit 'c936595d17' into clippy-subtree-update 2025-10-31 19:15:42 +01:00
Philipp Krones
c936595d17
Rustup (#16000)
r? @ghost

changelog: none
2025-10-31 18:04:36 +00:00
Philipp Krones
a53104042e
Bump Clippy version -> 0.1.93 2025-10-31 18:58:42 +01:00
Philipp Krones
2b9c8f1981
Bump nightly version -> 2025-10-31 2025-10-31 18:58:33 +01:00