Commit 39ad6a9
authored
Rollup merge of rust-lang#129668 - coolreader18:fix-pin-set-regr, r=dtolnay
Fix Pin::set bounds regression
Fixes rust-lang#129601
Fixes the regression from rust-lang#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`1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1370 | 1370 | | |
1371 | 1371 | | |
1372 | 1372 | | |
| 1373 | + | |
1373 | 1374 | | |
| 1375 | + | |
| 1376 | + | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
| 1381 | + | |
1374 | 1382 | | |
1375 | 1383 | | |
1376 | 1384 | | |
| |||
1402 | 1410 | | |
1403 | 1411 | | |
1404 | 1412 | | |
1405 | | - | |
1406 | | - | |
1407 | | - | |
1408 | | - | |
| 1413 | + | |
1409 | 1414 | | |
1410 | 1415 | | |
1411 | 1416 | | |
| |||
1420 | 1425 | | |
1421 | 1426 | | |
1422 | 1427 | | |
1423 | | - | |
1424 | | - | |
1425 | | - | |
1426 | | - | |
| 1428 | + | |
1427 | 1429 | | |
1428 | 1430 | | |
1429 | 1431 | | |
| |||
1475 | 1477 | | |
1476 | 1478 | | |
1477 | 1479 | | |
1478 | | - | |
1479 | 1480 | | |
1480 | 1481 | | |
1481 | 1482 | | |
1482 | 1483 | | |
| 1484 | + | |
1483 | 1485 | | |
| 1486 | + | |
1484 | 1487 | | |
1485 | 1488 | | |
1486 | 1489 | | |
| |||
0 commit comments