Taiki Endo

Results 938 comments of Taiki Endo

I'm not opposed to supporting unstable features under an explicit option. However, negative_impls breaks pin_project's soundness (#340), so I prefer not to provide features that require negative_impls to be enabled...

> I assume the restriction on not being able to implement Drop is desired though? I think this issue is purely a bug of the generics parsing. https://github.com/taiki-e/pin-project-lite/blob/ac4096c3bb574aa6be77f3c06f54509b8f707582/src/lib.rs#L1555-L1561

This is actually a discussion "is there a way to optimize when there are multiple variants of the same type?"

[ambassador](https://github.com/hobofan/ambassador) is interesting. Maybe we can support something like the following: ```rust #[delegatable_trait] pub trait Trait { // ... } #[auto_enum(delegate(Trait))] fn func() -> impl Trait { // ... }...

It seems that a warning that catches this has been implemented. ``` error: cross-crate traits with a default impl, like `Unpin`, should not be specialized --> tests/run-pass/negative_impls.rs:16:1 | 16 |...

This is a bug, but maybe a limitation of declarative macros, and I'm not sure if it can be fully fixed.

? trait bounds are supported on both generics and where clause. (#9, #22)

Workaround: This can be avoided by moving bounds to where clause and splitting it. ```diff pin_project! { - pub struct Multiple + where + T: core::fmt::Display, { field: &'a mut...

As well as https://github.com/taiki-e/pin-project-lite/issues/26, it should eventually be fixed by `unaligned_references` becoming a hard error.

How does this work if the trait implemented for tuples?