about summary refs log tree commit diff
path: root/compiler/rustc_mir_build/src/errors.rs
diff options
context:
space:
mode:
authorMatthias Krüger <matthias.krueger@famsik.de>2024-08-28 17:12:20 +0200
committerGitHub <noreply@github.com>2024-08-28 17:12:20 +0200
commit27d7fb0cfad092c528b166e221a1f4ef8e60176e (patch)
treef61091b6cf7f45ed677594fe7e51bbb66aaa77cc /compiler/rustc_mir_build/src/errors.rs
parent472c9645fbe24060f542d1a48656883db97391e8 (diff)
parent0d6c9152fa8cfaf4b430beef643565ede7de1067 (diff)
downloadrust-27d7fb0cfad092c528b166e221a1f4ef8e60176e.tar.gz
rust-27d7fb0cfad092c528b166e221a1f4ef8e60176e.zip
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`
Diffstat (limited to 'compiler/rustc_mir_build/src/errors.rs')
0 files changed, 0 insertions, 0 deletions