Skip to content

#![feature(overlapping_marker_traits)] breaks the guarantee for Unpin provided by pin-project #105

@taiki-e

Description

@taiki-e

UPDATE2(2020/01/27):

This will be fixed in rust-lang/rust#68544


UPDATE(2019/09/26):

overlapping_marker_traits is replaced with marker_trait_attr.
marker_trait_attr doesn't seem to break the guarantee (added test in #110). So, once overlapping_marker_traits is removed, close this issue.


pin-project provides an appropriate Unpin implementation by default. Since overlapping implementations are prohibited, this ensures that users cannot add inappropriate Unpin implementations.

However, currently, this guarantee can be broken by enabling #[feature(overlapping_marker_traits)]: playground

@cramertj has already pointed out this in rust-lang/rust#29864 (comment).
And it seems that it is planned to make #[feature(overlapping_marker_traits)] available only with explicitly allowed traits, but it doesn't seem to be fully implemented yet.


Thanks to @RalfJung for pointing out the interaction with this feature.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-unpinArea: Unpin and UnsafeUnpinC-upstream-bugCategory: This is a bug of compiler or dependencies (the fix may require action in the upstream)I-unsoundA soundness hole (worst kind of bug), see: https://en.wikipedia.org/wiki/Soundnessrequires-nightlyThis issue requires a nightly compiler in some way

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions