From aebe2dddc266dd2b4fcfec7feed3edd1c815beb1 Mon Sep 17 00:00:00 2001 From: Taiki Endo Date: Tue, 22 Sep 2020 02:35:13 +0900 Subject: [PATCH] Update lint test --- tests/lint.rs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/tests/lint.rs b/tests/lint.rs index ec3c35da..b39d8539 100644 --- a/tests/lint.rs +++ b/tests/lint.rs @@ -61,6 +61,28 @@ pub mod box_pointers { pub p: Box, pub u: Box, } + + #[allow(box_pointers)] // for the type itself + #[pin_project(project_replace)] + #[derive(Debug)] + pub struct TupleStruct(#[pin] pub Box, pub Box); + + #[allow(box_pointers)] // for the type itself + #[pin_project( + project = EnumProj, + project_ref = EnumProjRef, + project_replace = EnumProjOwn, + )] + #[derive(Debug)] + pub enum Enum { + Struct { + #[pin] + p: Box, + u: Box, + }, + Tuple(#[pin] Box, Box), + Unit, + } } pub mod explicit_outlives_requirements {