Guillaume Gomez
fe5f734e6a
Rollup merge of #130526 - eholk:pin-reborrow, r=compiler-errors
...
Begin experimental support for pin reborrowing
This commit adds basic support for reborrowing `Pin` types in argument position. At the moment it only supports reborrowing `Pin<&mut T>` as `Pin<&mut T>` by inserting a call to `Pin::as_mut()`, and only in argument position (not as the receiver in a method call).
This PR makes the following example compile:
```rust
#![feature(pin_ergonomics)]
fn foo(_: Pin<&mut Foo>) {
}
fn bar(mut x: Pin<&mut Foo>) {
foo(x);
foo(x);
}
```
Previously, you would have had to write `bar` as:
```rust
fn bar(mut x: Pin<&mut Foo>) {
foo(x.as_mut());
foo(x);
}
```
Tracking:
- #130494
r? `@compiler-errors`
2024-09-20 19:46:38 +02:00
..
2024-09-16 22:09:42 -04:00
2024-08-19 11:08:51 +08:00
2024-02-16 20:02:50 +00:00
2024-07-12 03:02:58 +00:00
2024-02-16 20:02:50 +00:00
2024-08-20 18:33:25 +02:00
2024-08-10 00:54:16 +00:00
2024-08-31 15:35:42 +03:00
2024-08-17 12:43:25 -04:00
2024-07-18 08:09:01 +02:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-17 13:59:45 +01:00
2024-02-16 20:02:50 +00:00
2024-03-19 12:02:21 -04:00
2024-02-16 20:02:50 +00:00
2024-05-07 16:56:54 -04:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-04-10 13:39:53 -04:00
2024-04-10 13:39:53 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-08-20 18:33:25 +02:00
2024-04-16 20:45:07 +03:00
2024-02-16 20:02:50 +00:00
2024-03-03 18:53:35 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-05-21 19:05:37 -07:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-27 03:20:10 +00:00
2024-04-24 08:05:29 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-05-21 19:05:37 -07:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-04-24 08:05:29 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-11 11:56:47 -04:00
2024-05-20 20:16:29 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-28 22:31:13 +08:00
2024-07-28 22:31:13 +08:00
2024-07-28 22:31:13 +08:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-30 22:27:19 +02:00
2024-04-30 22:27:19 +02:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-07-04 02:02:21 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-09 15:43:08 -03:00
2024-02-09 15:43:08 -03:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-30 22:27:19 +02:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 04:28:05 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-12 20:26:34 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-04 14:19:42 -03:00
2024-06-04 14:19:42 -03:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-04-24 08:05:29 +00:00
2024-03-10 21:18:41 -04:00
2024-03-19 12:02:21 -04:00
2024-03-19 12:02:21 -04:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-05-28 20:05:01 +00:00
2024-05-28 20:48:35 +00:00
2024-09-19 16:28:19 -07:00
2024-09-19 16:28:19 -07:00
2024-09-19 16:28:19 -07:00
2024-09-19 15:40:56 -07:00
2024-09-19 15:40:56 -07:00
2024-09-18 12:36:31 -07:00
2024-09-19 15:34:00 -07:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-03-19 11:30:12 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-24 16:20:22 -05:00
2024-06-24 16:20:22 -05:00
2024-02-17 16:49:01 +01:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-06-27 15:19:08 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-01-30 21:28:18 +00:00
2024-02-16 20:02:50 +00:00
2024-07-31 12:24:26 -04:00
2024-07-31 12:24:26 -04:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00
2024-02-16 20:02:50 +00:00