Changelog

All notable changes to this project will be documented in this file.

This project adheres to Semantic Versioning.

Unreleased

0.2.4 - 2021-01-11

0.2.3 - 2021-01-09

0.2.2 - 2021-01-09

0.2.1 - 2021-01-05

  • Exclude unneeded files from crates.io.

0.2.0 - 2020-11-13

  • pin_project! macro now supports enums.

    To use pin_project! on enums, you need to name the projection type returned from the method.

    use pin_project_lite::pin_project;
    use std::pin::Pin;
    
    pin_project! {
        #[project = EnumProj]
        enum Enum<T, U> {
            Variant { #[pin] pinned: T, unpinned: U },
        }
    }
    
    impl<T, U> Enum<T, U> {
        fn method(self: Pin<&mut Self>) {
            match self.project() {
                EnumProj::Variant { pinned, unpinned } => {
                    let _: Pin<&mut T> = pinned;
                    let _: &mut U = unpinned;
                }
            }
        }
    }
    
  • Support naming the projection types.

    By passing an attribute with the same name as the method, you can name the projection type returned from the method:

    use pin_project_lite::pin_project;
    use std::pin::Pin;
    
    pin_project! {
        #[project = StructProj]
        struct Struct<T> {
            #[pin]
            field: T,
        }
    }
    
    fn func<T>(x: Pin<&mut Struct<T>>) {
        let StructProj { field } = x.project();
        let _: Pin<&mut T> = field;
    }
    

0.1.11 - 2020-10-20

  • Suppress clippy::redundant_pub_crate lint in generated code.

  • Documentation improvements.

0.1.10 - 2020-10-01

  • Suppress drop_bounds lint, which will be added to rustc in the future. See taiki-e/pin-project#272 for more details.

0.1.9 - 2020-09-29

0.1.8 - 2020-09-26

0.1.7 - 2020-06-04

0.1.6 - 2020-05-31

0.1.5 - 2020-05-07

0.1.4 - 2020-01-20

0.1.3 - 2020-01-20

0.1.2 - 2020-01-05

0.1.1 - 2019-11-15

0.1.0 - 2019-10-22

Initial release