generativity 1.2.1

Generation of unique invariant lifetimes
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
// see cad97/generativity#13 and rust-lang/rust#78586
// if this fails in crater *please* ping me; I *want* this to not hit the lint!
#![deny(repr_transparent_external_private_fields)] // this should not trigger

use generativity::{Id, make_guard};

#[repr(transparent)]
pub struct BOption<'id, T>(Option<T>, Id<'id>); // this should work

fn main() {
    make_guard!(a);
    let _ = BOption(Some(0), a.into());
}