rust/library/core
Matthias Krüger 27d7fb0cfa
Rollup merge of #129668 - coolreader18:fix-pin-set-regr, r=dtolnay
Fix Pin::set bounds regression

Fixes #129601

Fixes the regression from #129449, where changing the bounds of the impl block containing `Pin::set` changed the method resolution behavior.

```rust
struct A;
impl A {
    fn set(&self) {}
}

let a: Pin<&A>;
a.set();
// before:
// - checks <impl<Ptr: DerefMut> Pin<Ptr>>::set(): `&A` doesn't impl `DerefMut`
// - autorefs -> &A: resolves to A::set()
// now:
// - checks <impl<Ptr: Deref> Pin<Ptr>>::set(): `&A` impls `Deref`! resolves to Pin::set()
// - check method bounds: `&A` doesn't impl DerefMut: error
```

r? `@dtolnay`
2024-08-28 17:12:20 +02:00
..
benches Reformat use declarations. 2024-07-29 08:26:52 +10:00
src Rollup merge of #129668 - coolreader18:fix-pin-set-regr, r=dtolnay 2024-08-28 17:12:20 +02:00
tests Remove cfg(test) from library/core 2024-08-25 20:04:26 -04:00
Cargo.toml Cleanup bootstrap check-cfg 2024-06-27 11:30:03 +02:00