pin-project-lite
pin-project-lite copied to clipboard
A lightweight version of pin-project written with declarative macros.
In [the current implementation](https://github.com/taiki-e/pin-project-lite/blob/bd4617ce80b9338e9db9a176157f7f31a0885cb3/src/lib.rs#L156-L157), an error will occur if the field has an attribute other than `#[pin]`. ```rust pin_project! { #[derive(serde::Deserialize)] struct Struct1 { #[serde(default)] //~ ERROR pinned: Option, unpinned:...
~~NOTE: **[pin-project](https://github.com/taiki-e/pin-project) (not lite) is not affected by this issue.** see https://github.com/taiki-e/pin-project/pull/34#issuecomment-688801015 for more.~~ EDIT: see https://github.com/taiki-e/pin-project/issues/342 for pin-project (not lite) Currently, pin-project-lite uses `safe_packed_borrow` lint to check that the...
See https://github.com/taiki-e/pin-project/issues/340 for more.
Currently the following code fails to compile: ```rs pin_project_lite::pin_project! { struct S { f: [u8; N], } } ``` ``` error: no rules expected the token `[` --> tests/test.rs:16:5 |...
Workaround: https://github.com/taiki-e/pin-project-lite/issues/2#issuecomment-745190950 Currently, the following code does not be supported: generics: * [x] `?` trait bounds: done in #9 ```rust pin_project! { pub struct Maybe
pin-project-lite has some limitations and workarounds that are only described in the issue or code. It would be nice if we could provide them as part of the documentation. Issues:...
follow-up #25 > we can copy the description of #25 and pin-project's docs.
Fixes #77 The visibility that has been parsed once by caller macro and can no longer be re-parsed by us (due to rustc bug) is forced to `pub(crate)`. Note: This...
Finally tracked down the source of https://github.com/smol-rs/event-listener/issues/61. If another macro is used to call `pin_project!`, `pub` will sometimes not be properly matched by `pin_project!`, and a `pub` projection method will...
Originally discussed in https://discord.com/channels/500028886025895936/627651185406509067/869996991105626152. > Well, it's fine to accept the newtype variant as a special case, if someone can implement it in pin-project-lite. Previous work by @Michael-J-Ward: https://github.com/taiki-e/pin-project-lite/pull/63, https://github.com/taiki-e/pin-project-lite/pull/68