#![cfg_attr(not(feature = "std"), no_std)]
extern crate alloc;
use alloc::boxed::Box;
use ouroboros::self_referencing;
#[cfg(test)]
mod ok_tests;
pub struct Ext<'this, T, const REV: bool>(&'this Box<T>);
#[self_referencing(pub_extras)]
pub struct WithConstParam<T: 'static, const REV: bool> {
data: core::cell::RefCell<T>,
#[borrows(data)]
#[not_covariant]
dref: Option<Box<Ext<'this, T, REV>>>,
}
#[self_referencing]
pub struct DataAndRef {
data: i32,
#[borrows(data)]
data_ref: &'this i32,
}
#[self_referencing()]
#[allow(clippy::redundant_allocation)]
pub struct Chain {
a: i32,
#[borrows(a)]
b: &'this i32,
#[borrows(b)]
c: &'this i32,
}
#[self_referencing]
pub struct DocumentationExample {
int_data: i32,
float_data: f32,
#[borrows(int_data)]
int_reference: &'this i32,
#[borrows(mut float_data)]
float_reference: &'this mut f32,
}
#[self_referencing(no_doc)]
pub struct Undocumented {
data: Box<i32>,
#[borrows(data)]
data_ref: &'this i32,
}
#[self_referencing(pub_extras)]
pub struct Visibility {
private_field: Box<i32>,
#[borrows(private_field)]
pub public_field: &'this i32,
#[borrows(private_field)]
pub(crate) pub_crate_field: &'this i32,
}