Matthias Krüger e413c2e770
Rollup merge of #110259 - ndrewxie:issue-109964-fix-gitstuff, r=cjgillot
Added diagnostic for pin! macro in addition to Box::pin if Unpin isn't implemented

I made a PR earlier, but accidentally renamed a branch and that deleted the PR... sorry for the duplicate

Currently, if an operation on `Pin<T>` is performed that requires `T` to implement `Unpin`, the diagnostic suggestion is to use `Box::pin` ("note: consider using `Box::pin`").

This PR suggests pin! as well, as that's another valid way of pinning a value, and avoids a heap allocation. Appropriate diagnostic suggestions were included to highlight the difference in semantics (local pinning for pin! vs non-local for Box::pin).

Fixes #109964
2023-04-13 21:58:37 +02:00
..
2023-04-03 09:24:11 +02:00
2023-04-03 09:24:07 +02:00
2023-04-03 09:24:11 +02:00
2023-04-03 15:59:21 +00:00
2023-04-11 17:45:42 +00:00
2023-04-03 09:24:11 +02:00
2023-04-07 18:07:11 +10:00
2023-04-05 01:01:45 +09:00
2023-04-03 15:59:21 +00:00
2023-04-07 09:11:53 +02:00
2023-04-03 15:59:21 +00:00
2023-04-03 15:59:21 +00:00
2023-04-03 09:24:11 +02:00
2023-03-22 15:15:41 -07:00
2023-03-29 18:04:44 -04:00
2023-04-05 15:59:29 +00:00
2023-04-10 16:08:14 +00:00